diff options
1416 files changed, 27838 insertions, 7711 deletions
diff --git a/.gitignore b/.gitignore index 5bceef179b9..ace64225d0c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ + build*/ .directory .mailmap @@ -9,3 +10,7 @@ build*/ *.bak *.patch *.diff +*.REMOTE.* +*.BACKUP.* +*.BASE.* +*.LOCAL.*
\ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index dfa648867a5..49f0c31b15e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/cmake/macros/FindMySQL.cmake b/cmake/macros/FindMySQL.cmake index d42dc5caf74..036b8302c75 100644 --- a/cmake/macros/FindMySQL.cmake +++ b/cmake/macros/FindMySQL.cmake @@ -72,19 +72,20 @@ find_path(MYSQL_INCLUDE_DIR /usr/local/include /usr/local/include/mysql /usr/local/mysql/include - "C:/Program Files/MySQL/include" - "C:/Program Files/MySQL/MySQL Server 5.0/include" - "C:/Program Files/MySQL/MySQL Server 5.1/include" "C:/Program Files/MySQL/MySQL Server 5.6/include" + "C:/Program Files/MySQL/MySQL Server 5.5/include" + "C:/Program Files/MySQL/MySQL Server 5.1/include" + "C:/Program Files/MySQL/MySQL Server 5.0/include" + "C:/Program Files/MySQL/include" "C:/MySQL/include" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/include" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/include" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/include" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/include" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/include" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/include" "$ENV{ProgramFiles}/MySQL/*/include" "$ENV{SystemDrive}/MySQL/*/include" "c:/msys/local/include" @@ -115,20 +116,28 @@ if( WIN32 ) libmysql PATHS ${MYSQL_ADD_LIBRARIES_PATH} - "C:/Program Files/MySQL/lib" - "C:/Program Files/MySQL/MySQL Server 5.0/lib/opt" - "C:/Program Files/MySQL/MySQL Server 5.1/lib/opt" "C:/Program Files/MySQL/MySQL Server 5.6/lib/opt" + "C:/Program Files/MySQL/MySQL Server 5.5/lib/opt" + "C:/Program Files/MySQL/MySQL Server 5.1/lib/opt" + "C:/Program Files/MySQL/MySQL Server 5.0/lib/opt" + "C:/Program Files/MySQL/lib" "C:/MySQL/lib/debug" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib/opt" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/lib" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/lib/opt" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/lib/opt" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/lib/opt" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt" "$ENV{ProgramFiles}/MySQL/*/lib/opt" "$ENV{SystemDrive}/MySQL/*/lib/opt" "c:/msys/local/include" diff --git a/dep/CMakeLists.txt b/dep/CMakeLists.txt index f22286c305f..9c13ad59bc5 100644 --- a/dep/CMakeLists.txt +++ b/dep/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/acelite/CMakeLists.txt b/dep/acelite/CMakeLists.txt index c394d5313a9..8bf3fadbe3f 100644 --- a/dep/acelite/CMakeLists.txt +++ b/dep/acelite/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/acelite/ace/CMakeLists.txt b/dep/acelite/ace/CMakeLists.txt index 332972da061..6b5d3d84b40 100644 --- a/dep/acelite/ace/CMakeLists.txt +++ b/dep/acelite/ace/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/bzip2/CMakeLists.txt b/dep/bzip2/CMakeLists.txt index f8f5cf27b95..945e1a2f5ea 100644 --- a/dep/bzip2/CMakeLists.txt +++ b/dep/bzip2/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/g3dlite/CMakeLists.txt b/dep/g3dlite/CMakeLists.txt index 62b21fc81e0..a2446fbbffa 100644 --- a/dep/g3dlite/CMakeLists.txt +++ b/dep/g3dlite/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/g3dlite/source/g3dmath.cpp b/dep/g3dlite/source/g3dmath.cpp index 84e8345bff4..e846f8c6080 100644 --- a/dep/g3dlite/source/g3dmath.cpp +++ b/dep/g3dlite/source/g3dmath.cpp @@ -41,7 +41,7 @@ double inf() { } bool isNaN(float x) { - static const float n = nan(); + static const float n = fnan(); return memcmp(&x, &n, sizeof(float)) == 0; } diff --git a/dep/gsoap/CMakeLists.txt b/dep/gsoap/CMakeLists.txt index 387d46e07da..1eb692270fb 100644 --- a/dep/gsoap/CMakeLists.txt +++ b/dep/gsoap/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/jemalloc/CMakeLists.txt b/dep/jemalloc/CMakeLists.txt index b39f9e58301..74253127efa 100644 --- a/dep/jemalloc/CMakeLists.txt +++ b/dep/jemalloc/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/libmpq/CMakeLists.txt b/dep/libmpq/CMakeLists.txt index ef2fccdc9ba..a18d8b15d8b 100644 --- a/dep/libmpq/CMakeLists.txt +++ b/dep/libmpq/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/mysqllite/CMakeLists.txt b/dep/mysqllite/CMakeLists.txt index be943f9c002..4bd48e0dfec 100644 --- a/dep/mysqllite/CMakeLists.txt +++ b/dep/mysqllite/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (C) 2006 MySQL AB -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/zlib/CMakeLists.txt b/dep/zlib/CMakeLists.txt index 6f303b446b6..2e718667be6 100644 --- a/dep/zlib/CMakeLists.txt +++ b/dep/zlib/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql index 6296351f52f..f02ae80e472 100644 --- a/sql/base/characters_database.sql +++ b/sql/base/characters_database.sql @@ -868,6 +868,31 @@ LOCK TABLES `character_queststatus_rewarded` WRITE; UNLOCK TABLES; -- +-- Table structure for table `character_queststatus_seasonal` +-- + +DROP TABLE IF EXISTS `character_queststatus_seasonal`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `character_queststatus_seasonal` ( + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', + `quest` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier', + `event` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Event Identifier', + PRIMARY KEY (`guid`,`quest`), + KEY `idx_guid` (`guid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `character_queststatus_seasonal` +-- + +LOCK TABLES `character_queststatus_seasonal` WRITE; +/*!40000 ALTER TABLE `character_queststatus_seasonal` DISABLE KEYS */; +/*!40000 ALTER TABLE `character_queststatus_seasonal` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `character_queststatus_weekly` -- @@ -1921,6 +1946,30 @@ LOCK TABLES `lag_reports` WRITE; UNLOCK TABLES; -- +-- Table structure for table `lfg_data` +-- + +DROP TABLE IF EXISTS `lfg_data`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `lfg_data` ( + `guid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', + `dungeon` INT(10) UNSIGNED NOT NULL DEFAULT '0', + `state` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`guid`) +) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='LFG Data'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `lfg_data` +-- + +LOCK TABLES `lfg_data` WRITE; +/*!40000 ALTER TABLE `lfg_data` DISABLE KEYS */; +/*!40000 ALTER TABLE `lfg_data` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `mail` -- @@ -2198,5 +2247,3 @@ UNLOCK TABLES; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2011-04-04 21:03:41 diff --git a/sql/old/3.3.5a/2011_11_21_01_pilgrim_achievement_reward.sql b/sql/old/3.3.5a/2011_11_21_01_world_pilgrim_achievement_reward.sql index 7083107a8c2..7083107a8c2 100644 --- a/sql/old/3.3.5a/2011_11_21_01_pilgrim_achievement_reward.sql +++ b/sql/old/3.3.5a/2011_11_21_01_world_pilgrim_achievement_reward.sql diff --git a/sql/old/3.3.5a/2011_11_21_02_pilgrim_achievement_criteria_data.sql b/sql/old/3.3.5a/2011_11_21_02_world_pilgrim_achievement_criteria_data.sql index 589dbb0b2a4..589dbb0b2a4 100644 --- a/sql/old/3.3.5a/2011_11_21_02_pilgrim_achievement_criteria_data.sql +++ b/sql/old/3.3.5a/2011_11_21_02_world_pilgrim_achievement_criteria_data.sql diff --git a/sql/old/3.3.5a/2011_11_21_03_pilgrim_misc.sql b/sql/old/3.3.5a/2011_11_21_03_world_pilgrim_misc.sql index 6547fe9a53a..6547fe9a53a 100644 --- a/sql/old/3.3.5a/2011_11_21_03_pilgrim_misc.sql +++ b/sql/old/3.3.5a/2011_11_21_03_world_pilgrim_misc.sql diff --git a/sql/old/3.3.5a/2011_11_21_04_pilgrim_misc.sql b/sql/old/3.3.5a/2011_11_21_04_world_pilgrim_misc.sql index 194c084ebc5..194c084ebc5 100644 --- a/sql/old/3.3.5a/2011_11_21_04_pilgrim_misc.sql +++ b/sql/old/3.3.5a/2011_11_21_04_world_pilgrim_misc.sql diff --git a/sql/old/3.3.5a/2011_11_21_05_pilgrim_tables.sql b/sql/old/3.3.5a/2011_11_21_05_world_pilgrim_tables.sql index 18881e14eaf..18881e14eaf 100644 --- a/sql/old/3.3.5a/2011_11_21_05_pilgrim_tables.sql +++ b/sql/old/3.3.5a/2011_11_21_05_world_pilgrim_tables.sql diff --git a/sql/updates/world/2011_11_24_00_world_version.sql b/sql/old/3.3.5a/2011_11_24_00_world_version.sql index ad2396f29e1..ad2396f29e1 100644 --- a/sql/updates/world/2011_11_24_00_world_version.sql +++ b/sql/old/3.3.5a/2011_11_24_00_world_version.sql diff --git a/sql/updates/world/2011_11_25_00_world_quest_template.sql b/sql/old/3.3.5a/2011_11_25_00_world_quest_template.sql index eee92a3761b..eee92a3761b 100644 --- a/sql/updates/world/2011_11_25_00_world_quest_template.sql +++ b/sql/old/3.3.5a/2011_11_25_00_world_quest_template.sql diff --git a/sql/updates/world/2011_11_25_01_world_quest_template.sql b/sql/old/3.3.5a/2011_11_25_01_world_quest_template.sql index f7e4555f093..f7e4555f093 100644 --- a/sql/updates/world/2011_11_25_01_world_quest_template.sql +++ b/sql/old/3.3.5a/2011_11_25_01_world_quest_template.sql diff --git a/sql/updates/world/2011_11_25_02_world_creature.sql b/sql/old/3.3.5a/2011_11_25_02_world_creature.sql index 0b26187f196..0b26187f196 100644 --- a/sql/updates/world/2011_11_25_02_world_creature.sql +++ b/sql/old/3.3.5a/2011_11_25_02_world_creature.sql diff --git a/sql/updates/world/2011_11_26_00_world_quest_template.sql b/sql/old/3.3.5a/2011_11_26_00_world_quest_template.sql index 6a7834e0a76..6a7834e0a76 100644 --- a/sql/updates/world/2011_11_26_00_world_quest_template.sql +++ b/sql/old/3.3.5a/2011_11_26_00_world_quest_template.sql diff --git a/sql/updates/world/2011_11_26_01_world_quest_template.sql b/sql/old/3.3.5a/2011_11_26_01_world_quest_template.sql index 5b08d57860b..5b08d57860b 100644 --- a/sql/updates/world/2011_11_26_01_world_quest_template.sql +++ b/sql/old/3.3.5a/2011_11_26_01_world_quest_template.sql diff --git a/sql/updates/world/2011_11_26_02_world_spell_group.sql b/sql/old/3.3.5a/2011_11_26_02_world_spell_group.sql index 71ad2eaf9fb..71ad2eaf9fb 100644 --- a/sql/updates/world/2011_11_26_02_world_spell_group.sql +++ b/sql/old/3.3.5a/2011_11_26_02_world_spell_group.sql diff --git a/sql/updates/world/2011_11_26_03_world_spell_proc_event.sql b/sql/old/3.3.5a/2011_11_26_03_world_spell_proc_event.sql index 36837be8ab6..36837be8ab6 100644 --- a/sql/updates/world/2011_11_26_03_world_spell_proc_event.sql +++ b/sql/old/3.3.5a/2011_11_26_03_world_spell_proc_event.sql diff --git a/sql/updates/world/2011_11_26_04_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2011_11_26_04_world_achievement_criteria_data.sql index b037bf58349..b037bf58349 100644 --- a/sql/updates/world/2011_11_26_04_world_achievement_criteria_data.sql +++ b/sql/old/3.3.5a/2011_11_26_04_world_achievement_criteria_data.sql diff --git a/sql/updates/world/2011_11_26_04_world_disables.sql b/sql/old/3.3.5a/2011_11_26_04_world_disables.sql index 4722f248656..4722f248656 100644 --- a/sql/updates/world/2011_11_26_04_world_disables.sql +++ b/sql/old/3.3.5a/2011_11_26_04_world_disables.sql diff --git a/sql/updates/world/2011_11_26_05_world_ulduar_gameobject.sql b/sql/old/3.3.5a/2011_11_26_05_world_ulduar_gameobject.sql index 60ba0aefbeb..60ba0aefbeb 100644 --- a/sql/updates/world/2011_11_26_05_world_ulduar_gameobject.sql +++ b/sql/old/3.3.5a/2011_11_26_05_world_ulduar_gameobject.sql diff --git a/sql/updates/world/2011_11_26_06_world_sai.sql b/sql/old/3.3.5a/2011_11_26_06_world_sai.sql index 9396222e8be..9396222e8be 100644 --- a/sql/updates/world/2011_11_26_06_world_sai.sql +++ b/sql/old/3.3.5a/2011_11_26_06_world_sai.sql diff --git a/sql/updates/world/2011_11_27_00_world_creature_template.sql b/sql/old/3.3.5a/2011_11_27_00_world_creature_template.sql index f29586ea142..f29586ea142 100644 --- a/sql/updates/world/2011_11_27_00_world_creature_template.sql +++ b/sql/old/3.3.5a/2011_11_27_00_world_creature_template.sql diff --git a/sql/updates/world/2011_11_27_00_world_spell_script.sql b/sql/old/3.3.5a/2011_11_27_00_world_spell_script.sql index 5411d660c2b..5411d660c2b 100644 --- a/sql/updates/world/2011_11_27_00_world_spell_script.sql +++ b/sql/old/3.3.5a/2011_11_27_00_world_spell_script.sql diff --git a/sql/updates/world/2011_11_28_00_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2011_11_28_00_world_achievement_criteria_data.sql index 9fea807a97c..9fea807a97c 100644 --- a/sql/updates/world/2011_11_28_00_world_achievement_criteria_data.sql +++ b/sql/old/3.3.5a/2011_11_28_00_world_achievement_criteria_data.sql diff --git a/sql/updates/world/2011_11_29_00_world_spell_script.sql b/sql/old/3.3.5a/2011_11_29_00_world_spell_script.sql index ff87ebff788..ff87ebff788 100644 --- a/sql/updates/world/2011_11_29_00_world_spell_script.sql +++ b/sql/old/3.3.5a/2011_11_29_00_world_spell_script.sql diff --git a/sql/updates/world/2011_12_03_00_world_gameobject.sql b/sql/old/3.3.5a/2011_12_03_00_world_gameobject.sql index 5707ee28d12..5707ee28d12 100644 --- a/sql/updates/world/2011_12_03_00_world_gameobject.sql +++ b/sql/old/3.3.5a/2011_12_03_00_world_gameobject.sql diff --git a/sql/updates/world/2011_12_08_00_world_gossip.sql b/sql/old/3.3.5a/2011_12_08_00_world_gossip.sql index f6195d9d66e..f6195d9d66e 100644 --- a/sql/updates/world/2011_12_08_00_world_gossip.sql +++ b/sql/old/3.3.5a/2011_12_08_00_world_gossip.sql diff --git a/sql/updates/world/2011_12_08_00_world_player_factionchange_achievement.sql b/sql/old/3.3.5a/2011_12_08_00_world_player_factionchange_achievement.sql index 7a19fa2cad0..7a19fa2cad0 100644 --- a/sql/updates/world/2011_12_08_00_world_player_factionchange_achievement.sql +++ b/sql/old/3.3.5a/2011_12_08_00_world_player_factionchange_achievement.sql diff --git a/sql/updates/world/2011_12_08_01_world_creature_template_addon.sql b/sql/old/3.3.5a/2011_12_08_01_world_creature_template_addon.sql index e8a464146e0..e8a464146e0 100644 --- a/sql/updates/world/2011_12_08_01_world_creature_template_addon.sql +++ b/sql/old/3.3.5a/2011_12_08_01_world_creature_template_addon.sql diff --git a/sql/updates/world/2011_12_10_00_world_spell_proc_event.sql b/sql/old/3.3.5a/2011_12_10_00_world_spell_proc_event.sql index 957a2e76b70..957a2e76b70 100644 --- a/sql/updates/world/2011_12_10_00_world_spell_proc_event.sql +++ b/sql/old/3.3.5a/2011_12_10_00_world_spell_proc_event.sql diff --git a/sql/updates/world/2011_12_10_01_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2011_12_10_01_world_achievement_criteria_data.sql index 70e4a4fc544..70e4a4fc544 100644 --- a/sql/updates/world/2011_12_10_01_world_achievement_criteria_data.sql +++ b/sql/old/3.3.5a/2011_12_10_01_world_achievement_criteria_data.sql diff --git a/sql/updates/world/2011_12_12_00_world_spell_bonus_data.sql b/sql/old/3.3.5a/2011_12_12_00_world_spell_bonus_data.sql index cb728e70dd9..cb728e70dd9 100644 --- a/sql/updates/world/2011_12_12_00_world_spell_bonus_data.sql +++ b/sql/old/3.3.5a/2011_12_12_00_world_spell_bonus_data.sql diff --git a/sql/updates/world/2011_12_13_00_world_misc.sql b/sql/old/3.3.5a/2011_12_13_00_world_misc.sql index 13958e75761..13958e75761 100644 --- a/sql/updates/world/2011_12_13_00_world_misc.sql +++ b/sql/old/3.3.5a/2011_12_13_00_world_misc.sql diff --git a/sql/updates/world/2011_12_13_01_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2011_12_13_01_world_achievement_criteria_data.sql index 89bbfc7126d..89bbfc7126d 100644 --- a/sql/updates/world/2011_12_13_01_world_achievement_criteria_data.sql +++ b/sql/old/3.3.5a/2011_12_13_01_world_achievement_criteria_data.sql diff --git a/sql/updates/world/2011_12_13_02_creature_template_addon.sql b/sql/old/3.3.5a/2011_12_13_02_world_creature_template_addon.sql index f1dc473bdd7..f1dc473bdd7 100644 --- a/sql/updates/world/2011_12_13_02_creature_template_addon.sql +++ b/sql/old/3.3.5a/2011_12_13_02_world_creature_template_addon.sql diff --git a/sql/updates/world/2011_12_14_00_world_command.sql b/sql/old/3.3.5a/2011_12_14_00_world_command.sql index e871a82d89d..e871a82d89d 100644 --- a/sql/updates/world/2011_12_14_00_world_command.sql +++ b/sql/old/3.3.5a/2011_12_14_00_world_command.sql diff --git a/sql/updates/world/2011_12_14_01_world_gameobject_template.sql b/sql/old/3.3.5a/2011_12_14_01_world_gameobject_template.sql index 52c04703acc..52c04703acc 100644 --- a/sql/updates/world/2011_12_14_01_world_gameobject_template.sql +++ b/sql/old/3.3.5a/2011_12_14_01_world_gameobject_template.sql diff --git a/sql/updates/world/2011_12_16_00_world_creature_template.sql b/sql/old/3.3.5a/2011_12_16_00_world_creature_template.sql index 3ff9d630c54..3ff9d630c54 100644 --- a/sql/updates/world/2011_12_16_00_world_creature_template.sql +++ b/sql/old/3.3.5a/2011_12_16_00_world_creature_template.sql diff --git a/sql/updates/world/2011_12_16_00_world_spell_bonus_data.sql b/sql/old/3.3.5a/2011_12_16_00_world_spell_bonus_data.sql index 5864b9ac042..5864b9ac042 100644 --- a/sql/updates/world/2011_12_16_00_world_spell_bonus_data.sql +++ b/sql/old/3.3.5a/2011_12_16_00_world_spell_bonus_data.sql diff --git a/sql/updates/world/2011_12_17_00_world_creature.sql b/sql/old/3.3.5a/2011_12_17_00_world_creature.sql index 0126561da01..0126561da01 100644 --- a/sql/updates/world/2011_12_17_00_world_creature.sql +++ b/sql/old/3.3.5a/2011_12_17_00_world_creature.sql diff --git a/sql/updates/world/2011_12_17_00_world_gameobject.sql b/sql/old/3.3.5a/2011_12_17_00_world_gameobject.sql index 98752a1b7ec..98752a1b7ec 100644 --- a/sql/updates/world/2011_12_17_00_world_gameobject.sql +++ b/sql/old/3.3.5a/2011_12_17_00_world_gameobject.sql diff --git a/sql/updates/world/2011_12_18_00_world_creature_addon.sql b/sql/old/3.3.5a/2011_12_18_00_world_creature_addon.sql index 5df7f000b06..5df7f000b06 100644 --- a/sql/updates/world/2011_12_18_00_world_creature_addon.sql +++ b/sql/old/3.3.5a/2011_12_18_00_world_creature_addon.sql diff --git a/sql/updates/world/2011_12_18_01_world_gossip.sql b/sql/old/3.3.5a/2011_12_18_01_world_gossip.sql index eb76ffe4009..eb76ffe4009 100644 --- a/sql/updates/world/2011_12_18_01_world_gossip.sql +++ b/sql/old/3.3.5a/2011_12_18_01_world_gossip.sql diff --git a/sql/updates/world/2011_12_18_02_world_spell_script_names.sql b/sql/old/3.3.5a/2011_12_18_02_world_spell_script_names.sql index c5f9a4376df..c5f9a4376df 100644 --- a/sql/updates/world/2011_12_18_02_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2011_12_18_02_world_spell_script_names.sql diff --git a/sql/updates/world/2011_12_18_03_world_trinity_string.sql b/sql/old/3.3.5a/2011_12_18_03_world_trinity_string.sql index d26cc356cff..d26cc356cff 100644 --- a/sql/updates/world/2011_12_18_03_world_trinity_string.sql +++ b/sql/old/3.3.5a/2011_12_18_03_world_trinity_string.sql diff --git a/sql/updates/world/2011_12_18_04_world_misc.sql b/sql/old/3.3.5a/2011_12_18_04_world_misc.sql index 3404e4f285f..3404e4f285f 100644 --- a/sql/updates/world/2011_12_18_04_world_misc.sql +++ b/sql/old/3.3.5a/2011_12_18_04_world_misc.sql diff --git a/sql/updates/world/2011_12_18_05_world_misc.sql b/sql/old/3.3.5a/2011_12_18_05_world_misc.sql index b8435c4211e..b8435c4211e 100644 --- a/sql/updates/world/2011_12_18_05_world_misc.sql +++ b/sql/old/3.3.5a/2011_12_18_05_world_misc.sql diff --git a/sql/updates/world/2011_12_18_06_world_sai.sql b/sql/old/3.3.5a/2011_12_18_06_world_sai.sql index 2fce176cd0f..2fce176cd0f 100644 --- a/sql/updates/world/2011_12_18_06_world_sai.sql +++ b/sql/old/3.3.5a/2011_12_18_06_world_sai.sql diff --git a/sql/updates/world/2011_12_18_07_world_conditions.sql b/sql/old/3.3.5a/2011_12_18_07_world_conditions.sql index ef669dd2dbb..ef669dd2dbb 100644 --- a/sql/updates/world/2011_12_18_07_world_conditions.sql +++ b/sql/old/3.3.5a/2011_12_18_07_world_conditions.sql diff --git a/sql/updates/world/2011_12_19_00_world_conditions.sql b/sql/old/3.3.5a/2011_12_19_00_world_conditions.sql index a56151a9f8f..a56151a9f8f 100644 --- a/sql/updates/world/2011_12_19_00_world_conditions.sql +++ b/sql/old/3.3.5a/2011_12_19_00_world_conditions.sql diff --git a/sql/updates/world/2011_12_19_01_world_quest_template.sql b/sql/old/3.3.5a/2011_12_19_01_world_quest_template.sql index c04fdddfe97..c04fdddfe97 100644 --- a/sql/updates/world/2011_12_19_01_world_quest_template.sql +++ b/sql/old/3.3.5a/2011_12_19_01_world_quest_template.sql diff --git a/sql/updates/world/2011_12_19_02_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2011_12_19_02_world_achievement_criteria_data.sql index af7b0a9361b..af7b0a9361b 100644 --- a/sql/updates/world/2011_12_19_02_world_achievement_criteria_data.sql +++ b/sql/old/3.3.5a/2011_12_19_02_world_achievement_criteria_data.sql diff --git a/sql/updates/world/2011_12_24_00_world_misc.sql b/sql/old/3.3.5a/2011_12_24_00_world_misc.sql index 5e070d0771e..5e070d0771e 100644 --- a/sql/updates/world/2011_12_24_00_world_misc.sql +++ b/sql/old/3.3.5a/2011_12_24_00_world_misc.sql diff --git a/sql/updates/world/2011_12_24_00_world_spell_proc_event.sql b/sql/old/3.3.5a/2011_12_24_00_world_spell_proc_event.sql index f25fa4c4856..f25fa4c4856 100644 --- a/sql/updates/world/2011_12_24_00_world_spell_proc_event.sql +++ b/sql/old/3.3.5a/2011_12_24_00_world_spell_proc_event.sql diff --git a/sql/updates/world/2011_12_24_01_world_mail_loot_template.sql b/sql/old/3.3.5a/2011_12_24_01_world_mail_loot_template.sql index 2fc05e9cf17..2fc05e9cf17 100644 --- a/sql/updates/world/2011_12_24_01_world_mail_loot_template.sql +++ b/sql/old/3.3.5a/2011_12_24_01_world_mail_loot_template.sql diff --git a/sql/updates/world/2011_12_25_00_world_areatrigger_scriptnames.sql b/sql/old/3.3.5a/2011_12_25_00_world_areatrigger_scriptnames.sql index 2a16394c7fe..2a16394c7fe 100644 --- a/sql/updates/world/2011_12_25_00_world_areatrigger_scriptnames.sql +++ b/sql/old/3.3.5a/2011_12_25_00_world_areatrigger_scriptnames.sql diff --git a/sql/updates/world/2011_12_25_00_world_gameobject_scriptnames.sql b/sql/old/3.3.5a/2011_12_25_00_world_gameobject_scriptnames.sql index c545550e129..c545550e129 100644 --- a/sql/updates/world/2011_12_25_00_world_gameobject_scriptnames.sql +++ b/sql/old/3.3.5a/2011_12_25_00_world_gameobject_scriptnames.sql diff --git a/sql/updates/world/2011_12_25_00_world_misc.sql b/sql/old/3.3.5a/2011_12_25_00_world_misc.sql index 8f1d3c44ceb..8f1d3c44ceb 100644 --- a/sql/updates/world/2011_12_25_00_world_misc.sql +++ b/sql/old/3.3.5a/2011_12_25_00_world_misc.sql diff --git a/sql/updates/world/2011_12_25_00_world_sai.sql b/sql/old/3.3.5a/2011_12_25_00_world_sai.sql index d0f1572d708..d0f1572d708 100644 --- a/sql/updates/world/2011_12_25_00_world_sai.sql +++ b/sql/old/3.3.5a/2011_12_25_00_world_sai.sql diff --git a/sql/updates/world/2011_12_25_00_world_spell_script_names.sql b/sql/old/3.3.5a/2011_12_25_00_world_spell_script_names.sql index dc42056f84c..dc42056f84c 100644 --- a/sql/updates/world/2011_12_25_00_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2011_12_25_00_world_spell_script_names.sql diff --git a/sql/updates/world/2011_12_25_01_world_areatrigger_scriptnames.sql b/sql/old/3.3.5a/2011_12_25_01_world_areatrigger_scriptnames.sql index ebed9976f44..ebed9976f44 100644 --- a/sql/updates/world/2011_12_25_01_world_areatrigger_scriptnames.sql +++ b/sql/old/3.3.5a/2011_12_25_01_world_areatrigger_scriptnames.sql diff --git a/sql/updates/world/2011_12_25_01_world_misc.sql b/sql/old/3.3.5a/2011_12_25_01_world_misc.sql index 9e4d7e6c058..9e4d7e6c058 100644 --- a/sql/updates/world/2011_12_25_01_world_misc.sql +++ b/sql/old/3.3.5a/2011_12_25_01_world_misc.sql diff --git a/sql/updates/world/2011_12_25_01_world_sai.sql b/sql/old/3.3.5a/2011_12_25_01_world_sai.sql index 8ae439ffe67..8ae439ffe67 100644 --- a/sql/updates/world/2011_12_25_01_world_sai.sql +++ b/sql/old/3.3.5a/2011_12_25_01_world_sai.sql diff --git a/sql/updates/world/2011_12_25_02_world_areatrigger_scriptnames.sql b/sql/old/3.3.5a/2011_12_25_02_world_areatrigger_scriptnames.sql index 78a1fbc98c9..78a1fbc98c9 100644 --- a/sql/updates/world/2011_12_25_02_world_areatrigger_scriptnames.sql +++ b/sql/old/3.3.5a/2011_12_25_02_world_areatrigger_scriptnames.sql diff --git a/sql/updates/world/2011_12_25_02_world_misc.sql b/sql/old/3.3.5a/2011_12_25_02_world_misc.sql index ee2fd9c1964..ee2fd9c1964 100644 --- a/sql/updates/world/2011_12_25_02_world_misc.sql +++ b/sql/old/3.3.5a/2011_12_25_02_world_misc.sql diff --git a/sql/updates/world/2011_12_25_02_world_sai.sql b/sql/old/3.3.5a/2011_12_25_02_world_sai.sql index f0d69b04964..f0d69b04964 100644 --- a/sql/updates/world/2011_12_25_02_world_sai.sql +++ b/sql/old/3.3.5a/2011_12_25_02_world_sai.sql diff --git a/sql/updates/world/2011_12_25_03_world_misc.sql b/sql/old/3.3.5a/2011_12_25_03_world_misc.sql index a8967354a3d..a8967354a3d 100644 --- a/sql/updates/world/2011_12_25_03_world_misc.sql +++ b/sql/old/3.3.5a/2011_12_25_03_world_misc.sql diff --git a/sql/updates/world/2011_12_25_03_world_sai.sql b/sql/old/3.3.5a/2011_12_25_03_world_sai.sql index e53c9f72e38..e53c9f72e38 100644 --- a/sql/updates/world/2011_12_25_03_world_sai.sql +++ b/sql/old/3.3.5a/2011_12_25_03_world_sai.sql diff --git a/sql/updates/world/2011_12_26_00_world_sai.sql b/sql/old/3.3.5a/2011_12_26_00_world_sai.sql index 616ced60147..616ced60147 100644 --- a/sql/updates/world/2011_12_26_00_world_sai.sql +++ b/sql/old/3.3.5a/2011_12_26_00_world_sai.sql diff --git a/sql/updates/world/2011_12_26_01_world_sai.sql b/sql/old/3.3.5a/2011_12_26_01_world_sai.sql index 50283820dc8..50283820dc8 100644 --- a/sql/updates/world/2011_12_26_01_world_sai.sql +++ b/sql/old/3.3.5a/2011_12_26_01_world_sai.sql diff --git a/sql/updates/world/2011_12_26_02_world_sai.sql b/sql/old/3.3.5a/2011_12_26_02_world_sai.sql index 6da23e21875..6da23e21875 100644 --- a/sql/updates/world/2011_12_26_02_world_sai.sql +++ b/sql/old/3.3.5a/2011_12_26_02_world_sai.sql diff --git a/sql/updates/world/2011_12_26_03_world_sai.sql b/sql/old/3.3.5a/2011_12_26_03_world_sai.sql index 07333e50a91..07333e50a91 100644 --- a/sql/updates/world/2011_12_26_03_world_sai.sql +++ b/sql/old/3.3.5a/2011_12_26_03_world_sai.sql diff --git a/sql/updates/world/2011_12_26_04_world_sai.sql b/sql/old/3.3.5a/2011_12_26_04_world_sai.sql index c508773c51a..c508773c51a 100644 --- a/sql/updates/world/2011_12_26_04_world_sai.sql +++ b/sql/old/3.3.5a/2011_12_26_04_world_sai.sql diff --git a/sql/updates/world/2011_12_26_05_world_sai.sql b/sql/old/3.3.5a/2011_12_26_05_world_sai.sql index 0155c3ad39b..0155c3ad39b 100644 --- a/sql/updates/world/2011_12_26_05_world_sai.sql +++ b/sql/old/3.3.5a/2011_12_26_05_world_sai.sql diff --git a/sql/updates/world/2011_12_26_06_world_sai.sql b/sql/old/3.3.5a/2011_12_26_06_world_sai.sql index 6335bd9f475..6335bd9f475 100644 --- a/sql/updates/world/2011_12_26_06_world_sai.sql +++ b/sql/old/3.3.5a/2011_12_26_06_world_sai.sql diff --git a/sql/updates/world/2011_12_26_07_world_sai.sql b/sql/old/3.3.5a/2011_12_26_07_world_sai.sql index ffe55b0e5f9..ffe55b0e5f9 100644 --- a/sql/updates/world/2011_12_26_07_world_sai.sql +++ b/sql/old/3.3.5a/2011_12_26_07_world_sai.sql diff --git a/sql/updates/world/2011_12_26_08_world_sai.sql b/sql/old/3.3.5a/2011_12_26_08_world_sai.sql index 6633e97f2b4..6633e97f2b4 100644 --- a/sql/updates/world/2011_12_26_08_world_sai.sql +++ b/sql/old/3.3.5a/2011_12_26_08_world_sai.sql diff --git a/sql/old/3.3.5a/2012_01_02_00_world_sai.sql b/sql/old/3.3.5a/2012_01_02_00_world_sai.sql new file mode 100644 index 00000000000..3b9abd4c746 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_02_00_world_sai.sql @@ -0,0 +1,41 @@ +-- [Q] Plan B (11658) +SET @ENTRY_GUARD := 25342; -- Dead Caravan Guard +SET @ENTRY_WORKER := 25343; -- Dead Caravan Worker +SET @ITEM := 34842; -- Warsong Outfit +SET @GOSSIP_1 := 9155; +SET @GOSSIP_2 := 9156; +SET @QUEST := 11658; -- Plan B + +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP_1; +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP_2; +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(@GOSSIP_1, 12388), +(@GOSSIP_2, 12389); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP_1; +DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP_2; +INSERT INTO `gossip_menu_option` VALUES +(@GOSSIP_1, 0, 0, 'Retrieve Warsong Outfit.', 1, 1, 0, 0, 0, 0, ''), +(@GOSSIP_2, 0, 0, 'Retrieve Warsong Outfit.', 1, 1, 0, 0, 0, 0, ''); + +UPDATE `creature_template` SET `npcflag`=`npcflag`|1 WHERE `entry` IN (@ENTRY_GUARD, @ENTRY_WORKER); +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=25342 AND `id`=2534201; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=25343 AND `id`=2534301; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@ENTRY_GUARD, @ENTRY_WORKER); +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY_GUARD AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY_WORKER 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_GUARD, 0, 0, 1, 62, 0, 100, 0, @GOSSIP_1, 0, 0, 0, 56, @ITEM, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Dead Caravan Guard - On Gossip Select - Add Item Warsong Outfit'), +(@ENTRY_GUARD, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dead Caravan Guard - On Gossip Select - Forced Despawn'), +(@ENTRY_WORKER, 0, 0, 1, 62, 0, 100, 0, @GOSSIP_2, 0, 0, 0, 56, @ITEM, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Dead Caravan Worker - On Gossip Select - Add Item Warsong Outfit'), +(@ENTRY_WORKER, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dead Caravan Worker - On Gossip Select - Forced Despawn'); + +-- Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP_1; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP_2; +INSERT INTO `conditions` VALUES +(15, @GOSSIP_1, 0, 0, 9, @QUEST, 0, 0, 0, '', 'Only show gossip if player has quest Plan B'), +(15, @GOSSIP_2, 0, 0, 9, @QUEST, 0, 0, 0, '', 'Only show gossip if player has quest Plan B'), +(15, @GOSSIP_1, 0, 0, 2, @ITEM, 10, 0, 0, '', 'Only show gossip if player has less then 10 outfits'), +(15, @GOSSIP_2, 0, 0, 2, @ITEM, 10, 0, 0, '', 'Only show gossip if player has less then 10 outfits'); diff --git a/sql/old/3.3.5a/2012_01_02_01_world_game_event.sql b/sql/old/3.3.5a/2012_01_02_01_world_game_event.sql new file mode 100644 index 00000000000..11267a6b296 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_02_01_world_game_event.sql @@ -0,0 +1,4 @@ +-- More Darkmoon Faerie synchronization +UPDATE `game_event` SET `start_time`='2012-02-05 00:01:00' WHERE `eventEntry`=3; +UPDATE `game_event` SET `start_time`='2012-03-04 00:01:00' WHERE `eventEntry`=4; +UPDATE `game_event` SET `start_time`='2012-01-01 00:01:00' WHERE `eventEntry`=5; diff --git a/sql/old/3.3.5a/2012_01_02_02_world_creature_template.sql b/sql/old/3.3.5a/2012_01_02_02_world_creature_template.sql new file mode 100644 index 00000000000..ed95c4450fd --- /dev/null +++ b/sql/old/3.3.5a/2012_01_02_02_world_creature_template.sql @@ -0,0 +1,21 @@ +-- Kill xp exploit, mobs spawned by portal keepers don't gives xp on retail. (ie mobs 30662, 30664) +UPDATE `creature_template` SET `flags_extra`= `flags_extra`|64 WHERE `entry` IN ( +-- NORMAL +30661, -- CREATURE_AZURE_INVADER_1 +30961, -- CREATURE_AZURE_INVADER_2 +30662, -- CREATURE_AZURE_SPELLBREAKER_1 +30962, -- CREATURE_AZURE_SPELLBREAKER_2 +30663, -- CREATURE_AZURE_BINDER_1 +30918, -- CREATURE_AZURE_BINDER_2 +30664, -- CREATURE_AZURE_MAGE_SLAYER_1 +30963, -- CREATURE_AZURE_MAGE_SLAYER_2 +-- HEROIC: +31487, -- Azure Invader +31494, -- Azure Spellbreaker +31483, -- Azure Binder +31497, -- Azure Mage Slayer +31484, -- Azure Binder +31488, -- Azure Invader +31495, -- Azure Spellbreaker +31498 -- Azure Mage Slayer +); diff --git a/sql/old/3.3.5a/2012_01_02_03_world_creature_onkill_reputation.sql b/sql/old/3.3.5a/2012_01_02_03_world_creature_onkill_reputation.sql new file mode 100644 index 00000000000..282fc58dd3b --- /dev/null +++ b/sql/old/3.3.5a/2012_01_02_03_world_creature_onkill_reputation.sql @@ -0,0 +1,57 @@ +-- The Oculus hero +DELETE FROM `creature_onkill_reputation` WHERE `creature_id` IN (31558, 31561, 31560, 31559, 30901, 30902, 30903, 30904, 30905, 30906, 30907, 30908, 30909, 30910, 30911, 30912, 30913, 30914, 30991, 30915, 30916, 30879); +INSERT INTO `creature_onkill_reputation` VALUES +(31558, 1037, 1052, 7, 0, 250, 7, 0, 250, 1), +(31561, 1037, 1052, 7, 0, 250, 7, 0, 250, 1), +(31560, 1037, 1052, 7, 0, 250, 7, 0, 250, 1), +(31559, 1037, 1052, 7, 0, 250, 7, 0, 250, 1), +(30901, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30902, 1037, 1052, 7, 0, 2, 7, 0, 2, 1), +(30903, 1037, 1052, 7, 0, 30, 7, 0, 30, 1), +(30904, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30905, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30991, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30906, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30907, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30908, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30909, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30910, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30911, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30912, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30913, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30914, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30879, 1037, 1052, 7, 0, 0, 7, 0, 0, 1), +(30915, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30916, 1037, 1052, 7, 0, 15, 7, 0, 15, 1); + +-- Utgarde Pinnacle hero +DELETE FROM `creature_onkill_reputation` WHERE `creature_id` IN (30774, 30788, 30807, 30810, 30756, 30762, 30764, 30765, 30766, 30767, 30770, 30772, 30779, 30790, 30803, 30775, 30791, 30804, 30806, 30809, 30816, 30817, 30818, 30819, 30820, 30821, 30822, 30823); +INSERT INTO `creature_onkill_reputation` VALUES +(30774, 1037, 1052, 7, 0, 250, 7, 0, 250, 1), +(30788, 1037, 1052, 7, 0, 250, 7, 0, 250, 1), +(30807, 1037, 1052, 7, 0, 250, 7, 0, 250, 1), +(30810, 1037, 1052, 7, 0, 250, 7, 0, 250, 1), +(30756, 1037, 1052, 7, 0, 0, 7, 0, 0, 1), +(30762, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30764, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30765, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30766, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30767, 1037, 1052, 7, 0, 2, 7, 0, 2, 1), +(30770, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30772, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30779, 1037, 1052, 7, 0, 0, 7, 0, 0, 1), +(30790, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30803, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30775, 1037, 1052, 7, 0, 0, 7, 0, 0, 1), +(30791, 1037, 1052, 7, 0, 2, 7, 0, 2, 1), +(30804, 1037, 1052, 7, 0, 2, 7, 0, 2, 1), +(30806, 1037, 1052, 7, 0, 30, 7, 0, 30, 1), +(30809, 1037, 1052, 7, 0, 0, 7, 0, 0, 1), +(30816, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30817, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30818, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30819, 1037, 1052, 7, 0, 2, 7, 0, 2, 1), +(30820, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30821, 1037, 1052, 7, 0, 15, 7, 0, 15, 1), +(30822, 1037, 1052, 7, 0, 2, 7, 0, 2, 1), +(30823, 1037, 1052, 7, 0, 2, 7, 0, 2, 1); diff --git a/sql/old/3.3.5a/2012_01_03_00_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_03_00_world_gossip_menu.sql new file mode 100644 index 00000000000..9e9bba43b1a --- /dev/null +++ b/sql/old/3.3.5a/2012_01_03_00_world_gossip_menu.sql @@ -0,0 +1,17 @@ +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9918 AND `text_id`=13792; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9918,13792); +DELETE FROM `gossip_menu` WHERE `entry`=9859 AND `text_id`=13650; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9859,13650); +DELETE FROM `gossip_menu` WHERE `entry`=9857 AND `text_id`=13651; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9857,13651); +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=10316 WHERE `entry`=33224; +UPDATE `creature_template` SET `gossip_menu_id`=9918 WHERE `entry`=29430; +UPDATE `creature_template` SET `gossip_menu_id`=9859 WHERE `entry`=29434; +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (10316,9857,9917) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(10316,0,0, 'Glad to help, my lady. I''m told you were once the guardian of a fabled sword. Do you know where I might find it?',1,1,10315,0,0,0, ''), +(9857,0,0, 'I''m ready - lets get you out of here.',1,1,0,0,0,0, ''), +(9917,0,0, 'I am ready to head further into Storm Peaks.',1,1,0,0,0,0, ''); diff --git a/sql/old/3.3.5a/2012_01_03_01_world_quest_template.sql b/sql/old/3.3.5a/2012_01_03_01_world_quest_template.sql new file mode 100644 index 00000000000..f35ea3be65b --- /dev/null +++ b/sql/old/3.3.5a/2012_01_03_01_world_quest_template.sql @@ -0,0 +1 @@ +UPDATE `quest_template` SET `OfferRewardText`='<Getry looks you over.>$B$BThis is all Ickoris could send?' WHERE `id`=11703; diff --git a/sql/old/3.3.5a/2012_01_03_02_world_sai.sql b/sql/old/3.3.5a/2012_01_03_02_world_sai.sql new file mode 100644 index 00000000000..61ae8aab575 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_03_02_world_sai.sql @@ -0,0 +1,27 @@ +-- Add text for Lynn Hyal +DELETE FROM `creature_text` WHERE `entry`=23768; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +(23768, 1, 0, 'James? James... No, you\'re not James, but I know who you are...', 12, 0, 100, 0, 0, 0, 'Lynn Hyal'), +(23768, 2, 0, 'You\'re the one who tracked down the brutes who did this to us.', 12, 0, 100, 0, 0, 0, 'Lynn Hyal'), +(23768, 3, 0, 'I tried so hard to tell Jim... to tell anyone... who was behind this, but I couldn\'t find a way...', 12, 0, 100, 0, 0, 0, 'Lynn Hyal'), +(23768, 4, 0, 'Thank you for helping us and for helping Jim. If you see him, tell him little Jimmy and I love him and that we\'re waiting for him.', 12, 0, 100, 0, 0, 0, 'Lynn Hyal'), +(23768, 5, 0, 'I don\'t know when we\'ll see Daddy again, Jimmy, but I know he loves you and he misses you very much.', 12, 0, 100, 0, 0, 0, 'Lynn Hyal'); +-- Add text for Jimmy Hyal +DELETE FROM `creature_text` WHERE `entry`=23769; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +(23769, 1, 0, 'Mommy, when will we see Daddy again?', 12, 0, 100, 0, 0, 0, 'Jimmy Hyal'); +-- add smart ai dialog for Lynn Hyal and quest credit at end of dialog +UPDATE `creature_template` SET AIName="SmartAI" WHERE `entry`=23768; +DELETE FROM `smart_scripts` WHERE `entryorguid`=23768; +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 +(23768, 0, 0, 0, 1, 0, 100, 1, 0, 0, 0, 0, 84, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lynn Hyal - on spawn - talk 1'), +(23768, 0, 1, 0, 1, 0, 100, 1, 2000, 2000, 0, 0, 84, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lynn Hyal - after 2 sec - talk 2'), +(23768, 0, 2, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 84, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lynn Hyal - after 5 sec - talk 3'), +(23768, 0, 3, 0, 1, 0, 100, 1, 8000, 8000, 0, 0, 84, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lynn Hyal - after 8 sec - talk 4'), +(23768, 0, 4, 0, 1, 0, 100, 1, 12000, 12000, 0, 0, 84, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lynn Hyal - after 12 sec - reply to jimmy'), +(23768, 0, 5, 0, 1, 0, 100, 1, 12000, 12000, 0, 0, 33, 23768, 0, 0, 0, 0, 0, 18, 5, 0, 0, 0, 0, 0, 0, 'Lynn Hyal - after 12 sec - kill credit quest complete'); +-- add smart ai dialog for Jimmy Hyal +UPDATE `creature_template` SET AIName="SmartAI" WHERE `entry`=23769; +DELETE FROM `smart_scripts` WHERE `entryorguid`=23769; +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 +(23769, 0, 0, 0, 1, 0, 100, 1, 10000, 10000, 0, 0, 84, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Jimmy Hyal - after 10 sec - talk 1'); diff --git a/sql/old/3.3.5a/2012_01_03_03_world_creature_template.sql b/sql/old/3.3.5a/2012_01_03_03_world_creature_template.sql new file mode 100644 index 00000000000..29d0e802abe --- /dev/null +++ b/sql/old/3.3.5a/2012_01_03_03_world_creature_template.sql @@ -0,0 +1,2 @@ +-- Update faction for Frostmane Troll Whelp "From Sniff" +UPDATE `creature_template` SET `faction_A`=7,`faction_H`=7 WHERE `entry`=706; diff --git a/sql/old/3.3.5a/2012_01_03_04_world_gameobject_questrelation.sql b/sql/old/3.3.5a/2012_01_03_04_world_gameobject_questrelation.sql new file mode 100644 index 00000000000..519fa99e2d5 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_03_04_world_gameobject_questrelation.sql @@ -0,0 +1,8 @@ +DELETE FROM `gameobject_questrelation` WHERE `quest` IN (12345, 12377); +INSERT INTO `gameobject_questrelation` VALUES +(190035, 12345), +(190079, 12377); +DELETE FROM `gameobject_involvedrelation` WHERE `quest` IN (12345, 12377); +INSERT INTO `gameobject_involvedrelation` VALUES +(190035, 12345), +(190079, 12377); diff --git a/sql/old/3.3.5a/2012_01_03_05_world_creature.sql b/sql/old/3.3.5a/2012_01_03_05_world_creature.sql new file mode 100644 index 00000000000..b30ca2d5ef4 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_03_05_world_creature.sql @@ -0,0 +1,180 @@ +SET @GUID := 72707; -- need 62; +SET @NPC_WILDSPAWN_SATYR = 11451; +SET @NPC_WILDSPAWN_ROGUE := 11452; +SET @NPC_WILDSPAWN_BETRAYER := 11454; +SET @NPC_WILDSPAWN_FELSWORN := 11455; +SET @NPC_WILDSPAWN_SHADOWSTALKER := 11456; +SET @NPC_WILDSPAWN_HELLCALLER := 11457; +SET @NPC_WARPWOOD_TREANT = 11462; +SET @NPC_WARPWOOD_CRUSHER := 13021; +SET @NPC_WHIP_LASHER := 13022; +SET @NPC_PHASE_LASHER := 13196; +SET @NPC_FEL_LASH := 13197; + +-- add movement +SET @ENTRY := 56992; -- single Wildspawn Felsworn instance +UPDATE creature SET `MovementType`=2 WHERE `guid`=@ENTRY; +DELETE FROM `creature_addon` WHERE `guid`=@ENTRY; +INSERT INTO `creature_addon`(`guid`,`path_id`) VALUES +(@ENTRY,@ENTRY*10); + +-- Add waypoints to Wildspawn Felsworn instance +DELETE FROM `waypoint_data` WHERE `id`=@ENTRY*10; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@ENTRY*10,1,57.4000,-737.329,-25.1524,0,0,0,100,0), +(@ENTRY*10,2,26.45,-682.69,-24.98,0,0,0,100,0); + +-- Smart AI for Wildspawn Shadowstalker +SET @ENTRY := @NPC_WILDSPAWN_SHADOWSTALKER; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE creature SET `MovementType`=1,`spawndist`=3 WHERE `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,11,22766,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Shadowstalker - On Spawn - cast Sneak on self'), +(@ENTRY,0,1,0,0,0,100,0,4000,8000,5000,8000,11,22416,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Shadowstalker - In Combat - Cast Backstab'), +(@ENTRY,0,2,0,0,0,100,0,6000,7000,8000,9000,11,7992,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Shadowstalker - In Combat - Cast Slowing Posion'); + +-- add movement +SET @ENTRY := 56967; -- single Wildspawn Shadowstalker instance +UPDATE creature SET `MovementType`=2 WHERE `guid`=@ENTRY; +DELETE FROM `creature_addon` WHERE `guid`=@ENTRY; +INSERT INTO `creature_addon`(`guid`,`path_id`) VALUES +(@ENTRY,@ENTRY*10); + +-- Add waypoints to Wildspawn Shadowstalker instance +DELETE FROM `waypoint_data` WHERE `id`=@ENTRY*10; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@ENTRY*10,1,45.4305,-675.9378,-25.1612,0,0,0,100,0), +(@ENTRY*10,2,36.5939,-646.3212,-25.1506,0,0,0,100,0), +(@ENTRY*10,3,58.3292,-605.7308,-25.0700,0,0,0,100,0), +(@ENTRY*10,4,52.3244,-584.9519,-23.3673,0,0,0,100,0), +(@ENTRY*10,5,52.1407,-565.7738,-19.4151,0,0,0,100,0), +(@ENTRY*10,6,56.5794,-558.3062,-19.2307,0,0,0,100,0), +(@ENTRY*10,7,76.8705,-545.9866,-15.2457,0,0,0,100,0), +(@ENTRY*10,8,97.9787,-544.0214,-11.0777,0,0,0,100,0), +(@ENTRY*10,9,76.8705,-545.9866,-15.2457,0,0,0,100,0), +(@ENTRY*10,10,56.5794,-558.3062,-19.2307,0,0,0,100,0), +(@ENTRY*10,11,52.1407,-565.7738,-19.4151,0,0,0,100,0), +(@ENTRY*10,12,52.3244,-584.9519,-23.3673,0,0,0,100,0), +(@ENTRY*10,13,58.3292,-605.7308,-25.0700,0,0,0,100,0), +(@ENTRY*10,14,36.5939,-646.3212,-25.1506,0,0,0,100,0), +(@ENTRY*10,15,45.4305,-675.9378,-25.1612,0,0,0,100,0), +(@ENTRY*10,16,62.53,-681.04,-24.98,0,0,0,100,0); + +-- Spawn the mobs +DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+62; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES +(@GUID+1,@NPC_WARPWOOD_TREANT,429,1,1,0,0,72.5524,-197.561,-4.14211,3.13356,7200,0,0,7842,0,2), +(@GUID+2,@NPC_WARPWOOD_TREANT,429,1,1,0,0,20.3687,-203.068,-4.0968,3.10349,7200,0,0,7842,0,2), +(@GUID+3,@NPC_WARPWOOD_TREANT,429,1,1,0,0,30.1582,-195.841,-4.12466,3.01317,7200,0,0,7599,0,2), +(@GUID+4,@NPC_WARPWOOD_TREANT,429,1,1,0,0,25.8537,-206.521,-4.06996,3.01317,7200,0,0,7599,0,2), +(@GUID+5,@NPC_WARPWOOD_TREANT,429,1,1,0,0,-107.769,-200.032,-4.10429,0.153016,7200,0,0,7842,0,2), +(@GUID+6,@NPC_WARPWOOD_TREANT,429,1,1,0,0,-113.89,-195.466,-4.14424,0.0626954,7200,0,0,7842,0,2), +(@GUID+7,@NPC_WARPWOOD_TREANT,429,1,1,0,0,-117.388,-207.58,-4.06716,0.0476419,7200,0,0,7842,0,2), +(@GUID+8,@NPC_WARPWOOD_TREANT,429,1,1,0,0,-142.675,-350.105,-4.11237,1.70352,7200,0,0,7599,0,2), +(@GUID+9,@NPC_WARPWOOD_TREANT,429,1,1,0,0,-145.689,-356.994,-4.13712,1.66338,7200,0,0,7599,0,2), +(@GUID+10,@NPC_WARPWOOD_TREANT,429,1,1,0,0,-138.62,-360.106,-4.13313,1.66338,7200,0,0,7599,0,2), +(@GUID+11,@NPC_WARPWOOD_TREANT,429,1,1,0,0,-115.225,-347.295,-4.05097,6.26559,7200,0,0,7599,0,2), +(@GUID+12,@NPC_WARPWOOD_TREANT,429,1,1,0,0,-109.451,-350.449,-4.07628,6.28064,7200,0,0,7599,0,2), +(@GUID+13,@NPC_WARPWOOD_TREANT,429,1,1,0,0,-120.637,-353.502,-4.10136,6.26747,7200,0,0,7842,0,2), +(@GUID+14,@NPC_WARPWOOD_TREANT,429,1,1,0,0,-46.8699,-355.781,-4.11898,0.109725,7200,0,0,7599,0,2), +(@GUID+15,@NPC_WARPWOOD_TREANT,429,1,1,0,0,-57.5391,-352.691,-4.09353,0.121943,7200,0,0,7842,0,2), +(@GUID+16,@NPC_WARPWOOD_TREANT,429,1,1,0,0,-60.9243,-359.466,-4.14508,0.0617289,7200,0,0,7842,0,2), +(@GUID+17,@NPC_WARPWOOD_TREANT,429,1,1,0,0,54.2367,-348.114,-4.05781,6.25459,7200,0,0,7599,0,2), +(@GUID+18,@NPC_WARPWOOD_TREANT,429,1,1,0,0,43.279,-352.861,-4.0973,0.0633858,7200,0,0,7842,0,2), +(@GUID+19,@NPC_WARPWOOD_TREANT,429,1,1,0,0,39.8267,-343.521,-4.02135,6.18098,7200,0,0,7842,0,2), +(@GUID+20,@NPC_WARPWOOD_TREANT,429,1,1,0,0,111.859,-366.456,-4.14992,1.56459,7200,0,0,7842,0,2), +(@GUID+21,@NPC_WARPWOOD_TREANT,429,1,1,0,0,116.012,-372.374,-4.09262,1.52947,7200,0,0,7842,0,2), +(@GUID+22,@NPC_WARPWOOD_TREANT,429,1,1,0,0,107.625,-377.033,-4.07882,1.53449,7200,0,0,7842,0,2), +(@GUID+23,@NPC_WARPWOOD_CRUSHER,429,1,1,0,0,141.391,-355.109,-4.15258,3.22692,7200,0,0,16194,0,0), +(@GUID+24,@NPC_PHASE_LASHER,429,1,1,0,0,81.2447,-361.592,-4.14699,1.54781,7200,0,0,15684,0,0), +(@GUID+25,@NPC_WHIP_LASHER,429,1,1,0,0,34.9898,-347.58,-4.05484,0.017372,7200,0,0,1900,0,0), +(@GUID+26,@NPC_WHIP_LASHER,429,1,1,0,0,36.7793,-352.448,-4.09411,0.00231851,7200,0,0,1900,0,0), +(@GUID+27,@NPC_WHIP_LASHER,429,1,1,0,0,41.2793,-352.437,-4.09411,0.00231851,7200,0,0,1900,0,0), +(@GUID+28,@NPC_WHIP_LASHER,429,1,1,0,0,44.3212,-352.43,-4.09411,0.00231851,7200,0,0,1900,0,0), +(@GUID+29,@NPC_WHIP_LASHER,429,1,1,0,0,44.315,-349.742,-4.07234,0.0588672,7200,0,0,1900,0,0), +(@GUID+30,@NPC_WHIP_LASHER,429,1,1,0,0,39.4515,-350.029,-4.0749,0.063885,7200,0,0,1900,0,0), +(@GUID+31,@NPC_WHIP_LASHER,429,1,1,0,0,39.2745,-347.262,-4.05348,0.063885,7200,0,0,1900,0,0), +(@GUID+32,@NPC_WARPWOOD_CRUSHER,429,1,1,0,0,-20.953,-371.52,-4.05577,1.58638,7200,0,0,16194,0,0), +(@GUID+33,@NPC_PHASE_LASHER,429,1,1,0,0,-52.0524,-361.703,-4.14598,1.7679,7200,0,0,15684,0,0), +(@GUID+34,@NPC_WHIP_LASHER,429,1,1,0,0,-62.1186,-349.8,-4.07015,6.09414,7200,0,0,1900,0,0), +(@GUID+35,@NPC_WHIP_LASHER,429,1,1,0,0,-69.5873,-354.282,-4.1069,6.17944,7200,0,0,1900,0,0), +(@GUID+36,@NPC_WHIP_LASHER,429,1,1,0,0,-66.7331,-351.805,-4.08577,6.18948,7200,0,0,1900,0,0), +(@GUID+37,@NPC_WHIP_LASHER,429,1,1,0,0,-73.9811,-351.124,-4.08116,6.18948,7200,0,0,1900,0,0), +(@GUID+38,@NPC_WHIP_LASHER,429,1,1,0,0,-69.8854,-349.117,-4.06468,6.2798,7200,0,0,1900,0,0), +(@GUID+39,@NPC_WHIP_LASHER,429,1,1,0,0,-65.6902,-346.108,-4.0402,6.2798,7200,0,0,1900,0,0), +(@GUID+40,@NPC_WARPWOOD_CRUSHER,429,1,1,0,0,-73.7821,-346.08,-4.0402,6.2798,7200,0,0,1900,0,0), +(@GUID+41,@NPC_WARPWOOD_TREANT,429,1,1,0,0,-93.8011,-363.618,-4.14738,1.65316,7200,0,0,16194,0,0), +(@GUID+42,@NPC_PHASE_LASHER,429,1,1,0,0,-131.311,-365.627,-4.15058,1.51265,7200,0,0,15198,0,0), +(@GUID+43,@NPC_WHIP_LASHER,429,1,1,0,0,-143.839,-340.391,-4.12014,1.83881,7200,0,0,1900,0,0), +(@GUID+44,@NPC_WHIP_LASHER,429,1,1,0,0,-142.296,-336.529,-4.10736,1.85386,7200,0,0,1900,0,0), +(@GUID+45,@NPC_WHIP_LASHER,429,1,1,0,0,-138.49,-341.197,-4.07808,1.73845,7200,0,0,1900,0,0), +(@GUID+46,@NPC_WHIP_LASHER,429,1,1,0,0,-134.462,-337.194,-4.04726,1.70944,7200,0,0,1900,0,0), +(@GUID+47,@NPC_WHIP_LASHER,429,1,1,0,0,-135.424,-330.303,-4.0528,1.70944,7200,0,0,1900,0,0), +(@GUID+48,@NPC_WHIP_LASHER,429,1,1,0,0,-142.163,-331.244,-4.1045,1.71445,7200,0,0,1900,0,0), +(@GUID+49,@NPC_WHIP_LASHER,429,1,1,0,0,-138.62,-333.245,-4.07944,1.71947,7200,0,0,1900,0,0), +(@GUID+50,@NPC_WARPWOOD_CRUSHER,429,1,1,0,0,-138.38,-275.724,-4.07674,3.17049,7200,0,0,16194,0,0), +(@GUID+51,@NPC_PHASE_LASHER,429,1,1,0,0,-162.835,-275.863,-4.14791,6.27238,7200,0,0,15684,0,0), +(@GUID+52,@NPC_WHIP_LASHER,429,1,1,0,0,-158.318,-204.325,-4.15232,0.0694766,7200,0,0,1900,0,0), +(@GUID+53,@NPC_WHIP_LASHER,429,1,1,0,0,-154.646,-204.07,-4.15232,0.0694766,7200,0,0,1900,0,0), +(@GUID+54,@NPC_WHIP_LASHER,429,1,1,0,0,-153.089,-196.695,-4.15243,0.0343519,7200,0,0,1900,0,0), +(@GUID+55,@NPC_WHIP_LASHER,429,1,1,0,0,-160.393,-196.946,-4.15243,0.0343519,7200,0,0,1900,0,0), +(@GUID+56,@NPC_WHIP_LASHER,429,1,1,0,0,-162.052,-201.486,-4.15243,0.0393697,7200,0,0,1900,0,0), +(@GUID+57,@NPC_WHIP_LASHER,429,1,1,0,0,-152.686,-201.117,-4.15243,0.0393697,7200,0,0,1900,0,0), +(@GUID+58,@NPC_WHIP_LASHER,429,1,1,0,0,-156.996,-199.83,-4.15243,0.059441,7200,0,0,1900,0,0), +(@GUID+59,@NPC_PHASE_LASHER,429,1,1,0,0,-86.8965,-210.681,-4.03141,1.56479,7200,0,0,15198,0,0), +(@GUID+60,@NPC_WARPWOOD_CRUSHER,429,1,1,0,0,-87.0174,-180.571,-2.71439,4.76202,7200,0,0,16194,0,0), +(@GUID+61,@NPC_PHASE_LASHER,429,1,1,0,0,-27.3846,-207.58,-4.06107,0.888256,7200,0,0,15684,0,0), +(@GUID+62,@NPC_WARPWOOD_CRUSHER,429,1,1,0,0,-15.3937,-177.684,-2.71439,4.81219,7200,0,0,16194,0,0); + +-- Add movement to some mobs +DELETE FROM `creature_addon` WHERE `guid` BETWEEN @GUID+1 AND @GUID+22; +INSERT INTO `creature_addon` (`guid`,`path_id`) VALUES +(@GUID+1,(@GUID+1)*10), +(@GUID+2,(@GUID+2)*10), +(@GUID+3,(@GUID+2)*10), +(@GUID+4,(@GUID+2)*10), +(@GUID+5,(@GUID+6)*10), +(@GUID+6,(@GUID+6)*10), +(@GUID+7,(@GUID+6)*10), +(@GUID+8,(@GUID+8)*10), +(@GUID+9,(@GUID+8)*10), +(@GUID+10,(@GUID+8)*10), +(@GUID+11,(@GUID+11)*10), +(@GUID+12,(@GUID+11)*10), +(@GUID+13,(@GUID+11)*10), +(@GUID+14,(@GUID+14)*10), +(@GUID+15,(@GUID+14)*10), +(@GUID+16,(@GUID+14)*10), +(@GUID+17,(@GUID+17)*10), +(@GUID+18,(@GUID+17)*10), +(@GUID+19,(@GUID+17)*10), +(@GUID+20,(@GUID+20)*10), +(@GUID+21,(@GUID+20)*10), +(@GUID+22,(@GUID+20)*10); + +-- Add waypoints to mobs +DELETE FROM `waypoint_data` WHERE `id` = (@GUID+1)*10; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +((@GUID+1)*10,1,70.6901,-197.173,-4.14434,0,1,0,100,0), +((@GUID+1)*10,2,-104.169,-199.817,-4.12389,0,1,0,100,0), +((@GUID+2)*10,1,-73.5443,-202.239,-4.10251,0,1,0,100,0), +((@GUID+2)*10,2,35.4205,-201.467,-4.11061,0,1,0,100,0), +((@GUID+6)*10,1,-20.2122,-201.982,-4.11082,0,1,0,100,0), +((@GUID+6)*10,2,-130.665,-201.733,-4.10813,0,1,0,100,0), +((@GUID+8)*10,1,-166.248,-199.501,-4.15228,0,1,0,100,0), +((@GUID+8)*10,2,-131.595,-354.127,-4.10839,0,1,0,100,0), +((@GUID+11)*10,1,-35.5988,-348.525,-4.06037,0,1,0,100,0), +((@GUID+11)*10,2,-21.0353,-356.517,-4.12553,0,1,0,100,0), +((@GUID+11)*10,3,4.10672,-354.436,-4.11233,0,1,0,100,0), +((@GUID+11)*10,4,-62.8668,-351.204,-4.083,0,1,0,100,0), +((@GUID+11)*10,5,-113.908,-346.958,-4.04887,0,1,0,100,0), +((@GUID+14)*10,1,49.0152,-351.975,-4.09131,0,1,0,100,0), +((@GUID+14)*10,2,-68.801,-355.361,-4.11568,0,1,0,100,0), +((@GUID+17)*10,1,140.938,-354.573,-4.15133,0,1,0,100,0), +((@GUID+17)*10,2, -17.9066,-352.038,-4.09042,0,1,0,100,0), +((@GUID+20)*10,1,134.04,-337.362,-4.14977,0,1,0,100,0), +((@GUID+20)*10,2,117.337,-367.835,-4.15199,0,1,0,100,0), +((@GUID+20)*10,3,68.2814,-346.911,-4.04935,0,1,0,100,0), +((@GUID+20)*10,4,111.089,-364.118,-4.14948,0,1,0,100,0); diff --git a/sql/old/3.3.5a/2012_01_03_06_world_sai.sql b/sql/old/3.3.5a/2012_01_03_06_world_sai.sql new file mode 100644 index 00000000000..858dc3f498d --- /dev/null +++ b/sql/old/3.3.5a/2012_01_03_06_world_sai.sql @@ -0,0 +1,82 @@ +SET @NPC_WILDSPAWN_SATYR = 11451; +SET @NPC_WILDSPAWN_ROGUE := 11452; +SET @NPC_WILDSPAWN_BETRAYER := 11454; +SET @NPC_WILDSPAWN_FELSWORN := 11455; +SET @NPC_WILDSPAWN_SHADOWSTALKER := 11456; +SET @NPC_WILDSPAWN_HELLCALLER := 11457; +SET @NPC_WARPWOOD_TREANT = 11462; +SET @NPC_WARPWOOD_CRUSHER := 13021; +SET @NPC_WHIP_LASHER := 13022; +SET @NPC_PHASE_LASHER := 13196; +SET @NPC_FEL_LASH := 13197; + +-- SmartAI for Wildspawn Hellcaller +SET @ENTRY := @NPC_WILDSPAWN_HELLCALLER; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE creature SET `MovementType`=1,`spawndist`=3 WHERE `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller - On Aggro - Prevent Combat Movement'), +(@ENTRY,0,1,2,4,0,100,0,0,0,0,0,11,15228,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Hellcaller - On Aggro - Cast Fireball '), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller - On Aggro - Set Phase 1'), +(@ENTRY,0,3,0,9,1,100,0,0,40,2400,3800,11,15228,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Hellcaller - Phase 1 - Cast Fireball'), +(@ENTRY,0,4,5,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller -In Phase 1 - Start Combat Movement'), +(@ENTRY,0,5,0,61,1,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller - Mana at 15% (Phase 1) - Set Phase 2'), +(@ENTRY,0,6,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,'Wildspawn Hellcaller - At 35 Yards (Phase 1) - Start Combat Movement'), +(@ENTRY,0,7,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller - at 15 Yards (Phase 1) - Prevent Combat Movement '), +(@ENTRY,0,8,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller - Below 5 Yards (Phase 1) - Start Combat Movement'), +(@ENTRY,0,9,0,3,2,100,0,0,30,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller - Mana is above 30% (Phase 2) - Set Phase 1'), +(@ENTRY,0,10,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'Wildspawn Hellcaller - Set Phase 1 when Mana is above 30% (Phase 2)'), +(@ENTRY,0,11,0,0,0,100,0,8000,14000,18000,25000,11,20754,3,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Hellcaller - In Combat - Cast Rain of Fire'), +(@ENTRY,0,12,0,2,0,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller - At 15% HP - Start Combat Movement'), +(@ENTRY,0,13,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Betrayer - At 15% HP - Flee'), +(@ENTRY,0,14,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - On Evade - Set Phase to 0'); + +-- SmartAI for Wildspawn Felsworn +SET @ENTRY := @NPC_WILDSPAWN_FELSWORN; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE creature SET `MovementType`=1,`spawndist`=3 WHERE `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,1,1000,1000,1800000,1800000,11,12542,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - Cast Chaotic Focus'), +(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - On Aggro - Prevent Combat Movement'), +(@ENTRY,0,2,3,4,0,100,0,0,0,0,0,11,15537,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Felsworn - On Aggro - Cast Shadow Bolt'), +(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - On Aggro - Set Phase 1'), +(@ENTRY,0,4,0,9,1,100,0,0,40,2400,3800,11,15537,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Felsworn - Phase 1 - Cast Shadow Bolt'), +(@ENTRY,0,5,6,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn -In Phase 1 - Start Combat Movement'), +(@ENTRY,0,6,0,61,1,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - Mana at 15% (Phase 1) - Set Phase 2'), +(@ENTRY,0,7,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,'Wildspawn Felsworn - At 35 Yards (Phase 1) - Start Combat Movement'), +(@ENTRY,0,8,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - at 15 Yards (Phase 1) - Prevent Combat Movement '), +(@ENTRY,0,9,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - Below 5 Yards (Phase 1) - Start Combat Movement'), +(@ENTRY,0,10,0,3,2,100,0,0,30,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - Mana is above 30% (Phase 2) - Set Phase 1'), +(@ENTRY,0,11,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'Wildspawn Felsworn - Set Phase 1 when Mana is above 30% (Phase 2)'), +(@ENTRY,0,12,0,0,0,100,0,7000,12000,38000,45000,11,22417,1,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - In Phase 1 - Cast Shadow Shield'), +(@ENTRY,0,13,0,0,1,100,0,11000,17000,23000,30000,11,15654,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Felsworn - In Phase 1 - Cast Shadow Word: Pain'), +(@ENTRY,0,14,0,0,0,100,0,6000,10000,10000,15000,11,12542,1,0,0,0,0,5,0,0,0,0,0,0,0,'Wildspawn Felsworn - In Combat - Cast Fear (on random target)'), +(@ENTRY,0,15,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - On Evade - Set Phase to 0'); + +-- add movement +SET @ENTRY := 56992; -- single Wildspawn Felsworn instance +UPDATE creature SET `MovementType`=2 WHERE `guid`=@ENTRY; +DELETE FROM `creature_addon` WHERE `guid`=@ENTRY; +INSERT INTO `creature_addon`(`guid`,`path_id`) VALUES +(@ENTRY,@ENTRY*10); + +-- Add waypoints to Wildspawn Felsworn instance +DELETE FROM `waypoint_data` WHERE `id`=@ENTRY*10; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@ENTRY*10,1,57.4000,-737.329,-25.1524,0,0,0,100,0), +(@ENTRY*10,2,26.45,-682.69,-24.98,0,0,0,100,0); + +-- Smart AI for Wildspawn Shadowstalker +SET @ENTRY := @NPC_WILDSPAWN_SHADOWSTALKER; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE creature SET `MovementType`=1,`spawndist`=3 WHERE `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,11,22766,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Shadowstalker - On Spawn - cast Sneak on self'), +(@ENTRY,0,1,0,0,0,100,0,4000,8000,5000,8000,11,22416,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Shadowstalker - In Combat - Cast Backstab'), +(@ENTRY,0,2,0,0,0,100,0,6000,7000,8000,9000,11,7992,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Shadowstalker - In Combat - Cast Slowing Posion'); diff --git a/sql/old/3.3.5a/2012_01_03_07_world_creature.sql b/sql/old/3.3.5a/2012_01_03_07_world_creature.sql new file mode 100644 index 00000000000..5098901b564 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_03_07_world_creature.sql @@ -0,0 +1,46 @@ +-- Spawn & Pathing for Horace Alder Entry: 27704 "Not Spawned" +SET @NPC := 1846; +DELETE FROM `creature` WHERE `guid` IN (@NPC); +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES +(@NPC,27704,1,1,1,0,0,-3738.565,-4442.265,56.23981,0.41887,300,0,0,1,0,2); +SET @PATH := @NPC * 10; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-3740.015,-4437.762,56.23981,0,0,0,0,100,0), +(@PATH,2,-3742.823,-4433.892,56.23981,0,0,0,0,100,0), +(@PATH,3,-3746.757,-4431.049,56.23981,0,0,0,0,100,0), +(@PATH,4,-3751.263,-4429.58,56.23981,0,0,0,0,100,0), +(@PATH,5,-3756.035,-4429.627,56.23981,0,0,0,0,100,0), +(@PATH,6,-3760.625,-4431.113,56.23981,0,0,0,0,100,0), +(@PATH,7,-3764.42,-4433.888,56.22611,0,0,0,0,100,0), +(@PATH,8,-3767.252,-4437.716,56.23981,0,0,0,0,100,0), +(@PATH,9,-3768.719,-4442.307,56.23982,0,0,0,0,100,0), +(@PATH,10,-3768.664,-4447.081,56.22474,0,0,0,0,100,0), +(@PATH,11,-3767.221,-4451.627,56.23982,0,0,0,0,100,0), +(@PATH,12,-3764.422,-4455.48,56.23981,0,0,0,0,100,0), +(@PATH,13,-3767.221,-4451.627,56.23982,0,0,0,0,100,0), +(@PATH,14,-3768.664,-4447.081,56.22474,0,0,0,0,100,0), +(@PATH,15,-3768.719,-4442.307,56.23982,0,0,0,0,100,0), +(@PATH,16,-3767.255,-4437.724,56.20177,0,0,0,0,100,0), +(@PATH,17,-3764.42,-4433.888,56.22611,0,0,0,0,100,0), +(@PATH,18,-3760.625,-4431.113,56.23981,0,0,0,0,100,0), +(@PATH,19,-3756.035,-4429.627,56.23981,0,0,0,0,100,0), +(@PATH,20,-3751.263,-4429.58,56.23981,0,0,0,0,100,0), +(@PATH,21,-3746.757,-4431.049,56.23981,0,0,0,0,100,0), +(@PATH,22,-3742.823,-4433.892,56.23981,0,0,0,0,100,0), +(@PATH,23,-3740.015,-4437.762,56.23981,0,0,0,0,100,0), +(@PATH,24,-3738.565,-4442.265,56.23981,0,0,0,0,100,0), +(@PATH,25,-3738.577,-4447.063,56.23981,0,0,0,0,100,0), +(@PATH,26,-3740.03,-4451.584,56.23981,0,0,0,0,100,0), +(@PATH,27,-3742.872,-4455.448,56.23981,0,0,0,0,100,0), +(@PATH,28,-3746.699,-4458.252,56.23982,0,0,0,0,100,0), +(@PATH,29,-3751.217,-4459.749,56.26265,0,0,0,0,100,0), +(@PATH,30,-3756.021,-4459.732,56.23981,0,0,0,0,100,0), +(@PATH,31,-3751.217,-4459.749,56.26265,0,0,0,0,100,0), +(@PATH,32,-3746.699,-4458.252,56.23982,0,0,0,0,100,0), +(@PATH,33,-3742.872,-4455.448,56.23981,0,0,0,0,100,0), +(@PATH,34,-3740.03,-4451.584,56.23981,0,0,0,0,100,0), +(@PATH,35,-3738.577,-4447.063,56.23981,0,0,0,0,100,0), +(@PATH,36,-3738.565,-4442.265,56.23981,0,0,0,0,100,0); diff --git a/sql/old/3.3.5a/2012_01_04_00_characters_character_queststatus_seasonal.sql b/sql/old/3.3.5a/2012_01_04_00_characters_character_queststatus_seasonal.sql new file mode 100644 index 00000000000..f9ae71b65a7 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_00_characters_character_queststatus_seasonal.sql @@ -0,0 +1,8 @@ +DROP TABLE IF EXISTS `character_queststatus_seasonal`; +CREATE TABLE `character_queststatus_seasonal` ( + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', + `quest` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier', + `event` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Event Identifier', + PRIMARY KEY (`guid`,`quest`), + KEY `idx_guid` (`guid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; diff --git a/sql/old/3.3.5a/2012_01_04_00_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_04_00_world_gossip_menu.sql new file mode 100644 index 00000000000..cf11ba74eb2 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_00_world_gossip_menu.sql @@ -0,0 +1,70 @@ +-- Update npc_text from sniff +UPDATE `npc_text` SET `prob0`=1,`text0_0`='I wandered for the rest of my natural life in search of knowledge, seeing more wonder and meeting more strange and mysterious races than any of my people before me. I travelled across the length and breadth of ancient Kalimdor until there was no more to see, no new lands across the horizon.$B$BYet... there was still so much I did not know as I felt my final journey approaching and I wept for the things I would never know.$B$BAs I fell, my life at an end, that is when they found me.',`WDBVerified`=14545 WHERE `ID`=14121; +UPDATE `npc_text` SET `prob0`=1,`text0_0`='The bronze dragonflight. They snatched me from the brink of death and took me before their master, Nozdormu. He said they had been watching me and wanted me to continue my hunt. He granted me immortality as a watcher, tasked to bear witness to the history of Azeroth as one of his agents.$B$BI am Xarantaur the Witness, and it is my duty to preserve the true history of Azeroth lest it be forgotten.',`WDBVerified`=14545 WHERE `ID`=14122; + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=10217 AND `text_id`=14204; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10217,14204); +DELETE FROM `gossip_menu` WHERE `entry`=10174 AND `text_id`=14118; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10174,14118); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=10217 WHERE `entry`=30824; +UPDATE `creature_template` SET `gossip_menu_id`=10038 WHERE `entry`=31261; +UPDATE `creature_template` SET `gossip_menu_id`=10174 WHERE `entry`=30825; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (10026,10174) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(10026,0,0, 'Take me to the ship.',1,1,0,0,0,0, ''), +(10174,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9806 AND `text_id`=13525; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9806,13525); +DELETE FROM `gossip_menu` WHERE `entry`=9807 AND `text_id`=13526; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9807,13526); +DELETE FROM `gossip_menu` WHERE `entry`=9808 AND `text_id`=13527; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9808,13527); +DELETE FROM `gossip_menu` WHERE `entry`=9809 AND `text_id`=13528; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9809,13528); +DELETE FROM `gossip_menu` WHERE `entry`=9810 AND `text_id`=13529; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9810,13529); +DELETE FROM `gossip_menu` WHERE `entry`=9811 AND `text_id`=13530; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9811,13530); +DELETE FROM `gossip_menu` WHERE `entry`=9812 AND `text_id`=13531; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9812,13531); +DELETE FROM `gossip_menu` WHERE `entry`=9813 AND `text_id`=13534; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9813,13534); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9806 WHERE `entry`=29344; +UPDATE `creature_template` SET `gossip_menu_id`=9813 WHERE `entry`=29396; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9806,9807,9808,9809,9810,9811,9812) AND `id` IN (0); +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9808,9809,9810,9811,9812) AND `id` IN (1); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(9806,0,0, 'Lord-Commander, I would hear your tale.',1,1,9807,0,0,0, ''), +(9807,0,0, '<You nod slightly but do not complete the motion as the lord-commander narrows his eyes before he continues.>',1,1,9808,0,0,0, ''), +(9808,0,0, 'I thought that they now called themselves the Scarlet Onslaught?',1,1,9809,0,0,0, ''), +(9808,1,0, 'Lord-Commander, would you repeat what you said before?',1,1,9807,0,0,0, ''), +(9809,0,0, 'Where did the grand admiral go?',1,1,9810,0,0,0, ''), +(9809,1,0, 'Lord-Commander, would you repeat what you said before?',1,1,9808,0,0,0, ''), +(9810,0,0, 'That''s fine. When do I start?',1,1,9811,0,0,0, ''), +(9810,1,0, 'Lord-Commander, would you repeat what you said before?',1,1,9809,0,0,0, ''), +(9811,0,0, 'Let''s finish this!',1,1,9812,0,0,0, ''), +(9811,1,0, 'Lord-Commander, would you repeat what you said before?',1,1,9810,0,0,0, ''), +(9812,0,0, 'That''s quite a tale, lord-commander.',1,1,0,0,0,0, ''), +(9812,1,0, 'Lord-Commander, would you repeat what you said before?',1,1,9811,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9168 AND `text_id`=12427; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9168,12427); +DELETE FROM `gossip_menu` WHERE `entry`=9184 AND `text_id`=12472; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9184,12472); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9168 WHERE `entry`=25504; +UPDATE `creature_template` SET `gossip_menu_id`=9184 WHERE `entry`=25379; +UPDATE `creature_template` SET `gossip_menu_id`=348 WHERE `entry`=25278; diff --git a/sql/old/3.3.5a/2012_01_04_01_world_game_event_seasonal_questrelation.sql b/sql/old/3.3.5a/2012_01_04_01_world_game_event_seasonal_questrelation.sql new file mode 100644 index 00000000000..9746a358e8a --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_01_world_game_event_seasonal_questrelation.sql @@ -0,0 +1,386 @@ +DROP TABLE IF EXISTS `game_event_seasonal_questrelation`; +CREATE TABLE `game_event_seasonal_questrelation` ( + `quest` mediumint(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', + `event` mediumint(10) NOT NULL DEFAULT '0' COMMENT 'Quest Identifier', + PRIMARY KEY (`quest`,`event`), + KEY `idx_quest` (`quest`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; + +INSERT INTO `game_event_seasonal_questrelation` (`quest`,`event`) VALUES + (1657, 12), + (1658, 12), + (6961, 2), + (6962, 2), + (6963, 2), + (6964, 2), + (6983, 3), + (6984, 3), + (7021, 2), + (7022, 2), + (7023, 2), + (7024, 2), + (7025, 2), + (7042, 2), + (7043, 2), + (7045, 2), + (7061, 2), + (7062, 2), + (7063, 2), + (8149, 11), + (8150, 11), + (8311, 12), + (8312, 12), + (8322, 12), + (8353, 12), + (8354, 12), + (8355, 12), + (8356, 12), + (8357, 12), + (8358, 12), + (8359, 12), + (8360, 12), + (8373, 12), + (8409, 12), + (8744, 52), + (8746, 2), + (8762, 2), + (8763, 2), + (8767, 52), + (8768, 52), + (8769, 52), + (8788, 52), + (8799, 2), + (8803, 52), + (8827, 2), + (8828, 2), + (8860, 6), + (8861, 6), + (8868, 7), + (8897, 8), + (8898, 8), + (8899, 8), + (8900, 8), + (8901, 8), + (8902, 8), + (8903, 8), + (8904, 8), + (8971, -1), + (8972, -1), + (8973, -1), + (8974, -1), + (8975, -1), + (8976, -1), + (8979, 8), + (8980, 8), + (8981, 8), + (8982, 8), + (8983, 8), + (8984, 8), + (8993, 8), + (9024, 8), + (9025, 8), + (9026, 8), + (9027, 8), + (9028, 8), + (11131, 12), + (11135, 12), + (11219, 12), + (11220, 12), + (11242, 12), + (11356, 12), + (11357, 12), + (11360, 12), + (11361, 12), + (11392, 12), + (11401, 12), + (11403, 12), + (11404, 12), + (11405, 12), + (11435, 12), + (11439, 12), + (11440, 12), + (11449, 12), + (11450, 12), + (11528, 52), + (11558, 8), + (11580, 1), + (11581, 1), + (11583, 1), + (11584, 1), + (11696, 1), + (11732, 1), + (11734, 1), + (11735, 1), + (11736, 1), + (11737, 1), + (11738, 1), + (11739, 1), + (11740, 1), + (11741, 1), + (11742, 1), + (11743, 1), + (11744, 1), + (11745, 1), + (11746, 1), + (11747, 1), + (11748, 1), + (11749, 1), + (11750, 1), + (11751, 1), + (11752, 1), + (11753, 1), + (11754, 1), + (11755, 1), + (11756, 1), + (11757, 1), + (11758, 1), + (11759, 1), + (11760, 1), + (11761, 1), + (11762, 1), + (11763, 1), + (11764, 1), + (11765, 1), + (11766, 1), + (11767, 1), + (11768, 1), + (11769, 1), + (11770, 1), + (11771, 1), + (11772, 1), + (11773, 1), + (11774, 1), + (11775, 1), + (11776, 1), + (11777, 1), + (11778, 1), + (11779, 1), + (11780, 1), + (11781, 1), + (11782, 1), + (11783, 1), + (11784, 1), + (11785, 1), + (11786, 1), + (11787, 1), + (11799, 1), + (11800, 1), + (11801, 1), + (11802, 1), + (11803, 1), + (11804, 1), + (11805, 1), + (11806, 1), + (11807, 1), + (11808, 1), + (11809, 1), + (11810, 1), + (11811, 1), + (11812, 1), + (11813, 1), + (11814, 1), + (11815, 1), + (11816, 1), + (11817, 1), + (11818, 1), + (11819, 1), + (11820, 1), + (11821, 1), + (11822, 1), + (11823, 1), + (11824, 1), + (11825, 1), + (11826, 1), + (11827, 1), + (11828, 1), + (11829, 1), + (11830, 1), + (11831, 1), + (11832, 1), + (11833, 1), + (11834, 1), + (11835, 1), + (11836, 1), + (11837, 1), + (11838, 1), + (11839, 1), + (11840, 1), + (11841, 1), + (11842, 1), + (11843, 1), + (11844, 1), + (11845, 1), + (11846, 1), + (11847, 1), + (11848, 1), + (11849, 1), + (11850, 1), + (11851, 1), + (11852, 1), + (11853, 1), + (11854, 1), + (11855, 1), + (11856, 1), + (11857, 1), + (11858, 1), + (11859, 1), + (11860, 1), + (11861, 1), + (11862, 1), + (11863, 1), + (11937, 1), + (11976, 1), + (12133, 12), + (12135, 12), + (12139, 12), + (12155, 12), + (12286, -1), + (12313, 24), + (12331, 12), + (12332, 12), + (12333, 12), + (12334, 12), + (12335, 12), + (12336, 12), + (12337, 12), + (12338, 12), + (12339, 12), + (12340, 12), + (12341, 12), + (12342, 12), + (12343, 12), + (12344, 12), + (12345, 12), + (12346, 12), + (12347, 12), + (12348, 12), + (12349, 12), + (12350, 12), + (12351, 12), + (12352, 12), + (12353, 12), + (12354, 12), + (12355, 12), + (12356, 12), + (12357, 12), + (12358, 12), + (12359, 12), + (12360, 12), + (12361, 12), + (12362, 12), + (12363, 12), + (12364, 12), + (12365, 12), + (12366, 12), + (12367, 12), + (12368, 12), + (12369, 12), + (12370, 12), + (12371, 12), + (12373, 12), + (12374, 12), + (12375, 12), + (12376, 12), + (12377, 12), + (12378, 12), + (12379, 12), + (12380, 12), + (12381, 12), + (12382, 12), + (12383, 12), + (12384, 12), + (12385, 12), + (12386, 12), + (12387, 12), + (12388, 12), + (12389, 12), + (12390, 12), + (12391, 12), + (12392, 12), + (12393, 12), + (12394, 12), + (12395, 12), + (12396, 12), + (12397, 12), + (12398, 12), + (12399, 12), + (12400, 12), + (12401, 12), + (12402, 12), + (12403, 12), + (12404, 12), + (12405, 12), + (12406, 12), + (12407, 12), + (12408, 12), + (12409, 12), + (12410, 12), + (12940, 12), + (12941, 12), + (12944, 12), + (12945, 12), + (12946, 12), + (12947, 12), + (12950, 12), + (13203, 52), + (13433, 12), + (13434, 12), + (13435, 12), + (13436, 12), + (13437, 12), + (13438, 12), + (13439, 12), + (13440, 12), + (13441, 12), + (13442, 12), + (13443, 12), + (13444, 12), + (13445, 12), + (13446, 12), + (13447, 12), + (13448, 12), + (13449, 12), + (13450, 12), + (13451, 12), + (13452, 12), + (13453, 12), + (13454, 12), + (13455, 12), + (13456, 12), + (13457, 12), + (13458, 12), + (13459, 12), + (13460, 12), + (13461, 12), + (13462, 12), + (13463, 12), + (13464, 12), + (13465, 12), + (13466, 12), + (13467, 12), + (13468, 12), + (13469, 12), + (13470, 12), + (13471, 12), + (13472, 12), + (13473, 12), + (13474, 12), + (13485, 1), + (13486, 1), + (13487, 1), + (13488, 1), + (13489, 1), + (13490, 1), + (13491, 1), + (13492, 1), + (13493, 1), + (13494, 1), + (13495, 1), + (13496, 1), + (13497, 1), + (13498, 1), + (13499, 1), + (13500, 1), + (13501, 12), + (13548, 12), + (13966, 52); diff --git a/sql/old/3.3.5a/2012_01_04_02_world_achievements.sql b/sql/old/3.3.5a/2012_01_04_02_world_achievements.sql new file mode 100644 index 00000000000..cbd5efa3cd6 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_02_world_achievements.sql @@ -0,0 +1,29 @@ +-- The Undying +DELETE FROM `disables` WHERE `sourceType` = 4 AND `entry` IN (13237, 13238, 13239, 13240, 7617); -- Enable criteria +DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (13237, 13238, 13239, 13240, 7617); -- Enable instance script execution for achievement criteria +INSERT INTO `achievement_criteria_data` VALUES +(13237, 12, 0, 0, ''), +(13237, 18, 0, 0, ''), +(13238, 12, 0, 0, ''), +(13238, 18, 0, 0, ''), +(13239, 12, 0, 0, ''), +(13239, 18, 0, 0, ''), +(13240, 12, 0, 0, ''), +(13240, 18, 0, 0, ''), +(7617, 12, 0, 0, ''), +(7617, 18, 0, 0, ''); + +-- The Immortal +DELETE FROM `disables` WHERE `sourceType` = 4 AND `entry` IN (13233, 13234, 13235, 13236, 7616); -- Enable criteria +DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (13233, 13234, 13235, 13236, 7616); -- Enable instance script execution for achievement criteria +INSERT INTO `achievement_criteria_data` VALUES +(13233, 12, 1, 0, ''), +(13233, 18, 0, 0, ''), +(13234, 12, 1, 0, ''), +(13234, 18, 0, 0, ''), +(13235, 12, 1, 0, ''), +(13235, 18, 0, 0, ''), +(13236, 12, 1, 0, ''), +(13236, 18, 0, 0, ''), +(7616, 12, 1, 0, ''), +(7616, 18, 0, 0, ''); diff --git a/sql/old/3.3.5a/2012_01_04_02_world_sai.sql b/sql/old/3.3.5a/2012_01_04_02_world_sai.sql new file mode 100644 index 00000000000..70cb3fc9a04 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_02_world_sai.sql @@ -0,0 +1,177 @@ +-- spawns for the first part of DM East, along Pusillins path (will make things a bit more fun ;-) ) + +SET @NPC_WILDSPAWN_SATYR = 11451; +SET @NPC_WILDSPAWN_ROGUE := 11452; +SET @NPC_WILDSPAWN_BETRAYER := 11454; +SET @NPC_WILDSPAWN_FELSWORN := 11455; +SET @NPC_WILDSPAWN_SHADOWSTALKER := 11456; +SET @NPC_WILDSPAWN_HELLCALLER := 11457; +SET @NPC_WARPWOOD_TREANT = 11462; +SET @NPC_WARPWOOD_CRUSHER := 13021; +SET @NPC_WHIP_LASHER := 13022; +SET @NPC_PHASE_LASHER := 13196; +SET @NPC_FEL_LASH := 13197; + +-- SmartAI for Warpwood Treant +SET @ENTRY := @NPC_WARPWOOD_TREANT; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,3000,5000,5000,7000,11,18368,0,0,0,0,0,2,0,0,0,0,0,0,0,'Warpwood Treant - In Combat - Cast Strike'), +(@ENTRY,0,1,0,0,0,100,0,7000,9000,18000,22000,11,14331,0,0,0,0,0,2,0,0,0,0,0,0,0,'Warpwood Treant - In Combat - Cast Vicious Rend'), +(@ENTRY,0,2,0,0,0,100,0,10000,12000,9000,14000,11,11428,0,0,0,0,0,2,0,0,0,0,0,0,0,'Warpwood Treant - In Combat - Cast Knockdown'); + +-- SmartAI for Warpwood Crusher +SET @ENTRY := @NPC_WARPWOOD_CRUSHER; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +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,0,0,100,0,3000,7000,8000,12000,11,22426,0,0,0,0,0,2,0,0,0,0,0,0,0,'Warpwood Crusher - In Combat - Cast Crush Armor'); + +-- SmartAI for Whip Lasher +SET @ENTRY := @NPC_WHIP_LASHER; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE creature SET `MovementType`=1,`spawndist`=15 WHERE `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +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,0,0,100,0,2000,5000,7000,9000,11,21987,0,0,0,0,0,2,0,0,0,0,0,0,0,'Whip Lasher - In Combat - Cast Lash of Pain'); + +-- Fel Lash +SET @ENTRY := @NPC_FEL_LASH; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE creature SET `MovementType`=1,`spawndist`=15 WHERE `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +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,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fel Lash - On Aggro - Prevent Combat Movement'), +(@ENTRY,0,1,2,4,0,100,0,0,0,0,0,11,15230,0,0,0,0,0,2,0,0,0,0,0,0,0,'Fel Lash - On Aggro - Cast Arcane Bolt'), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,0,0,0,0,0,0,0,0,'Fel Lash - On Aggro - Set Phase 1'), +(@ENTRY,0,3,0,9,1,100,0,0,40,2400,3800,11,15230,0,0,0,0,0,2,0,0,0,0,0,0,0,'Fel Lash - In Phase 1 - Cast Arcane Bolt '), +(@ENTRY,0,4,5,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fel Lash - In Phase 1 and Mana at 15% - Start Combat Movement'), +(@ENTRY,0,5,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,0,0,0,0,0,0,0,0,'Fel Lash - In Phase 1 and Mana is at 15% - set Phase 2'), +(@ENTRY,0,6,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fel Lash - In Phase 1 - Start Combat Movement at 35 Yards'), +(@ENTRY,0,7,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fel Lash - In Phase 1 - Prevent Combat Movement at 15 Yards'), +(@ENTRY,0,8,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fel Lash - In Phase 1 - Start Combat Movement Below 5 Yards'), +(@ENTRY,0,9,0,3,2,100,0,30,100,100,100,22,1,0,0,0,0,0,0,0,0,0,0,0,0,0,'Fel Lash - Phase 2 - Set Phase 1 when Mana is above 30%'), +(@ENTRY,0,10,0,0,0,100,0,9000,15000,11000,16000,11,22271,1,0,0,0,0,1,0,0,0,0,0,0,0,'Fel Lash - In Combat - Cast Arcane Explosion'), +(@ENTRY,0,11,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'Fel Lash - On Evade - Set Phase to 0'); + +-- Phase Lasher +SET @ENTRY := @NPC_PHASE_LASHER; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE creature SET `MovementType`=1,`spawndist`=15 WHERE `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +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,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Phase Lasher - On Aggro - Prevent Combat Movement'), +(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Phase Lasher - On Aggro - Set Phase 1'), +(@ENTRY,0,2,0,9,1,100,0,0,30,3400,4800,11,17228,2,0,0,0,0,2,0,0,0,0,0,0,0,'Phase Lasher - On Range - Cast Shadow Bolt Volley (Phase 1)'), +(@ENTRY,0,3,0,0,1,100,0,5000,5000,6000,6000,31,2,4,8,16,0,0,1,0,0,0,0,0,0,0,'Phase Lasher - In Phase 1 - Random Select Phase'), +(@ENTRY,0,4,5,9,2,100,0,0,40,3400,4800,11,15285,2,0,0,0,0,2,0,0,0,0,0,0,0,'Phase Lasher - In Phase 2 - Cast Fireball Volley'), +(@ENTRY,0,5,0,61,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Phase Lasher - In Phase 2 - Set Phase 1'), +(@ENTRY,0,6,7,0,4,100,0,4000,8000,8000,10000,11,22519,2,0,0,0,0,2,0,0,0,0,0,0,0,'Phase Lasher - In Phase 3 - Cast Ice Nova'), +(@ENTRY,0,7,0,61,4,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Phase Lasher - In Phase 3 - Set Phase 1'), +(@ENTRY,0,8,0,0,8,100,0,4000,8000,10000,13000,11,22356,2,0,0,0,0,2,0,0,0,0,0,0,0,'Phase Lasher - In Phase 4 - Cast Slow'), +(@ENTRY,0,9,0,61,8,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Phase Lasher - In Phase 4 - Set Phase 1'), +(@ENTRY,0,10,11,0,16,100,0,4000,8000,6000,8000,11,21749,2,0,0,0,0,2,0,0,0,0,0,0,0,'Phase Lasher - In Phase 5 - Cast Thorn Volley'), +(@ENTRY,0,11,0,61,16,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Phase Lasher - In Phase 5 - Set Phase 1'), +(@ENTRY,0,12,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Phase Lasher - On Evade - Set Phase to 0'), +(@ENTRY,0,13,0,6,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Phase Lasher - On Death - Set Phase to 0'); + +-- SmartAI for Wildspawn Satyr +SET @ENTRY := @NPC_WILDSPAWN_SATYR; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE creature SET `MovementType`=1,`spawndist`=3 WHERE `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +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,0,0,100,0,1000,3000,4000,6000,11,15580,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Satyr - In Combat - Cast Strike'), +(@ENTRY,0,1,0,0,0,100,0,7000,9000,14000,18000,11,9080,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Satyr - In Combat - Cast Hamstring'), +(@ENTRY,0,2,0,0,0,100,0,5000,7000,15000,25000,11,9128,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Satyr - In Combat - Cast Battle Shout'), +(@ENTRY,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,'Wildspawn Satyr - At 30% HP - Cast Enrage'), +(@ENTRY,0,4,0,2,0,100,1,0,30,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'Wildspawn Satyr - At 30% HP - Say Line 0'); + +-- Text for Wildspawn Satyr +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,'%s becomes enraged!',16,0,100,0,0,0,'Wildspawn Satyr - At 30% HP - Enraged Text'); + +-- SmartAI for Wildspawn Rogue +SET @ENTRY := @NPC_WILDSPAWN_ROGUE; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE creature SET `MovementType`=1,`spawndist`=3 WHERE `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,5000,7000,12000,16000,11,15583,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Rogue - In Combat - Cast Rupture'), +(@ENTRY,0,1,0,0,0,100,0,11000,15000,10000,13000,11,15667,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Rogue - In Combat - Cast Sinister Strike'); + +-- SmartAI for Wildspawn Betrayer +SET @ENTRY := @NPC_WILDSPAWN_BETRAYER; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE creature SET `MovementType`=1,`spawndist`=3 WHERE `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Betrayer - On Spawn - Prevent Combat Movement'), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'Wildspawn Betrayer - On Spawn - Prevent Melee'), +(@ENTRY,0,2,3,4,0,100,0,0,0,0,0,11,16100,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Betrayer - On Aggro - Cast Shoot'), +(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Betrayer - On Aggro - Set Phase 1'), +(@ENTRY,0,4,5,9,1,100,0,5,30,2300,3900,11,16100,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Betrayer - In Combat (Phase 1) - Cast Shoot'), +(@ENTRY,0,5,0,61,1,100,0,0,0,0,0,40,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Betrayer - In Combat (Phase 1) - Set Ranged Weapon Model'), +(@ENTRY,0,6,7,9,1,100,1,25,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,'Wildspawn Betrayer - At 25 Yards (Phase 1) - Start Combat Movement'), +(@ENTRY,0,7,0,61,1,100,1,0,0,0,0,20,1,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Betrayer - At 25 Yards (Phase 1) - Start Melee'), +(@ENTRY,0,8,9,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Betrayer - Below 5 Yards (Phase 1) - Start Combat Movement'), +(@ENTRY,0,9,10,61,1,100,0,0,0,0,0,40,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Betrayer - Below 5 Yards (Phase 1) - Set Melee Weapon'), +(@ENTRY,0,10,0,61,1,100,0,0,0,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Betrayer - Below 5 Yards (Phase 1) - Start Melee'), +(@ENTRY,0,11,12,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Betrayer - At 15 Yards (Phase 1) - Prevent Combat Movement'), +(@ENTRY,0,12,0,61,1,100,0,0,0,0,0,20,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Betrayer - At 15 Yards (Phase 1) - Prevent Melee'), +(@ENTRY,0,13,0,9,1,100,0,5,30,7800,11400,11,18649,40,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Betrayer - In Combat (Phase 1) - Cast Shadow Shot'), +(@ENTRY,0,14,0,9,1,100,0,5,30,9900,13600,11,7896,40,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Betrayer - In Combat (Phase 1) - Cast Exploding Shot'), +(@ENTRY,0,15,0,0,1,100,0,5000,8000,8000,11000,11,11428,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Betrayer - In Combat (Phase 1) - Cast Knockdown'), +(@ENTRY,0,16,0,2,0,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Betrayer - At 15% HP - Start Combat Movement'), +(@ENTRY,0,17,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Betrayer - At 15% HP - Flee'), +(@ENTRY,0,18,19,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Betrayer - On Evade - Set Phase to 0'), +(@ENTRY,0,19,0,61,0,100,0,0,0,0,0,40,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Betrayer - On Evade - Set Melee Weapon Model'); + +-- SmartAI for Wildspawn Hellcaller +SET @ENTRY := @NPC_WILDSPAWN_HELLCALLER; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE creature SET `MovementType`=1,`spawndist`=3 WHERE `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller - On Aggro - Prevent Combat Movement'), +(@ENTRY,0,1,2,4,0,100,0,0,0,0,0,11,15228,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Hellcaller - On Aggro - Cast Fireball '),(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller - On Aggro - Set Phase 1'),(@ENTRY,0,3,0,9,1,100,0,0,40,2400,3800,11,15228,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Hellcaller - Phase 1 - Cast Fireball'), +(@ENTRY,0,4,5,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller -In Phase 1 - Start Combat Movement'), +(@ENTRY,0,5,0,61,1,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller - Mana at 15% (Phase 1) - Set Phase 2'), +(@ENTRY,0,6,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,'Wildspawn Hellcaller - At 35 Yards (Phase 1) - Start Combat Movement'), +(@ENTRY,0,7,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller - at 15 Yards (Phase 1) - Prevent Combat Movement '), +(@ENTRY,0,8,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller - Below 5 Yards (Phase 1) - Start Combat Movement'), +(@ENTRY,0,9,0,3,2,100,0,0,30,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller - Mana is above 30% (Phase 2) - Set Phase 1'), +(@ENTRY,0,10,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'Wildspawn Hellcaller - Set Phase 1 when Mana is above 30% (Phase 2)'), +(@ENTRY,0,11,0,0,0,100,0,8000,14000,18000,25000,11,20754,3,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Hellcaller - In Combat - Cast Rain of Fire'), +(@ENTRY,0,12,0,2,0,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Hellcaller - At 15% HP - Start Combat Movement'), +(@ENTRY,0,13,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Betrayer - At 15% HP - Flee'),(@ENTRY,0,14,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - On Evade - Set Phase to 0'); + +-- SmartAI for Wildspawn Felsworn +SET @ENTRY := @NPC_WILDSPAWN_FELSWORN; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE creature SET `MovementType`=1,`spawndist`=3 WHERE `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES(@ENTRY,0,0,0,1,0,100,1,1000,1000,1800000,1800000,11,12542,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - Cast Chaotic Focus'), +(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - On Aggro - Prevent Combat Movement'), +(@ENTRY,0,2,3,4,0,100,0,0,0,0,0,11,15537,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Felsworn - On Aggro - Cast Shadow Bolt'), +(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - On Aggro - Set Phase 1'),(@ENTRY,0,4,0,9,1,100,0,0,40,2400,3800,11,15537,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Felsworn - Phase 1 - Cast Shadow Bolt'), +(@ENTRY,0,5,6,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn -In Phase 1 - Start Combat Movement'), +(@ENTRY,0,6,0,61,1,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - Mana at 15% (Phase 1) - Set Phase 2'), +(@ENTRY,0,7,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,'Wildspawn Felsworn - At 35 Yards (Phase 1) - Start Combat Movement'), +(@ENTRY,0,8,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - at 15 Yards (Phase 1) - Prevent Combat Movement '), +(@ENTRY,0,9,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - Below 5 Yards (Phase 1) - Start Combat Movement'), +(@ENTRY,0,10,0,3,2,100,0,0,30,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - Mana is above 30% (Phase 2) - Set Phase 1'), +(@ENTRY,0,11,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'Wildspawn Felsworn - Set Phase 1 when Mana is above 30% (Phase 2)'), +(@ENTRY,0,12,0,0,0,100,0,7000,12000,38000,45000,11,22417,1,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - In Phase 1 - Cast Shadow Shield'),(@ENTRY,0,13,0,0,1,100,0,11000,17000,23000,30000,11,15654,0,0,0,0,0,2,0,0,0,0,0,0,0,'Wildspawn Felsworn - In Phase 1 - Cast Shadow Word: Pain'),(@ENTRY,0,14,0,0,0,100,0,6000,10000,10000,15000,11,12542,1,0,0,0,0,5,0,0,0,0,0,0,0,'Wildspawn Felsworn - In Combat - Cast Fear (on random target)'), +(@ENTRY,0,15,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wildspawn Felsworn - On Evade - Set Phase to 0'); diff --git a/sql/old/3.3.5a/2012_01_04_03_world_spell_script_names.sql b/sql/old/3.3.5a/2012_01_04_03_world_spell_script_names.sql new file mode 100644 index 00000000000..f8ae3db6ad3 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_03_world_spell_script_names.sql @@ -0,0 +1,2 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` = 53385; +INSERT INTO `spell_script_names` VALUES (53385, 'spell_pal_divine_storm'); diff --git a/sql/old/3.3.5a/2012_01_04_04_world_creature.sql b/sql/old/3.3.5a/2012_01_04_04_world_creature.sql new file mode 100644 index 00000000000..58970cd03c7 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_04_world_creature.sql @@ -0,0 +1,10 @@ +-- fix earlier typo in guid (recovered 1846) +DELETE FROM `creature` WHERE `guid` = 1864; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES +(1864,1096,0,1,1,7197,0,-11958.5,-484.88,17.0796,5.15875,300,0,0,1160,1067,0); + +DELETE FROM `creature_addon` WHERE `guid`=1864; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(1864,0,0,0,4097,0,''); + + diff --git a/sql/old/3.3.5a/2012_01_04_04_world_creature_template.sql b/sql/old/3.3.5a/2012_01_04_04_world_creature_template.sql new file mode 100644 index 00000000000..6131c439fdb --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_04_world_creature_template.sql @@ -0,0 +1,8 @@ +-- [Q] Garments of the Moon (5621) and Garments of the Light (5625) +SET @ENTRY_SHAYA := 12429; -- Sentinel Shaya +SET @ENTRY_DOLF := 12427; -- Mountaineer Dolf +UPDATE `creature_template` SET `unit_flags`=`unit_flags`|8 WHERE `entry` IN (@ENTRY_SHAYA, @ENTRY_DOLF); + +-- [Q] Garments of Darkness (5650) +SET @ENTRY_KEL := 12428; -- Deathguard Kel (has to be +8 so in total 36872) +UPDATE `creature_template` SET `unit_flags`=`unit_flags`|8|4096|32768 WHERE `entry` IN (@ENTRY_KEL); diff --git a/sql/old/3.3.5a/2012_01_04_05_world_waypoint_data.sql b/sql/old/3.3.5a/2012_01_04_05_world_waypoint_data.sql new file mode 100644 index 00000000000..2ad787b36ca --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_05_world_waypoint_data.sql @@ -0,0 +1,476 @@ +-- Some Hinterlands fixups. + +-- Waypoint Script guids +SET @SCRIPTGUID := 55; -- 12 required + +-- Fixup Revantusk Watcher add Invisibility and Stealth Detection aura +UPDATE creature SET `modelid`=0,`curhealth`=1 WHERE id=14730; +UPDATE `creature_addon` SET `bytes2`=257,`auras`=18950 WHERE guid IN (SELECT guid FROM creature WHERE id=14730); + +-- Revantusk Drummer add emote +DELETE FROM `creature_addon` WHERE `guid` IN (92886,92887,92888); +DELETE FROM `creature_template_addon` WHERE `entry`=14734; +INSERT INTO `creature_template_addon` (`entry`,`bytes2`,`emote`) VALUES (14734,1,36); + +-- Pathing for Smith Slagtree Entry: 14737 +SET @NPC := 92909; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-589.9536,`position_y`=-4548.458,`position_z`=9.161489 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-591.6767,-4554.789,9.161489,0,0,0,0,100,0), +(@PATH,2,-595.7503,-4559.671,9.161489,0,6000,0,929090,100,0), +(@PATH,3,-589.9536,-4548.458,9.161489,0,29000,0,929091,100,0); +DELETE FROM `waypoint_scripts` WHERE `id` IN (929090,929091); +INSERT INTO `waypoint_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`o`,`guid`) VALUES +(929090,1,30,0,0,3.228859,@SCRIPTGUID), +(929090,2,2,74,8,0,@SCRIPTGUID+1), +(929090,5,2,74,0,0,@SCRIPTGUID+2), +(929091,1,30,0,0,0.6108652,@SCRIPTGUID+3), +(929091,2,15,23488,1,0,@SCRIPTGUID+4), +(929091,5,2,83,233,0,@SCRIPTGUID+5), +(929091,24,2,83,69,0,@SCRIPTGUID+6); + +-- Pathing for Mystic Yayo'jin Entry: 14739 +SET @NPC := 92911; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-541.7078,`position_y`=-4608.892,`position_z`=13.12271 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-538.0938,-4609.549,13.11275,0,500,0,0,100,0), +(@PATH,2,-538.0938,-4609.549,13.11275,5.986479,8000,0,0,100,0), +(@PATH,3,-539.3364,-4606.846,13.11516,0,500,0,0,100,0), +(@PATH,4,-539.3364,-4606.846,13.11516,0.9773844,10000,0,0,100,0), +(@PATH,5,-542.105,-4606.523,13.12286,0,500,0,0,100,0), +(@PATH,6,-542.105,-4606.523,13.12286,1.815142,9000,0,0,100,0), +(@PATH,7,-543.7079,-4611.147,13.15176,0,0,0,0,100,0), +(@PATH,8,-540.0343,-4611.84,13.11918,0,0,0,0,100,0), +(@PATH,9,-539.916,-4609.014,13.11769,0,0,0,0,100,0), +(@PATH,10,-541.7078,-4608.892,13.12271,0,500,0,0,100,0), +(@PATH,11,-541.7078,-4608.892,13.12271,2.86234,48000,0,929110,100,0); +DELETE FROM `waypoint_scripts` WHERE `id`=929110; +INSERT INTO `waypoint_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`guid`) VALUES +(929110,2,2,74,1,@SCRIPTGUID+7), +(929110,39,2,74,0,@SCRIPTGUID+8), +(929110,41,2,83,133,@SCRIPTGUID+9); + +-- Pathing for Revantusk Watcher Entry: 14730 +SET @NPC := 92898; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-621.9691,`position_y`=-4670.079,`position_z`=5.061154 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,257,0, '18950'); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-614.1932,-4653.834,5.040805,0,0,0,0,100,0), +(@PATH,2,-620.4515,-4667.109,5.066647,0,0,0,0,100,0), +(@PATH,3,-630.2896,-4686.361,5.086016,0,0,0,0,100,0), +(@PATH,4,-644.1071,-4714.346,5.219747,0,9000,0,928980,100,0); +DELETE FROM `waypoint_scripts` WHERE `id` IN (928980); +INSERT INTO `waypoint_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`x`,`y`,`z`,`o`,`guid`) VALUES +(928980,8,6,0,1,-621.9691,-4670.079,5.061154,1.098353,@SCRIPTGUID+10); + +-- Pathing for Revantusk Watcher Entry: 14730 +SET @NPC := 92899; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-619.3934,`position_y`=-4664.687,`position_z`=5.057855 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,257,0, '18950'); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-615.9739,-4657.611,5.048162,0,0,0,0,100,0), +(@PATH,2,-617.2744,-4660.37,5.053535,0,0,0,0,100,0), +(@PATH,3,-618.5742,-4663.127,5.058907,0,0,0,0,100,0), +(@PATH,4,-619.8167,-4665.867,5.066616,0,0,0,0,100,0), +(@PATH,5,-621.2051,-4668.584,5.066684,0,0,0,0,100,0), +(@PATH,6,-622.5936,-4671.301,5.066746,0,0,0,0,100,0), +(@PATH,7,-623.9827,-4674.019,5.066799,0,0,0,0,100,0), +(@PATH,8,-625.2844,-4676.566,5.066853,0,0,0,0,100,0), +(@PATH,9,-626.7726,-4679.479,5.060135,0,0,0,0,100,0), +(@PATH,10,-628.1486,-4682.171,5.07026,0,0,0,0,100,0), +(@PATH,11,-629.5447,-4684.852,5.078729,0,0,0,0,100,0), +(@PATH,12,-630.8968,-4687.591,5.091967,0,0,0,0,100,0), +(@PATH,13,-632.2471,-4690.326,5.105191,0,10000,0,928990,100,0); +DELETE FROM `waypoint_scripts` WHERE `id` IN (928990); +INSERT INTO `waypoint_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`x`,`y`,`z`,`o`,`guid`) VALUES +(928990,9,6,0,1,-619.3934,-4664.687,5.057855,1.120319,@SCRIPTGUID+11); + +-- Pathing for Revantusk Watcher Entry: 14730 +SET @NPC := 92946; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-583.7281,`position_y`=-4567.89,`position_z`=9.120717 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,257,0, '18950'); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-576.5599,-4568.717,9.161489,0,0,0,0,100,0), +(@PATH,2,-570.6282,-4570.051,9.286489,0,0,0,0,100,0), +(@PATH,3,-564.2906,-4571.396,9.480314,0,0,0,0,100,0), +(@PATH,4,-559.9419,-4573.958,9.605314,0,0,0,0,100,0), +(@PATH,5,-554.7994,-4581.686,9.740568,0,0,0,0,100,0), +(@PATH,6,-552.841,-4589.281,9.605314,0,0,0,0,100,0), +(@PATH,7,-555.0905,-4596.873,9.605314,0,0,0,0,100,0), +(@PATH,8,-555.7503,-4601.974,9.614173,0,0,0,0,100,0), +(@PATH,9,-559.4357,-4608.517,9.739173,0,0,0,0,100,0), +(@PATH,10,-563.2764,-4613.221,9.739173,0,0,0,0,100,0), +(@PATH,11,-566.1555,-4615.88,9.739173,0,0,0,0,100,0), +(@PATH,12,-566.157,-4619.973,9.739173,0,0,0,0,100,0), +(@PATH,13,-565.7682,-4621.338,10.5361,0,0,0,0,100,0), +(@PATH,14,-564.9091,-4624.298,12.33652,0,0,0,0,100,0), +(@PATH,15,-564.4247,-4626.619,13.21042,0,0,0,0,100,0), +(@PATH,16,-565.8718,-4628.861,13.21023,0,0,0,0,100,0), +(@PATH,17,-568.9028,-4629.674,13.21105,0,0,0,0,100,0), +(@PATH,18,-571.7204,-4630.63,14.69388,0,0,0,0,100,0), +(@PATH,19,-576.4782,-4631.931,17.15172,0,0,0,0,100,0), +(@PATH,20,-581.1254,-4634.227,19.03236,0,0,0,0,100,0), +(@PATH,21,-585.7308,-4639.775,21.21893,0,0,0,0,100,0), +(@PATH,22,-585.2182,-4645.189,22.94262,0,0,0,0,100,0), +(@PATH,23,-582.2473,-4647.843,24.75424,0,0,0,0,100,0), +(@PATH,24,-576.8602,-4648.417,26.25482,0,0,0,0,100,0), +(@PATH,25,-572.6866,-4646.474,28.46729,0,0,0,0,100,0), +(@PATH,26,-569.6187,-4644.834,30.25781,0,0,0,0,100,0), +(@PATH,27,-565.1738,-4641.978,30.34623,0,0,0,0,100,0), +(@PATH,28,-561.8621,-4639.479,30.34518,0,0,0,0,100,0), +(@PATH,29,-559.1216,-4640.588,30.34381,0,0,0,0,100,0), +(@PATH,30,-561.8621,-4639.479,30.34518,0,0,0,0,100,0), +(@PATH,31,-568.164,-4644.291,30.34578,0,0,0,0,100,0), +(@PATH,32,-572.6866,-4646.474,28.46729,0,0,0,0,100,0), +(@PATH,33,-576.8602,-4648.417,26.25482,0,0,0,0,100,0), +(@PATH,34,-582.2473,-4647.843,24.75424,0,0,0,0,100,0), +(@PATH,35,-585.2182,-4645.189,22.94262,0,0,0,0,100,0), +(@PATH,36,-585.7538,-4639.803,21.22803,0,0,0,0,100,0), +(@PATH,37,-581.134,-4634.237,19.03649,0,0,0,0,100,0), +(@PATH,38,-576.6482,-4631.978,17.23644,0,0,0,0,100,0), +(@PATH,39,-572.6212,-4631.001,15.44738,0,0,0,0,100,0), +(@PATH,40,-568.9028,-4629.674,13.21105,0,0,0,0,100,0), +(@PATH,41,-565.8718,-4628.861,13.21023,0,0,0,0,100,0), +(@PATH,42,-564.4247,-4626.619,13.21042,0,0,0,0,100,0), +(@PATH,43,-564.7512,-4625.108,12.77208,0,0,0,0,100,0), +(@PATH,44,-565.6238,-4622.17,11.06051,0,0,0,0,100,0), +(@PATH,45,-566.157,-4619.973,9.739173,0,0,0,0,100,0), +(@PATH,46,-566.1555,-4615.88,9.739173,0,0,0,0,100,0), +(@PATH,47,-563.2764,-4613.221,9.739173,0,0,0,0,100,0), +(@PATH,48,-559.4357,-4608.517,9.739173,0,0,0,0,100,0), +(@PATH,49,-555.7503,-4601.974,9.614173,0,0,0,0,100,0), +(@PATH,50,-555.0905,-4596.873,9.605314,0,0,0,0,100,0), +(@PATH,51,-552.841,-4589.281,9.605314,0,0,0,0,100,0), +(@PATH,52,-554.7994,-4581.686,9.740568,0,0,0,0,100,0), +(@PATH,53,-559.9419,-4573.958,9.605314,0,0,0,0,100,0), +(@PATH,54,-564.2906,-4571.396,9.480314,0,0,0,0,100,0), +(@PATH,55,-570.6282,-4570.051,9.286489,0,0,0,0,100,0), +(@PATH,56,-576.5599,-4568.717,9.161489,0,0,0,0,100,0), +(@PATH,57,-583.7281,-4567.89,9.120717,0,0,0,0,100,0), +(@PATH,58,-589.5422,-4571.942,9.482045,0,0,0,0,100,0), +(@PATH,59,-595.0231,-4573.951,9.786489,0,0,0,0,100,0), +(@PATH,60,-589.5422,-4571.942,9.482045,0,0,0,0,100,0), +(@PATH,61,-583.7281,-4567.89,9.120717,0,0,0,0,100,0); + +-- Pathing for Revantusk Watcher Entry: 14730 +SET @NPC := 92903; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-587.9592,`position_y`=-4565.161,`position_z`=9.161489 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,257,0, '18950'); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-589.1211,-4560.011,9.161489,0,0,0,0,100,0), +(@PATH,2,-586.8055,-4558.024,9.161489,0,0,0,0,100,0), +(@PATH,3,-582.1091,-4557.421,9.418232,0,0,0,0,100,0), +(@PATH,4,-563.0848,-4567.083,9.617765,0,0,0,0,100,0), +(@PATH,5,-564.0873,-4565.243,9.636915,0,0,0,0,100,0), +(@PATH,6,-554.4955,-4549.669,10.38081,0,0,0,0,100,0), +(@PATH,7,-551.9146,-4546.659,10.20161,0,0,0,0,100,0), +(@PATH,8,-530.5864,-4534.892,10.88507,0,0,0,0,100,0), +(@PATH,9,-528.0935,-4540.74,10.68414,0,0,0,0,100,0), +(@PATH,10,-548.4247,-4552.033,10.33687,0,0,0,0,100,0), +(@PATH,11,-559.3554,-4571.553,9.605396,0,0,0,0,100,0), +(@PATH,12,-558.353,-4572.357,9.734953,0,0,0,0,100,0), +(@PATH,13,-552.0048,-4585.105,9.830168,0,0,0,0,100,0), +(@PATH,14,-551.9355,-4589.406,9.685699,0,0,0,0,100,0), +(@PATH,15,-559.1077,-4612.717,9.864173,0,0,0,0,100,0), +(@PATH,16,-563.384,-4614.937,9.739216,0,0,0,0,100,0), +(@PATH,17,-587.5415,-4618.487,9.456761,0,0,0,0,100,0), +(@PATH,18,-596.1833,-4629.224,9.796849,0,0,0,0,100,0), +(@PATH,19,-601.0118,-4628.754,9.411202,0,0,0,0,100,0), +(@PATH,20,-592.4224,-4616.147,9.359911,0,0,0,0,100,0), +(@PATH,21,-588.6967,-4613.219,9.55808,0,0,0,0,100,0), +(@PATH,22,-567.4048,-4614.91,9.729955,0,0,0,0,100,0), +(@PATH,23,-566.9582,-4615.76,9.628169,0,0,0,0,100,0), +(@PATH,24,-557.4971,-4586.748,9.730397,0,0,0,0,100,0), +(@PATH,25,-565.1426,-4573.827,9.526945,0,0,0,0,100,0), +(@PATH,26,-587.9592,-4565.161,9.161489,0,0,0,0,100,0); + +-- Pathing for Revantusk Watcher Entry: 14730 +SET @NPC := 92904; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-563.7853,`position_y`=-4572.203,`position_z`=9.480314 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,257,0, '18950'); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-589.0695,-4562.6,9.161489,0,0,0,0,100,0), +(@PATH,2,-584.3304,-4558.535,9.161489,0,0,0,0,100,0), +(@PATH,3,-563.9773,-4568.874,9.527922,0,0,0,0,100,0), +(@PATH,4,-551.5903,-4548.764,10.15376,0,0,0,0,100,0), +(@PATH,5,-529.4497,-4536.548,11.02155,0,0,0,0,100,0), +(@PATH,6,-549.9079,-4550.587,9.985304,0,0,0,0,100,0), +(@PATH,7,-561.3011,-4570.924,9.605314,0,0,0,0,100,0), +(@PATH,8,-553.2903,-4587.01,9.647795,0,0,0,0,100,0), +(@PATH,9,-561.1612,-4612.59,9.864173,0,0,0,0,100,0), +(@PATH,10,-588.2601,-4616.572,9.456761,0,0,0,0,100,0), +(@PATH,11,-599.4961,-4630.079,9.579808,0,0,0,0,100,0), +(@PATH,12,-589.3387,-4615.174,9.456761,0,0,0,0,100,0), +(@PATH,13,-565.2857,-4617.084,9.739173,0,0,0,0,100,0), +(@PATH,14,-555.2867,-4586.42,9.730314,0,0,0,0,100,0), +(@PATH,15,-563.7853,-4572.203,9.480314,0,0,0,0,100,0); + +DELETE FROM `creature_formations` WHERE `leaderGUID`=92903; +INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES +(92903,92903,0,0,2), +(92903,92904,2,300,2); + +-- Pathing for Vilebranch Headhunter Entry: 2641 +SET @NPC := 93747; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-334.7697,`position_y`=-4118.176,`position_z`=152.1513 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-333.2237,-4134.225,152.0622,0,0,0,0,100,0), +(@PATH,2,-339.8373,-4147.746,152.1256,0,0,0,0,100,0), +(@PATH,3,-346.6712,-4160.327,152.1256,0,0,0,0,100,0), +(@PATH,4,-345.9421,-4177.107,152.2871,0,0,0,0,100,0), +(@PATH,5,-346.2449,-4195.276,152.2244,0,0,0,0,100,0), +(@PATH,6,-345.7937,-4206.436,152.1899,0,0,0,0,100,0), +(@PATH,7,-341.1774,-4208.535,152.0649,0,0,0,0,100,0), +(@PATH,8,-337.7476,-4206.129,152.1899,0,1000,0,0,100,0), +(@PATH,9,-341.1774,-4208.535,152.0649,0,0,0,0,100,0), +(@PATH,10,-345.7937,-4206.436,152.1899,0,0,0,0,100,0), +(@PATH,11,-346.2449,-4195.276,152.2244,0,0,0,0,100,0), +(@PATH,12,-345.9421,-4177.107,152.2871,0,0,0,0,100,0), +(@PATH,13,-346.6712,-4160.327,152.1256,0,0,0,0,100,0), +(@PATH,14,-339.8373,-4147.746,152.1256,0,0,0,0,100,0), +(@PATH,15,-333.2237,-4134.225,152.0622,0,0,0,0,100,0), +(@PATH,16,-334.7697,-4118.176,152.1513,0,0,0,0,100,0), +(@PATH,17,-345.4443,-4114.745,151.9538,0,0,0,0,100,0), +(@PATH,18,-358.0292,-4116.998,154.2687,0,0,0,0,100,0), +(@PATH,19,-345.4443,-4114.745,151.9538,0,0,0,0,100,0), +(@PATH,20,-334.7697,-4118.176,152.1513,0,0,0,0,100,0); + +-- Pathing for Vilebranch Headhunter Entry: 2641 +SET @NPC := 93634; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-304.2423,`position_y`=-4087.691,`position_z`=152.2971 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-295.6881,-4087.868,152.4837,0,0,0,0,100,0), +(@PATH,2,-284.571,-4085.302,152.14,0,0,0,0,100,0), +(@PATH,3,-272.7595,-4092.214,152.5167,0,0,0,0,100,0), +(@PATH,4,-284.571,-4085.302,152.14,0,0,0,0,100,0), +(@PATH,5,-295.6881,-4087.868,152.4837,0,0,0,0,100,0), +(@PATH,6,-304.2423,-4087.691,152.2971,0,0,0,0,100,0), +(@PATH,7,-314.2382,-4088.344,152.2971,0,0,0,0,100,0), +(@PATH,8,-322.7508,-4087.331,152.5894,0,0,0,0,100,0), +(@PATH,9,-331.1907,-4082.108,152.5066,0,0,0,0,100,0), +(@PATH,10,-338.1729,-4086.666,153.3141,0,0,0,0,100,0), +(@PATH,11,-342.3202,-4093.814,152.2581,0,0,0,0,100,0), +(@PATH,12,-338.1729,-4086.666,153.3141,0,0,0,0,100,0), +(@PATH,13,-331.1907,-4082.108,152.5066,0,0,0,0,100,0), +(@PATH,14,-322.7508,-4087.331,152.5894,0,0,0,0,100,0), +(@PATH,15,-314.2382,-4088.344,152.2971,0,0,0,0,100,0), +(@PATH,16,-304.2423,-4087.691,152.2971,0,0,0,0,100,0); + +-- Pathing for Vilebranch Headhunter Entry: 2641 +SET @NPC := 93755; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-334.7697,`position_y`=-4118.176,`position_z`=152.1513 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-345.4443,-4114.745,151.9538,0,0,0,0,100,0), +(@PATH,2,-334.7697,-4118.176,152.1513,0,0,0,0,100,0), +(@PATH,3,-333.2237,-4134.225,152.0622,0,0,0,0,100,0), +(@PATH,4,-339.8373,-4147.746,152.1256,0,0,0,0,100,0), +(@PATH,5,-345.9421,-4177.107,152.2871,0,0,0,0,100,0), +(@PATH,6,-346.2449,-4195.276,152.2244,0,0,0,0,100,0), +(@PATH,7,-345.7937,-4206.436,152.1899,0,0,0,0,100,0), +(@PATH,8,-341.1774,-4208.535,152.0649,0,0,0,0,100,0), +(@PATH,9,-337.7476,-4206.129,152.1899,0,3000,0,0,100,0), +(@PATH,10,-341.1774,-4208.535,152.0649,0,0,0,0,100,0), +(@PATH,11,-345.7937,-4206.436,152.1899,0,0,0,0,100,0), +(@PATH,12,-346.2449,-4195.276,152.2244,0,7000,0,0,100,0), +(@PATH,13,-345.9421,-4177.107,152.2871,0,0,0,0,100,0), +(@PATH,14,-339.8373,-4147.746,152.1256,0,0,0,0,100,0), +(@PATH,15,-333.2237,-4134.225,152.0622,0,0,0,0,100,0), +(@PATH,16,-334.7697,-4118.176,152.1513,0,0,0,0,100,0); + +-- Pathing for Green Sludge Entry: 2655 +SET @NPC := 92995; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=367.4861,`position_y`=-3892.534,`position_z`=103.3926 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,362.0923,-3869.861,106.0149,0,0,0,0,100,0), +(@PATH,2,359.729,-3842.23,107.0658,0,0,0,0,100,0), +(@PATH,3,362.0923,-3869.861,106.0149,0,0,0,0,100,0), +(@PATH,4,367.4861,-3892.534,103.3926,0,0,0,0,100,0), +(@PATH,5,388.8041,-3900.64,99.87824,0,0,0,0,100,0), +(@PATH,6,399.8027,-3882.644,97.61748,0,0,0,0,100,0), +(@PATH,7,390.798,-3860.872,95.97817,0,0,0,0,100,0), +(@PATH,8,379.3473,-3843.385,96.72575,0,0,0,0,100,0), +(@PATH,9,389.2842,-3825.799,98.92686,0,0,0,0,100,0), +(@PATH,10,399.2549,-3789.222,102.3659,0,0,0,0,100,0), +(@PATH,11,389.2842,-3825.799,98.92686,0,0,0,0,100,0), +(@PATH,12,379.3473,-3843.385,96.72575,0,0,0,0,100,0), +(@PATH,13,390.7259,-3860.698,95.98909,0,0,0,0,100,0), +(@PATH,14,399.8027,-3882.644,97.61748,0,0,0,0,100,0), +(@PATH,15,388.8041,-3900.64,99.87824,0,0,0,0,100,0), +(@PATH,16,367.4861,-3892.534,103.3926,0,0,0,0,100,0); + +-- Pathing for Jade Ooze Entry: 2656 +SET @NPC := 93068; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=386.5382,`position_y`=-3767.701,`position_z`=103.1262 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,382.7473,-3754.237,102.4903,0,0,0,0,100,0), +(@PATH,2,376.4646,-3738.252,105.2092,0,0,0,0,100,0), +(@PATH,3,365.8063,-3725.304,105.9001,0,0,0,0,100,0), +(@PATH,4,348.4052,-3720.816,105.9374,0,0,0,0,100,0), +(@PATH,5,319.9912,-3724.497,106.8615,0,0,0,0,100,0), +(@PATH,6,312.3986,-3744.087,106.7072,0,0,0,0,100,0), +(@PATH,7,318.8742,-3761.253,106.802,0,0,0,0,100,0), +(@PATH,8,343.6207,-3757.014,106.9888,0,0,0,0,100,0), +(@PATH,9,318.8742,-3761.253,106.802,0,0,0,0,100,0), +(@PATH,10,312.3907,-3744.138,106.7072,0,0,0,0,100,0), +(@PATH,11,319.9912,-3724.497,106.8615,0,0,0,0,100,0), +(@PATH,12,348.4052,-3720.816,105.9374,0,0,0,0,100,0), +(@PATH,13,365.8063,-3725.304,105.9001,0,0,0,0,100,0), +(@PATH,14,376.4646,-3738.252,105.2092,0,0,0,0,100,0), +(@PATH,15,382.7473,-3754.237,102.4903,0,0,0,0,100,0), +(@PATH,16,386.5382,-3767.701,103.1262,0,0,0,0,100,0), +(@PATH,17,398.7607,-3775.05,102.3659,0,0,0,0,100,0), +(@PATH,18,403.8524,-3788.918,102.2382,0,0,0,0,100,0), +(@PATH,19,398.7607,-3775.05,102.3659,0,0,0,0,100,0), +(@PATH,20,386.5382,-3767.701,103.1262,0,0,0,0,100,0); + +-- Pathing for Green Sludge Entry: 2655 +SET @NPC := 93068; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=353.2792,`position_y`=-3775.147,`position_z`=126.7992 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,337.8778,-3781.475,127.0284,0,0,0,0,100,0), +(@PATH,2,348.2281,-3797.657,127.2243,0,0,0,0,100,0), +(@PATH,3,337.8778,-3781.475,127.0284,0,0,0,0,100,0), +(@PATH,4,353.2792,-3775.147,126.7992,0,0,0,0,100,0), +(@PATH,5,360.8041,-3764.615,126.8099,0,0,0,0,100,0), +(@PATH,6,384.1081,-3758.339,126.8203,0,0,0,0,100,0), +(@PATH,7,398.6287,-3760.762,126.0662,0,0,0,0,100,0), +(@PATH,8,421.6737,-3776.188,122.9383,0,0,0,0,100,0), +(@PATH,9,439.5612,-3795.414,120.8122,0,0,0,0,100,0), +(@PATH,10,416.8036,-3816.887,120.3546,0,0,0,0,100,0), +(@PATH,11,400.8517,-3822.608,118.5542,0,0,0,0,100,0), +(@PATH,12,381.2686,-3822.9,114.8412,0,0,0,0,100,0), +(@PATH,13,372.0157,-3806.465,111.9946,0,0,0,0,100,0), +(@PATH,14,363.0406,-3792.427,111.5014,0,0,0,0,100,0), +(@PATH,15,374.681,-3774.967,106.5569,0,0,0,0,100,0), +(@PATH,16,363.0406,-3792.427,111.5014,0,0,0,0,100,0), +(@PATH,17,372.0157,-3806.465,111.9946,0,0,0,0,100,0), +(@PATH,18,381.2686,-3822.9,114.8412,0,0,0,0,100,0), +(@PATH,19,400.8517,-3822.608,118.5542,0,0,0,0,100,0), +(@PATH,20,416.8036,-3816.887,120.3546,0,0,0,0,100,0), +(@PATH,21,439.5612,-3795.414,120.8122,0,0,0,0,100,0), +(@PATH,22,421.6737,-3776.188,122.9383,0,0,0,0,100,0), +(@PATH,23,398.6287,-3760.762,126.0662,0,0,0,0,100,0), +(@PATH,24,384.1081,-3758.339,126.8203,0,0,0,0,100,0), +(@PATH,25,360.8041,-3764.615,126.8099,0,0,0,0,100,0), +(@PATH,26,353.2792,-3775.147,126.7992,0,0,0,0,100,0); + +-- Pathing for Vilebranch Warrior Entry: 4465 +SET @NPC := 93742; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-300.8814,`position_y`=-4190.363,`position_z`=136.5622 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-299.2402,-4199.432,136.8216,0,0,0,0,100,0), +(@PATH,2,-294.703,-4206.721,136.5972,0,0,0,0,100,0), +(@PATH,3,-284.916,-4203.682,136.7266,0,0,0,0,100,0), +(@PATH,4,-281.4611,-4198.692,136.5716,0,0,0,0,100,0), +(@PATH,5,-278.4128,-4187.48,136.5716,0,0,0,0,100,0), +(@PATH,6,-279.7527,-4179.343,136.4959,0,0,0,0,100,0), +(@PATH,7,-282.9599,-4172.346,136.5655,0,0,0,0,100,0), +(@PATH,8,-291.1088,-4159.861,136.5396,0,0,0,0,100,0), +(@PATH,9,-296.5112,-4150.362,136.5396,0,0,0,0,100,0), +(@PATH,10,-297.4698,-4136.667,136.5396,0,0,0,0,100,0), +(@PATH,11,-296.116,-4127.808,136.4748,0,0,0,0,100,0), +(@PATH,12,-287.9145,-4123.469,136.6125,0,0,0,0,100,0), +(@PATH,13,-276.8211,-4123.947,137.0688,0,0,0,0,100,0), +(@PATH,14,-268.0964,-4124.016,135.5265,0,0,0,0,100,0), +(@PATH,15,-259.8373,-4124.032,128.8418,0,0,0,0,100,0), +(@PATH,16,-253.119,-4123.896,124.6126,0,0,0,0,100,0), +(@PATH,17,-245.0412,-4124.756,119.3458,0,0,0,0,100,0), +(@PATH,18,-231.2207,-4124.845,117.8142,0,0,0,0,100,0), +(@PATH,19,-213.4383,-4132.925,118.0337,0,0,0,0,100,0), +(@PATH,20,-231.2207,-4124.845,117.8142,0,0,0,0,100,0), +(@PATH,21,-245.0412,-4124.756,119.3458,0,0,0,0,100,0), +(@PATH,22,-253.119,-4123.896,124.6126,0,0,0,0,100,0), +(@PATH,23,-259.8373,-4124.032,128.8418,0,0,0,0,100,0), +(@PATH,24,-268.0964,-4124.016,135.5265,0,0,0,0,100,0), +(@PATH,25,-276.8211,-4123.947,137.0688,0,0,0,0,100,0), +(@PATH,26,-287.9145,-4123.469,136.6125,0,0,0,0,100,0), +(@PATH,27,-296.116,-4127.808,136.4748,0,0,0,0,100,0), +(@PATH,28,-297.4698,-4136.667,136.5396,0,0,0,0,100,0), +(@PATH,29,-296.5112,-4150.362,136.5396,0,0,0,0,100,0), +(@PATH,30,-291.1088,-4159.861,136.5396,0,0,0,0,100,0), +(@PATH,31,-282.9599,-4172.346,136.5655,0,0,0,0,100,0), +(@PATH,32,-279.7527,-4179.343,136.4959,0,0,0,0,100,0), +(@PATH,33,-278.4128,-4187.48,136.5716,0,0,0,0,100,0), +(@PATH,34,-281.4611,-4198.692,136.5716,0,0,0,0,100,0), +(@PATH,35,-284.916,-4203.682,136.7266,0,0,0,0,100,0), +(@PATH,36,-294.703,-4206.721,136.5972,0,0,0,0,100,0), +(@PATH,37,-299.2402,-4199.432,136.8216,0,0,0,0,100,0), +(@PATH,38,-300.8814,-4190.363,136.5622,0,0,0,0,100,0); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=6059 AND `text_id`=7211; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (6059,7211); +DELETE FROM `gossip_menu` WHERE `entry`=6087 AND `text_id`=7241; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (6087,7241); +DELETE FROM `gossip_menu` WHERE `entry`=6088 AND `text_id`=7242; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (6088,7242); +DELETE FROM `gossip_menu` WHERE `entry`=6086 AND `text_id`=7240; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (6086,7240); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=6059 WHERE `entry`=14731; +UPDATE `creature_template` SET `gossip_menu_id`=6087 WHERE `entry`=14740; +UPDATE `creature_template` SET `gossip_menu_id`=6088 WHERE `entry`=14741; +UPDATE `creature_template` SET `gossip_menu_id`=6086 WHERE `entry`=14739; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (6059,6087,6086) AND `id` IN (0); +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (6059,6087) AND `id` IN (1); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(6059,0,5, 'Make this inn your home.',8,65536,0,0,0,0, ''), +(6059,1,1, 'Let me browse your goods.',3,128,0,0,0,0, ''), +(6087,0,1, 'I would like to buy from you.',3,128,0,0,0,0, ''), +(6087,1,3, 'What can you teach me?',5,16,0,0,0,0, ''), +(6086,0,1, 'I would like to buy from you.',3,128,0,0,0,0, ''); + diff --git a/sql/old/3.3.5a/2012_01_04_06_world_waypoint_data.sql b/sql/old/3.3.5a/2012_01_04_06_world_waypoint_data.sql new file mode 100644 index 00000000000..c4cefc87c63 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_06_world_waypoint_data.sql @@ -0,0 +1,22 @@ +-- Pathing for King Dred Entry: 27483 "Drak'Tharon Keep" +SET @NPC := 127507; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-544.874,`position_y`=-696.9735,`position_z`=30.29507 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-529.7952,-711.4729,30.37141,0,1000,0,0,100,0), +(@PATH,2,-544.874,-696.9735,30.29507,0,0,0,0,100,0), +(@PATH,3,-550.9299,-694.043,30.49649,0,0,0,0,100,0), +(@PATH,4,-554.3631,-689.458,30.83389,0,0,0,0,100,0), +(@PATH,5,-554.6004,-681.4241,30.67007,0,0,0,0,100,0), +(@PATH,6,-550.1124,-674.5519,30.67007,0,0,0,0,100,0), +(@PATH,7,-540.9714,-671.0374,30.29507,0,0,0,0,100,0), +(@PATH,8,-535.8426,-664.3137,30.29507,0,1000,0,0,100,0), +(@PATH,9,-540.9714,-671.0374,30.29507,0,0,0,0,100,0), +(@PATH,10,-550.1124,-674.5519,30.67007,0,0,0,0,100,0), +(@PATH,11,-554.6004,-681.4241,30.67007,0,0,0,0,100,0), +(@PATH,12,-554.3631,-689.458,30.83389,0,0,0,0,100,0), +(@PATH,13,-550.9299,-694.043,30.49649,0,0,0,0,100,0), +(@PATH,14,-544.874,-696.9735,30.29507,0,0,0,0,100,0); diff --git a/sql/old/3.3.5a/2012_01_04_07_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_04_07_world_gossip_menu.sql new file mode 100644 index 00000000000..9e9bba43b1a --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_07_world_gossip_menu.sql @@ -0,0 +1,17 @@ +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9918 AND `text_id`=13792; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9918,13792); +DELETE FROM `gossip_menu` WHERE `entry`=9859 AND `text_id`=13650; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9859,13650); +DELETE FROM `gossip_menu` WHERE `entry`=9857 AND `text_id`=13651; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9857,13651); +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=10316 WHERE `entry`=33224; +UPDATE `creature_template` SET `gossip_menu_id`=9918 WHERE `entry`=29430; +UPDATE `creature_template` SET `gossip_menu_id`=9859 WHERE `entry`=29434; +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (10316,9857,9917) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(10316,0,0, 'Glad to help, my lady. I''m told you were once the guardian of a fabled sword. Do you know where I might find it?',1,1,10315,0,0,0, ''), +(9857,0,0, 'I''m ready - lets get you out of here.',1,1,0,0,0,0, ''), +(9917,0,0, 'I am ready to head further into Storm Peaks.',1,1,0,0,0,0, ''); diff --git a/sql/old/3.3.5a/2012_01_04_08_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_04_08_world_gossip_menu.sql new file mode 100644 index 00000000000..826ca19e99f --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_08_world_gossip_menu.sql @@ -0,0 +1,164 @@ +-- Some Gossip updates +UPDATE `creature_template` SET `npcflag`=`npcflag`&~1 WHERE `entry` IN (239,353,658,1215,1233,2079); +UPDATE `creature_template` SET `gossip_menu_id`=5241 WHERE `entry` IN (22658,32099); +UPDATE `creature_template` SET `gossip_menu_id`=5124 WHERE `entry` IN (22571,32080); +UPDATE `creature_template` SET `gossip_menu_id`=5442 WHERE `entry` IN (22628); +UPDATE `creature_template` SET `gossip_menu_id`=6500 WHERE `entry` IN (22656); +UPDATE `creature_template` SET `gossip_menu_id`=7499 WHERE `entry` IN (20548); +UPDATE `creature_template` SET `gossip_menu_id`=9695 WHERE `entry` IN (31210); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=1632 AND `text_id`=2289; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1632,2289); +DELETE FROM `gossip_menu` WHERE `entry`=4322 AND `text_id`=5494; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4322,5494); +DELETE FROM `gossip_menu` WHERE `entry`=2801 AND `text_id`=3494; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (2801,3494); +DELETE FROM `gossip_menu` WHERE `entry`=2831 AND `text_id`=3523; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (2831,3523); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=1632 WHERE `entry`=1340; +UPDATE `creature_template` SET `gossip_menu_id`=4322 WHERE `entry`=2057; +UPDATE `creature_template` SET `gossip_menu_id`=2801 WHERE `entry`=1154; +UPDATE `creature_template` SET `gossip_menu_id`=2831 WHERE `entry`=1156; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (2831) AND `id` IN (0,1); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(2831,0,5, 'Make this inn your home.',8,65536,0,0,0,0, ''), +(2831,1,1, 'Let me browse your goods.',3,128,0,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9838 AND `text_id`=13349; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9838,13349); +DELETE FROM `gossip_menu` WHERE `entry`=10854 AND `text_id`=15066; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10854,15066); +DELETE FROM `gossip_menu` WHERE `entry`=10147 AND `text_id`=14091; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10147,14091); +DELETE FROM `gossip_menu` WHERE `entry`=9873 AND `text_id`=13690; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9873,13690); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9838 WHERE `entry`=28774; +UPDATE `creature_template` SET `gossip_menu_id`=9832 WHERE `entry`=28776; +UPDATE `creature_template` SET `gossip_menu_id`=10854 WHERE `entry`=36856; +UPDATE `creature_template` SET `gossip_menu_id`=10180 WHERE `entry`=29478; +UPDATE `creature_template` SET `gossip_menu_id`=10147 WHERE `entry`=31136; +UPDATE `creature_template` SET `gossip_menu_id`=9873 WHERE `entry`=28701; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9838,9873) AND `id` IN (0); +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9838,9873,10180) AND `id` IN (1); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(9838,0,8, 'I want to create a guild crest.',11,524288,0,0,0,0, ''), +(9838,1,7, 'How do I form a guild?',10,262144,0,0,0,0, ''), +(10180,1,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(9873,0,3, 'Train me.',5,16,0,0,0,0, ''), +(9873,1,1, 'May I browse your epic gem recipes?',3,128,0,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=2061 AND `text_id`=2713; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (2061,2713); +DELETE FROM `gossip_menu` WHERE `entry`=5818 AND `text_id`=6991; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (5818,6991); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=2061 WHERE `entry`=9563; +UPDATE `creature_template` SET `gossip_menu_id`=5818 WHERE `entry`=14437; +UPDATE `creature_template` SET `gossip_menu_id`=10188 WHERE `entry`=31051; + +-- Creature Gossip_menu_option Update from sniff +-- You must manually add delete statement +-- DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (5818) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(5818,0,1, 'Gorzeeki, I wish to make a purchase.',3,128,0,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=8023 AND `text_id`=9899; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8023,9899); +DELETE FROM `gossip_menu` WHERE `entry`=8021 AND `text_id`=9896; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8021,9896); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=8021 WHERE `entry`=19679; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (8023,8021,4005) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(8023,0,0, '<Push a random button.>',1,1,8023,0,0,0, ''), +(8021,0,1, 'Show me what you have for sale, "Slim."',3,128,0,0,0,0, ''), +(4005,0,1, 'I would like to buy from you.',3,128,0,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=4143 AND `text_id`=5136; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4143,5136); +DELETE FROM `gossip_menu` WHERE `entry`=6229 AND `text_id`=7403; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (6229,7403); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9781 WHERE `entry`=29143; +UPDATE `creature_template` SET `gossip_menu_id`=4143 WHERE `entry`=2857; +UPDATE `creature_template` SET `gossip_menu_id`=6229 WHERE `entry`=7010; +UPDATE `creature_template` SET `gossip_menu_id`=9107 WHERE `entry`=24930; +UPDATE `creature_template` SET `gossip_menu_id`=9108 WHERE `entry`=25081; +UPDATE `creature_template` SET `gossip_menu_id`=9107 WHERE `entry`=24931; +UPDATE `creature_template` SET `gossip_menu_id`=9106 WHERE `entry`=24926; + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=4667 WHERE `entry`=906; + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=4644 AND `text_id`=5716; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4644,5716); +DELETE FROM `gossip_menu` WHERE `entry`=4045 AND `text_id`=4935; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4045,4935); +DELETE FROM `gossip_menu` WHERE `entry`=3926 AND `text_id`=4786; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (3926,4786); +DELETE FROM `gossip_menu` WHERE `entry`=4006 AND `text_id`=4862; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4006,4862); +DELETE FROM `gossip_menu` WHERE `entry`=4012 AND `text_id`=4998; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4012,4998); +DELETE FROM `gossip_menu` WHERE `entry`=4185 AND `text_id`=5287; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4185,5287); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=4045 WHERE `entry`=2980; +UPDATE `creature_template` SET `gossip_menu_id`=5856 WHERE `entry`=5939; +UPDATE `creature_template` SET `gossip_menu_id`=10181 WHERE `entry`=3079; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (4644,3926,4006) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(4644,0,3, 'I seek further druidic training to have a closer understanding of the Earth Mother''s will.',5,16,0,0,0,0, ''), +(3926,0,3, 'I seek training as a druid.',5,16,0,0,0,0, ''), +(4006,0,1, 'I would like to buy from you.',3,128,0,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=7369 AND `text_id`=8805; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (7369,8805); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=7369 WHERE `entry`=17109; + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=4486 AND `text_id`=538; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4486,538); + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (4486) AND `id` IN (0,1); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(4486,0,3, 'I am interested in mage training.',5,16,0,0,0,0, ''), +(4486,1,0, 'I wish to unlearn my talents.',16,16,0,0,0,0, ''); + +-- Gossip conditions +SET @ID := 4486; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=@ID; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@ID,538,0,15,8,0,0,0,'','Show gossip text if player is mage'); +-- Gossip option conditions +SET @ID := 4486; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@ID; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,@ID,0,0,15,8,0,0,0,'','Show gossip option if player is mage'), +(15,@ID,1,0,15,8,0,0,0,'','Show gossip option if player is mage'); diff --git a/sql/old/3.3.5a/2012_01_04_09_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_04_09_world_gossip_menu.sql new file mode 100644 index 00000000000..b95eb723d03 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_09_world_gossip_menu.sql @@ -0,0 +1,56 @@ +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=6768 AND `text_id`=6194; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (6768,6194); +DELETE FROM `gossip_menu` WHERE `entry`=8703 AND `text_id`=10948; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8703,10948); +DELETE FROM `gossip_menu` WHERE `entry`=8672 AND `text_id`=10910; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8672,10910); +DELETE FROM `gossip_menu` WHERE `entry`=8673 AND `text_id`=10911; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8673,10911); +DELETE FROM `gossip_menu` WHERE `entry`=8678 AND `text_id`=10916; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8678,10916); +DELETE FROM `gossip_menu` WHERE `entry`=8677 AND `text_id`=10921; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8677,10921); +DELETE FROM `gossip_menu` WHERE `entry`=8677 AND `text_id`=10913; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8677,10913); -- Needs condition of 10 Apexis Shards +DELETE FROM `gossip_menu` WHERE `entry`=8676 AND `text_id`=10914; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8676,10914); +DELETE FROM `gossip_menu` WHERE `entry`=8704 AND `text_id`=10949; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8704,10949); +DELETE FROM `gossip_menu` WHERE `entry`=8681 AND `text_id`=10927; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8681,10927); +DELETE FROM `gossip_menu` WHERE `entry`=8671 AND `text_id`=10951; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8671,10951); +DELETE FROM `gossip_menu` WHERE `entry`=8680 AND `text_id`=10923; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8680,10923); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=6768 WHERE `entry`=13418; +UPDATE `creature_template` SET `gossip_menu_id`=8678 WHERE `entry`=23316; +UPDATE `creature_template` SET `gossip_menu_id`=8681 WHERE `entry`=23233; +UPDATE `creature_template` SET `gossip_menu_id`=8680 WHERE `entry`=23300; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (6768,8703,8672,8673,8677,8676,8704) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(6768,0,1, 'Let me browse your seasonal fare.',3,128,0,0,0,0, ''), +(8703,0,0, 'Insert an Apexis Shard, and begin!',1,1,0,0,0,0, ''), +(8672,0,0, 'Purchase 1 Unstable Flask of the Beast for the cost of 10 Apexis Shards',1,1,8673,0,0,0, ''), -- Needs condition of 10 Apexis Shards +(8673,0,0, 'Use the fel crystalforge to make another purchase.',1,1,8672,0,0,0, ''), +(8677,0,0, 'Purchase 1 Unstable Flask of the Sorcerer for the cost of 10 Apexis Shards',1,1,8676,0,0,0, ''), -- Needs condition of 10 Apexis Shards +(8676,0,0, 'Use the Bash''ir crystalforge to make another purchase.',1,1,8677,0,0,0, ''), +(8704,0,0, 'Insert 35 Apexis Shards, and begin!',1,1,0,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=8689 AND `text_id`=10931; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8689,10931); +DELETE FROM `gossip_menu` WHERE `entry`=8669 AND `text_id`=10938; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8669,10938); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=8669 WHERE `entry`=23334; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (8689) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(8689,0,0, 'Place 35 Apexis Shards near the dragon egg to crack it open.',1,1,0,0,0,0, ''); diff --git a/sql/old/3.3.5a/2012_01_04_10_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_04_10_world_gossip_menu.sql new file mode 100644 index 00000000000..b41f74e8050 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_10_world_gossip_menu.sql @@ -0,0 +1,131 @@ +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=4005 AND `text_id`=4869; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4005,4869); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=4005 WHERE `entry`=4731; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (4005) AND `id` IN (1); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(4005,1,1, 'I would like to buy from you.',3,128,0,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=940 AND `text_id`=1513; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (940,1513); +DELETE FROM `gossip_menu` WHERE `entry`=941 AND `text_id`=1517; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (941,1517); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=940 WHERE `entry`=7607; +UPDATE `creature_template` SET `gossip_menu_id`=941 WHERE `entry`=7604; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (941) AND `id` IN (1); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(941,1,0, 'That''s it! I''m tired of helping you out. It''s time we settled things on the battlefield!',1,1,0,0,0,0, ''); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=6944 WHERE `entry`=28621; +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=5710 AND `text_id`=6878; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (5710,6878); +DELETE FROM `gossip_menu` WHERE `entry`=5711 AND `text_id`=6879; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (5711,6879); +DELETE FROM `gossip_menu` WHERE `entry`=5712 AND `text_id`=6880; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (5712,6880); +DELETE FROM `gossip_menu` WHERE `entry`=5713 AND `text_id`=6881; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (5713,6881); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=3623 WHERE `entry`=11556; -- 3624 in db. possible different gossip depending on faction? +UPDATE `creature_template` SET `gossip_menu_id`=5710 WHERE `entry`=14354; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (5710,5711,5712,5713) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(5710,0,0, 'Why you little...',1,1,0,0,0,0, ''), +(5711,0,0, 'Mark my words, I will catch you, imp. And when I do!',1,1,0,0,0,0, ''), +(5712,0,0, 'DIE!',1,1,0,0,0,0, ''), +(5713,0,0, 'Prepare to meet your maker.',1,1,0,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=8310 AND `text_id`=10373; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8310,10373); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=8310 WHERE `entry`=20977; +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=8006 AND `text_id`=9871; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8006,9871); +DELETE FROM `gossip_menu` WHERE `entry`=8007 AND `text_id`=9872; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8007,9872); +DELETE FROM `gossip_menu` WHERE `entry`=8036 AND `text_id`=9922; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8036,9922); +DELETE FROM `gossip_menu` WHERE `entry`=8036 AND `text_id`=10045; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8036,10045); +DELETE FROM `gossip_menu` WHERE `entry`=8082 AND `text_id`=9990; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8082,9990); +DELETE FROM `gossip_menu` WHERE `entry`=8038 AND `text_id`=9925; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8038,9925); +DELETE FROM `gossip_menu` WHERE `entry`=7829 AND `text_id`=9579; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (7829,9579); +DELETE FROM `gossip_menu` WHERE `entry`=7831 AND `text_id`=9580; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (7831,9580); +DELETE FROM `gossip_menu` WHERE `entry`=7840 AND `text_id`=9597; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (7840,9597); +DELETE FROM `gossip_menu` WHERE `entry`=7852 AND `text_id`=9613; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (7852,9613); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=8006 WHERE `entry`=19468; +UPDATE `creature_template` SET `gossip_menu_id`=8082 WHERE `entry`=20162; +UPDATE `creature_template` SET `gossip_menu_id`=8038 WHERE `entry`=19840; +UPDATE `creature_template` SET `gossip_menu_id`=7852 WHERE `entry`=18887; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (8036,8082,7830,7829,7831,7840,7852) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(8036,0,0, '<Begin emergency shutdown.>',1,1,8036,0,0,0, ''), +(8082,0,0, 'I''m as ready as I''ll ever be.',1,1,0,0,0,0, ''), +(7830,0,0, 'Taretha cannot see you, Thrall.',1,1,7829,0,0,0, ''), +(7829,0,0, 'The situation is rather complicated, Thrall. It would be best for you to head into the mountains now, before more of Blackmoore''s men show up. We''ll make sure Taretha is safe.',1,1,7831,0,0,0, ''), +(7831,0,0, 'Tarren Mill.',1,1,0,0,0,0, ''), +(7840,0,0, 'We''re ready, Thrall.',1,1,0,0,0,0, ''), +(7852,0,0, 'We''ll get you out, Taretha. Don''t worry. I doubt the wizard would wander too far away.',1,1,0,0,0,0, ''); + +-- Creature Gossip_menu_option Update from sniff +UPDATE `gossip_menu_option` SET `action_menu_id`=7829 WHERE `menu_id`=7830 AND `id`=0; + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9185 AND `text_id`=12475; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9185,12475); +DELETE FROM `gossip_menu` WHERE `entry`=9248 AND `text_id`=12556; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9248,12556); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9185 WHERE `entry`=25381; +UPDATE `creature_template` SET `gossip_menu_id`=9248 WHERE `entry`=26158; +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=5232 AND `text_id`=6250; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (5232,6250); +DELETE FROM `gossip_menu` WHERE `entry`=6813 AND `text_id`=8139; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (6813,8139); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=5232 WHERE `entry`=13445; +UPDATE `creature_template` SET `gossip_menu_id`=6813 WHERE `entry`=15760; + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=6944 WHERE `entry`=6026; +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=10171 AND `text_id`=14115; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10171,14115); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=10171 WHERE `entry`=32301; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (10026) AND `id` IN (1); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(10026,1,0, 'Take me to the ship.',1,1,0,0,0,0, ''); diff --git a/sql/old/3.3.5a/2012_01_04_11_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_04_11_world_gossip_menu.sql new file mode 100644 index 00000000000..4356f9c7a0a --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_11_world_gossip_menu.sql @@ -0,0 +1,223 @@ +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=341 AND `text_id`=820; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (341,820); +DELETE FROM `gossip_menu` WHERE `entry`=1041 AND `text_id`=1123; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1041,1123); +DELETE FROM `gossip_menu` WHERE `entry`=643 AND `text_id`=1203; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (643,1203); +DELETE FROM `gossip_menu` WHERE `entry`=645 AND `text_id`=1206; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (645,1206); +DELETE FROM `gossip_menu` WHERE `entry`=648 AND `text_id`=1208; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (648,1208); +DELETE FROM `gossip_menu` WHERE `entry`=657 AND `text_id`=1221; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (657,1221); +DELETE FROM `gossip_menu` WHERE `entry`=660 AND `text_id`=1226; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (660,1226); +DELETE FROM `gossip_menu` WHERE `entry`=682 AND `text_id`=1232; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (682,1232); +DELETE FROM `gossip_menu` WHERE `entry`=683 AND `text_id`=1233; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (683,1233); +DELETE FROM `gossip_menu` WHERE `entry`=692 AND `text_id`=1242; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (692,1242); +DELETE FROM `gossip_menu` WHERE `entry`=693 AND `text_id`=1243; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (693,1243); +DELETE FROM `gossip_menu` WHERE `entry`=698 AND `text_id`=1249; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (698,1249); +DELETE FROM `gossip_menu` WHERE `entry`=705 AND `text_id`=1257; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (705,1257); +DELETE FROM `gossip_menu` WHERE `entry`=706 AND `text_id`=1258; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (706,1258); +DELETE FROM `gossip_menu` WHERE `entry`=10392 AND `text_id`=1259; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10392,1259); +DELETE FROM `gossip_menu` WHERE `entry`=708 AND `text_id`=1260; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (708,1260); +DELETE FROM `gossip_menu` WHERE `entry`=2943 AND `text_id`=3657; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (2943,3657); +DELETE FROM `gossip_menu` WHERE `entry`=4469 AND `text_id`=3977; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4469,3977); +DELETE FROM `gossip_menu` WHERE `entry`=4470 AND `text_id`=3977; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4470,3977); +DELETE FROM `gossip_menu` WHERE `entry`=4471 AND `text_id`=3977; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4471,3977); +DELETE FROM `gossip_menu` WHERE `entry`=4466 AND `text_id`=4434; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4466,4434); +DELETE FROM `gossip_menu` WHERE `entry`=4467 AND `text_id`=4434; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4467,4434); +DELETE FROM `gossip_menu` WHERE `entry`=4468 AND `text_id`=4434; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4468,4434); +DELETE FROM `gossip_menu` WHERE `entry`=12537 AND `text_id`=4437; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (12537,4437); +DELETE FROM `gossip_menu` WHERE `entry`=4508 AND `text_id`=4783; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4508,4783); +DELETE FROM `gossip_menu` WHERE `entry`=4502 AND `text_id`=4837; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4502,4837); +DELETE FROM `gossip_menu` WHERE `entry`=5061 AND `text_id`=4837; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (5061,4837); +DELETE FROM `gossip_menu` WHERE `entry`=4472 AND `text_id`=5000; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4472,5000); +DELETE FROM `gossip_menu` WHERE `entry`=4473 AND `text_id`=5000; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4473,5000); +DELETE FROM `gossip_menu` WHERE `entry`=4474 AND `text_id`=5000; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4474,5000); +DELETE FROM `gossip_menu` WHERE `entry`=4201 AND `text_id`=5016; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4201,5016); +DELETE FROM `gossip_menu` WHERE `entry`=4112 AND `text_id`=5019; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4112,5019); +DELETE FROM `gossip_menu` WHERE `entry`=4139 AND `text_id`=5124; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4139,5124); +DELETE FROM `gossip_menu` WHERE `entry`=4146 AND `text_id`=5147; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4146,5147); +DELETE FROM `gossip_menu` WHERE `entry`=4161 AND `text_id`=5207; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4161,5207); +DELETE FROM `gossip_menu` WHERE `entry`=4173 AND `text_id`=5260; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4173,5260); +DELETE FROM `gossip_menu` WHERE `entry`=4203 AND `text_id`=5320; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4203,5320); +DELETE FROM `gossip_menu` WHERE `entry`=4262 AND `text_id`=5416; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4262,5416); +DELETE FROM `gossip_menu` WHERE `entry`=4344 AND `text_id`=5519; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4344,5519); +DELETE FROM `gossip_menu` WHERE `entry`=4353 AND `text_id`=5561; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4353,5561); +DELETE FROM `gossip_menu` WHERE `entry`=4482 AND `text_id`=5721; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4482,5721); +DELETE FROM `gossip_menu` WHERE `entry`=4475 AND `text_id`=5721; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4475,5721); +DELETE FROM `gossip_menu` WHERE `entry`=4481 AND `text_id`=5721; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4481,5721); +DELETE FROM `gossip_menu` WHERE `entry`=4504 AND `text_id`=5722; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4504,5722); +DELETE FROM `gossip_menu` WHERE `entry`=4505 AND `text_id`=5722; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4505,5722); +DELETE FROM `gossip_menu` WHERE `entry`=4503 AND `text_id`=5722; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4503,5722); +DELETE FROM `gossip_menu` WHERE `entry`=4941 AND `text_id`=5994; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4941,5994); +DELETE FROM `gossip_menu` WHERE `entry`=5641 AND `text_id`=6755; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (5641,6755); +DELETE FROM `gossip_menu` WHERE `entry`=5849 AND `text_id`=7011; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (5849,7011); +DELETE FROM `gossip_menu` WHERE `entry`=8110 AND `text_id`=10040; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8110,10040); +DELETE FROM `gossip_menu` WHERE `entry`=8631 AND `text_id`=10821; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8631,10821); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=341 WHERE `entry`=3628; +UPDATE `creature_template` SET `gossip_menu_id`=581 WHERE `entry`=5511; +UPDATE `creature_template` SET `gossip_menu_id`=645 WHERE `entry`=5493; +UPDATE `creature_template` SET `gossip_menu_id`=648 WHERE `entry`=1292; +UPDATE `creature_template` SET `gossip_menu_id`=657 WHERE `entry`=2327; +UPDATE `creature_template` SET `gossip_menu_id`=660 WHERE `entry`=5513; +UPDATE `creature_template` SET `gossip_menu_id`=681 WHERE `entry`=1312; +UPDATE `creature_template` SET `gossip_menu_id`=681 WHERE `entry`=1315; +UPDATE `creature_template` SET `gossip_menu_id`=681 WHERE `entry`=1314; +UPDATE `creature_template` SET `gossip_menu_id`=681 WHERE `entry`=1307; +UPDATE `creature_template` SET `gossip_menu_id`=681 WHERE `entry`=1313; +UPDATE `creature_template` SET `gossip_menu_id`=681 WHERE `entry`=1309; +UPDATE `creature_template` SET `gossip_menu_id`=681 WHERE `entry`=1310; +UPDATE `creature_template` SET `gossip_menu_id`=682 WHERE `entry`=1304; +UPDATE `creature_template` SET `gossip_menu_id`=683 WHERE `entry`=5503; +UPDATE `creature_template` SET `gossip_menu_id`=684 WHERE `entry`=1347; +UPDATE `creature_template` SET `gossip_menu_id`=685 WHERE `entry`=5494; +UPDATE `creature_template` SET `gossip_menu_id`=687 WHERE `entry`=1298; +UPDATE `creature_template` SET `gossip_menu_id`=688 WHERE `entry`=1319; +UPDATE `creature_template` SET `gossip_menu_id`=688 WHERE `entry`=1323; +UPDATE `creature_template` SET `gossip_menu_id`=688 WHERE `entry`=1333; +UPDATE `creature_template` SET `gossip_menu_id`=689 WHERE `entry`=1341; +UPDATE `creature_template` SET `gossip_menu_id`=689 WHERE `entry`=1339; +UPDATE `creature_template` SET `gossip_menu_id`=690 WHERE `entry`=1324; +UPDATE `creature_template` SET `gossip_menu_id`=691 WHERE `entry`=1350; +UPDATE `creature_template` SET `gossip_menu_id`=691 WHERE `entry`=1349; +UPDATE `creature_template` SET `gossip_menu_id`=692 WHERE `entry`=1351; +UPDATE `creature_template` SET `gossip_menu_id`=693 WHERE `entry`=5510; +UPDATE `creature_template` SET `gossip_menu_id`=693 WHERE `entry`=5512; +UPDATE `creature_template` SET `gossip_menu_id`=693 WHERE `entry`=5509; +UPDATE `creature_template` SET `gossip_menu_id`=693 WHERE `entry`=5514; +UPDATE `creature_template` SET `gossip_menu_id`=698 WHERE `entry`=5519; +UPDATE `creature_template` SET `gossip_menu_id`=701 WHERE `entry`=1305; +UPDATE `creature_template` SET `gossip_menu_id`=703 WHERE `entry`=1303; +UPDATE `creature_template` SET `gossip_menu_id`=703 WHERE `entry`=1302; +UPDATE `creature_template` SET `gossip_menu_id`=705 WHERE `entry`=1326; +UPDATE `creature_template` SET `gossip_menu_id`=706 WHERE `entry`=1325; +UPDATE `creature_template` SET `gossip_menu_id`=708 WHERE `entry`=4974; +UPDATE `creature_template` SET `gossip_menu_id`=1041 WHERE `entry`=7232; +UPDATE `creature_template` SET `gossip_menu_id`=2745 WHERE `entry`=957; +UPDATE `creature_template` SET `gossip_menu_id`=2943 WHERE `entry`=10782; +UPDATE `creature_template` SET `gossip_menu_id`=4112 WHERE `entry`=5500; +UPDATE `creature_template` SET `gossip_menu_id`=4139 WHERE `entry`=11026; +UPDATE `creature_template` SET `gossip_menu_id`=4146 WHERE `entry`=5518; +UPDATE `creature_template` SET `gossip_menu_id`=4161 WHERE `entry`=1317; +UPDATE `creature_template` SET `gossip_menu_id`=4173 WHERE `entry`=11096; +UPDATE `creature_template` SET `gossip_menu_id`=4201 WHERE `entry`=5499; +UPDATE `creature_template` SET `gossip_menu_id`=4203 WHERE `entry`=5564; +UPDATE `creature_template` SET `gossip_menu_id`=4262 WHERE `entry`=1300; +UPDATE `creature_template` SET `gossip_menu_id`=4344 WHERE `entry`=5567; +UPDATE `creature_template` SET `gossip_menu_id`=4353 WHERE `entry`=1346; +UPDATE `creature_template` SET `gossip_menu_id`=4466 WHERE `entry`=376; +UPDATE `creature_template` SET `gossip_menu_id`=4467 WHERE `entry`=5489; +UPDATE `creature_template` SET `gossip_menu_id`=4468 WHERE `entry`=5484; +UPDATE `creature_template` SET `gossip_menu_id`=4469 WHERE `entry`=5491; +UPDATE `creature_template` SET `gossip_menu_id`=4470 WHERE `entry`=5492; +UPDATE `creature_template` SET `gossip_menu_id`=4471 WHERE `entry`=928; +UPDATE `creature_template` SET `gossip_menu_id`=4472 WHERE `entry`=5517; +UPDATE `creature_template` SET `gossip_menu_id`=4473 WHERE `entry`=5516; +UPDATE `creature_template` SET `gossip_menu_id`=4474 WHERE `entry`=5515; +UPDATE `creature_template` SET `gossip_menu_id`=4475 WHERE `entry`=914; +UPDATE `creature_template` SET `gossip_menu_id`=4481 WHERE `entry`=5480; +UPDATE `creature_template` SET `gossip_menu_id`=4482 WHERE `entry`=5479; +UPDATE `creature_template` SET `gossip_menu_id`=4502 WHERE `entry`=918; +UPDATE `creature_template` SET `gossip_menu_id`=4503 WHERE `entry`=461; +UPDATE `creature_template` SET `gossip_menu_id`=4504 WHERE `entry`=5496; +UPDATE `creature_template` SET `gossip_menu_id`=4505 WHERE `entry`=5495; +UPDATE `creature_template` SET `gossip_menu_id`=4508 WHERE `entry`=5504; +UPDATE `creature_template` SET `gossip_menu_id`=4783 WHERE `entry`=2879; +UPDATE `creature_template` SET `gossip_menu_id`=4941 WHERE `entry`=332; +UPDATE `creature_template` SET `gossip_menu_id`=5061 WHERE `entry`=13283; +UPDATE `creature_template` SET `gossip_menu_id`=5641 WHERE `entry`=6122; +UPDATE `creature_template` SET `gossip_menu_id`=5849 WHERE `entry`=14450; +UPDATE `creature_template` SET `gossip_menu_id`=8110 WHERE `entry`=20407; +UPDATE `creature_template` SET `gossip_menu_id`=8631 WHERE `entry`=23050; +UPDATE `creature_template` SET `gossip_menu_id`=9729 WHERE `entry`=28650; +UPDATE `creature_template` SET `gossip_menu_id`=9823 WHERE `entry`=29725; +UPDATE `creature_template` SET `gossip_menu_id`=10392 WHERE `entry`=5193; +UPDATE `creature_template` SET `gossip_menu_id`=10606 WHERE `entry`=34998; +UPDATE `creature_template` SET `gossip_menu_id`=10606 WHERE `entry`=34997; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (341,581,645,648,657,660,682,683,684,687,688,689,690,692,693,698,701,702,703,705,706,4146,4161,4201,4203,4353,9823) AND `id` IN (0); +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9823) AND `id` IN (4); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(341,0,5, 'Make this inn your home.',8,65536,0,0,0,0, ''), +(581,0,3, 'Train me.',5,16,0,0,0,0, ''), +(645,0,3, 'Train me.',5,16,0,0,0,0, ''), +(648,0,3, 'Train me.',5,16,0,0,0,0, ''), +(657,0,3, 'Train me.',5,16,0,0,0,0, ''), +(660,0,3, 'Train me.',5,16,0,0,0,0, ''), +(682,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(683,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(684,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(687,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(688,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(689,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(690,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(692,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(693,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(698,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(701,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(702,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(703,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(705,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(706,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(4146,0,3, 'Train me.',5,16,0,0,0,0, ''), +(4161,0,3, 'Train me.',5,16,0,0,0,0, ''), +(4201,0,3, 'Train me.',5,16,0,0,0,0, ''), +(4203,0,3, 'Train me.',5,16,0,0,0,0, ''), +(4353,0,3, 'Train me.',5,16,0,0,0,0, ''), +(9823,0,0, 'I''ve lost my key to Scholomance.',1,1,0,0,0,0, ''), +(9823,4,0, 'I''ve lost my Shadowforge Key.',1,1,0,0,0,0, ''); + +-- Insert npc_text from sniff +DELETE FROM `npc_text` WHERE `ID` IN (1123); +INSERT INTO `npc_text` (`ID`,`prob0`,`text0_0`,`text0_1`,`lang0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`prob1`,`text1_0`,`text1_1`,`lang1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`prob2`,`text2_0`,`text2_1`,`lang2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`prob3`,`text3_0`,`text3_1`,`lang3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`prob4`,`text4_0`,`text4_1`,`lang4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`prob5`,`text5_0`,`text5_1`,`lang5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`prob6`,`text6_0`,`text6_1`,`lang6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`prob7`,`text7_0`,`text7_1`,`lang7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`,`WDBVerified`) VALUES +(1123,100,'Can''t ye see I''m busy? This had better be good.','',7,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,1); diff --git a/sql/old/3.3.5a/2012_01_04_12_world_gosip_menu.sql b/sql/old/3.3.5a/2012_01_04_12_world_gosip_menu.sql new file mode 100644 index 00000000000..a57dc7bcdba --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_12_world_gosip_menu.sql @@ -0,0 +1,30 @@ +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=752 AND `text_id`=1302; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (752,1302); +DELETE FROM `gossip_menu` WHERE `entry`=1541 AND `text_id`=2213; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1541,2213); +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=752 WHERE `entry`=7363; +UPDATE `creature_template` SET `gossip_menu_id`=11618 WHERE `entry`=9540; +UPDATE `creature_template` SET `gossip_menu_id`=1541 WHERE `entry`=8816; +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (1541) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(1541,0,0, 'I wish to face the Defiler.',1,1,0,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9735 AND `text_id`=13342; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9735,13342); +DELETE FROM `gossip_menu` WHERE `entry`=9754 AND `text_id`=13397; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9754,13397); +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9735 WHERE `entry`=28760; +UPDATE `creature_template` SET `gossip_menu_id`=9769 WHERE `entry`=28914; +UPDATE `creature_template` SET `gossip_menu_id`=9762 WHERE `entry`=28912; +UPDATE `creature_template` SET `gossip_menu_id`=9795 WHERE `entry`=29173; +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9735,9769,9795) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(9735,0,1, 'Yes, Hargus. I wish to purchase supplies.',3,128,0,0,0,0, ''), +(9769,0,0, 'I missed the gate to Acherus, Orbaz. Could you please open another?',1,1,0,0,0,0, ''), +(9795,0,0, 'I am ready, Highlord. Let the siege of Light''s Hope begin!',1,1,0,0,0,0, ''); diff --git a/sql/old/3.3.5a/2012_01_04_13_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_04_13_world_gossip_menu.sql new file mode 100644 index 00000000000..5a102db3f08 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_13_world_gossip_menu.sql @@ -0,0 +1,88 @@ +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=8895 AND `text_id`=11667; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8895,11667); +DELETE FROM `gossip_menu` WHERE `entry`=8805 AND `text_id`=11291; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8805,11291); +DELETE FROM `gossip_menu` WHERE `entry`=10116 AND `text_id`=14042; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10116,14042); +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=8895 WHERE `entry`=24111; +UPDATE `creature_template` SET `gossip_menu_id`=8805 WHERE `entry`=23733; +UPDATE `creature_template` SET `gossip_menu_id`=10116 WHERE `entry`=26914; +UPDATE `creature_template` SET `gossip_menu_id`=9879 WHERE `entry`=26916; +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (10116) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(10116,0,3, 'Train me.',5,16,0,0,0,0, ''); +-- Insert npc_text from sniff +DELETE FROM `npc_text` WHERE `ID` IN (11291); +INSERT INTO `npc_text` (`ID`,`prob0`,`text0_0`,`text0_1`,`lang0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`prob1`,`text1_0`,`text1_1`,`lang1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`prob2`,`text2_0`,`text2_1`,`lang2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`prob3`,`text3_0`,`text3_1`,`lang3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`prob4`,`text4_0`,`text4_1`,`lang4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`prob5`,`text5_0`,`text5_1`,`lang5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`prob6`,`text6_0`,`text6_1`,`lang6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`prob7`,`text7_0`,`text7_1`,`lang7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`,`WDBVerified`) VALUES +(11291,1,'When I grow up I want to be a stable man!','',0,0,1,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,1); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=7434 AND `text_id`=8983; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (7434,8983); +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=7434 WHERE `entry`=17440; +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=10922 AND `text_id`=15171; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10922,15171); +DELETE FROM `gossip_menu` WHERE `entry`=10950 AND `text_id`=15215; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10950,15215); +DELETE FROM `gossip_menu` WHERE `entry`=10909 AND `text_id`=15157; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10909,15157); +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=10922 WHERE `entry`=37592; +UPDATE `creature_template` SET `gossip_menu_id`=10950 WHERE `entry`=37223; +UPDATE `creature_template` SET `gossip_menu_id`=10909 WHERE `entry`=37554; + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (10950) AND `id` IN (0,1); +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (10909) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(10950,0,0, 'Can you remove the sword?',1,1,0,0,0,0, ''), +(10950,1,0, 'Dark Lady, I think I hear Arthas coming. Whatever you''re going to do, do it quickly.',1,1,0,0,0,0, ''), +(10909,0,0, 'We''re ready! Let''s go!',1,1,0,0,0,0, ''); +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9024 AND `text_id`=12194; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9024,12194); + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9024) AND `id` IN (0,1,2,3); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(9024,0,0, '<Get on the work bench and let Walt put you in the golem suit.>',1,1,0,0,0,0, ''), +(9024,1,0, '<Get on the work bench and let Walt put you in the golem suit.>',1,1,0,0,0,0, ''), +(9024,2,0, '<Get on the work bench and let Walt put you in the golem suit.>',1,1,0,0,0,0, ''), +(9024,3,0, '<Get on the work bench and let Walt put you in the golem suit.>',1,1,0,0,0,0, ''); + +-- Gossip conditions +SET @ID := 9024; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@ID; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,@ID,0,0,9,11485,0,0,0,'','Show gossip option if player has quest Iron Rune Constructs and You: Rocket Jumping'), +(15,@ID,1,0,9,11489,0,0,0,'','Show gossip option if player has quest Iron Rune Constructs and You: Collecting Data'), +(15,@ID,2,0,9,11491,0,0,0,'','Show gossip option if player has quest Iron Rune Constructs and You: The Bluff'), +(15,@ID,3,0,9,11494,0,0,0,'','Show gossip option if player has quest Lightning Infused Relics'); + + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=8560 AND `text_id`=10723; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8560,10723); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9562 AND `text_id`=12881; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9562,12881); +DELETE FROM `gossip_menu` WHERE `entry`=9562 AND `text_id`=12882; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9562,12882); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9562 WHERE `entry`=27318; + +-- Gossip conditions +SET @ID := 9562; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=@ID; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@ID,12882,0,8,12311,0,0,0,'','Show gossip text if player completed quest The Noble''s Crypt'); + +UPDATE `creature_template` SET `gossip_menu_id`=0 WHERE `entry`=14354; + diff --git a/sql/old/3.3.5a/2012_01_04_14_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_04_14_world_gossip_menu.sql new file mode 100644 index 00000000000..be28d634899 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_14_world_gossip_menu.sql @@ -0,0 +1,71 @@ +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9635 AND `text_id`=13322; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9635,13322); +DELETE FROM `gossip_menu` WHERE `entry`=9724 AND `text_id`=13307; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9724,13307); +DELETE FROM `gossip_menu` WHERE `entry`=9720 AND `text_id`=13303; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9720,13303); +DELETE FROM `gossip_menu` WHERE `entry`=9688 AND `text_id`=13147; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9688,13147); +DELETE FROM `gossip_menu` WHERE `entry`=9738 AND `text_id`=13352; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9738,13352); +DELETE FROM `gossip_menu` WHERE `entry`=9723 AND `text_id`=13306; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9723,13306); +DELETE FROM `gossip_menu` WHERE `entry`=9721 AND `text_id`=13304; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9721,13304); +DELETE FROM `gossip_menu` WHERE `entry`=9722 AND `text_id`=13305; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9722,13305); +DELETE FROM `gossip_menu` WHERE `entry`=9748 AND `text_id`=13366; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9748,13366); +DELETE FROM `gossip_menu` WHERE `entry`=9677 AND `text_id`=13124; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9677,13124); +DELETE FROM `gossip_menu` WHERE `entry`=9679 AND `text_id`=13124; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9679,13124); +DELETE FROM `gossip_menu` WHERE `entry`=9684 AND `text_id`=13124; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9684,13124); +DELETE FROM `gossip_menu` WHERE `entry`=9742 AND `text_id`=13361; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9742,13361); +DELETE FROM `gossip_menu` WHERE `entry`=9678 AND `text_id`=13137; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9678,13137); +DELETE FROM `gossip_menu` WHERE `entry`=9686 AND `text_id`=13138; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9686,13138); +DELETE FROM `gossip_menu` WHERE `entry`=9743 AND `text_id`=13362; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9743,13362); +DELETE FROM `gossip_menu` WHERE `entry`=9746 AND `text_id`=13365; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9746,13365); +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9724 WHERE `entry`=28604; +UPDATE `creature_template` SET `gossip_menu_id`=9720 WHERE `entry`=27801; +UPDATE `creature_template` SET `gossip_menu_id`=9688 WHERE `entry`=28376; +UPDATE `creature_template` SET `gossip_menu_id`=9738 WHERE `entry`=28771; +UPDATE `creature_template` SET `gossip_menu_id`=9723 WHERE `entry`=28374; +UPDATE `creature_template` SET `gossip_menu_id`=9748 WHERE `entry`=28216; +UPDATE `creature_template` SET `gossip_menu_id`=9677 WHERE `entry`=28217; +UPDATE `creature_template` SET `gossip_menu_id`=9742 WHERE `entry`=28027; +UPDATE `creature_template` SET `gossip_menu_id`=9678 WHERE `entry`=28315; +UPDATE `creature_template` SET `gossip_menu_id`=9743 WHERE `entry`=28114; +UPDATE `creature_template` SET `gossip_menu_id`=9746 WHERE `entry`=28122; +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9804,9750,9713,9720,9721,9722,9674,9677,9684,9678,9686,9728,2384,1624) AND `id` IN (0); +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (10024,9724,2384) AND `id` IN (1); +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9742,2384) AND `id` IN (2); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(10024,1,0, 'I''m ready to fly to Sholazar Basin.',1,1,0,0,0,0, ''), +(9804,0,1, 'Show me what you have for sale.',3,128,0,0,0,0, ''), +(9750,0,3, 'Train me.',5,16,0,0,0,0, ''), +(9724,1,0, 'Have a spare bunch of bananas?',1,1,0,0,0,0, ''), +(9713,0,0, 'I''m ready to start the distillation, uh, Tipsy.',1,1,0,0,0,0, ''), +(9720,0,0, 'I want to stop the Scourge as much as you do. How can I help?',1,1,9721,0,0,0, ''), +(9721,0,0, 'You can trust me. I am no friend of the Lich King''s.',1,1,9722,0,0,0, ''), +(9722,0,0, 'I will not fail.',1,1,0,0,0,0, ''), +(9674,0,0, 'You look safe enough... let''s do this.',1,1,0,0,0,0, ''), +(9677,0,0, '<Reach down and pull the Injured Rainspeaker Oracle to its feet.>',1,1,0,0,0,0, ''), +(9684,0,0, 'I am ready to travel to your village now.',1,1,0,0,0,0, ''), +(9678,0,0, 'Shaman Vekjik, I have spoken with the big-tongues and they desire peace. I have brought this offering on their behalf.',1,1,9686,0,0,0, ''), +(9686,0,0, 'No no... I had no intentions of betraying your people. I was only defending myself. It was all a misunderstanding.',1,1,0,0,0,0, ''), +(9742,2,0, 'I need to find Jaloot, do you have his favorite crystal?',1,1,0,0,0,0, ''), +(9728,0,0, '<Check for a pulse...>',1,1,0,0,0,0, ''), +(2384,0,3, 'I am interested in warlock training.',5,16,0,0,0,0, ''), +(2384,1,0, 'I wish to unlearn my talents.',16,16,0,0,0,0, ''), +(2384,2,0, 'I wish to know about Dual Talent Specialization.',1,1,0,0,0,0, ''), +(1624,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''); diff --git a/sql/old/3.3.5a/2012_01_04_15_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_04_15_world_gossip_menu.sql new file mode 100644 index 00000000000..38d449640f2 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_04_15_world_gossip_menu.sql @@ -0,0 +1,26 @@ +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9475 AND `text_id`=12733; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9475,12733); +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9475 WHERE `entry`=27060; +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9786 AND `text_id`=13466; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9786,13466); +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9574 WHERE `entry`=27659; +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9574) AND `id` IN (0,1,4); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(9574,0,0, 'What should we do next?',1,1,9786,0,0,0, ''), +(9574,1,0, 'I want to fly on the wings of the Bronze Flight.',1,1,0,0,0,0, ''), +(9574,4,0, 'What abilities do Amber Drakes have?',1,1,0,0,0,0, ''); +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9690 AND `text_id`=13157; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9690,13157); +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9690 WHERE `entry`=26664; +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=10009 AND `text_id`=13873; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10009,13873); +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=10009 WHERE `entry`=30871; diff --git a/sql/old/3.3.5a/2012_01_05_00_world_script_texts.sql b/sql/old/3.3.5a/2012_01_05_00_world_script_texts.sql new file mode 100644 index 00000000000..2fcaaf83e49 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_00_world_script_texts.sql @@ -0,0 +1,2 @@ +UPDATE `script_texts` SET `content_default` = "Noooo! This torture is inhumane! You have what you want... why don't you just kill me?" WHERE `entry`="-1571030"; +UPDATE `script_texts` SET `content_default` = "Pathetic fool! A servant of Malygos would sooner die than aid an enemy..." WHERE `entry`= "-1571024"; diff --git a/sql/old/3.3.5a/2012_01_05_01_world_gameobject.sql b/sql/old/3.3.5a/2012_01_05_01_world_gameobject.sql new file mode 100644 index 00000000000..15b2f5dc408 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_01_world_gameobject.sql @@ -0,0 +1,5 @@ +-- Template updates for gameobject 186831 (Saga of the Twins) +UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry`=186831; -- Saga of the Twins +DELETE FROM `gameobject` WHERE `id`=186831; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(216,186831,571,1,1,957.1025,-5308.23,189.3529,2.600535,0,0,0.9636297,0.267241,300,100,1); diff --git a/sql/old/3.3.5a/2012_01_05_02_world_gameobject_template.sql b/sql/old/3.3.5a/2012_01_05_02_world_gameobject_template.sql new file mode 100644 index 00000000000..022c82d539d --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_02_world_gameobject_template.sql @@ -0,0 +1,7 @@ +-- Fixing quest 12234 "Need to Know" +UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry`=188675; -- Scarlet Onslaught Daily Orders: Barracks by sniff +UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry`=188676; -- Scarlet Onslaught Daily Orders: Abbey by sniff +UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry`=188677; -- Scarlet Onslaught Daily Orders: Beach by sniff +DELETE FROM `gameobject` WHERE `id`=188677; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(219,188677,571,1,1,2567.449,-388.7118,3.573463,-2.879789,0,0,-0.9914446,0.1305283,300,100,1); diff --git a/sql/old/3.3.5a/2012_01_05_03_world_creature_model_info.sql b/sql/old/3.3.5a/2012_01_05_03_world_creature_model_info.sql new file mode 100644 index 00000000000..8da923db96b --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_03_world_creature_model_info.sql @@ -0,0 +1,7 @@ +-- Template updates for creature 31798 (Athan) +-- Model data 23823 (creature 31798 (Athan)) +UPDATE `creature_model_info` SET `bounding_radius`=2.06,`combat_reach`=0,`gender`=2 WHERE `modelid`=23823; -- Athan +-- Addon data for creature 31798 (Athan) +DELETE FROM `creature_template_addon` WHERE `entry`=31798; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(31798,0,0,1,0, NULL); -- Athan diff --git a/sql/old/3.3.5a/2012_01_05_04_world_gameobject.sql b/sql/old/3.3.5a/2012_01_05_04_world_gameobject.sql new file mode 100644 index 00000000000..4090eb0c123 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_04_world_gameobject.sql @@ -0,0 +1,4 @@ +-- add South Point Station Valve gameobject +DELETE FROM `gameobject` WHERE `id`=188109; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(221,188109,571,1,1,3792.77,4808.874,-11.56067,1.483528,0,0,0.6755896,0.7372779,0,0,1); diff --git a/sql/old/3.3.5a/2012_01_05_05_world_creature.sql b/sql/old/3.3.5a/2012_01_05_05_world_creature.sql new file mode 100644 index 00000000000..b902db64ee6 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_05_world_creature.sql @@ -0,0 +1,2 @@ +-- Update position of a Stormforged Raider that was flying +UPDATE `creature` SET position_X=8471.19, position_Y=-105.686, position_Z=792.018 WHERE guid=114177; diff --git a/sql/old/3.3.5a/2012_01_05_06_world_spell_script_names.sql b/sql/old/3.3.5a/2012_01_05_06_world_spell_script_names.sql new file mode 100644 index 00000000000..1a22c2916bb --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_06_world_spell_script_names.sql @@ -0,0 +1,2 @@ +-- add voices for Currupted Ashbringer +UPDATE `spell_script_names` SET `spell_id`=28414 WHERE `ScriptName`= 'spell_item_ashbringer'; diff --git a/sql/old/3.3.5a/2012_01_05_07_world_creature_template.sql b/sql/old/3.3.5a/2012_01_05_07_world_creature_template.sql new file mode 100644 index 00000000000..b3f0c8aeec6 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_07_world_creature_template.sql @@ -0,0 +1,9 @@ +UPDATE `creature_template` SET `npcflag`=`npcflag`|16777216,`unit_flags`=`unit_flags`|16777216,`spell1`=50978,`spell2`=50980,`spell3`=50985,`spell4`=50983,`spell5`=54166,`VehicleId`=111,`Health_mod`=18,`Mana_mod`=12,`questItem1`=0,`AIName`='',`ScriptName`='' WHERE `entry`=28222; + +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=28222; +INSERT INTO `npc_spellclick_spells` (`npc_entry`,`spell_id`,`quest_start`,`quest_start_active`,`quest_end`,`cast_flags`,`aura_required`,`aura_forbidden`,`user_type`) VALUES +(28222,52082,12546,1,12546,1,0,0,0); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=16 AND `SourceEntry`=28222; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(16,0,28222,0,23,4282,0,0,0,'','Ride vehicle only in Area'); diff --git a/sql/old/3.3.5a/2012_01_05_08_world_creature_template.sql b/sql/old/3.3.5a/2012_01_05_08_world_creature_template.sql new file mode 100644 index 00000000000..e62617c0914 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_08_world_creature_template.sql @@ -0,0 +1,2 @@ +-- Fix Highlord Nemesis Trainer +UPDATE `creature_template` SET `unit_flags`=131072,`flags_extra`=262144,`ScriptName`= 'npc_training_dummy' WHERE `entry`=32547; diff --git a/sql/old/3.3.5a/2012_01_05_09_world_waypoint_data.sql b/sql/old/3.3.5a/2012_01_05_09_world_waypoint_data.sql new file mode 100644 index 00000000000..6299472a263 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_09_world_waypoint_data.sql @@ -0,0 +1,73 @@ +-- Spawn & Pathing for Nethervine Inciter Entry: 19511 "Not Spawned" +SET @NPC := 40252; +DELETE FROM `creature` WHERE `guid` IN (@NPC); +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES +(@NPC,19511,553,1,1,0,0,13.71129,556.805,-18.16187,0.41887,300,0,0,1,0,2); +SET @PATH := @NPC * 10; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,34.53745,554.1877,-18.31396,0,0,0,0,100,0), +(@PATH,2,13.71129,556.805,-18.16187,0,0,0,0,100,0), +(@PATH,3,-11.50565,559.8253,-18.09619,0,0,0,0,100,0), +(@PATH,4,-29.17254,568.2135,-17.99052,0,0,0,0,100,0), +(@PATH,5,-11.50565,559.8253,-18.09619,0,0,0,0,100,0), +(@PATH,6,13.71129,556.805,-18.16187,0,0,0,0,100,0); +-- .go 34.53745 554.1877 -18.31396 + +-- Pathing for Nethervine Inciter Entry: 19511 +SET @NPC := 83086; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-37.1817,`position_y`=524.0293,`position_z`=-10.16431 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-21.58225,517.7063,-6.475254,0,0,0,0,100,0), +(@PATH,2,-9.34382,516.5084,-5.636462,0,0,0,0,100,0), +(@PATH,3,4.990617,518.1604,-7.138422,0,0,0,0,100,0), +(@PATH,4,19.44558,526.3201,-11.25785,0,0,0,0,100,0), +(@PATH,5,23.91135,540.4265,-18.37715,0,0,0,0,100,0), +(@PATH,6,18.10396,548.5428,-18.3295,0,0,0,0,100,0), +(@PATH,7,-1.83314,553.5635,-18.1602,0,0,0,0,100,0), +(@PATH,8,-17.95817,553.2923,-18.19155,0,0,0,0,100,0), +(@PATH,9,-30.42817,550.3372,-18.30474,0,0,0,0,100,0), +(@PATH,10,-43.32164,544.6859,-18.35999,0,0,0,0,100,0), +(@PATH,11,-46.76561,533.5467,-15.89331,0,0,0,0,100,0), +(@PATH,12,-37.1817,524.0293,-10.16431,0,0,0,0,100,0); +-- .go -21.58225 517.7063 -6.475254 + +-- Pathing for Nethervine Inciter Entry: 19511 +SET @NPC := 83072; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-10.81185,`position_y`=498.6948,`position_z`=-5.355443 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-10.5063,509.9379,-5.275531,0,0,0,0,100,0), +(@PATH,2,-10.81185,498.6948,-5.355443,0,0,0,0,100,0), +(@PATH,3,2.500325,493.4179,-5.437914,0,0,0,0,100,0), +(@PATH,4,15.09316,496.8965,-5.464271,0,0,0,0,100,0), +(@PATH,5,2.500325,493.4179,-5.437914,0,0,0,0,100,0), +(@PATH,6,-10.81185,498.6948,-5.355443,0,0,0,0,100,0); +-- .go -10.5063 509.9379 -5.275531 + +-- Pathing for Nethervine Inciter Entry: 19511 +SET @NPC := 83073; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-6.525395,`position_y`=482.9323,`position_z`=-5.492778 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,1.63937,482.4999,-5.53459,0,0,0,0,100,0), +(@PATH,2,-6.525395,482.9323,-5.492778,0,0,0,0,100,0), +(@PATH,3,-13.81937,488.856,-5.425375,0,0,0,0,100,0), +(@PATH,4,-17.63536,496.55,-5.370692,0,0,0,0,100,0), +(@PATH,5,-16.29433,503.0782,-5.324292,0,0,0,0,100,0), +(@PATH,6,-17.63536,496.55,-5.370692,0,0,0,0,100,0), +(@PATH,7,-13.81937,488.856,-5.425375,0,0,0,0,100,0), +(@PATH,8,-6.525395,482.9323,-5.492778,0,0,0,0,100,0); +-- .go 1.63937 482.4999 -5.53459 diff --git a/sql/old/3.3.5a/2012_01_05_10_world_creature_template.sql b/sql/old/3.3.5a/2012_01_05_10_world_creature_template.sql new file mode 100644 index 00000000000..a3d8d2432b5 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_10_world_creature_template.sql @@ -0,0 +1,2 @@ +-- Set correct immunemasks for Scourgelord Tyrannus +UPDATE `creature_template` SET `mechanic_immune_mask` = mechanic_immune_mask|1|2|4|16|32|64|128|256|512|1024|2048|4096|8192|131072|4194304|8388608|67108864|536870912 WHERE `entry` in (36658,36938); diff --git a/sql/old/3.3.5a/2012_01_05_11_world_creature_onkill_reputation.sql b/sql/old/3.3.5a/2012_01_05_11_world_creature_onkill_reputation.sql new file mode 100644 index 00000000000..047c0453608 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_11_world_creature_onkill_reputation.sql @@ -0,0 +1,6 @@ +-- remade incorrect gain of ashen verdict reputation according to http://www.wowwiki.com/Ashen_Verdict +-- there were incorrect values for trash mobs ( before=25 for kill, must to be 15) +-- for Lich King it must to be 1500 and for Deathbound Wards and Deathspeaker High Priests 45 +UPDATE `creature_onkill_reputation` SET `RewOnKillRepValue1` = 1500 WHERE `creature_id` IN (36597,39166,39167,39168); +UPDATE `creature_onkill_reputation` SET `RewOnKillRepValue1` = 45 WHERE `creature_id` IN (36829,37007); +UPDATE `creature_onkill_reputation` SET `RewOnKillRepValue1` = 15 WHERE `creature_id` IN (36619,36724,36725,36791,36805,36807,36808,36811,36880,36957,36960,36968,36982,37011,37012,37022,37029,37030,37031,37032,37033,37034,37035,37117,37125,37127,37132,37133,37134,37146,37149,37228,37229,37232,37501,37502,37531,37532,37546,37571,37595,37662,37663,37664,37665,37666,37695,37782,37886,37890,37919,37934,37949,38125,38159,38184,38369,38472,38485,38508,38711,38712); diff --git a/sql/old/3.3.5a/2012_01_05_12_world_game_event_seasonal_questrelation.sql b/sql/old/3.3.5a/2012_01_05_12_world_game_event_seasonal_questrelation.sql new file mode 100644 index 00000000000..ad6013b0edf --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_12_world_game_event_seasonal_questrelation.sql @@ -0,0 +1,5 @@ +UPDATE `game_event_seasonal_questrelation` SET `event`=8 WHERE `event`=-1; + +ALTER TABLE `game_event_seasonal_questrelation` + CHANGE `quest` `questId` int(10) unsigned NOT NULL COMMENT 'Quest Identifier', + CHANGE `event` `eventEntry` mediumint(8) unsigned NOT NULL DEFAULT 0 COMMENT 'Entry of the game event'; diff --git a/sql/old/3.3.5a/2012_01_05_13_world_creature_transport.sql b/sql/old/3.3.5a/2012_01_05_13_world_creature_transport.sql new file mode 100644 index 00000000000..3acb70a4442 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_13_world_creature_transport.sql @@ -0,0 +1,2 @@ +-- put Brother Keltan on the correct ship +UPDATE `creature_transport` SET `guid`=1, `transport_entry`=192241, `TransOffsetX`=-24.08398, `TransOffsetY`=-22.21777, `TransOffsetZ`=24.37781 WHERE `guid`=66 AND `transport_entry`=192242; diff --git a/sql/old/3.3.5a/2012_01_05_14_world_command.sql b/sql/old/3.3.5a/2012_01_05_14_world_command.sql new file mode 100644 index 00000000000..d890ab5509c --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_14_world_command.sql @@ -0,0 +1 @@ +INSERT INTO `command` (`name`, `security`, `help`) VALUES ('reload wp_data', 3, 'Syntax: .reload wp_data will reload waypoint_data table.'); diff --git a/sql/old/3.3.5a/2012_01_05_14_world_creature_template.sql b/sql/old/3.3.5a/2012_01_05_14_world_creature_template.sql new file mode 100644 index 00000000000..331a533812d --- /dev/null +++ b/sql/old/3.3.5a/2012_01_05_14_world_creature_template.sql @@ -0,0 +1,9 @@ +-- Added equipment template, corrected unit_flags and fixed model bounding for The Etymidian +SET @EQUIP := 2477; + +UPDATE `creature_template` SET `unit_flags`=`unit_flags`|8,`equipment_id`=@EQUIP WHERE `entry`=28222; +UPDATE `creature_model_info` SET `bounding_radius`=0.42,`combat_reach`=2.4 WHERE `modelid`=25928; + +DELETE FROM `creature_equip_template` WHERE `entry`=@EQUIP; +INSERT INTO `creature_equip_template` (`entry`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES +(@EQUIP,25316,0,0); diff --git a/sql/old/3.3.5a/2012_01_06_00_world_creature_template_addon.sql b/sql/old/3.3.5a/2012_01_06_00_world_creature_template_addon.sql new file mode 100644 index 00000000000..0ebc498ac03 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_06_00_world_creature_template_addon.sql @@ -0,0 +1,4 @@ +-- Give Sai'kkal Invisibility aura to Sai'kkal +DELETE FROM `creature_template_addon` WHERE `entry`=22932; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(22932,0,0,0,0,'39680'); diff --git a/sql/old/3.3.5a/2012_01_06_00_world_misc.sql b/sql/old/3.3.5a/2012_01_06_00_world_misc.sql new file mode 100644 index 00000000000..5cc96ef17a8 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_06_00_world_misc.sql @@ -0,0 +1,189 @@ +SET @NPC_SIMON_BUNNY := 22923; +SET @GO_APEXIS_RELIC := 185890; +SET @GO_APEXIS_MONUMENT := 185944; + +SET @SPELL_SIMON_BLUE_VISUAL := 40244; +SET @SPELL_SIMON_GREEN_VISUAL := 40245; +SET @SPELL_SIMON_RED_VISUAL := 40246; +SET @SPELL_SIMON_YELLOW_VISUAL := 40247; + +SET @ITEM_APEXIS_SHARD := 32569; +SET @QUEST_THE_CRYSTALS := 11025; +SET @QUEST_GUARDIAN_MONUMENT := 11059; +SET @GOSSIP_MENU_ID_NORMAL := 8703; +SET @GOSSIP_MENU_ID_LARGE := 8704; + +SET @ID_SPELL_GROUP := 1115; + +UPDATE `creature_template` SET `ScriptName` = 'npc_simon_bunny',`flags_extra` = 130 WHERE `entry` = @NPC_SIMON_BUNNY; +UPDATE `gameobject_template` SET `ScriptName` = 'go_apexis_relic' WHERE `entry` IN (@GO_APEXIS_MONUMENT,@GO_APEXIS_RELIC); +-- Update is done via displayid since there are 28 entries for each color +UPDATE `gameobject_template` SET `flags` = 16,`ScriptName` = 'go_simon_cluster' WHERE `displayId` IN (7364,7365,7366,7367,7369,7371,7373,7375); + +-- Spell stacking rules for Introspection and Apexis reward spells +DELETE FROM `spell_group` WHERE `spell_id` IN (40055,40165,40166,40167,40623,40625,40626); +INSERT INTO `spell_group` (`id`,`spell_id`) VALUES +(@ID_SPELL_GROUP+0,40055), +(@ID_SPELL_GROUP+0,40165), +(@ID_SPELL_GROUP+0,40166), +(@ID_SPELL_GROUP+0,40167), +(@ID_SPELL_GROUP+1,40623), +(@ID_SPELL_GROUP+1,40625), +(@ID_SPELL_GROUP+1,40626); + +DELETE FROM `spell_group_stack_rules` WHERE `group_id` IN (@ID_SPELL_GROUP,@ID_SPELL_GROUP+1); +INSERT INTO `spell_group_stack_rules` (`group_id`,`stack_rule`) VALUES +(@ID_SPELL_GROUP+0,1), +(@ID_SPELL_GROUP+1,1); +-- + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` IN (@SPELL_SIMON_BLUE_VISUAL,@SPELL_SIMON_GREEN_VISUAL,@SPELL_SIMON_RED_VISUAL,@SPELL_SIMON_YELLOW_VISUAL); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` IN (@GOSSIP_MENU_ID_NORMAL,@GOSSIP_MENU_ID_LARGE); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +-- Apexis Relic gossip option conditions +(15,@GOSSIP_MENU_ID_NORMAL,0,0,8,@QUEST_THE_CRYSTALS ,0,0,0,'','Apexis Relic Gossip Condition - Must have completed quest The Crystals'), +(15,@GOSSIP_MENU_ID_NORMAL,0,0,2,@ITEM_APEXIS_SHARD,1,0,0,'','Apexis Relic Gossip Condition - Must have an Apexis Shard'), +-- Apexis Monument gossip option conditions +(15,@GOSSIP_MENU_ID_LARGE,0,0,9,@QUEST_GUARDIAN_MONUMENT ,0,0,0,'','Apexis Monument Gossip Condition - Must be on quest Guardian of the Monument'), +(15,@GOSSIP_MENU_ID_LARGE,0,0,2,@ITEM_APEXIS_SHARD,35,0,0,'','Apexis Monument Gossip Condition - Must have 35 Apexis Shard'), +-- Visual color spells should target their correspondant cluster color +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185604,0,0,'','Simon Game - Blue visual target Large Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185609,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185617,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185625,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185637,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185640,0,0,'','Simon Game - Blue visual target Large Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185647,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185649,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185652,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185659,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185660,0,0,'','Simon Game - Blue visual target Large Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185665,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185669,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185673,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185770,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185772,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185776,0,0,'','Simon Game - Blue visual target Large Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185780,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185784,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185791,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185795,0,0,'','Simon Game - Blue visual target Large Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185796,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185807,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185808,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185812,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185816,0,0,'','Simon Game - Blue visual target Large Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185820,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185824,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185828,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185832,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185836,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185840,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185844,0,0,'','Simon Game - Blue visual target Large Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185848,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_BLUE_VISUAL,0,18,0,185853,0,0,'','Simon Game - Blue visual target Blue Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185605,0,0,'','Simon Game - Green visual target Large Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185611,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185619,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185627,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185639,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185641,0,0,'','Simon Game - Green visual target Large Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185646,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185651,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185654,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185658,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185661,0,0,'','Simon Game - Green visual target Large Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185667,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185671,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185675,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185768,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185774,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185777,0,0,'','Simon Game - Green visual target Large Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185781,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185786,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185789,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185793,0,0,'','Simon Game - Green visual target Large Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185798,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185805,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185810,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185814,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185818,0,0,'','Simon Game - Green visual target Large Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185822,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185826,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185830,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185834,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185838,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185842,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185846,0,0,'','Simon Game - Green visual target Large Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185850,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_GREEN_VISUAL,0,18,0,185855,0,0,'','Simon Game - Green visual target Green Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185606,0,0,'','Simon Game - Red visual target Large Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185613,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185621,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185626,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185638,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185642,0,0,'','Simon Game - Red visual target Large Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185645,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185650,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185655,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185657,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185662,0,0,'','Simon Game - Red visual target Large Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185666,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185670,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185674,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185771,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185773,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185778,0,0,'','Simon Game - Red visual target Large Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185782,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185785,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185788,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185794,0,0,'','Simon Game - Red visual target Large Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185797,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185804,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185809,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185815,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185817,0,0,'','Simon Game - Red visual target Large Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185823,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185827,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185831,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185835,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185839,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185843,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185845,0,0,'','Simon Game - Red visual target Large Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185851,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_RED_VISUAL,0,18,0,185854,0,0,'','Simon Game - Red visual target Red Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185607,0,0,'','Simon Game - Yellow visual target Large Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185615,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185623,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185624,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185636,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185643,0,0,'','Simon Game - Yellow visual target Large Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185644,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185648,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185653,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185656,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185663,0,0,'','Simon Game - Yellow visual target Large Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185664,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185668,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185672,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185769,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185775,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185779,0,0,'','Simon Game - Yellow visual target Large Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185783,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185787,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185790,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185792,0,0,'','Simon Game - Yellow visual target Large Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185803,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185806,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185811,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185813,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185819,0,0,'','Simon Game - Yellow visual target Large Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185821,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185825,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185829,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185833,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185837,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185841,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185847,0,0,'','Simon Game - Yellow visual target Large Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185849,0,0,'','Simon Game - Yellow visual target Yellow Cluster'), +(13,0,@SPELL_SIMON_YELLOW_VISUAL,0,18,0,185852,0,0,'','Simon Game - Yellow visual target Yellow Cluster');
\ No newline at end of file diff --git a/sql/old/3.3.5a/2012_01_06_01_world_creature_template.sql b/sql/old/3.3.5a/2012_01_06_01_world_creature_template.sql new file mode 100644 index 00000000000..c089209c16f --- /dev/null +++ b/sql/old/3.3.5a/2012_01_06_01_world_creature_template.sql @@ -0,0 +1,2 @@ +-- spell interrupt is loaded from DBC so can be removed from mechanic_immune_mask +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask` &~33554432; diff --git a/sql/old/3.3.5a/2012_01_06_02_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_06_02_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..9e6dddfb949 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_06_02_world_achievement_criteria_data.sql @@ -0,0 +1,24 @@ +DELETE FROM `achievement_criteria_data` WHERE criteria_id IN (5220, 5215, 5218, 5221, 5216, 5219, 5213, 5018, 5217, 5214, 5233, 5235, 5232, 5234, 5238, 5236, 5229, 5237, 5230, 5231); +INSERT INTO `achievement_criteria_data` VALUES +-- Classes +(5220,21, 1,0,''), -- Realm First! Level 80 Warrior +(5215,21, 2,0,''), -- Realm First! Level 80 Paladin +(5218,21, 3,0,''), -- Realm First! Level 80 Hunter +(5221,21, 4,0,''), -- Realm First! Level 80 Rogue +(5216,21, 5,0,''), -- Realm First! Level 80 Priest +(5219,21, 6,0,''), -- Realm First! Level 80 Death Knight +(5213,21, 7,0,''), -- Realm First! Level 80 Shaman +(5018,21, 8,0,''), -- Realm First! Level 80 Mage +(5217,21, 9,0,''), -- Realm First! Level 80 Warlock +(5214,21,11,0,''), -- Realm First! Level 80 Druid +-- Races +(5233,21,0,1,''), -- Realm First! Level 80 Human +(5235,21,0,2,''), -- Realm First! Level 80 Orc +(5232,21,0,3,''), -- Realm First! Level 80 Dwarf +(5234,21,0,4,''), -- Realm First! Level 80 Night Elf +(5238,21,0,5,''), -- Realm First! Level 80 Undead +(5236,21,0,6,''), -- Realm First! Level 80 Tauren +(5229,21,0,7,''), -- Realm First! Level 80 Gnome +(5237,21,0,8,''), -- Realm First! Level 80 Troll +(5230,21,0,10,''), -- Realm First! Level 80 Blood Elf +(5231,21,0,11,''); -- Realm First! Level 80 Draenei diff --git a/sql/old/3.3.5a/2012_01_06_03_world_item_loot_template.sql b/sql/old/3.3.5a/2012_01_06_03_world_item_loot_template.sql new file mode 100644 index 00000000000..e1d6cd94525 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_06_03_world_item_loot_template.sql @@ -0,0 +1,8 @@ +-- Fix Decoy! (8606) quest items drop chance from Narain's Special Kit (21042) +SET @Kit := 21042; +DELETE FROM `item_loot_template` WHERE `entry`= @Kit; +INSERT INTO `item_loot_template` VALUES +(@Kit, 21037, 100, 1, 0, 1, 1), -- Crude Map +(@Kit, 21039, 100, 1, 0, 1, 1), -- Narain's Turban +(@Kit, 21040, 100, 1, 0, 1, 1), -- Narain's Robe +(@Kit, 21041, 100, 1, 0, 1, 1); -- Bag of Gold diff --git a/sql/old/3.3.5a/2012_01_06_04_world_creature_questrelation.sql b/sql/old/3.3.5a/2012_01_06_04_world_creature_questrelation.sql new file mode 100644 index 00000000000..e1dce65f3bc --- /dev/null +++ b/sql/old/3.3.5a/2012_01_06_04_world_creature_questrelation.sql @@ -0,0 +1,5 @@ +-- Fix Captain Vimes questrelation +DELETE FROM `creature_questrelation` WHERE `quest`=1220; +INSERT INTO `creature_questrelation` (`id`,`quest`) VALUES +(4947,1220), +(23951,1220); diff --git a/sql/old/3.3.5a/2012_01_06_05_world_creature_template.sql b/sql/old/3.3.5a/2012_01_06_05_world_creature_template.sql new file mode 100644 index 00000000000..412fab4dab2 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_06_05_world_creature_template.sql @@ -0,0 +1,2 @@ +-- Creatures with EAI flag set but no EAI script +UPDATE `creature_template` SET `AIName` = '' WHERE `entry` IN (29329,29330,29333,29338); diff --git a/sql/old/3.3.5a/2012_01_06_06_world_quest_template.sql b/sql/old/3.3.5a/2012_01_06_06_world_quest_template.sql new file mode 100644 index 00000000000..4f58452d980 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_06_06_world_quest_template.sql @@ -0,0 +1,2 @@ +-- Ogre Heaven fix PrevQuestID +UPDATE `quest_template` SET `PrevQuestID`=11000 WHERE `ID`=11009; diff --git a/sql/old/3.3.5a/2012_01_06_07_world_sai.sql b/sql/old/3.3.5a/2012_01_06_07_world_sai.sql new file mode 100644 index 00000000000..5d322367250 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_06_07_world_sai.sql @@ -0,0 +1,23 @@ +-- Fix Quest 11795, 11887 'Emergency Protocol: Section 8.2, Paragraph C', 'Emergency Supplies' +SET @NPC :=25841; -- Fizzcrank Recon Pilot +SET @Gossip :=21248; + +DELETE FROM `gossip_menu_option` WHERE (`menu_id`=@Gossip AND `id`=1); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(@Gossip,1,0,"Search the body for the pilot's insignia.",1,1,0,0,0,0,''); + +DELETE FROM `conditions` WHERE `SourceGroup`=21248; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,@Gossip,0,0,9,11887,0,0,0,'',''), +(15,@Gossip,1,0,9,11795,0,0,0,'',''); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC 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 +(@NPC,0,0,0,11,0,100,0,0,0,0,0,82,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fizzcrank Recon Pilot - On spawn - set gossip flag'), +(@NPC,0,1,2,62,0,100,0,@Gossip,0,0,0,11,46362,2,0,0,0,0,7,0,0,0,0,0,0,0,'Fizzcrank Recon Pilot - On gossip option 0 select - cast spell'), +(@NPC,0,2,3,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Fizzcrank Recon Pilot - close gossip'), +(@NPC,0,3,7,61,0,100,0,0,0,0,0,83,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fizzcrank Recon Pilot - remove gossip flag'), +(@NPC,0,4,5,62,0,100,0,@Gossip,1,0,0,11,46166,2,0,0,0,0,7,0,0,0,0,0,0,0,'Fizzcrank Recon Pilot - On gossip option 1 select - cast spell'), +(@NPC,0,5,6,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Fizzcrank Recon Pilot - close gossip'), +(@NPC,0,6,7,61,0,100,0,0,0,0,0,83,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fizzcrank Recon Pilot - remove gossip flag'), +(@NPC,0,7,0,61,0,100,0,0,0,0,0,41,3000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fizzcrank Recon Pilot - Despawn'); diff --git a/sql/old/3.3.5a/2012_01_06_08_world_creature_template.sql b/sql/old/3.3.5a/2012_01_06_08_world_creature_template.sql new file mode 100644 index 00000000000..d59a5551f14 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_06_08_world_creature_template.sql @@ -0,0 +1,2 @@ +-- Tiger Matriarch Credit have no SAI script +UPDATE `creature_template` SET `AIName`='' WHERE `entry`=40301; diff --git a/sql/old/3.3.5a/2012_01_06_09_world_creature_questrelation.sql b/sql/old/3.3.5a/2012_01_06_09_world_creature_questrelation.sql new file mode 100644 index 00000000000..c2af677f047 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_06_09_world_creature_questrelation.sql @@ -0,0 +1,9 @@ +-- Fix Report to Gryan Stoutmantle creature_questrelation values +DELETE FROM `creature_questrelation` WHERE `quest` = 109; +INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES +(233,109), -- Farmer Saldean +(237,109), -- Farmer Furlbrow +(240,109), -- Marshal Dughan +(261,109), -- Guard Thomas +(294,109), -- Marshal Haggard +(963,109); -- Deputy Rainer diff --git a/sql/old/3.3.5a/2012_01_06_10_world_creature_template.sql b/sql/old/3.3.5a/2012_01_06_10_world_creature_template.sql new file mode 100644 index 00000000000..c121fd7424b --- /dev/null +++ b/sql/old/3.3.5a/2012_01_06_10_world_creature_template.sql @@ -0,0 +1,2 @@ +-- Drowned Guardian & Phylactery Guardian summoned NPC should not give XP +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|64 WHERE `entry` IN (26225,26224); diff --git a/sql/old/3.3.5a/2012_01_06_11_world_sai.sql b/sql/old/3.3.5a/2012_01_06_11_world_sai.sql new file mode 100644 index 00000000000..c785030b93e --- /dev/null +++ b/sql/old/3.3.5a/2012_01_06_11_world_sai.sql @@ -0,0 +1,14 @@ +-- Quest "Torgos!" 10035 (A) - 10036 (H) +-- Converted to SAI +SET @TRACHELA := 21515; +SET @TORGOS := 18707; +DELETE FROM `creature` WHERE `id`=@TORGOS; -- Torgos must to appear only by quest +UPDATE `creature_template` SET `unit_flags`=`unit_flags`&~256 WHERE `entry`=@TORGOS; -- removing OOC +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@TORGOS,@TRACHELA); +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (@TORGOS,@TRACHELA); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@TORGOS,@TRACHELA); +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 +(@TRACHELA,0,0,0,0,0,100,0,5000,8000,10000,14000,11,32903,1,0,0,0,0,5,0,0,0,0,0,0,0, 'Trachela - On combat - Cast Fevered Disease'), +(@TORGOS,0,0,0,0,0,100,0,2000,5000,12000,20000,11,32022,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Torgos - On combat - Cast Gut Rip'), +(@TORGOS,0,1,0,0,0,100,0,8000,10000,20000,25000,11,13579,1,0,0,0,0,3,0,0,0,0,0,0,0, 'Torgos - On combat - Cast Gouge'), +(@TORGOS,0,2,0,0,0,100,0,5000,8000,10000,14000,11,32903,1,0,0,0,0,5,0,0,0,0,0,0,0, 'Torgos - On combat - Cast Fevered Disease'); diff --git a/sql/old/3.3.5a/2012_01_06_12_world_sai.sql b/sql/old/3.3.5a/2012_01_06_12_world_sai.sql new file mode 100644 index 00000000000..b9c1319347d --- /dev/null +++ b/sql/old/3.3.5a/2012_01_06_12_world_sai.sql @@ -0,0 +1,2 @@ +UPDATE smart_scripts SET action_param2 = action_param3 WHERE action_type = 80; +UPDATE smart_scripts SET action_param3 = 0 WHERE action_type = 80;
\ No newline at end of file diff --git a/sql/old/3.3.5a/2012_01_07_00_world_creature_addon.sql b/sql/old/3.3.5a/2012_01_07_00_world_creature_addon.sql new file mode 100644 index 00000000000..83e1efbac80 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_07_00_world_creature_addon.sql @@ -0,0 +1,2 @@ +-- A-Me 01 and Un'Goro Thunderer (only one) were emoting to be dead +UPDATE `creature_addon` SET `bytes1`=0 WHERE `guid` IN (24268,24081); diff --git a/sql/old/3.3.5a/2012_01_07_01_world_creature_template.sql b/sql/old/3.3.5a/2012_01_07_01_world_creature_template.sql new file mode 100644 index 00000000000..deba1c596f0 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_07_01_world_creature_template.sql @@ -0,0 +1,8 @@ +-- Template updates for creature 36595 (Unleashed Soul) +UPDATE `creature_template` SET `exp`=2,`minlevel`=80,`maxlevel`=80,`baseattacktime`=2000,`speed_walk`=1.111112,`speed_run`=0.71429 WHERE `entry`=36595; -- Unleashed Soul +-- Model data 14594 (creature 36595 (Unleashed Soul)) +UPDATE `creature_model_info` SET `bounding_radius`=1.1,`combat_reach`=1.65,`gender`=2 WHERE `modelid`=14594; -- Unleashed Soul +-- Addon data for creature 36595 (Unleashed Soul) +DELETE FROM `creature_template_addon` WHERE `entry`=36595; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(36595,0,0,1,0, NULL); -- Unleashed Soul diff --git a/sql/old/3.3.5a/2012_01_07_02_world_gameobject_template.sql b/sql/old/3.3.5a/2012_01_07_02_world_gameobject_template.sql new file mode 100644 index 00000000000..438a49d969a --- /dev/null +++ b/sql/old/3.3.5a/2012_01_07_02_world_gameobject_template.sql @@ -0,0 +1,2 @@ +-- Fix Stratholme Service Gate Entrance +UPDATE `gameobject_template` SET `data1`=879 WHERE `entry`=175368; diff --git a/sql/old/3.3.5a/2012_01_07_03_world_creature_template.sql b/sql/old/3.3.5a/2012_01_07_03_world_creature_template.sql new file mode 100644 index 00000000000..fdbdfc5a689 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_07_03_world_creature_template.sql @@ -0,0 +1,8 @@ +-- Set standard immunities to The Nexus bosses. +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|1|2|4|8|16|32|64|256|512|1024|2048|4096|8192|65536|131072|262144|524288|4194304|8388608|67108864|536870912 WHERE `entry` IN +(26731,30510, -- Grand Magus Telestra + 26763,30529, -- Anomalus + 26794,30532, -- Ormorok the Tree-Shaper + 26723,30540, -- Keristrasza + 26796,30398, -- Commander Stoutbeard + 26798,30397); -- Commander Kolurg diff --git a/sql/old/3.3.5a/2012_01_07_04_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_01_07_04_world_creature_loot_template.sql new file mode 100644 index 00000000000..6855308ed82 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_07_04_world_creature_loot_template.sql @@ -0,0 +1,29 @@ +-- Update Narain's Scrying Goggles +SET @Item := 20951; +DELETE FROM `creature_loot_template` WHERE `item`=@Item; +INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +(11502,@Item,-100,1,0,1,1), -- Ragnaros +(11658,@Item,-100,1,0,1,1), -- Molten Giant +(11659,@Item,-100,1,0,1,1), -- Molten Destroyer +(11661,@Item,-100,1,0,1,1), -- Flamewaker +(11662,@Item,-100,1,0,1,1), -- Flamewaker Priest +(11663,@Item,-100,1,0,1,1), -- Flamewaker Healer +(11664,@Item,-100,1,0,1,1), -- Flamewaker Elite +(11665,@Item,-100,1,0,1,1), -- Lava Annihilator +(11666,@Item,-100,1,0,1,1), -- Firewalker +(11667,@Item,-100,1,0,1,1), -- Flameguard +(11669,@Item,-100,1,0,1,1), -- Flame Imp +(11673,@Item,-100,1,0,1,1), -- Ancient Core Hound +(11982,@Item,-100,1,0,1,1), -- Magmadar +(11988,@Item,-100,1,0,1,1), -- Golemagg the Incinerator +(12056,@Item,-100,1,0,1,1), -- Baron Geddon +(12057,@Item,-100,1,0,1,1), -- Garr +(12076,@Item,-100,1,0,1,1), -- Lava Elemental +(12098,@Item,-100,1,0,1,1), -- Sulfuron Harbinger +(12100,@Item,-100,1,0,1,1), -- Lava Reaver +(12101,@Item,-100,1,0,1,1), -- Lava Surger +(12118,@Item,-100,1,0,1,1), -- Lucifron +(12119,@Item,-100,1,0,1,1), -- Flamewaker Protector +(12231,@Item,-100,1,0,1,1), -- Firelord +(12259,@Item,-100,1,0,1,1), -- Gehennas +(12264,@Item,-100,1,0,1,1); -- Shazzrah diff --git a/sql/old/3.3.5a/2012_01_07_05_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_01_07_05_world_creature_loot_template.sql new file mode 100644 index 00000000000..5ffdb8f6261 --- /dev/null +++ b/sql/old/3.3.5a/2012_01_07_05_world_creature_loot_template.sql @@ -0,0 +1,4 @@ +-- correct id for firelord +DELETE FROM `creature_loot_template` WHERE `entry` IN (12231,11668) AND `item`=20951; +INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +(11668,20951,-100,1,0,1,1); -- Firelord diff --git a/sql/updates/characters/2012_01_14_00_characters_lfg_data.sql b/sql/updates/characters/2012_01_14_00_characters_lfg_data.sql new file mode 100644 index 00000000000..3c6671a3914 --- /dev/null +++ b/sql/updates/characters/2012_01_14_00_characters_lfg_data.sql @@ -0,0 +1,8 @@ +DROP TABLE IF EXISTS `lfg_data`; + +CREATE TABLE `lfg_data` ( + `guid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', + `dungeon` INT(10) UNSIGNED NOT NULL DEFAULT '0', + `state` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`guid`) +) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='LFG Data'; diff --git a/sql/updates/characters/2012_01_23_00_characters_character_queststatus_rewarded.sql b/sql/updates/characters/2012_01_23_00_characters_character_queststatus_rewarded.sql new file mode 100644 index 00000000000..d81cf3a6617 --- /dev/null +++ b/sql/updates/characters/2012_01_23_00_characters_character_queststatus_rewarded.sql @@ -0,0 +1 @@ +DELETE FROM `character_queststatus_rewarded` WHERE `quest` IN (8619,8635,8636,8642,8643,8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8670,8671,8672,8673,8674,8675,8676,8677,8678,8679,8680,8681,8682,8683,8684,8685,8686,8688,8713,8714,8715,8716,8717,8718,8719,8720,8721,8722,8723,8724,8725,8726,8727,8862,8863,8864,8865,8866,8867,8870,8871,8872,8873,8874,8875,8876,8877,8878,8879,8880,8881,8882,8883,13012,13013,13014,13015,13016,13017,13018,13019,13020,13021,13022,13023,13024,13025,13026,13027,13028,13029,13030,13031,13032,13033,13065,13066,13067,11120,11431,11442,11409,11318,11117,11400,11419,11118,11122,11293,11294,11321,11407,11408,11412,11413,11441,11446,11454,11486,11487,12020,12022,12318,12193,12062,12491,11447,12191,12492,12194,12192,12278,12306,12420,12421,13932,13649,13931,11127,11320,11347,11437,11438,11444,11445,9319,9322,9323,9324,9325,9326,9330,9331,9332,9339,9365,9367,9368,9386,9388,9389,11657,11691,11731,11882,11883,11886,11891,11915,11917,11921,11922,11923,11924,11925,11926,11933,11935,11947,11948,11952,11953,11954,11955,11964,11966,11970,11971,11972,12012,14022,114023,114024,114028,114030,114033,114036,114037,114040,114041,114043,114044,114064,114065,114035,114047,114048,114051,114053,114054,114055,114058,114059,114060,114061,114062,114488,24597,24609,24656,24657,24745,24848,24849,24666,24792,24804,24611,24536,24612,24635,24636,24655,24610,24629,24614,24576,24613,24615,24638,24645,24647,24648,24649,24650,24651,24652,24658,24659,24660,24662,24663,24664,24665,24793,24805,24850,24851,24541,14483,24661,1657,1658,6961,6962,6963,6964,6983,6984,7021,7022,7023,7024,7025,7042,7043,7045,7061,7062,7063,8149,8150,8311,8312,8322,8353,8354,8355,8356,8357,8358,8359,8360,8373,8409,8744,8746,8762,8763,8767,8768,8769,8788,8799,8803,8827,8828,8860,8861,8868,8897,8898,8899,8900,8901,8902,8903,8904,8971,8972,8973,8974,8975,8976,8979,8980,8981,8982,8983,8984,8993,9024,9025,9026,9027,9028,11131,11135,11219,11220,11242,11356,11357,11360,11361,11392,11401,11403,11404,11405,11435,11439,11440,11449,11450,11528,11558,11580,11581,11583,11584,11696,11732,11734,11735,11736,11737,11738,11739,11740,11741,11742,11743,11744,11745,11746,11747,11748,11749,11750,11751,11752,11753,11754,11755,11756,11757,11758,11759,11760,11761,11762,11763,11764,11765,11766,11767,11768,11769,11770,11771,11772,11773,11774,11775,11776,11777,11778,11779,11780,11781,11782,11783,11784,11785,11786,11787,11799,11800,11801,11802,11803,11804,11805,11806,11807,11808,11809,11810,11811,11812,11813,11814,11815,11816,11817,11818,11819,11820,11821,11822,11823,11824,11825,11826,11827,11828,11829,11830,11831,11832,11833,11834,11835,11836,11837,11838,11839,11840,11841,11842,11843,11844,11845,11846,11847,11848,11849,11850,11851,11852,11853,11854,11855,11856,11857,11858,11859,11860,11861,11862,11863,11937,11976,12133,12135,12139,12155,12286,12313,12331,12332,12333,12334,12335,12336,12337,12338,12339,12340,12341,12342,12343,12344,12345,12346,12347,12348,12349,12350,12351,12352,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12940,12941,12944,12945,12946,12947,12950,13203,13433,13434,13435,13436,13437,13438,13439,13440,13441,13442,13443,13444,13445,13446,13447,13448,13449,13450,13451,13452,13453,13454,13455,13456,13457,13458,13459,13460,13461,13462,13463,13464,13465,13466,13467,13468,13469,13470,13471,13472,13473,13474,13485,13486,13487,13488,13489,13490,13491,13492,13493,13494,13495,13496,13497,13498,13499,13500,13501,13548,13966); diff --git a/sql/updates/world/2012_01_08_00_world_version.sql b/sql/updates/world/2012_01_08_00_world_version.sql new file mode 100644 index 00000000000..721fea914f1 --- /dev/null +++ b/sql/updates/world/2012_01_08_00_world_version.sql @@ -0,0 +1 @@ +UPDATE `version` SET `db_version`='TDB 335.11.45' LIMIT 1; diff --git a/sql/updates/world/2012_01_08_01_world_sai.sql b/sql/updates/world/2012_01_08_01_world_sai.sql new file mode 100644 index 00000000000..fcdc21662c0 --- /dev/null +++ b/sql/updates/world/2012_01_08_01_world_sai.sql @@ -0,0 +1,24 @@ +-- UPDATE Blood Knight Dawnstar Gossip +SET @ENTRY := 17832; +SET @GOSSIPID := 7486; +SET @TEXTID := 9070; +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIPID WHERE `entry`=@ENTRY; +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIPID AND `text_id`=@TEXTID; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIPID,@TEXTID); +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (@GOSSIPID) AND `id` IN (0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(@GOSSIPID,0,0, 'Take Blood Knight Insignia',1,1,0,0,0,0, ''); +-- Gossip option Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIPID; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,@GOSSIPID,0,0,9,9692,0,0,0,'','Show gossip option if player has quest 9692 but not complete'), +(15,@GOSSIPID,0,0,26,24226,1,0,0,'','Show gossip option if player does not have item 24226'); +-- SAI for Blood Knight Dawnstar +UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE (`entryorguid`=@ENTRY AND `source_type`=0); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,62,0,100,0,@GOSSIPID,0,0,0,56,24226,1,0,0,0,0,7,0,0,0,0,0,0,0,'Blood Knight Dawnstar - On Gossip option select - Create Blood Knight Insignia'), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Blood Knight Dawnstar - On Gossip option select - Close Gossip'); diff --git a/sql/updates/world/2012_01_08_02_world_creature_template.sql b/sql/updates/world/2012_01_08_02_world_creature_template.sql new file mode 100644 index 00000000000..a544118aa4f --- /dev/null +++ b/sql/updates/world/2012_01_08_02_world_creature_template.sql @@ -0,0 +1,4 @@ +-- Template updates for creature 30081 (Efrem the Faithful) +UPDATE `creature_template` SET `npcflag`=`npcflag`|1 WHERE `entry`=30081; -- Efrem the Faithful +-- Model data 26827 (creature 30081 (Efrem the Faithful)) +UPDATE `creature_model_info` SET `bounding_radius`=0.3672,`combat_reach`=1.8,`gender`=0 WHERE `modelid`=26827; -- Efrem the Faithful diff --git a/sql/updates/world/2012_01_08_03_world_gossip_menu.sql b/sql/updates/world/2012_01_08_03_world_gossip_menu.sql new file mode 100644 index 00000000000..6555d25fbc3 --- /dev/null +++ b/sql/updates/world/2012_01_08_03_world_gossip_menu.sql @@ -0,0 +1,51 @@ +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9301,9512,9615) AND `id`=0; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(9301,0,0, 'Come on, Budd. Time to play with the ice trolls!',1,1,0,0,0,0, ''), +(9512,0,0, 'Unchain and control Flamebringer.',1,1,0,0,0,0, ''), +(9615,0,0, 'Shake Drakuru''s outstretched hand.',1,1,0,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9633 AND `text_id`=13034; +DELETE FROM `gossip_menu` WHERE `entry`=9490 AND `text_id`=12773; +DELETE FROM `gossip_menu` WHERE `entry`=9622 AND `text_id`=13011; +DELETE FROM `gossip_menu` WHERE `entry`=9416 AND `text_id`=12659; +DELETE FROM `gossip_menu` WHERE `entry`=9301 AND `text_id`=12617; +DELETE FROM `gossip_menu` WHERE `entry`=9615 AND `text_id` IN (12998,12999,13001); +DELETE FROM `gossip_menu` WHERE `entry`=9604 AND `text_id`=12966; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(9633,13034), +(9490,12773), +(9622,13011), +(9416,12659), +(9301,12617), +(9615,12998), +(9615,12999), +(9615,13001), +(9604,12966); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9633 WHERE `entry`=26868; +UPDATE `creature_template` SET `gossip_menu_id`=9821 WHERE `entry`=29740; +UPDATE `creature_template` SET `gossip_menu_id`=9490 WHERE `entry`=27262; +UPDATE `creature_template` SET `gossip_menu_id`=9622 WHERE `entry`=26519; +UPDATE `creature_template` SET `gossip_menu_id`=9416 WHERE `entry`=26604; +UPDATE `creature_template` SET `gossip_menu_id`=9301 WHERE `entry`=26422; +UPDATE `creature_template` SET `gossip_menu_id`=9615 WHERE `entry`=26423; +UPDATE `creature_template` SET `gossip_menu_id`=9604 WHERE `entry`=26424; + +-- Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=9615 AND `SourceEntry` IN (12998,12999,13001); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=9632 AND `SourceEntry`=13033; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=9633 AND `SourceEntry`=13034; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (9301,9512,9615) AND `SourceEntry`=0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,9615,12998,0,1,50001,0,0,0,'','Drakuru has different gossip if player has aura 50001'), +(14,9615,12999,0,11,50001,0,0,0,'','Drakuru has gossip only if player has not aura 50001'), +(14,9615,13001,0,8,11989,0,0,0,'','Drakuru has different gossip if player has quest 11989 rewarded'), +(14,9632,13033,0,14,12178,0,0,0,'','Hidetrader Jun''ik has gossip only if player has not taken quest 12178'), +(14,9633,13034,0,14,12436,0,0,0,'','Provisioner Lorkran has gossip only if player has not taken quest 12436'), +(15,9301,0,0,9,11984,0,0,0,'','Budd - Show gossip option if player has taken quest 11984'), +(15,9512,0,0,9,12259,0,0,0,'','Flamebringer - Show gossip option if player has taken quest 12259'), +(15,9512,0,1,9,12255,0,0,0,'','Flamebringer - Show gossip option if player has taken quest 12255'), +(15,9615,0,0,1,50001,0,0,0,'','Drakuru - Show gossip option if player has aura 50001'); diff --git a/sql/updates/world/2012_01_08_04_world_quest_template.sql b/sql/updates/world/2012_01_08_04_world_quest_template.sql new file mode 100644 index 00000000000..fdc3c401302 --- /dev/null +++ b/sql/updates/world/2012_01_08_04_world_quest_template.sql @@ -0,0 +1,2 @@ +-- Update quest 13093 (sharable/repeatable quest) +UPDATE `quest_template` SET `PrevQuestId`=13092,`Flags`=`Flags`|8192,`SpecialFlags`=1,`OfferRewardText`='Choose your fate, $N.',`RequestItemsText`='Bring me more vrykul bones and we will influence the fates in your favor.' WHERE `id`=13093; diff --git a/sql/updates/world/2012_01_08_05_world_conditions.sql b/sql/updates/world/2012_01_08_05_world_conditions.sql new file mode 100644 index 00000000000..b8e43e7d0e2 --- /dev/null +++ b/sql/updates/world/2012_01_08_05_world_conditions.sql @@ -0,0 +1,10 @@ +-- Slaves to Saronite add conditions for Horde version 10 +SET @QUEST_A := 13300; +SET @QUEST_H := 13302; +SET @GOSSIP := 10137; + +-- Only show gossip if player is on quest Slaves to Saronite +DELETE FROM `conditions` WHERE `SourceGroup`=@GOSSIP AND `ConditionValue1` IN (@QUEST_A,@QUEST_H); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`COMMENT`) VALUES +(15,@GOSSIP,0,0,9,@QUEST_A,0,0,0,'',"Only show first gossip if player is on quest Slaves to Saronite Alliance"), +(15,@GOSSIP,0,0,9,@QUEST_H,0,0,0,'',"Only show first gossip if player is on quest Slaves to Saronite Horde");
\ No newline at end of file diff --git a/sql/updates/world/2012_01_08_06_world_creature_text.sql b/sql/updates/world/2012_01_08_06_world_creature_text.sql new file mode 100644 index 00000000000..31331faaa95 --- /dev/null +++ b/sql/updates/world/2012_01_08_06_world_creature_text.sql @@ -0,0 +1,9 @@ +-- Remove old script text for boss_balinda.cpp "Not sure if the text actually exist" +DELETE FROM `script_texts` WHERE `entry` IN (-1810023,-1810024); +-- Add new creature_text for Captain Balinda Stonehearth <Stormpike Captain> +DELETE FROM `creature_text` WHERE `entry`=11949; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(11949,0,0, 'Begone, uncouth scum! The Alliance shall prevail in Alterac Valley!',14,0,100,0,0,0, 'Captain Balinda Stonehearth'), -- Aggro +(11949,1,0, 'Filthy Frostwolf cowards! If you want a fight, you''ll have to come to me!',14,0,100,0,0,0, 'Captain Balinda Stonehearth'), -- Reset +-- (Alliance players receives Stormpike's Salvation buff (+20% health points for 2 minutes)) +(11949,2,0, 'Take heart, Alliance! Throw these villains from Alterac Valley!',14,0,100,0,0,0, 'Captain Balinda Stonehearth'); diff --git a/sql/updates/world/2012_01_08_07_world_creature_text.sql b/sql/updates/world/2012_01_08_07_world_creature_text.sql new file mode 100644 index 00000000000..0cb9601a156 --- /dev/null +++ b/sql/updates/world/2012_01_08_07_world_creature_text.sql @@ -0,0 +1,8 @@ +-- Remove old script text for boss_galvangar.cpp "Not sure if the text actually exist" +DELETE FROM `script_texts` WHERE `entry` IN (-1810021,-1810022); +-- Add new creature_text for Captain Galvangar +DELETE FROM `creature_text` WHERE `entry`=11947; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(11947,0,0, 'Die! Your kind has no place in Alterac Valley!',14,0,100,0,0,0, 'Captain Galvangar'), -- Aggro +(11947,1,0, 'I''ll never fall for that, fool! If you want a battle it will be on my terms and in my lair!',14,0,100,0,0,0, 'Captain Galvangar'), -- Reset +(11947,2,0, 'Now is the time to attack! For the Horde!',14,0,100,0,0,0, 'Captain Galvangar'); -- Casting Fury of the Frostwolf diff --git a/sql/updates/world/2012_01_08_08_world_creature_text.sql b/sql/updates/world/2012_01_08_08_world_creature_text.sql new file mode 100644 index 00000000000..7c4a1f9ba7d --- /dev/null +++ b/sql/updates/world/2012_01_08_08_world_creature_text.sql @@ -0,0 +1,17 @@ +-- Remove old script text for boss_drekthar.cpp "Not sure if the text actually exist" +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1810007 AND -1810000; +-- Add new creature_text for Drek'Thar +DELETE FROM `creature_text` WHERE `entry`=11946; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +-- Aggro +(11946,0,0, 'Stormpike filth! In my keep?! Slay them all!',14,0,100,0,0,0, 'Drek''Thar'), +-- Reset +(11946,1,0, 'You seek to draw the General of the Frostwolf legion out from his fortress? PREPOSTEROUS!',14,0,100,0,0,0, 'Drek''Thar'), +-- Raid wipe +(11946,2,0, 'Stormpike weaklings, face me in my fortress - if you dare!',14,0,100,0,0,0, 'Drek''Thar'), +-- Combat +(11946,3,0, 'Your attacks are slowed by the cold, I think!',14,0,100,0,0,0, 'Drek''Thar'), +(11946,3,1, 'Today, you will meet your ancestors!',14,0,100,0,0,0, 'Drek''Thar'), +(11946,3,2, 'If you will not leave Alterac Valley on your own, then the Frostwolves will force you out!',14,0,100,0,0,0, 'Drek''Thar'), +(11946,3,3, 'You cannot defeat the Frostwolf clan!',14,0,100,0,0,0, 'Drek''Thar'), +(11946,3,4, 'You are no match for the strength of the Horde!',14,0,100,0,0,0, 'Drek''Thar'); diff --git a/sql/updates/world/2012_01_08_09_world_creature_text.sql b/sql/updates/world/2012_01_08_09_world_creature_text.sql new file mode 100644 index 00000000000..55f777dc733 --- /dev/null +++ b/sql/updates/world/2012_01_08_09_world_creature_text.sql @@ -0,0 +1,20 @@ +-- Remove old script text for boss_vanndar.cpp "Not sure if the text actually exist" +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1810018 AND -1810008; +-- Add new creature_text for Vanndar Stormpike +DELETE FROM `creature_text` WHERE `entry`=11948; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +-- Aggro +(11948,0,0, 'Soldiers of Stormpike, your General is under attack! I require aid! Come! Come! Slay these mangy Frostwolf dogs.',14,0,100,0,0,0, 'Vanndar Stormpike'), +-- Reset +(11948,1,0, 'You''ll never get me out of me bunker, heathens!',14,0,100,0,0,0, 'Vanndar Stormpike'), +(11948,1,1, 'Why don''t ya try again without yer cheap tactics, pansies! Or are you too chicken?',14,0,100,0,0,0, 'Vanndar Stormpike'), +-- Combat +(11948,2,0, 'I will tell you this much...Alterac Valley will be ours.',14,0,100,0,0,0, 'Vanndar Stormpike'), +(11948,2,1, 'Your attacks are weak! Go practice on some rabbits and come back when you''re stronger.',14,0,100,0,0,0, 'Vanndar Stormpike'), +(11948,2,2, 'We will not be swayed from our mission!',14,0,100,0,0,0, 'Vanndar Stormpike'), +(11948,2,3, 'It''ll take more than you rabble to bring me down!',14,0,100,0,0,0, 'Vanndar Stormpike'), +(11948,2,4, 'We, the Alliance, will prevail!',14,0,100,0,0,0, 'Vanndar Stormpike'), +(11948,2,5, 'The Stormpike clan bows to no one, especially the horde!',14,0,100,0,0,0, 'Vanndar Stormpike'), +(11948,2,6, 'Is that the best you can do?',14,0,100,0,0,0, 'Vanndar Stormpike'), +-- Said with a spell cast (Alliance players receive 10/20/30% damage/size increases, gained by turning in [Polished Armor Scraps] +(11948,3,0, 'Take no prisoners! Drive these heathens from our lands!',14,0,100,0,0,0, 'Vanndar Stormpike'); diff --git a/sql/updates/world/2012_01_08_11_world_creature_text.sql b/sql/updates/world/2012_01_08_11_world_creature_text.sql new file mode 100644 index 00000000000..ae4e544b3f7 --- /dev/null +++ b/sql/updates/world/2012_01_08_11_world_creature_text.sql @@ -0,0 +1,9 @@ +-- Remove old script text for eversong_woods.cpp +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000640 AND -1000637; +-- Master Kelerun Bloodmourn <Blood Knight> say text +DELETE FROM `creature_text` WHERE `entry`=17807; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(17807,0,0, 'Let the trial begin, Bloodwrath, attack!',14,0,100,0,0,0, 'Master Kelerun Bloodmourn'), +(17807,1,0, 'Champion Lightrend, make me proud!',14,0,100,0,0,0, 'Master Kelerun Bloodmourn'), +(17807,2,0, 'Show this upstart how a real Blood Knight fights, Swiftblade!',14,0,100,0,0,0, 'Master Kelerun Bloodmourn'), +(17807,3,0, 'Show $N the meaning of pain, Sunstriker!',14,0,100,0,0,0, 'Master Kelerun Bloodmourn'); diff --git a/sql/updates/world/2012_01_08_12_world_creature_text.sql b/sql/updates/world/2012_01_08_12_world_creature_text.sql new file mode 100644 index 00000000000..13b452e7b6a --- /dev/null +++ b/sql/updates/world/2012_01_08_12_world_creature_text.sql @@ -0,0 +1,6 @@ +-- Twilight Corrupter say text +DELETE FROM `creature_text` WHERE `entry`=15625; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(15625,0,0, 'Come, $N. See what the Nightmare brings...',14,0,100,0,0,0, 'Twilight Corrupter'), +(15625,1,0, 'The Nightmare cannot be stopped!',14,0,100,0,0,0, 'Twilight Corrupter'), +(15625,2,0, 'Twilight Corrupter squeezes the last bit of life out of $N and swallows their soul.',16,0,100,0,0,0, 'Twilight Corrupter'); diff --git a/sql/updates/world/2012_01_08_13_world_creature_text.sql b/sql/updates/world/2012_01_08_13_world_creature_text.sql new file mode 100644 index 00000000000..83e9f70f049 --- /dev/null +++ b/sql/updates/world/2012_01_08_13_world_creature_text.sql @@ -0,0 +1,7 @@ +-- NPC talk text insert from sniff "Orgrimmar Zeppelin Masters" +DELETE FROM `creature_text` WHERE `entry` IN (12136,26537,9564,34765) AND `groupid`=0; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(12136,0,0, 'The zeppelin to Grom''gol has just arrived! All aboard for Stranglethorn!',14,0,100,0,0,0, 'Snurk Bucksquick'), +(26537,0,0, 'The zeppelin to Warsong Hold has just arrived! All aboard for Borean Tundra!',14,0,100,0,0,0, 'Greeb Ramrocket'), +(9564,0,0, 'The zeppelin to Undercity has just arrived! All aboard for Tirisfal Glades!',14,0,100,0,0,0, 'Frezza'), +(34765,0,0, 'The zeppelin to Thunder Bluff has arrived! All aboard for a smooth ride across the Barrens!',14,0,100,0,0,0, 'Zelli Hotnozzle'); diff --git a/sql/updates/world/2012_01_08_14_world_creature_text.sql b/sql/updates/world/2012_01_08_14_world_creature_text.sql new file mode 100644 index 00000000000..d62ac5fdd20 --- /dev/null +++ b/sql/updates/world/2012_01_08_14_world_creature_text.sql @@ -0,0 +1,15 @@ +-- Remove old script text for arathi_highlands.cpp +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000273 AND -1000264; +-- Add new creature_text for Professor Phizzlethorpe <Blackwater Raiders> +DELETE FROM `creature_text` WHERE `entry`=2768; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(2768,0,0, 'Ok, $N. Follow me to the cave where I''ll attempt to harness the power of the rune stone into these goggles.',12,0,100,0,0,0, 'Professor Phizzlethorpe - SAY_PROGRESS_1'), +(2768,1,0, 'I discovered this cave on our first day here. I believe the energy in the stone can be used to our advantage.',12,0,100,0,0,0, 'Professor Phizzlethorpe - SAY_PROGRESS_2'), +(2768,2,0, 'I''ll begin drawing energy from the stone. Your job, $N, is to defend me. This place is cursed... trust me.',12,0,100,0,0,0, 'Professor Phizzlethorpe - SAY_PROGRESS_3'), +(2768,3,0, '%s begins tinkering with the goggles before the stone.',16,0,100,0,0,0, 'Professor Phizzlethorpe - EMOTE_PROGRESS_4'), +(2768,4,0, 'Help!!! Get these things off me so I can get my work done!',12,0,100,0,0,0, 'Professor Phizzlethorpe - SAY_AGGRO'), +(2768,5,0, 'Almost done! Just a little longer!',12,0,100,0,0,0, 'Professor Phizzlethorpe - SAY_PROGRESS_5'), +(2768,6,0, 'I''ve done it! I have harnessed the power of the stone into the goggles! Let''s get out of here!',12,0,100,0,0,0, 'Professor Phizzlethorpe - SAY_PROGRESS_6'), +(2768,7,0, 'Phew! Glad to be back from that creepy cave.',12,0,100,0,0,0, 'Professor Phizzlethorpe - SAY_PROGRESS_7'), +(2768,8,0, '%s hands one glowing goggles over to Doctor Draxlegauge.',16,0,100,0,0,0, 'Professor Phizzlethorpe - EMOTE_PROGRESS_8'), +(2768,9,0, 'Doctor Draxlegauge will give you further instructions, $N. Many thanks for your help!',12,0,100,0,0,0, 'Professor Phizzlethorpe - SAY_PROGRESS_9'); diff --git a/sql/updates/world/2012_01_08_15_world_script_texts.sql b/sql/updates/world/2012_01_08_15_world_script_texts.sql new file mode 100644 index 00000000000..b0614eda526 --- /dev/null +++ b/sql/updates/world/2012_01_08_15_world_script_texts.sql @@ -0,0 +1,3001 @@ +DELETE FROM `script_texts` WHERE `entry` IN (-1000000,-1000001,-1000004,-1000005,-1000100,-1000101,-1000102,-1000103,-1000104,-1000105,-1000106,-1000107,-1000108,-1000109,-1000110,-1000111,-1000112,-1000113,-1000114,-1000115,-1000116,-1000117,-1000118,-1000119,-1000120,-1000121,-1000122,-1000123,-1000124,-1000125,-1000126,-1000127,-1000128,-1000129,-1000130,-1000131,-1000132,-1000133,-1000134,-1000135,-1000136,-1000137,-1000138,-1000139,-1000140,-1000141,-1000142,-1000143,-1000144,-1000145,-1000146,-1603209,-1603219,-1000174,-1000175,-1000176,-1000177,-1000178,-1000179,-1000180,-1000181,-1000182,-1000183,-1000184,-1000185,-1000186,-1000188,-1000189,-1000190,-1000191,-1000192,-1000193,-1000194,-1000195,-1000196,-1000197,-1000198,-1000199,-1000200,-1000201,-1000202,-1000203,-1000204,-1000205,-1000206,-1000207,-1000208,-1000209,-1000210,-1000211,-1000212,-1000213,-1000214,-1000215,-1000216,-1000217,-1000218,-1000219,-1000220,-1000221,-1000222,-1000223,-1000224,-1000225,-1000226,-1000227,-1000228,-1000229,-1000230,-1000231,-1000232,-1000233,-1000234,-1000235,-1000236,-1000237,-1000238,-1000239,-1000240,-1000241,-1000242,-1000243,-1000244,-1000245,-1000246,-1000247,-1000248,-1000249,-1000250,-1000251,-1000252,-1000253,-1000254,-1000255,-1000256,-1000257,-1000258,-1000259,-1000260,-1000261,-1000262,-1000263,-1000274,-1000275,-1000276,-1000277,-1000278,-1000279,-1000280,-1000281,-1000282,-1000283,-1000284,-1000285,-1000286,-1000287,-1000288,-1000289,-1000290,-1000291,-1000292,-1000293,-1000294,-1000295,-1000296,-1000297,-1000298,-1000299,-1000300,-1000301,-1000302,-1000303,-1000304,-1000305,-1000306,-1000307,-1000308,-1000309,-1000310,-1000311,-1000312,-1000313,-1000314,-1000315,-1000316,-1000317,-1000318,-1000319,-1000320,-1000321,-1000322,-1000323,-1000324,-1000325,-1000326,-1000327,-1000328,-1000329,-1000330,-1000331,-1000332,-1000333,-1000334,-1000335,-1000336,-1000337,-1000338,-1000339,-1000340,-1000341,-1000342,-1000343,-1000344,-1000345,-1000346,-1000347,-1000348,-1000349,-1000350,-1000351,-1000352,-1000353,-1000354,-1000355,-1000356,-1000357,-1000358,-1000359,-1000362,-1000363,-1000364,-1000365,-1000366,-1000367,-1000368,-1000369,-1000370,-1000371,-1000372,-1000373,-1000374,-1000375,-1000376,-1000377,-1000378,-1000379,-1000380,-1000381,-1000382,-1000383,-1000384,-1000385,-1000386,-1000387,-1000388,-1000389,-1000390,-1000391,-1000392,-1000393,-1000394,-1000395,-1000396,-1000397,-1000398,-1603056,-1603055,-1000403,-1000404,-1000405,-1000406,-1000407,-1000408,-1000409,-1000410,-1000411,-1000412,-1000413,-1000414,-1000415,-1000416,-1000417,-1000418,-1000419,-1000420,-1000421,-1000422,-1000423,-1000424,-1000425,-1000426,-1000427,-1000428,-1000429,-1000430,-1000431,-1000432,-1000433,-1000434,-1000435,-1000436,-1000437,-1000438,-1000439,-1000440,-1000441,-1000442,-1000443,-1000444,-1000445,-1000482,-1000483,-1000484,-1000485,-1000486,-1000487,-1000488,-1000496,-1000497,-1000498,-1000499,-1000450,-1000451,-1000452,-1000453,-1000454,-1000455,-1000456,-1000457,-1000458,-1000459,-1000460,-1000461,-1000462,-1000463,-1033000,-1033001,-1033002,-1033003,-1033004,-1033005,-1033006,-1033007,-1033008,-1036000,-1036001,-1043000,-1043001,-1043002,-1043003,-1043004,-1043005,-1043006,-1043007,-1043008,-1043009,-1043010,-1043011,-1043012,-1043013,-1043014,-1043015,-1043016,-1043017,-1047000,-1047001,-1047002,-1047003,-1047004,-1047005,-1047006,-1047007,-1047008,-1047009,-1047010,-1060005,-1060004,-1060003,-1060002,-1060001,-1060000,-1070000,-1070001,-1070002,-1070003,-1070004,-1070005,-1070006,-1129000,-1129001,-1129002,-1129003,-1129004,-1189000,-1189001,-1189002,-1189003,-1189004,-1189005,-1189006,-1189007,-1189008,-1189009,-1189010,-1189011,-1189012,-1189013,-1189014,-1189015,-1189016,-1189017,-1189018,-1189019,-1189020,-1189021,-1230000,-1230001,-1230002,-1249000,-1249001,-1249002,-1249003,-1249004,-1269000,-1269001,-1269002,-1269003,-1269004,-1269005,-1269006,-1269007,-1269008,-1269009,-1269010,-1269011,-1269012,-1269013,-1269014,-1269015,-1269016,-1269017,-1269018,-1269019,-1269020,-1269021,-1269022,-1269023,-1269024,-1269025,-1269026,-1269027,-1269028,-1309002,-1309003,-1309004,-1309005,-1309006,-1309007,-1309008,-1309009,-1309010,-1309011,-1309012,-1309013,-1309014,-1309015,-1309016,-1309017,-1309018,-1309019,-1309020,-1309021,-1309022,-1309023,-1329000,-1329001,-1329002,-1329003,-1350000,-1350001,-1350002,-1350003,-1350004,-1350005,-1350006,-1350007,-1350008,-1350009,-1350010,-1350011,-1350012,-1350013,-1350014,-1350015,-1350016,-1350017,-1350018,-1350019,-1350020,-1350021,-1350022,-1350023,-1350024,-1350025,-1350026,-1350027,-1350028,-1350029,-1350030,-1409000,-1409001,-1409002,-1409003,-1409004,-1409005,-1409006,-1409007,-1409008,-1409009,-1409010,-1409011,-1409012,-1409013,-1409014,-1409015,-1409016,-1409017,-1409018,-1469000,-1469001,-1469002,-1469003,-1469004,-1469005,-1469006,-1469007,-1469008,-1469009,-1469010,-1469011,-1469012,-1469013,-1469014,-1469015,-1469016,-1469017,-1469018,-1469019,-1469020,-1469021,-1469022,-1469023,-1469024,-1469025,-1469026,-1469027,-1469028,-1469029,-1469030,-1469031,-1509000,-1509001,-1509002,-1509003,-1509004,-1509005,-1509006,-1509007,-1509008,-1509009,-1509010,-1509011,-1509012,-1509013,-1509014,-1509015,-1509016,-1509017,-1509018,-1509019,-1509020,-1509021,-1509022,-1509023,-1509024,-1509025,-1509026,-1509027,-1531000,-1531001,-1531002,-1531003,-1531004,-1531005,-1531006,-1531007,-1531008,-1531009,-1531010,-1531011,-1532000,-1532001,-1532002,-1532003,-1532004,-1532005,-1532006,-1532007,-1532008,-1532009,-1532010,-1532011,-1532012,-1532013,-1532014,-1532015,-1532016,-1532017,-1532018,-1532019,-1532020,-1532021,-1532022,-1532023,-1532024,-1532025,-1532026,-1532027,-1532028,-1532029,-1532030,-1532031,-1532032,-1532033,-1532034,-1532035,-1532036,-1532037,-1532038,-1532039,-1532040,-1532041,-1532042,-1532043,-1532044,-1532045,-1532046,-1532047,-1532048,-1532049,-1532050,-1532051,-1532052,-1532053,-1532054,-1532055,-1532056,-1532057,-1532058,-1532059,-1532060,-1532061,-1532062,-1532063,-1532064,-1532065,-1532066,-1532067,-1532068,-1532069,-1532070,-1532071,-1532072,-1532073,-1532074,-1532075,-1532076,-1532077,-1532078,-1532079,-1532080,-1532081,-1532082,-1532083,-1532084,-1532085,-1532086,-1532087,-1532088,-1532089,-1532090,-1532091,-1532092,-1532093,-1532094,-1532095,-1532096,-1532097,-1532098,-1532099,-1532100,-1532101,-1532102,-1532103,-1532104,-1532105,-1532106,-1532107,-1532108,-1532109,-1532110,-1532111,-1532112,-1532113,-1532114,-1533000,-1533001,-1533002,-1533003,-1533004,-1533005,-1533006,-1533007,-1533008,-1533009,-1533010,-1533011,-1533012,-1533013,-1533014,-1533015,-1533016,-1533017,-1533018,-1533019,-1533020,-1533021,-1533022,-1533023,-1533024,-1533025,-1533026,-1533027,-1533028,-1533029,-1533030,-1533031,-1533032,-1533033,-1533034,-1533035,-1533036,-1533037,-1533038,-1533039,-1533040,-1533041,-1533042,-1533043,-1533044,-1533045,-1533046,-1533047,-1533048,-1533049,-1533050,-1533051,-1533052,-1533053,-1533054,-1533055,-1533056,-1533057,-1533058,-1533059,-1533060,-1533061,-1533062,-1533063,-1533064,-1533065,-1533066,-1533067,-1533068,-1533069,-1533070,-1533071); +DELETE FROM `script_texts` WHERE `entry` IN (-1533072,-1533073,-1533074,-1533075,-1533076,-1533077,-1533078,-1533079,-1533080,-1533081,-1533082,-1533083,-1533084,-1533085,-1533086,-1533087,-1533088,-1533089,-1533090,-1533091,-1533092,-1533093,-1533094,-1533095,-1533096,-1533097,-1533098,-1533099,-1533100,-1533101,-1533102,-1533103,-1533104,-1533105,-1533106,-1533107,-1533108,-1533109,-1533110,-1533111,-1533112,-1533113,-1533114,-1533115,-1533116,-1533117,-1533118,-1534000,-1534001,-1534002,-1534003,-1534004,-1534005,-1534006,-1534007,-1534008,-1534009,-1534010,-1534011,-1534012,-1534013,-1534014,-1534015,-1534016,-1534017,-1534018,-1534019,-1534020,-1534021,-1534022,-1534023,-1534024,-1534025,-1534026,-1534027,-1534028,-1534029,-1534030,-1540000,-1540001,-1540002,-1540003,-1540004,-1540005,-1540006,-1540007,-1540008,-1540009,-1540010,-1540011,-1540012,-1540013,-1540014,-1540015,-1540016,-1540017,-1540018,-1540019,-1540020,-1540021,-1540022,-1540023,-1540024,-1540025,-1540026,-1540027,-1540028,-1540029,-1540030,-1540031,-1540032,-1540033,-1540034,-1540035,-1540036,-1540037,-1540038,-1540039,-1540040,-1540041,-1540042,-1540043,-1540044,-1540045,-1540046,-1540047,-1542000,-1542001,-1542002,-1542003,-1542004,-1542005,-1542006,-1542007,-1542008,-1542009,-1542010,-1542011,-1542012,-1542013,-1542014,-1543000,-1543001,-1543002,-1543003,-1543004,-1543005,-1543006,-1543007,-1543008,-1543009,-1543010,-1543011,-1543012,-1543013,-1543014,-1543015,-1543016,-1543017,-1543018,-1543019,-1543020,-1543021,-1543022,-1543023,-1543024,-1543025,-1544000,-1544001,-1544002,-1544003,-1544004,-1544005,-1544006,-1544007,-1544008,-1544009,-1544010,-1544011,-1544012,-1544013,-1544014,-1544015,-1545000,-1545001,-1545002,-1545003,-1545004,-1545005,-1545006,-1545007,-1545008,-1545009,-1545010,-1545011,-1545012,-1545013,-1545014,-1545015,-1545016,-1545017,-1545018,-1545019,-1545020,-1545021,-1545022,-1545023,-1548000,-1548001,-1548002,-1548003,-1548004,-1548005,-1548006,-1548007,-1548008,-1548009,-1548010,-1548011,-1548012,-1548013,-1548014,-1548015,-1548016,-1548017,-1548018,-1548019,-1548020,-1548021,-1548022,-1548023,-1548024,-1548025,-1548026,-1548027,-1548028,-1548029,-1548030,-1548031,-1548032,-1548033,-1548034,-1548035,-1548036,-1548037,-1548038,-1548039,-1548040,-1548041,-1548042,-1548043,-1548044,-1548045,-1548046,-1548047,-1548048,-1548049,-1548050,-1548051,-1548052,-1548053,-1548054,-1548055,-1550000,-1550001,-1550002,-1550003,-1550004,-1550005,-1550006,-1550007,-1550008,-1550009,-1550010,-1550011,-1550012,-1550013,-1550014,-1550015,-1550016,-1550017,-1550018,-1550019,-1550020,-1550021,-1550022,-1550023,-1550024,-1550025,-1550026,-1550027,-1550028,-1550029,-1550030,-1550031,-1550032,-1550033,-1550034,-1550035,-1550036,-1550037,-1550038,-1550039,-1550040,-1550041,-1550042,-1550043,-1552000,-1552001,-1552002,-1552003,-1552004,-1552005,-1552006,-1552007,-1552008,-1552009,-1552010,-1552011,-1552012,-1552013,-1552014,-1552015,-1552016,-1552017,-1552018,-1552019,-1552020,-1552021,-1552022,-1552023,-1552024,-1552025,-1552026,-1552027,-1552028,-1552029,-1552030,-1553000,-1553001,-1553002,-1553003,-1553004,-1553005,-1553006,-1553007,-1553008,-1553009,-1553010,-1553011,-1553012,-1554000,-1554001,-1554002,-1554003,-1554004,-1554005,-1554006,-1554007,-1554008,-1554009,-1554010,-1554011,-1554012,-1554013,-1554014,-1554015,-1554016,-1554017,-1554018,-1554019,-1554020,-1554021,-1554022,-1554023,-1554024,-1554025,-1554026,-1554027,-1555000,-1555001,-1555002,-1555003,-1555004,-1555005,-1555006,-1555007,-1555008,-1555009,-1555010,-1555011,-1555012,-1555013,-1555014,-1555015,-1555016,-1555017,-1555018,-1555019,-1555020,-1555021,-1555022,-1555023,-1555024,-1555025,-1555026,-1555027,-1555028,-1555029,-1555030,-1555031,-1555032,-1555033,-1555034,-1555035,-1555036,-1556000,-1556001,-1556002,-1556003,-1556004,-1556005,-1556006,-1556007,-1556008,-1556009,-1556010,-1556011,-1556012,-1556013,-1556015,-1557000,-1557001,-1557002,-1557003,-1557004,-1557005,-1557006,-1557007,-1557008,-1557009,-1557010,-1557011,-1557012,-1557013,-1557014,-1558000,-1558001,-1558002,-1558003,-1558004,-1558005,-1558006,-1558007,-1558008,-1558009,-1560000,-1560001,-1560002,-1560003,-1560004,-1560005,-1560006,-1560007,-1560008,-1560009,-1560010,-1560011,-1560012,-1560013,-1560014,-1560015,-1560016,-1560017,-1560018,-1560019,-1560020,-1560021,-1560022,-1560023,-1560024,-1560025,-1560026,-1560027,-1560028,-1560029,-1560030,-1560031,-1560032,-1560033,-1560034,-1560035,-1560036,-1560037,-1560038,-1560039,-1560040,-1560041,-1560042,-1560043,-1560044,-1560045,-1560046,-1560047,-1560048,-1560049,-1564000,-1564001,-1564002,-1564003,-1564004,-1564005,-1564006,-1564007,-1564008,-1564009,-1564010,-1564011,-1564012,-1564013,-1564014,-1564015,-1564016,-1564017,-1564018,-1564019,-1564020,-1564021,-1564022,-1564023,-1564024,-1564025,-1564026,-1564027,-1564028,-1564029,-1564030,-1564031,-1564032,-1564033,-1564034,-1564035,-1564036,-1564037,-1564038,-1564039,-1564040,-1564041,-1564042,-1564043,-1564044,-1564045,-1564046,-1564047,-1564048,-1564049,-1564050,-1564051,-1564052,-1564053,-1564054,-1564055,-1564056,-1564057,-1564058,-1564059,-1564060,-1564061,-1564062,-1564063,-1564064,-1564065,-1564066,-1564067,-1564068,-1564069,-1564070,-1564071,-1564072,-1564073,-1564074,-1564075,-1564076,-1564077,-1564078,-1564079,-1564080,-1564081,-1564082,-1564083,-1564084,-1564085,-1564086,-1564087,-1564088,-1564089,-1564090,-1564091,-1564092,-1564093,-1564094,-1564095,-1564096,-1565000,-1565001,-1565002,-1565003,-1565004,-1565005,-1565006,-1565007,-1565008,-1565009,-1565010,-1565011,-1565012,-1565013,-1565014,-1565015,-1565016,-1565017,-1565018,-1565019,-1568000,-1568001,-1568002,-1568003,-1568004,-1568005,-1568006,-1568007,-1568008,-1568009,-1568010,-1568011,-1568012,-1568013,-1568014,-1568015,-1568016,-1568017,-1568018,-1568019,-1568020,-1568021,-1568022,-1568023,-1571000,-1571001,-1571002,-1571003,-1571004,-1571005,-1571006,-1571007,-1571008,-1571009,-1571010,-1571011,-1571012,-1571013,-1571014,-1571015,-1571016,-1571017,-1571018,-1571019,-1571020,-1571021,-1571022,-1571023,-1571024,-1571025,-1571026,-1571027,-1571028,-1571029,-1571030,-1571031,-1571032,-1571033,-1571034,-1574000,-1574001,-1574002,-1574003,-1574004,-1574005,-1574006,-1574007,-1574008,-1574009,-1574010,-1574011,-1574012,-1574013,-1574014,-1574015,-1574016,-1574017,-1574018,-1574019,-1574020,-1576000,-1576001,-1576002,-1576003,-1576004,-1576005,-1576010,-1576011,-1576012,-1576013,-1576020,-1576021,-1576022,-1576023,-1576024,-1576040,-1576041,-1576042,-1576043,-1576044,-1580000,-1580001,-1580002,-1580003,-1580004,-1580005,-1580006,-1580007,-1580008,-1580009,-1580010,-1580011,-1580012,-1580013,-1580014,-1580015,-1580016,-1580017,-1580018,-1580019,-1580020,-1580021,-1580022,-1580023,-1580024,-1580025,-1580026,-1580027,-1580028,-1580029,-1580030,-1580031,-1580032,-1580033,-1580034,-1580035,-1580036,-1580037,-1580038,-1580039,-1580040,-1580041,-1580042,-1580043,-1580044,-1580045,-1580046,-1580047,-1580048,-1580049,-1580050,-1580051,-1580052,-1580053,-1580054,-1580055,-1580056,-1580057,-1580058,-1580059,-1580060,-1580061,-1580062,-1580063); +DELETE FROM `script_texts` WHERE `entry` IN (-1580064,-1580065,-1580066,-1580067,-1580068,-1580069,-1580070,-1580071,-1580072,-1580073,-1580074,-1580075,-1580076,-1580077,-1580078,-1580079,-1580080,-1580081,-1580082,-1580083,-1580084,-1580085,-1580086,-1580087,-1580088,-1580089,-1580090,-1580091,-1580092,-1580093,-1580094,-1580095,-1580096,-1580097,-1580098,-1580099,-1580100,-1580101,-1580102,-1580103,-1580104,-1580105,-1580106,-1580107,-1580108,-1580109,-1585000,-1585001,-1585002,-1585003,-1585004,-1585005,-1585006,-1585007,-1585008,-1585009,-1585010,-1585011,-1585012,-1585013,-1585014,-1585015,-1585016,-1585017,-1585018,-1585019,-1585020,-1585021,-1585022,-1585023,-1585024,-1585025,-1585026,-1585027,-1585028,-1585029,-1590000,-1590001,-1590002,-1601003,-1601002,-1601000,-1601001,-1602000,-1602001,-1602002,-1602003,-1602004,-1602005,-1602006,-1602007,-1602008,-1602009,-1602010,-1602011,-1602012,-1602013,-1602014,-1602015,-1602016,-1602017,-1602018,-1602019,-1602020,-1602021,-1602022,-1602023,-1602024,-1602025,-1602026,-1602027,-1602028,-1602029,-1602030,-1602031,-1602032,-1602033,-1602034,-1602035,-1602036,-1602037,-1602038,-1602039,-1602040,-1602041,-1602042,-1599000,-1599001,-1599002,-1599003,-1599004,-1599005,-1599006,-1599007,-1599008,-1599009,-1599010,-1599011,-1599012,-1599013,-1603000,-1599015,-1599016,-1599017,-1599018,-1599019,-1599020,-1599021,-1599022,-1599023,-1599024,-1599025,-1599026,-1599027,-1599028,-1599029,-1599030,-1599031,-1599032,-1599033,-1599034,-1599035,-1599036,-1599037,-1599038,-1599039,-1599040,-1599041,-1599042,-1599043,-1599044,-1599064,-1599046,-1599047,-1599048,-1599049,-1599050,-1599051,-1599052,-1599053,-1599054,-1599055,-1599056,-1599057,-1599058,-1599059,-1599060,-1599061,-1599062,-1599063,-1599045,-1599065,-1599066,-1599067,-1599068,-1604010,-1604012,-1604013,-1604014,-1604015,-1604016,-1604017,-1608000,-1615000,-1615001,-1615002,-1615003,-1615004,-1615005,-1615006,-1615007,-1615008,-1615009,-1615010,-1615011,-1615012,-1615013,-1615014,-1615015,-1615016,-1615017,-1615018,-1615019,-1615020,-1615021,-1615022,-1615023,-1615024,-1615025,-1615026,-1615027,-1615028,-1615029,-1615030,-1615031,-1615032,-1615033,-1615034,-1615035,-1615036,-1615037,-1615038,-1615039,-1615040,-1615041,-1615042,-1619021,-1619022,-1619023,-1619024,-1619025,-1619026,-1619027,-1619028,-1999900,-1999901,-1999902,-1999903,-1999904,-1999905,-1999906,-1999907,-1999908,-1999909,-1999910,-1999911,-1999912,-1999913,-1999914,-1999915,-1999916,-1999917,-1999918,-1999919,-1999920,-1999921,-1999922,-1999923,-1999924,-1999925,-1609000,-1609001,-1609002,-1609003,-1609004,-1609005,-1609006,-1609007,-1609008,-1609009,-1609010,-1609011,-1609012,-1609013,-1609014,-1609015,-1609016,-1609025,-1609026,-1609027,-1609028,-1609029,-1609030,-1609031,-1609032,-1609033,-1609034,-1609035,-1609036,-1609037,-1609038,-1609039,-1609040,-1609041,-1609042,-1609043,-1609044,-1609045,-1609046,-1609047,-1609048,-1609049,-1609050,-1609051,-1609052,-1609053,-1609054,-1609055,-1609056,-1609057,-1609058,-1609059,-1609060,-1609061,-1609062,-1609063,-1609064,-1609065,-1609066,-1609067,-1609068,-1609069,-1609070,-1609071,-1609072,-1609073,-1609074,-1609075,-1609076,-1609077,-1609078,-1609080,-1609081,-1609082,-1609083,-1609084,-1609085,-1609086,-1609087,-1609088,-1609089,-1609090,-1609091,-1609092,-1609093,-1609094,-1609095,-1609096,-1609097,-1609098,-1609501,-1609502,-1609503,-1609504,-1609505,-1609506,-1609507,-1609508,-1609509,-1609510,-1609511,-1609512,-1609513,-1609514,-1609515,-1609516,-1609517,-1609518,-1609519,-1609531,-1609532,-1609561,-1609562,-1609563,-1609564,-1609565,-1609566,-1609567,-1609568,-1609569,-1609570,-1609581,-1609582,-1609583,-1609584,-1609585,-1609586,-1609201,-1609202,-1609203,-1609204,-1609205,-1609206,-1609207,-1609208,-1609209,-1609210,-1609211,-1609212,-1609213,-1609214,-1609215,-1609216,-1609217,-1609218,-1609219,-1609220,-1609221,-1609222,-1609223,-1609224,-1609225,-1609226,-1609227,-1609228,-1609229,-1609230,-1609231,-1609232,-1609233,-1609234,-1609235,-1609236,-1609237,-1609238,-1609239,-1609240,-1609241,-1609242,-1609243,-1609244,-1609245,-1609246,-1609247,-1609248,-1609249,-1609250,-1609251,-1609252,-1609253,-1609254,-1609255,-1609256,-1609257,-1609258,-1609259,-1609260,-1609261,-1609262,-1609263,-1609264,-1609265,-1609266,-1609267,-1609268,-1609269,-1609270,-1609271,-1609272,-1609273,-1609274,-1609275,-1609276,-1609277,-1609278,-1609279,-1609280,-1609281,-1609282,-1609283,-1609284,-1609285,-1609286,-1048000,-1048001,-1048002,-1571035,-1750040,-1750041,-1750042,-1750043,-1750044,-1700003,-1700002,-1700001,-1000464,-1000465,-1000466,-1000467,-1000468,-1048003,-1048004,-1033009,-1090000,-1090001,-1090002,-1090003,-1090004,-1090005,-1090006,-1090007,-1090008,-1090009,-1090010,-1090011,-1090012,-1090013,-1090014,-1090015,-1090016,-1090017,-1090018,-1090019,-1090020,-1090021,-1090022,-1090023,-1090024,-1090025,-1090026,-1090027,-1090028,-1000469,-1000470,-1000471,-1000472,-1000473,-1600000,-1600001,-1600002,-1600003,-1600004,-1600005,-1600006,-1600007,-1600008,-1600009,-1600010,-1600011,-1600012,-1600013,-1600014,-1600015,-1600016,-1600017,-1600018,-1608001,-1608002,-1608003,-1608004,-1608005,-1608006,-1608007,-1608008,-1608009,-1608010,-1608011,-1608012,-1608013,-1608014,-1608015,-1608016,-1608017,-1608018,-1608019,-1608020,-1608021,-1608022,-1608023,-1608024,-1608025,-1608026,-1608027,-1608028,-1608029,-1608030,-1608031,-1608032,-1608033,-1608034,-1608035,-1608036,-1608037,-1608038,-1608039,-1608040,-1608041,-1608042,-1608043,-1608044,-1608045,-1800013,-1800012,-1800011,-1800010,-1800009,-1800008,-1800007,-1800006,-1800005,-1800004,-1800003,-1800002,-1800001,-1571036,-1571037,-1571038,-1603001,-1603002,-1603003,-1603004,-1603005,-1603006,-1603007,-1603008,-1603009,-1603010,-1603011,-1603012,-1603013,-1603014,-1603015,-1603016,-1603017,-1603018,-1603019,-1603020,-1603021,-1603022,-1603023,-1603024,-1603025,-1603026,-1603030,-1603031,-1603032,-1603033,-1603034,-1603035,-1603036,-1603037,-1603040,-1603041,-1603042,-1603043,-1603044,-1603045,-1603046,-1603047,-1603050,-1603051,-1603052,-1603053,-1603054,-1603060,-1603061,-1603062,-1603063,-1603064,-1603065,-1603066,-1603067,-1603068,-1603069,-1603070,-1603071,-1603072,-1603073,-1603074,-1603075,-1603180,-1603181,-1603182,-1603183,-1603184,-1603185,-1603186,-1603187,-1603188,-1603189,-1603190,-1603191,-1603192,-1603193,-1603194,-1603195,-1603196,-1603197,-1603198,-1603199,-1603200,-1603201,-1603210,-1603211,-1603212,-1603213,-1603214,-1603215,-1603216,-1603217,-1603218,-1603220,-1603221,-1603222,-1603223,-1603224,-1603225,-1603226,-1603227,-1603228,-1603230,-1603231,-1603232,-1603233,-1603234,-1603235,-1603236,-1603237,-1603238,-1603240,-1603241,-1603242,-1603243,-1603244,-1603245,-1603246,-1603247,-1603248,-1603249,-1603250,-1603251,-1603252,-1603253,-1603254,-1603255,-1603256,-1603257,-1603258,-1603259,-1603260,-1603261,-1603270,-1603271,-1603272,-1603273,-1603274,-1603275,-1603276,-1603277,-1603278,-1603279,-1603280,-1603281,-1603282,-1603283,-1603284,-1603285,-1603286,-1603287,-1603290,-1603291,-1603292,-1603293,-1603294,-1603295,-1603296,-1603300); +DELETE FROM `script_texts` WHERE `entry` IN (-1603301,-1603302,-1603303,-1603304,-1603305,-1603306,-1603307,-1603308,-1603310,-1603311,-1603312,-1603313,-1603314,-1603315,-1603316,-1603317,-1603318,-1603319,-1603330,-1603331,-1603332,-1603333,-1603334,-1603335,-1603336,-1603337,-1603338,-1603339,-1603340,-1603341,-1595000,-1595001,-1595002,-1595003,-1595004,-1595005,-1595006,-1595007,-1595008,-1595009,-1595010,-1595011,-1595012,-1595013,-1595014,-1595015,-1595016,-1595017,-1595018,-1595019,-1595020,-1595021,-1595022,-1595023,-1595024,-1595025,-1595026,-1595027,-1595028,-1595029,-1595030,-1595031,-1595032,-1595033,-1595034,-1595035,-1595036,-1595037,-1595038,-1595039,-1595040,-1595041,-1595042,-1595043,-1595044,-1595045,-1595046,-1595047,-1595070,-1595071,-1595072,-1595073,-1595074,-1595075,-1595076,-1595077,-1595078,-1595079,-1595080,-1595081,-1595082,-1595083,-1595084,-1595085,-1595086,-1595087,-1595088,-1595089,-1595090,-1595091,-1595092,-1595093,-1595094,-1595095,-1595096,-1595097,-1595098,-1595099,-1595100,-1595101,-1595102,-1595103,-1595104,-1595105,-1595106,-1595107,-1595108,-1595109,-1595110,-1595111,-1595112,-1595113,-1595114,-1595115,-1595116,-1595117,-1595118,-1595119,-1595120,-1658001,-1658002,-1658003,-1658004,-1658005,-1658006,-1658007,-1658010,-1658011,-1658012,-1658013,-1658014,-1658015,-1658016,-1658017,-1658018,-1658020,-1658021,-1658030,-1658031,-1658032,-1658033,-1658034,-1658035,-1658036,-1658037,-1658038,-1658039,-1658040,-1658041,-1658065,-1658064,-1658062,-1658063,-1658061,-1658060,-1658059,-1658058,-1658057,-1658056,-1658055,-1658054,-1658053,-1658052,-1658051,-1658050,-1632001,-1632002,-1632003,-1632004,-1632005,-1632006,-1632010,-1632011,-1632012,-1632013,-1632014,-1632015,-1632016,-1632017,-1632018,-1632019,-1632020,-1632021,-1632022,-1632023,-1632024,-1632025,-1632026,-1632027,-1632028,-1632029,-1632030,-1632040,-1632041,-1632042,-1632043,-1632044,-1632045,-1632046,-1632047,-1632050,-1632051,-1632052,-1632053,-1632054,-1632055,-1601004,-1601005,-1601006,-1601007,-1601008,-1601009,-1601010,-1601011,-1601012,-1601013,-1601014,-1601015,-1601016,-1601017,-1601018,-1601019,-1601020,-1601021,-1601022,-1800038,-1800037,-1800035,-1800034,-1800032,-1800028,-1800025,-1800020,-1800019,-1800018,-1800046,-1800045,-1800044,-1800042,-1800043,-1800047,-1800048,-1800049,-1800050,-1800051,-1800052,-1800053,-1800054,-1800055,-1800056,-1800057,-1800058,-1800059,-1800060,-1800061,-1800062,-1800063,-1571039,-1571040,-1571041,-1668001,-1668002,-1668003,-1668004,-1668005,-1668006,-1668007,-1668008,-1668009,-1668010,-1668011,-1668012,-1668013,-1668014,-1668015,-1668016,-1668017,-1668018,-1668019,-1668020,-1668021,-1668022,-1668023,-1668024,-1668025,-1668026,-1668027,-1668028,-1668029,-1668030,-1668031,-1668032,-1668033,-1668034,-1668035,-1668036,-1668037,-1668038,-1668039,-1668040,-1668041,-1668042,-1668043,-1668050,-1668051,-1668052,-1668053,-1668054,-1668055,-1668060,-1668061,-1668062,-1668063,-1668064,-1668065,-1578000,-1578001,-1578002,-1578003,-1578004,-1575028,-1575029,-1575030,-1575031,-1575032,-1575033,-1575034,-1575035,-1575036,-1575037,-1575004,-1575005,-1575006,-1575007,-1575008,-1575009,-1575010,-1575011,-1575012,-1575013,-1000474,-1000475,-1000476,-1209000,-1209001,-1209002,-1209003,-1649000,-1649010,-1649011,-1649012,-1649020,-1649021,-1649022,-1649030,-1649031,-1649032,-1649033,-1649034,-1649035,-1649036,-1649037,-1649038,-1649039,-1649115,-1649116,-1649117,-1649118,-1649120,-1649121,-1649122,-1649123,-1649040,-1649041,-1649042,-1649043,-1649044,-1649045,-1649046,-1649047,-1649048,-1649049,-1649050,-1649055,-1649056,-1649057,-1649058,-1649059,-1649060,-1649061,-1649062,-1649063,-1649070,-1649071,-1649072,-1649073,-1649074,-1649075,-1649076,-1649077,-1649080,-1649081,-1649082,-1649083,-1649084,-1649085,-1649086,-1649087,-1649088,-1649089,-1649090,-1649091,-1649092,-1649093,-1649094,-1649095,-1649096,-1649097,-1649098,-1649099,-1649100,-1649101,-1649102,-1649103,-1649104,-1649105,-1649106,-1649107,-1649108,-1649109,-1649110,-1000500,-1000501,-1000502,-1000503,-1000504,-1000505,-1000506,-1000575,-1000576,-1000577,-1000578,-1000507,-1000508,-1000509,-1000510,-1000511,-1000512,-1000513,-1000514,-1000515,-1000516,-1000517,-1000518,-1000519,-1000520,-1000521,-1000522,-1000523,-1000524,-1000525,-1000571,-1000572,-1000573,-1000574,-1000606,-1000607,-1000609,-1000610,-1000611,-1000612,-1000613,-1000614,-1000615,-1000616,-1000617,-1000618,-1000619,-1000620,-1000621,-1000629,-1000630,-1000631,-1000632,-1000633,-1000634,-1000635,-1000636,-1800064,-1800065,-1800066,-1800067,-1800068,-1800069,-1800070,-1000600,-1571042,-1571043,-1575015,-1575016,-1575017,-1575018,-1575022,-1575000,-1575001,-1575002,-1599014,-1604018,-1604019,-1604020,-1604021,-1604022,-1604023,-1604000,-1604001,-1604003,-1604004,-1604005,-1604006,-1604007,-1604008,-1619017,-1619018,-1619019,-1619000,-1619001,-1619002,-1619008,-1619009,-1619030,-1619034,-1603229,-1575019,-1575020,-1604002,-1604009,-1619003,-1619004,-1619005,-1619007,-1619010,-1619011,-1619012,-1619013,-1619020,-1619031,-1619032,-1619033,-1603268,-1603267,-1603266,-1603265,-1603264,-1603263,-1603262,-1000002,-1000003,-1575023,-1575024,-1575025,-1575026,-1575027,-1619015,-1619006,-1575021,-1619016,-1571047,-1571046,-1571045,-1571044,-1603502,-1603503,-1603504,-1603505,-1603506,-1603507,-1603508,-1603509,-1603510,-1603535,-1603536,-1603537,-1603538,-1603539,-1603289,-1603297,-1603298,-1603299,-1658066,-1658067,-1658068,-1658069,-1658070,-1800071,-1800072,-1800073,-1800074,-1230003,-1230004,-1230005,-1230006,-1230007,-1230008,-1578005,-1578006,-1578007,-1578008,-1578009,-1578010,-1578011,-1578012,-1578013,-1578014,-1578015,-1578016); + +INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +(0, -1000000, '<TrinityScript Text Entry Missing!>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'DEFAULT_TEXT'), +(0, -1000001, '%s goes into a killing frenzy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'EMOTE_GENERIC_FRENZY_KILL'), +(0, -1000004, '%s goes into a berserker rage!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'EMOTE_GENERIC_BERSERK'), +(0, -1000005, '%s goes into a berserker rage!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'EMOTE_GENERIC_BERSERK_RAID'), +(6109, -1000100, 'Come, little ones. Face me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'azuregos SAY_TELEPORT'), +(467, -1000101, 'Follow me, $N. I''ll take you to the Defias hideout. But you better protect me or I am as good as dead.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'defias traitor SAY_START'), +(467, -1000102, 'The entrance is hidden here in Moonbrook. Keep your eyes peeled for thieves. They want me dead.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'defias traitor SAY_PROGRESS'), +(467, -1000103, 'You can go tell Stoutmantle this is where the Defias Gang is holed up, $N.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'defias traitor SAY_END'), +(467, -1000104, '%s coming in fast! Prepare to fight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'defias traitor SAY_AGGRO_1'), +(467, -1000105, 'Help!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'defias traitor SAY_AGGRO_2'), +(12858, -1000106, 'Everyone ready?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'torek SAY_READY'), +(12858, -1000107, 'Ok, Lets move out!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'torek SAY_MOVE'), +(12858, -1000108, 'Prepare yourselves. Silverwing is just around the bend.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'torek SAY_PREPARE'), +(12858, -1000109, 'Silverwing is ours!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'torek SAY_WIN'), +(12858, -1000110, 'Go report that the outpost is taken. We will remain here.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'torek SAY_END'), +(17312, -1000111, 'Our house is this way, through the thicket.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'magwin SAY_START'), +(17312, -1000112, 'Help me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'magwin SAY_AGGRO'), +(17312, -1000113, 'My poor family. Everything has been destroyed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'magwin SAY_PROGRESS'), +(17312, -1000114, 'Father! Father! You''re alive!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'magwin SAY_END1'), +(17312, -1000115, 'You can thank $N for getting me back here safely, father.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'magwin SAY_END2'), +(17312, -1000116, '%s hugs her father.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 7, 0, 'magwin EMOTE_HUG'), +(16993, -1000117, 'Thank you for agreeing to help. Now, let''s get out of here $N.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'wounded elf SAY_ELF_START'), +(16993, -1000118, 'Over there! They''re following us!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'wounded elf SAY_ELF_SUMMON1'), +(16993, -1000119, 'Allow me a moment to rest. The journey taxes what little strength I have.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 16, 'wounded elf SAY_ELF_RESTING'), +(16993, -1000120, 'Did you hear something?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'wounded elf SAY_ELF_SUMMON2'), +(16993, -1000121, 'Falcon Watch, at last! Now, where''s my... Oh no! My pack, it''s missing! Where has -', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'wounded elf SAY_ELF_COMPLETE'), +(16993, -1000122, 'You won''t keep me from getting to Falcon Watch!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'wounded elf SAY_ELF_AGGRO'), +(0, -1000123, 'Ready when you are, $c.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 15, 'big will SAY_BIG_WILL_READY'), +(0, -1000124, 'The Affray has begun. $n, get ready to fight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'twiggy SAY_TWIGGY_BEGIN'), +(0, -1000125, 'You! Enter the fray!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'twiggy SAY_TWIGGY_FRAY'), +(0, -1000126, 'Challenger is down!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'twiggy SAY_TWIGGY_DOWN'), +(0, -1000127, 'The Affray is over.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'twiggy SAY_TWIGGY_OVER'), +(19831, -1000128, 'We need you to send reinforcements to Manaforge Duro, Ardonis. This is not a request, it''s an order.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dawnforge SAY_COMMANDER_DAWNFORGE_1'), +(19831, -1000129, 'You cannot be serious! We are severely understaffed and can barely keep this manaforge functional!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dawnforge SAY_ARCANIST_ARDONIS_1'), +(19831, -1000130, 'You will do as ordered. Manaforge Duro has come under heavy attack by mana creatures and the situation is out of control. Failure to comply will not be tolerated!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dawnforge SAY_COMMANDER_DAWNFORGE_2'), +(19831, -1000131, 'Indeed, it is not a request.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dawnforge SAY_PATHALEON_CULATOR_IMAGE_1'), +(19831, -1000132, 'My lord!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dawnforge SAY_COMMANDER_DAWNFORGE_3'), +(19831, -1000133, 'Duro will be reinforced! Ultris was a complete disaster. I will NOT have that mistake repeated!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dawnforge PATHALEON_CULATOR_IMAGE_2'), +(19831, -1000134, 'We''ve had too many setbacks along the way: Hellfire Citadel, Fallen Sky Ridge, Firewing Point... Prince Kael''thas will tolerate no further delays. I will tolerate nothing other than complete success!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dawnforge PATHALEON_CULATOR_IMAGE_2_1'), +(19831, -1000135, 'I am returning to Tempest Keep. See to it that I do not have reason to return!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dawnforge PATHALEON_CULATOR_IMAGE_2_2'), +(19831, -1000136, 'Yes, my lord.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dawnforge COMMANDER_DAWNFORGE_4 SAY_ARCANIST_ARDONIS_2'), +(19831, -1000137, 'See to it, Ardonis!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dawnforge COMMANDER_DAWNFORGE_5'), +(17085, -1000138, 'Avruu''s magic... it still controls me. You must fight me, mortal. It''s the only way to break the spell!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'aeranas SAY_SUMMON'), +(17085, -1000139, 'Avruu''s magic is broken! I''m free once again!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'aeranas SAY_FREE'), +(16295, -1000140, 'Let''s go.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'lilatha SAY_START'), +(16295, -1000141, '$N, let''s use the antechamber to the right.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'lilatha SAY_PROGRESS1'), +(16295, -1000142, 'I can see the light at the end of the tunnel!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'lilatha SAY_PROGRESS2'), +(16295, -1000143, 'There''s Farstrider Enclave now, $C. Not far to go... Look out! Troll ambush!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'lilatha SAY_PROGRESS3'), +(16295, -1000144, 'Thank you for saving my life and bringing me back to safety, $N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'lilatha SAY_END1'), +(16295, -1000145, 'Captain Helios, I''ve been rescued from the Amani Catacombs. Reporting for duty, sir!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'lilatha SAY_END2'), +(16295, -1000146, 'Liatha, get someone to look at those injuries. Thank you for bringing her back safely.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'lilatha CAPTAIN_ANSWER'), +(32845, -1603209, 'Hodir begins to cast Flash Freeze!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'Hodir - EMOTE_FREEZE'), +(32845, -1603219, 'Hodir gains Frozen Blows!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'Hodir - EMOTE_BLOW'), +(21469, -1000174, 'Good $N, you are under the spell''s influence. I must analyze it quickly, then we can talk.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'daranelle SAY_SPELL_INFLUENCE'), +(0, -1000175, 'Thank you, mortal.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 11, 0, ' SAY_JUST_EATEN'), +(0, -1000176, 'The last thing I remember is the ship falling and us getting into the pods. I''ll go see how I can help. Thank you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'draenei_survivor SAY_HEAL1'), +(0, -1000177, '$C, Where am I? Who are you? Oh no! What happened to the ship?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'draenei_survivor SAY_HEAL2'), +(0, -1000178, '$C You saved me! I owe you a debt that I can never repay. I''ll go see if I can help the others.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'draenei_survivor SAY_HEAL3'), +(0, -1000179, 'Ugh... what is this place? Is that all that''s left of the ship over there?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'draenei_survivor SAY_HEAL4'), +(0, -1000180, 'Oh, the pain...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'draenei_survivor SAY_HELP1'), +(0, -1000181, 'Everything hurts, Please make it stop...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'draenei_survivor SAY_HELP2'), +(0, -1000182, 'Ughhh... I hurt. Can you help me?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'draenei_survivor SAY_HELP3'), +(0, -1000183, 'I don''t know if I can make it, please help me...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'draenei_survivor SAY_HELP4'), +(0, -1000184, 'Yes Master, all goes along as planned.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'engineer_spark SAY_TEXT'), +(0, -1000185, '%s puts the shell to his ear.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 7, 0, 'engineer_spark EMOTE_SHELL'), +(0, -1000186, 'Now I cut you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 7, 0, 'engineer_spark SAY_ATTACK'), +(0, -1000188, 'Deployment sucessful. Trespassers will be neutralized.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'converted_sentry SAY_CONVERTED_1'), +(0, -1000189, 'Objective acquired. Initiating security routines.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'converted_sentry SAY_CONVERTED_2'), +(0, -1000190, 'In Nagrand, food hunt ogre!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ' SAY_LUMP_0'), +(0, -1000191, 'You taste good with maybe a little salt and pepper.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ' SAY_LUMP_1'), +(0, -1000192, 'OK, OK! Lump give up!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ' SAY_LUMP_DEFEAT'), +(0, -1000193, 'Thank you, dear $C, you just saved my life.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'stillblade SAY_HEAL'), +(0, -1000194, 'I give up! Please don''t kill me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unkor SAY_SUBMIT'), +(0, -1000195, 'I choose the third option: KILLING YOU!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'floon SAY_FLOON_ATTACK'), +(0, -1000196, 'Belore...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'lady_sylvanas SAY_LAMENT_END'), +(0, -1000197, '%s kneels down and pick up the amulet.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 1, 0, 'lady_sylvanas EMOTE_LAMENT_END'), +(0, -1000198, 'Taste blade, mongrel!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'SAY_GUARD_SIL_AGGRO1'), +(0, -1000199, '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...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'SAY_GUARD_SIL_AGGRO2'), +(9623, -1000200, 'As if we don''t have enough problems, you go and create more!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'SAY_GUARD_SIL_AGGRO3'), +(9623, -1000201, 'I''m saved! Thank you, doctor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'injured_patient SAY_DOC1'), +(9623, -1000202, 'HOORAY! I AM SAVED!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'injured_patient SAY_DOC2'), +(9623, -1000203, 'Sweet, sweet embrace... take me...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'injured_patient SAY_DOC3'), +(9623, -1000204, '%s looks up at you quizzically. Maybe you should inspect it?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'cluck EMOTE_A_HELLO'), +(9623, -1000205, '%s looks at you unexpectadly.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'cluck EMOTE_H_HELLO'), +(23139, -1000206, '%s starts pecking at the feed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'cluck EMOTE_CLUCK_TEXT2'), +(23139, -1000207, 'You have my blessing', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ashyen_and_keleth SAY_REWARD_BLESS'), +(28315, -1000208, 'Frenzyheart kill you if you come back. You no welcome here no more!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'vekjik SAY_TEXTID_VEKJIK1'), +(15420, -1000209, 'Very well. Let''s see what you have to show me, $N.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'anvilward SAY_ANVIL1'), +(15420, -1000210, 'What manner of trick is this, $R? If you seek to ambush me, I warn you I will not go down quietly!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'anvilward SAY_ANVIL2'), +(23139, -1000211, 'Warning! %s emergency shutdown process initiated by $N. Shutdown will complete in two minutes.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'manaforge_control EMOTE_START'), +(23139, -1000212, 'Emergency shutdown will complete in one minute.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'manaforge_control EMOTE_60'), +(23139, -1000213, 'Emergency shutdown will complete in thirty seconds.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'manaforge_control EMOTE_30'), +(22083, -1000214, 'Emergency shutdown will complete in ten seconds.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'manaforge_control EMOTE_10'), +(22083, -1000215, 'Emergency shutdown complete.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'manaforge_control EMOTE_COMPLETE'), +(22083, -1000216, 'Emergency shutdown aborted.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'manaforge_control EMOTE_ABORT'), +(22083, -1000217, 'Greetings, $N. I will guide you through the cavern. Please try and keep up.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'WHISPER_CUSTODIAN_1'), +(22083, -1000218, 'We do not know if the Caverns of Time have always been accessible to mortals. Truly, it is impossible to tell as the Timeless One is in perpetual motion, changing our timeways as he sees fit. What you see now may very well not exist tomorrow. You may wake up and have no memory of this place.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'WHISPER_CUSTODIAN_2'), +(22083, -1000219, 'It is strange, I know... Most mortals cannot actually comprehend what they see here, as often, what they see is not anchored within their own perception of reality.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'WHISPER_CUSTODIAN_3'), +(22083, -1000220, 'Follow me, please.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'WHISPER_CUSTODIAN_4'), +(23141, -1000221, 'There are only two truths to be found here: First, that time is chaotic, always in flux, and completely malleable and second, perception does not dictate reality.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'WHISPER_CUSTODIAN_5'), +(21648, -1000222, 'As custodians of time, we watch over and care for Nozdormu''s realm. The master is away at the moment, which means that attempts are being made to dramatically alter time. The master never meddles in the affairs of mortals but instead corrects the alterations made to time by others. He is reactionary in this regard.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'WHISPER_CUSTODIAN_6'), +(0, -1000223, 'For normal maintenance of time, the Keepers of Time are sufficient caretakers. We are able to deal with most ordinary disturbances. I speak of little things, such as rogue mages changing something in the past to elevate their status or wealth in the present.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'WHISPER_CUSTODIAN_7'), +(0, -1000224, 'These tunnels that you see are called timeways. They are infinite in number. The ones that currently exist in your reality are what the master has deemed as ''trouble spots.'' These trouble spots may differ completely in theme but they always share a cause. That is, their existence is a result of the same temporal disturbance. Remember that should you venture inside one...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'WHISPER_CUSTODIAN_8'), +(0, -1000225, 'This timeway is in great disarray! We have agents inside right now attempting to restore order. What information I have indicates that Thrall''s freedom is in jeopardy. A malevolent organization known as the Infinite Dragonflight is trying to prevent his escape. I fear without outside assistance, all will be lost.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'WHISPER_CUSTODIAN_9'), +(0, -1000226, 'We have very little information on this timeway. Sa''at has been dispatched and is currently inside. The data we have gathered from his correspondence is that the Infinite Dragonflight are once again attempting to alter time. Could it be that the opening of the Dark Portal is being targeted for sabotage? Let us hope not...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'WHISPER_CUSTODIAN_10'), +(0, -1000227, 'This timeway is currently collapsing. What that may hold for the past, present and future is currently unknown...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'WHISPER_CUSTODIAN_11'), +(0, -1000228, 'The timeways are currently ranked in order from least catastrophic to most catastrophic. Note that they are all classified as catastrophic, meaning that any single one of these timeways collapsing would mean that your world would end. We only classify them in such a way so that the heroes and adventurers that are sent here know which timeway best suits their abilities.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'WHISPER_CUSTODIAN_12'), +(0, -1000229, 'All we know of this timeway is that it leads to Mount Hyjal. The Infinite Dragonflight have gone to great lengths to prevent our involvement. We know next to nothing, mortal. Soridormi is currently attempting to break through the timeway''s defenses but has thus far been unsuccessful. You might be our only hope of breaking through and resolving the conflict.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'WHISPER_CUSTODIAN_13'), +(0, -1000230, 'Our time is at an end $N. I would wish you luck, if such a thing existed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'WHISPER_CUSTODIAN_14'), +(0, -1000231, 'Ah, $GPriest:Priestess; you came along just in time. I appreciate it.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 20, 'garments SAY_COMMON_HEALED'), +(0, -1000232, 'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those gnolls with your power to back me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 4, 'garments SAY_DG_KEL_THANKS'), +(0, -1000233, 'Farewell to you, and may shadow always protect you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 3, 'garments SAY_DG_KEL_GOODBYE'), +(0, -1000234, 'Follow me, stranger. This won''t take long.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'SAY_KHAD_SERV_0'), +(2768, -1000235, 'Shattrath was once the draenei capital of this world. Its name means "dwelling of light."', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_1'), +(2768, -1000236, 'When the Burning Legion turned the orcs against the draenei, the fiercest battle was fought here. The draenei fought tooth and nail, but in the end the city fell.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_2'), +(2768, -1000237, 'The city was left in ruins and darkness... until the Sha''tar arrived.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_3'), +(2768, -1000238, 'Let us go into the Lower City. I will warn you that as one of the only safe havens in Outland, Shattrath has attracted droves of refugees from all wars, current and past.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_4'), +(2768, -1000239, 'The Sha''tar, or "born from light" are the naaru that came to Outland to fight the demons of the Burning Legion.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_5'), +(2768, -1000240, 'They were drawn to the ruins of Shattrath City where a small remnant of the draenei priesthood conducted its rites inside a ruined temple on this very spot.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_6'), +(2768, -1000241, 'The priesthood, known as the Aldor, quickly regained its strength as word spread that the naaru had returned and reconstruction soon began. The ruined temple is now used as an infirmary for injured refugees.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_7'), +(2768, -1000242, 'It wouldn''t be long, however, before the city came under attack once again. This time, the attack came from Illidan''s armies. A large regiment of blood elves had been sent by Illidan''s ally, Kael''thas Sunstrider, to lay waste to the city.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_8'), +(2768, -1000243, 'As the regiment of blood elves crossed this very bridge, the Aldor''s exarchs and vindicators lined up to defend the Terrace of Light. But then the unexpected happened.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_9'), +(2768, -1000244, 'The blood elves laid down their weapons in front of the city''s defenders; their leader, a blood elf elder known as Voren''thal, stormed into the Terrace of Light and demanded to speak to A''dal.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_10'), +(23002, -1000245, 'As the naaru approached him, Voren''thal kneeled before him and uttered the following words: "I''ve seen you in a vision, naaru. My race''s only hope for survival lies with you. My followers and I are here to serve you."', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_11'), +(23002, -1000246, 'The defection of Voren''thal and his followers was the largest loss ever incurred by Kael''s forces. And these weren''t just any blood elves. Many of the best and brightest amongst Kael''s scholars and magisters had been swayed by Voren''thal''s influence.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_12'), +(23002, -1000247, 'The naaru accepted the defectors, who would become known as the Scryers; their dwelling lies in the platform above. Only those initiated with the Scryers are allowed there.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_13'), +(16483, -1000248, 'The Aldor are followers of the Light and forgiveness and redemption are values they understand. However, they found hard to forget the deeds of the blood elves while under Kael''s command.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_14'), +(16483, -1000249, 'Many of the priesthood had been slain by the same magisters who now vowed to serve the naaru. They were not happy to share the city with their former enemies.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_15'), +(16483, -1000250, 'The Aldor''s most holy temple and its surrounding dwellings lie on the terrace above. As a holy site, only the initiated are welcome inside.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_16'), +(16483, -1000251, 'The attacks against Shattrath continued, but the city did not fall, as you can see. On the contrary, the naaru known as Xi''ri led a successful incursion into Shadowmoon Valley - Illidan''s doorstep.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_17'), +(16483, -1000252, 'There he continues to wage war on Illidan with the assistance of the Aldor and the Scryers. The two factions have not given up on their old feuds, though.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_18'), +(16483, -1000253, 'Such is their animosity that they vie for the honor of being sent to assist the naaru there. Each day, that decision is made here by A''dal. The armies gather here to receive A''dal''s blessing before heading to Shadowmoon.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_19'), +(16483, -1000254, 'Khadgar should be ready to see you again. Just remember that to serve the Sha''tar you will most likely have to ally with the Aldor or the Scryers. And seeking the favor of one group will cause the others'' dislike.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_20'), +(16483, -1000255, 'Good luck stranger, and welcome to Shattrath City.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'SAY_KHAD_SERV_21'), +(17243, -1000256, 'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those murlocs with the Light on my side!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 4, 'garments SAY_ROBERTS_THANKS'), +(17243, -1000257, 'Farewell to you, and may the Light be with you always.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 3, 'garments SAY_ROBERTS_GOODBYE'), +(17243, -1000258, 'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those humans with your power to back me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 4, 'garments SAY_KORJA_THANKS'), +(17318, -1000259, 'Farewell to you, and may our ancestors be with you always!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 3, 'garments SAY_KORJA_GOODBYE'), +(17318, -1000260, 'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those wendigo with the Light on my side!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 4, 'garments SAY_DOLF_THANKS'), +(17318, -1000261, 'Farewell to you, and may the Light be with you always.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 3, 'garments SAY_DOLF_GOODBYE'), +(17318, -1000262, 'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those corrupt timberlings with Elune''s power behind me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 2, 4, 'garments SAY_SHAYA_THANKS'), +(17318, -1000263, 'Farewell to you, and may Elune be with you always.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 2, 3, 'garments SAY_SHAYA_GOODBYE'), +(3439, -1000274, 'Time to teach you a lesson in manners, little $Gboy:girl;!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'larry SAY_START'), +(3439, -1000275, 'Now I''m gonna give you to the count of ''3'' to get out of here before I sick the dogs on you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'larry SAY_COUNT'), +(3439, -1000276, '1...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'larry SAY_COUNT_1'), +(3439, -1000277, '2...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'larry SAY_COUNT_2'), +(3439, -1000278, 'Time to meet your maker!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'larry SAY_ATTACK_5'), +(3439, -1000279, 'Alright, we give up! Don''t hurt us!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'larry SAY_GIVEUP'), +(6172, -1000280, 'A shadowy, sinister presence has invaded the Emerald Dream. Its power is poised to spill over into our world, $N. We must oppose it! That''s why I cannot accompany you in person.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'clintar SAY_START'), +(15420, -1000281, 'The Emerald Dream will never be yours!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'clintar SAY_AGGRO_1'), +(15420, -1000282, 'Begone from this place!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'clintar SAY_AGGRO_2'), +(0, -1000283, 'That''s the first relic, but there are still two more. Follow me, $N.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'clintar SAY_RELIC1'), +(24981, -1000284, 'I''ve recovered the second relic. Take a moment to rest, and then we''ll continue to the last reliquary.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'clintar SAY_RELIC2'), +(0, -1000285, 'We have all three of the relics, but my energy is rapidly fading. We must make our way back to Dreamwarden Lurosa! He will let you know what to do next.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'clintar SAY_RELIC3'), +(22916, -1000286, 'Lurosa, I am entrusting the Relics of Aviana to $N, who will take them to Morthis Whisperwing. I must return completely to the Emerald Dream now. Do not let $N fail!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'clintar SAY_END'), +(7806, -1000287, 'Emergency power activated! Initializing ambulanory motor! CLUCK!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox SAY_OOX_START'), +(7806, -1000288, 'Physical threat detected! Evasive action! CLUCK!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox SAY_OOX_AGGRO1'), +(7806, -1000289, 'Thread analyzed! Activating combat plan beta! CLUCK!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox SAY_OOX_AGGRO2'), +(7806, -1000290, 'CLUCK! Sensors detect spatial anomaly - danger imminent! CLUCK!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox SAY_OOX_AMBUSH'), +(7806, -1000291, 'No one challanges the Wastewander nomads - not even robotic chickens! ATTACK!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox SAY_OOX17_AMBUSH_REPLY'), +(0, -1000292, 'Cloaking systems online! CLUCK! Engaging cloak for transport to Booty Bay!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox SAY_OOX_END'), +(18351, -1000293, 'To the house! Stay close to me, no matter what! I have my gun and ammo there!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'stilwell SAY_DS_START'), +(18351, -1000294, 'We showed that one!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'stilwell SAY_DS_DOWN_1'), +(18351, -1000295, 'One more down!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'stilwell SAY_DS_DOWN_2'), +(20209, -1000296, 'We''ve done it! We won!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'stilwell SAY_DS_DOWN_3'), +(20209, -1000297, 'Meet me down by the orchard-- I just need to put my gun away.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'stilwell SAY_DS_PROLOGUE'), +(20209, -1000298, 'Alright, alright I think I can figure out how to operate this thing...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 393, 'wizzlecrank SAY_START'), +(20209, -1000299, 'Arrrgh! This isn''t right!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'wizzlecrank SAY_STARTUP1'), +(20209, -1000300, 'Okay, I think I''ve got it, now. Follow me, $n!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'wizzlecrank SAY_STARTUP2'), +(20209, -1000301, 'There''s the stolen shredder! Stop it or Lugwizzle will have our hides!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'wizzlecrank SAY_MERCENARY'), +(20907, -1000302, 'Looks like we''re out of woods, eh? Wonder what this does...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'wizzlecrank SAY_PROGRESS_1'), +(18879, -1000303, 'Come on, don''t break down on me now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 393, 'wizzlecrank SAY_PROGRESS_2'), +(20415, -1000304, 'That was a close one! Well, let''s get going, it''s still a ways to Ratchet!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'wizzlecrank SAY_PROGRESS_3'), +(20415, -1000305, 'Hmm... I don''t think this blinking red light is a good thing...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'wizzlecrank SAY_END'), +(19685, -1000306, 'Let''s get to the others, and keep an eye open for those wolves cutside...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'erland SAY_START_1'), +(19685, -1000307, 'Be careful, $N. Those wolves like to hide among the trees.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'erland SAY_START_2'), +(19685, -1000308, 'A $C attacks!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'erland SAY_AGGRO_1'), +(19685, -1000309, 'Beware! I am under attack!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'erland SAY_AGGRO_2'), +(19685, -1000310, 'Oh no! A $C is upon us!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'erland SAY_AGGRO_3'), +(19685, -1000311, 'We''re almost there!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'erland SAY_PROGRESS'), +(19685, -1000312, 'We made it! Thanks, $N. I couldn''t have gotten without you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'erland SAY_END'), +(19685, -1000313, 'It''s good to see you again, Erland. What is your report?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 33, 1, 'erland SAY_RANE'), +(19685, -1000314, 'Masses of wolves are to the east, and whoever lived at Malden''s Orchard is gone.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 1, 'erland SAY_RANE_REPLY'), +(19685, -1000315, 'If I am excused, then I''d like to check on Quinn...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 1, 'erland SAY_CHECK_NEXT'), +(19685, -1000316, 'Hello, Quinn. How are you faring?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 1, 'erland SAY_QUINN'), +(19685, -1000317, 'I''ve been better. Ivar the Foul got the better of me...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 33, 1, 'erland SAY_QUINN_REPLY'), +(19685, -1000318, 'Try to take better care of yourself, Quinn. You were lucky this time.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 1, 'erland SAY_BYE'), +(19685, -1000319, 'Let the trial begin, Bloodwrath, attack!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 'kelerun SayId1'), +(19685, -1000320, 'Champion Lightrend, make me proud!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 'kelerun SayId2'), +(19685, -1000321, 'Show this upstart how a real Blood Knight fights, Swiftblade!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 'kelerun SayId3'), +(19685, -1000322, 'Show $n the meaning of pain, Sunstriker!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 'kelerun SayId4'), +(19685, -1000323, 'Mist! I feared I would never see you again! Yes, I am well, do not worry for me. You must rest and recover your health.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'mist SAY_AT_HOME'), +(19685, -1000324, '%s growls in acknowledgement before straightening and making her way off into the forest.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'mist EMOTE_AT_HOME'), +(19685, -1000325, '"Threshwackonator First Mate unit prepared to follow"', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'threshwackonator EMOTE_START'), +(19685, -1000326, 'YARRR! Swabie, what have ye done?! He''s gone mad! Baton him down the hatches! Hoist the mast! ARRRR! Every man for hi''self!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'threshwackonator SAY_AT_CLOSE'), +(19685, -1000327, 'Ok, $n, let''s go find where I left that mysterious fossil. Follow me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_START'), +(19720, -1000328, 'Now where did I put that mysterious fossil? Ah, maybe up there...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_RAMP1_1'), +(19720, -1000329, 'Hrm, nothing up here.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_RAMP1_2'), +(19720, -1000330, 'No mysterious fossil here... Ah, but my copy of Green Hills of Stranglethorn. What a good book!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_BOOK'), +(19720, -1000331, 'I bet you I left it in the tent!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_TENT1_1'), +(19720, -1000332, 'Oh wait, that''s Hollee''s tent... and it''s empty.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_TENT1_2'), +(19720, -1000333, 'Interesting... I hadn''t noticed this earlier...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_MOSS'), +(17768, -1000334, '%s inspects the ancient, mossy stone.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 7, 0, 'remtravel EMOTE_REM_MOSS'), +(1978, -1000335, 'Oh wait! I''m supposed to be looking for that mysterious fossil!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_MOSS_PROGRESS'), +(1978, -1000336, 'Nope. didn''t leave the fossil back here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_PROGRESS'), +(1978, -1000337, 'Ah. I remember now! I gave the mysterious fossil to Hollee! Check with her.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_REMEMBER'), +(1978, -1000338, '%s goes back to work, oblivious to everything around him.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 7, 0, 'remtravel EMOTE_REM_END'), +(1978, -1000339, 'Something tells me this $r wants the mysterious fossil too. Help!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_AGGRO'), +(1978, -1000340, '%s howls in delight at the sight of his lunch!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'kyle EMOTE_SEE_LUNCH'), +(1978, -1000341, '%s eats his lunch.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'kyle EMOTE_EAT_LUNCH'), +(1978, -1000342, '%s thanks you with a special dance.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'kyle EMOTE_DANCE'), +(1978, -1000343, 'Is the way clear? Let''s get out while we can, $N.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kayra SAY_START'), +(1978, -1000344, 'Looks like we won''t get away so easy. Get ready!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kayra SAY_AMBUSH1'), +(1978, -1000345, 'Let''s keep moving. We''re not safe here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kayra SAY_PROGRESS'), +(1978, -1000346, 'Look out, $N! Enemies ahead!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kayra SAY_AMBUSH2'), +(11856, -1000347, 'We''re almost to the refuge! Let''s go.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kayra SAY_END'), +(11856, -1000348, 'Ah...the wondrous sound of kodos. I love the way they make the ground shake... inspect the beast for me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kodo round SAY_SMEED_HOME_1'), +(11856, -1000349, 'Hey, look out with that kodo! You had better inspect that beast before I give you credit!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kodo round SAY_SMEED_HOME_2'), +(9453, -1000350, 'That kodo sure is a beauty. Wait a minute, where are my bifocals? Perhaps you should inspect the beast for me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kodo round SAY_SMEED_HOME_3'), +(18262, -1000351, 'You, there! Hand over that moonstone and nobody gets hurt!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'sprysprocket SAY_START'), +(18588, -1000352, '%s takes the Southfury moonstone and escapes into the river. Follow her!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'sprysprocket EMOTE_START'), +(18760, -1000353, 'Just chill!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'sprysprocket SAY_WHISPER_CHILL'), +(18760, -1000354, 'Stupid grenade picked a fine time to backfire! So much for high quality goblin engineering!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'sprysprocket SAY_GRENADE_FAIL'), +(18760, -1000355, 'All right, you win! I surrender! Just don''t hurt me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'sprysprocket SAY_END'), +(18760, -1000356, 'Okay, okay... gimme a minute to rest now. You gone and beat me up good.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 14, 'calvin SAY_COMPLETE'), +(10181, -1000357, 'Let''s go before they find out I''m free!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'KAYA_SAY_START'), +(10181, -1000358, 'Look out! We''re under attack!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'KAYA_AMBUSH'), +(17900, -1000359, 'Thank you for helping me. I know my way back from here.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'KAYA_END'), +(17969, -1000362, 'Let''s go $N. I am ready to reach Whitereach Post.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'paoka SAY_START'), +(17969, -1000363, 'Now this looks familiar. If we keep heading east, I think we can... Ahh, Wyvern on the attack!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'paoka SAY_WYVERN'), +(17969, -1000364, 'Thanks a bunch... I can find my way back to Whitereach Post from here. Be sure to talk with Motega Firemane; perhaps you can keep him from sending me home.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'paoka SAY_COMPLETE'), +(10646, -1000365, 'Be on guard... Arnak has some strange power over the Grimtotem... they will not be happy to see me escape.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'lakota SAY_LAKO_START'), +(10646, -1000366, 'Look out, the Grimtotem are upon us!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'lakota SAY_LAKO_LOOK_OUT'), +(10646, -1000367, 'Here they come.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'lakota SAY_LAKO_HERE_COME'), +(10646, -1000368, 'More Grimtotems are coming this way!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'lakota SAY_LAKO_MORE'), +(10646, -1000369, 'Finally, free at last... I must be going now, thanks for helping me escape. I can get back to Freewind Post by myself.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'lakota SAY_LAKO_END'), +(3465, -1000370, 'Stay close, $n. I''ll need all the help I can get to break out of here. Let''s go!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 1, 'gilthares SAY_GIL_START'), +(3465, -1000371, 'At last! Free from Northwatch Hold! I need a moment to catch my breath...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 5, 'gilthares SAY_GIL_AT_LAST'), +(3465, -1000372, 'Now I feel better. Let''s get back to Ratchet. Come on, $n.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 23, 'gilthares SAY_GIL_PROCEED'), +(3465, -1000373, 'Looks like the Southsea Freeboters are heavily entrenched on the coast. This could get rough.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 25, 'gilthares SAY_GIL_FREEBOOTERS'), +(3465, -1000374, 'Help! $C attacking!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'gilthares SAY_GIL_AGGRO_1'), +(3465, -1000375, '$C heading this way fast! Time for revenge!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'gilthares SAY_GIL_AGGRO_2'), +(3465, -1000376, '$C coming right at us!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'gilthares SAY_GIL_AGGRO_3'), +(3465, -1000377, 'Get this $C off of me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'gilthares SAY_GIL_AGGRO_4'), +(3465, -1000378, 'Almost back to Ratchet! Let''s keep up the pace...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'gilthares SAY_GIL_ALMOST'), +(3465, -1000379, 'Ah, the sweet salt air of Ratchet.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'gilthares SAY_GIL_SWEET'), +(3465, -1000380, 'Captain Brightsun, $N here has freed me! $N, I am certain the Captain will reward your bravery.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 66, 'gilthares SAY_GIL_FREED'), +(21027, -1000381, 'I sense the tortured spirits, $n. They are this way, come quickly!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'wilda SAY_WIL_START'), +(21027, -1000382, 'Watch out!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'wilda SAY_WIL_AGGRO1'), +(21027, -1000383, 'Naga attackers! Defend yourself!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'wilda SAY_WIL_AGGRO2'), +(21027, -1000384, 'Grant me protection $n, I must break trough their foul magic!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'wilda SAY_WIL_PROGRESS1'), +(21027, -1000385, 'The naga of Coilskar are exceptionally cruel to their prisoners. It is a miracle that I survived inside that watery prison for as long as I did. Earthmother be praised.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'wilda SAY_WIL_PROGRESS2'), +(21027, -1000386, 'Now we must find the exit.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'wilda SAY_WIL_FIND_EXIT'), +(21027, -1000387, 'Lady Vashj must answer for these atrocities. She must be brought to justice!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'wilda SAY_WIL_PROGRESS4'), +(21027, -1000388, 'The tumultuous nature of the great waterways of Azeroth and Draenor are a direct result of tormented water spirits.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'wilda SAY_WIL_PROGRESS5'), +(21027, -1000389, 'It shouldn''t be much further, $n. The exit is just up ahead.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'wilda SAY_WIL_JUST_AHEAD'), +(21027, -1000390, 'Thank you, $n. Please return to my brethren at the Altar of Damnation, near the Hand of Gul''dan, and tell them that Wilda is safe. May the Earthmother watch over you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'wilda SAY_WIL_END'), +(5955, -1000391, 'I''m Thirsty.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'tooga SAY_TOOG_THIRST'), +(5955, -1000392, 'Torta must be so worried.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'tooga SAY_TOOG_WORRIED'), +(5955, -1000393, 'Torta, my love! I have returned at long last.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'tooga SAY_TOOG_POST_1'), +(5955, -1000394, 'You have any idea how long I''ve been waiting here? And where''s dinner? All that time gone and nothing to show for it?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'tooga SAY_TORT_POST_2'), +(5955, -1000395, 'My dearest Torta. I have been gone for so long. Finally we are reunited. At long last our love can blossom again.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'tooga SAY_TOOG_POST_3'), +(5955, -1000396, 'Enough with the rambling. I am starving! Now, get your dusty shell into that ocean and bring momma some grub.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'tooga SAY_TORT_POST_4'), +(5955, -1000397, 'Yes Torta. Whatever your heart desires...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'tooga SAY_TOOG_POST_5'), +(5955, -1000398, 'And try not to get lost this time...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'tooga SAY_TORT_POST_6'), +(33515, -1603056, 'Auriaya begins to activate the Feral Defender!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'Auriaya - EMOTE_DEFENDER'), +(33515, -1603055, 'Auriaya begins to cast Terrifying Screech.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'Auriaya - EMOTE_FEAR'), +(6182, -1000403, 'Rin''ji is free!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'SAY_RIN_FREE'), +(6182, -1000404, 'Attack my sisters! The troll must not escape!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'SAY_RIN_BY_OUTRUNNER'), +(6182, -1000405, 'Rin''ji needs help!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'SAY_RIN_HELP_1'), +(6182, -1000406, 'Rin''ji is being attacked!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'SAY_RIN_HELP_2'), +(7780, -1000407, 'Rin''ji can see road now, $n. Rin''ji knows the way home.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'SAY_RIN_COMPLETE'), +(7780, -1000408, 'Rin''ji will tell you secret now... $n, should go to the Overlook Cliffs. Rin''ji hid something on island there', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'SAY_RIN_PROGRESS_1'), +(7780, -1000409, 'You find it, you keep it! Don''t tell no one that Rin''ji talked to you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'SAY_RIN_PROGRESS_2'), +(10638, -1000410, 'Here they come! Defend yourself!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 5, 'kanati SAY_KAN_START'), +(3568, -1000411, 'Why don''t we deal with you now, Hendel? Lady Proudmoore will speak for you back in the tower.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'hendel SAY_PROGRESS_1_TER'), +(3568, -1000412, 'Please... please... Miss Proudmore. I didn''t mean to...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'hendel SAY_PROGRESS_2_HEN'); +INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +(4966, -1000413, 'I apologize for taking so long to get here. I wanted Lady Proudmoore to be present also.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'hendel SAY_PROGRESS_3_TER'), +(4966, -1000414, 'We can only stay a few moments before returning to the tower. If you wish to speak to us more you may find us there.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'hendel SAY_PROGRESS_4_TER'), +(4966, -1000415, '%s, too injured, gives up the chase.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'hendel EMOTE_SURRENDER'), +(9999, -1000416, 'Well, I''m not sure how far I''ll make it in this state... I''m feeling kind of faint...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_RIN_START_1'), +(9999, -1000417, 'Remember, if I faint again, the water that Spraggle gave you will revive me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_RIN_START_2'), +(9999, -1000418, 'The heat... I can''t take it...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_FAINT_1'), +(9999, -1000419, 'Maybe... you could carry me?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_FAINT_2'), +(9999, -1000420, 'Uuuuuuggggghhhhh....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_FAINT_3'), +(9999, -1000421, 'I''m not feeling so well...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_FAINT_4'), +(9999, -1000422, 'Where... Where am I?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_WAKE_1'), +(9999, -1000423, 'I am feeling a little better now, thank you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_WAKE_2'), +(9999, -1000424, 'Yes, I must go on.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_WAKE_3'), +(9999, -1000425, 'How am I feeling? Quite soaked, thank you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_WAKE_4'), +(9999, -1000426, 'Spraggle! I didn''t think I''d make it back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_RIN_END_1'), +(9999, -1000427, 'Ringo! You''re okay!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_SPR_END_2'), +(9999, -1000428, 'Oh... I''m feeling faint...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_RIN_END_3'), +(9999, -1000429, '%s collapses onto the ground.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'ringo EMOTE_RIN_END_4'), +(9999, -1000430, '%s stands up after a short pause.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'ringo EMOTE_RIN_END_5'), +(6784, -1000431, 'Ugh.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_RIN_END_6'), +(9999, -1000432, 'Ringo? Wake up! Don''t worry, I''ll take care of you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ringo SAY_SPR_END_7'), +(9999, -1000433, '%s fades away after a long pause.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'ringo EMOTE_RIN_END_8'), +(11218, -1000434, 'Liladris has been waiting for me at Maestra''s Post, so we should make haste, $N.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kerlonian SAY_KER_START'), +(11218, -1000435, '%s looks very sleepy...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'kerlonian EMOTE_KER_SLEEP_1'), +(11218, -1000436, '%s suddenly falls asleep', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'kerlonian EMOTE_KER_SLEEP_2'), +(11218, -1000437, '%s begins to drift off...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'kerlonian EMOTE_KER_SLEEP_3'), +(11218, -1000438, 'This looks like the perfect place for a nap...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kerlonian SAY_KER_SLEEP_1'), +(11218, -1000439, 'Yaaaaawwwwwnnnn...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kerlonian SAY_KER_SLEEP_2'), +(11218, -1000440, 'Oh, I am so tired...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kerlonian SAY_KER_SLEEP_3'), +(11218, -1000441, 'You don''t mind if I stop here for a moment, do you?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kerlonian SAY_KER_SLEEP_4'), +(11218, -1000442, 'Be on the alert! The Blackwood furbolgs are numerous in the area...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kerlonian SAY_KER_ALERT_1'), +(11218, -1000443, 'It''s quiet... Too quiet...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kerlonian SAY_KER_ALERT_2'), +(11218, -1000444, 'Oh, I can see Liladris from here... Tell her I''m here, won''t you?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kerlonian SAY_KER_END'), +(11218, -1000445, '%s wakes up!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'kerlonian EMOTE_KER_AWAKEN'), +(18210, -1000482, 'Look out!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'maghar captive SAY_MAG_START'), +(18210, -1000483, 'Don''t let them escape! Kill the strong one first!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'maghar captive SAY_MAG_NO_ESCAPE'), +(18210, -1000484, 'More of them coming! Watch out!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'maghar captive SAY_MAG_MORE'), +(18210, -1000485, 'Where do you think you''re going? Kill them all!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'maghar captive SAY_MAG_MORE_REPLY'), +(18210, -1000486, 'Ride the lightning, filth!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'maghar captive SAY_MAG_LIGHTNING'), +(18210, -1000487, 'FROST SHOCK!!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'maghar captive SAY_MAG_SHOCK'), +(18210, -1000488, 'It is best that we split up now, in case they send more after us. Hopefully one of us will make it back to Garrosh. Farewell stranger.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'maghar captive SAY_MAG_COMPLETE'), +(17077, -1000496, '%s lifts its head into the air, as if listening for something.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'ancestral wolf EMOTE_WOLF_LIFT_HEAD'), +(17077, -1000497, '%s lets out a howl that rings across the mountains to the north and motions for you to follow.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'ancestral wolf EMOTE_WOLF_HOWL'), +(17077, -1000498, 'Welcome, kind spirit. What has brought you to us?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'ancestral wolf SAY_WOLF_WELCOME'), +(8856, -1000499, 'By your command!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7766, -1000450, 'Wait here. Spybot will make Lescovar come out as soon as possible. Be ready! Attack only after you''ve overheard their conversation.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(8856, -1000451, 'Good day to you both. I would speak to Lord Lescovar.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(1756, -1000452, 'Of course. He awaits you in the library.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(8856, -1000453, 'Thank you. The Light be with you both.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(8856, -1000454, 'Milord, your guest has arrived. He awaits your presence.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(1754, -1000455, 'Ah, thank you kindly. I will leave you to the library while I tend to this small matter.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(8856, -1000456, 'I shall use the time wisely, milord. Thank you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(1754, -1000457, 'It''s time for my meditation, leave me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(1756, -1000458, 'Yes, sir!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(1754, -1000459, 'There you are. What news from Westfall?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(1755, -1000460, 'VanCleef sends word that the plans are underway. But he''s hear rumors about someone snooping about.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(1754, -1000461, 'Hmm, it could be that meddle Shaw. I will see what I can discover. Be off with you. I''ll contact you again soon.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7766, -1000462, 'That''s it! That''s what you were waiting for! KILL THEM!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(1755, -1000463, 'The Defias shall succeed! No meek adventurer will stop us!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(0, -1033000, 'Follow me and I''ll open the courtyard door for you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 1, 'prisoner ashcrombe SAY_FREE_AS'), +(0, -1033001, 'I have just the spell to get this door open. Too bad the cell doors weren''t locked so haphazardly.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 1, 'prisoner ashcrombe SAY_OPEN_DOOR_AS'), +(0, -1033002, 'There it is! Wide open. Good luck to you conquering what lies beyond. I must report back to the Kirin Tor at once!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 1, 'prisoner ashcrombe SAY_POST_DOOR_AS'), +(0, -1033003, 'Free from this wretched cell at last! Let me show you to the courtyard....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 1, 'prisoner adamant SAY_FREE_AD'), +(0, -1033004, 'You are indeed courageous for wanting to brave the horrors that lie beyond this door.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 1, 'prisoner adamant SAY_OPEN_DOOR_AD'), +(0, -1033005, 'There we go!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 1, 'prisoner adamant SAY_POST1_DOOR_AD'), +(0, -1033006, 'Good luck with Arugal. I must hurry back to Hadrec now.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 1, 'prisoner adamant SAY_POST2_DOOR_AD'), +(3849, -1033007, 'About time someone killed the wretch.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 1, 'prisoner adamant SAY_BOSS_DIE_AD'), +(3850, -1033008, 'For once I agree with you... scum.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 1, 'prisoner ashcrombe SAY_BOSS_DIE_AS'), +(0, -1036000, 'You there, check out that noise!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5775, 1, 7, 0, 'smite INST_SAY_ALARM1'), +(0, -1036001, 'We''re under attack! A vast, ye swabs! Repel the invaders!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5777, 1, 7, 0, 'smite INST_SAY_ALARM2'), +(3678, -1043000, 'At last! Naralex can be awakened! Come aid me, brave adventurers!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'Disciple SAY_AT_LAST'), +(3678, -1043001, 'I must make the necessary preparations before the awakening ritual can begin. You must protect me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Disciple SAY_MAKE_PREPARATIONS'), +(3678, -1043002, 'These caverns were once a temple of promise for regrowth in the Barrens. Now, they are the halls of nightmares.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Disciple SAY_TEMPLE_OF_PROMISE'), +(3678, -1043003, 'Come. We must continue. There is much to be done before we can pull Naralex from his nightmare.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Disciple SAY_MUST_CONTINUE'), +(3678, -1043004, 'Within this circle of fire I must cast the spell to banish the spirits of the slain Fanglords.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Disciple SAY_BANISH_THE_SPIRITS'), +(3678, -1043005, 'The caverns have been purified. To Naralex''s chamber we go!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Disciple SAY_CAVERNS_PURIFIED'), +(3678, -1043006, 'Beyond this corridor, Naralex lies in fitful sleep. Let us go awaken him before it is too late.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Disciple SAY_BEYOND_THIS_CORRIDOR'), +(3678, -1043007, 'Protect me brave souls as I delve into this Emerald Dream to rescue Naralex and put an end to this corruption!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Disciple SAY_EMERALD_DREAM'), +(3678, -1043008, '%s begins to perform the awakening ritual on Naralex.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Disciple EMOTE_AWAKENING_RITUAL'), +(3678, -1043009, '%s tosses fitfully in troubled sleep.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Naralex EMOTE_TROUBLED_SLEEP'), +(3678, -1043010, '%s writhes in agony. The Disciple seems to be breaking through.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Naralex EMOTE_WRITHE_IN_AGONY'), +(3678, -1043011, '%s dreams up a horrendous vision. Something stirs beneath the murky waters.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Naralex EMOTE_HORRENDOUS_VISION'), +(3678, -1043012, 'This Mutanus the Devourer is a minion from Naralex''s nightmare no doubt!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Disciple SAY_MUTANUS_THE_DEVOURER'), +(3678, -1043013, 'I AM AWAKE, AT LAST!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'Naralex SAY_I_AM_AWAKE'), +(3678, -1043014, 'At last! Naralex awakes from the nightmare.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Disciple SAY_NARALEX_AWAKES'), +(3678, -1043015, 'Ah, to be pulled from the dreaded nightmare! I thank you, my loyal Disciple, along with your brave companions.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Naralex SAY_THANK_YOU'), +(3678, -1043016, 'We must go and gather with the other Disciples. There is much work to be done before I can make another attempt to restore the Barrens. Farewell, brave souls!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Naralex SAY_FAREWELL'), +(3678, -1043017, 'Attacked! Help get this $N off of me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Disciple SAY_ATTACKED'), +(4508, -1047000, 'Phew! Finally, out here. However, it will not become easy. Detain your eyes after annoyance.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Willix'), +(4508, -1047001, 'There on top resides Charlga Razorflank. The damned old Crone.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Willix'), +(4508, -1047002, 'Help! Get this Raging Agam''ar from me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Willix'), +(4508, -1047003, 'In this ditch there are Blueleaf Tuber! As if the gold waited only to be dug out, I say it you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Willix'), +(4508, -1047004, 'Danger is behind every corner.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Willix'), +(4508, -1047005, 'I do not understand how these disgusting animals can live at such a place.... puh as this stinks!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Willix'), +(4508, -1047006, 'I think, I see a way how we come out of this damned thorn tangle.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Willix'), +(4508, -1047007, 'I am glad that we are out again from this damned ditch. However, up here it is not much better!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Willix'), +(4508, -1047008, 'Finally! I am glad that I come, finally out here.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Willix'), +(4508, -1047009, 'I will rather rest a moment and come again to breath, before I return to Ratchet.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Willix'), +(4508, -1047010, 'Many thanks for your help.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Willix'), +(0, -1060005, 'REUSE', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'REUSE'), +(0, -1060004, 'REUSE', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'REUSE'), +(0, -1060003, 'REUSE', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'REUSE'), +(0, -1060002, 'REUSE', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'REUSE'), +(0, -1060001, 'REUSE', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'REUSE'), +(0, -1060000, 'REUSE', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'REUSE'), +(7228, -1070000, 'None may steal the secrets of the makers!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5851, 1, 0, 0, 'ironaya SAY_AGGRO'), +(0, -1070001, 'Taste blade, mongrel!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'SAY_GUARD_SIL_AGGRO1'), +(0, -1070002, '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...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'SAY_GUARD_SIL_AGGRO2'), +(0, -1070003, 'As if we don''t have enough problems, you go and create more!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'SAY_GUARD_SIL_AGGRO3'), +(620, -1070004, 'looks up at you quizzically. Maybe you should inspect it?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'cluck EMOTE_A_HELLO'), +(0, -1070005, 'looks at you unexpectadly.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'cluck EMOTE_H_HELLO'), +(620, -1070006, 'starts pecking at the feed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'cluck EMOTE_CLUCK_TEXT2'), +(7358, -1129000, 'You''ll never leave this place... alive.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5825, 1, 0, 0, 'amnennar SAY_AGGRO'), +(7358, -1129001, 'To me, my servants!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5828, 1, 0, 0, 'amnennar SAY_SUMMON60'), +(7358, -1129002, 'Come, spirits, attend your master!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5829, 1, 0, 0, 'amnennar SAY_SUMMON30'), +(7358, -1129003, 'I am the hand of the Lich King!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5827, 1, 0, 0, 'amnennar SAY_HP'), +(7358, -1129004, 'Too...easy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5826, 1, 0, 0, 'amnennar SAY_KILL'), +(3975, -1189000, 'Ah, I have been waiting for a real challenge!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5830, 1, 0, 0, 'herod SAY_AGGRO'), +(3975, -1189001, 'Blades of Light!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5832, 1, 0, 0, 'herod SAY_WHIRLWIND'), +(3975, -1189002, 'Light, give me strength!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5833, 1, 0, 0, 'herod SAY_ENRAGE'), +(3975, -1189003, 'Hah, is that all?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5831, 1, 0, 0, 'herod SAY_KILL'), +(3975, -1189004, '%s becomes enraged!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'herod EMOTE_ENRAGE'), +(3976, -1189005, 'Infidels! They must be purified!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5835, 1, 0, 0, 'mograine SAY_MO_AGGRO'), +(3976, -1189006, 'Unworthy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5836, 1, 0, 0, 'mograine SAY_MO_KILL'), +(3976, -1189007, 'At your side, milady!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5837, 1, 0, 0, 'mograine SAY_MO_RESSURECTED'), +(3977, -1189008, 'What, Mograine has fallen? You shall pay for this treachery!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5838, 1, 0, 0, 'whitemane SAY_WH_INTRO'), +(3977, -1189009, 'The Light has spoken!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5839, 1, 0, 0, 'whitemane SAY_WH_KILL'), +(3977, -1189010, 'Arise, my champion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5840, 1, 0, 0, 'whitemane SAY_WH_RESSURECT'), +(3983, -1189011, 'Tell me... tell me everything!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5847, 1, 0, 0, 'vishas SAY_AGGRO'), +(3983, -1189012, 'Naughty secrets!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5849, 1, 0, 0, 'vishas SAY_HEALTH1'), +(3983, -1189013, 'I''ll rip the secrets from your flesh!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5850, 1, 0, 0, 'vishas SAY_HEALTH2'), +(3983, -1189014, 'Purged by pain!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5848, 1, 0, 0, 'vishas SAY_KILL'), +(3983, -1189015, 'The monster got what he deserved.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'vishas SAY_TRIGGER_VORREL'), +(4543, -1189016, 'We hunger for vengeance.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5844, 1, 0, 0, 'thalnos SAY_AGGRO'), +(4543, -1189017, 'No rest, for the angry dead.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5846, 1, 0, 0, 'thalnos SAY_HEALTH'), +(4543, -1189018, 'More... More souls.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5845, 1, 0, 0, 'thalnos SAY_KILL'), +(6487, -1189019, 'You will not defile these mysteries!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5842, 1, 0, 0, 'doan SAY_AGGRO'), +(6487, -1189020, 'Burn in righteous fire!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5843, 1, 0, 0, 'doan SAY_SPECIALAE'), +(3974, -1189021, 'Release the hounds!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5841, 1, 0, 0, 'loksey SAY_AGGRO'), +(9503, -1230000, 'Ah, hits the spot!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'rocknot SAY_GOT_BEER'), +(9019, -1230001, 'Come to aid the Throne!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'dagran SAY_AGGRO'), +(9019, -1230002, 'Hail to the king, baby!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'dagran SAY_SLAY'), +(10184, -1249000, 'How fortuitous. Usually, I must leave my lair to feed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'onyxia SAY_AGGRO'), +(10184, -1249001, 'Learn your place mortal!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'onyxia SAY_KILL'), +(10184, -1249002, 'This meaningless exertion bores me. I''ll incinerate you all from above!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 254, 'onyxia SAY_PHASE_2_TRANS'), +(10184, -1249003, 'It seems you''ll need another lesson, mortals!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 293, 'onyxia SAY_PHASE_3_TRANS'), +(10184, -1249004, '%s takes in a deep breath...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'onyxia EMOTE_BREATH'), +(17880, -1269000, 'Why do you persist? Surely you can see the futility of it all. It is not too late! You may still leave with your lives ...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10442, 1, 0, 0, 'temporus SAY_ENTER'), +(17880, -1269001, 'So be it ... you have been warned.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10444, 1, 0, 0, 'temporus SAY_AGGRO'), +(17880, -1269002, 'Time... sands of time is run out for you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10443, 1, 0, 0, 'temporus SAY_BANISH'), +(17880, -1269003, 'You should have left when you had the chance.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10445, 1, 0, 0, 'temporus SAY_SLAY1'), +(17880, -1269004, 'Your days are done.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10446, 1, 0, 0, 'temporus SAY_SLAY2'), +(17880, -1269005, 'My death means ... little.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10447, 1, 0, 0, 'temporus SAY_DEATH'), +(17879, -1269006, 'Why do you aid the Magus? Just think of how many lives could be saved if the portal is never opened, if the resulting wars could be erased ...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10412, 1, 0, 0, 'chrono_lord_deja SAY_ENTER'), +(17879, -1269007, 'If you will not cease this foolish quest, then you will die!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10414, 1, 0, 0, 'chrono_lord_deja SAY_AGGRO'), +(17879, -1269008, 'You have outstayed your welcome, Timekeeper. Begone!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10413, 1, 0, 0, 'chrono_lord_deja SAY_BANISH'), +(17879, -1269009, 'I told you it was a fool''s quest!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10415, 1, 0, 0, 'chrono_lord_deja SAY_SLAY1'), +(17879, -1269010, 'Leaving so soon?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10416, 1, 0, 0, 'chrono_lord_deja SAY_SLAY2'), +(17879, -1269011, 'Time ... is on our side.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10417, 1, 0, 0, 'chrono_lord_deja SAY_DEATH'), +(17881, -1269012, 'The time has come to shatter this clockwork universe forever! Let us no longer be slaves of the hourglass! I warn you: those who do not embrace the greater path shall become victims of its passing!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10400, 1, 0, 0, 'aeonus SAY_ENTER'), +(17881, -1269013, 'Let us see what fate lays in store...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10402, 1, 0, 0, 'aeonus SAY_AGGRO'), +(17881, -1269014, 'Your time is up, slave of the past!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10401, 1, 0, 0, 'aeonus SAY_BANISH'), +(17881, -1269015, 'One less obstacle in our way!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10403, 1, 0, 0, 'aeonus SAY_SLAY1'), +(17881, -1269016, 'No one can stop us! No one!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10404, 1, 0, 0, 'aeonus SAY_SLAY2'), +(17881, -1269017, 'It is only a matter...of time.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10405, 1, 0, 0, 'aeonus SAY_DEATH'), +(17881, -1269018, 'goes into a frenzy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'aeonus EMOTE_FRENZY'), +(20201, -1269019, 'Stop! Do not go further, mortals. You are ill-prepared to face the forces of the Infinite Dragonflight. Come, let me help you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'saat SAY_SAAT_WELCOME'), +(15608, -1269020, 'The time has come! Gul''dan, order your warlocks to double their efforts! Moments from now the gateway will open, and your Horde will be released upon this ripe, unsuspecting world!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10435, 1, 0, 0, 'medivh SAY_ENTER'), +(15608, -1269021, 'What is this? Champions, coming to my aid? I sense the hand of the dark one in this. Truly this sacred event bears his blessing?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10436, 1, 0, 0, 'medivh SAY_INTRO'), +(15608, -1269022, 'Champions, my shield grows weak!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10437, 1, 0, 0, 'medivh SAY_WEAK75'), +(15608, -1269023, 'My powers must be concentrated on the portal! I do not have time to hold the shield!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10438, 1, 0, 0, 'medivh SAY_WEAK50'), +(15608, -1269024, 'The shield is nearly gone! All that I have worked for is in danger!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10439, 1, 0, 0, 'medivh SAY_WEAK25'), +(15608, -1269025, 'No... damn this feeble mortal coil...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10441, 1, 0, 0, 'medivh SAY_DEATH'), +(15608, -1269026, 'I am grateful for your aid, champions. Now, Gul''dan''s Horde will sweep across this world, like a locust swarm, and all my designs, all my carefully laid plans will at last fall into place.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10440, 1, 0, 0, 'medivh SAY_WIN'), +(15608, -1269027, 'Orcs of the Horde! This portalis the gateway to your new destiny! Azeroth lies before you, ripe for the taking!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'medivh SAY_ORCS_ENTER'), +(15608, -1269028, 'Gul''dan speaks the truth! We should return at once to tell our brothers of the news! Retreat back trought the portal!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'medivh SAY_ORCS_ANSWER'), +(14517, -1309002, 'Lord Hir''eek, grant me wings of vengance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8417, 1, 0, 0, 'jeklik SAY_AGGRO'), +(14517, -1309003, 'I command you to rain fire down upon these invaders!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'jeklik SAY_RAIN_FIRE'), +(14517, -1309004, 'Finally ...death. Curse you Hakkar! Curse you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8422, 1, 0, 0, 'jeklik SAY_DEATH'), +(14510, -1309005, 'Draw me to your web mistress Shadra. Unleash your venom!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8418, 1, 0, 0, 'marli SAY_AGGRO'), +(14510, -1309006, 'Shadra, make of me your avatar!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'marli SAY_TRANSFORM'), +(14510, -1309007, 'Aid me my brood!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'marli SAY_SPIDER_SPAWN'), +(14510, -1309008, 'Bless you mortal for this release. Hakkar controls me no longer...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8423, 1, 0, 0, 'marli SAY_DEATH'), +(14509, -1309009, 'Shirvallah, fill me with your RAGE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8419, 1, 0, 0, 'thekal SAY_AGGRO'), +(14509, -1309010, 'Hakkar binds me no more! Peace at last!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8424, 1, 0, 0, 'thekal SAY_DEATH'), +(14515, -1309011, 'Bethekk, your priestess calls upon your might!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8416, 1, 0, 0, 'arlokk SAY_AGGRO'), +(14515, -1309012, 'Feast on $n, my pretties!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'arlokk SAY_FEAST_PANTHER'), +(14515, -1309013, 'At last, I am free of the Soulflayer!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8412, 1, 0, 0, 'arlokk SAY_DEATH'), +(11380, -1309014, 'Welcome to da great show friends! Step right up to die!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8425, 1, 0, 0, 'jindo SAY_AGGRO'), +(11382, -1309015, 'I''ll feed your souls to Hakkar himself!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8413, 1, 0, 0, 'mandokir SAY_AGGRO'), +(11382, -1309016, 'DING!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'mandokir SAY_DING_KILL'), +(11382, -1309017, 'GRATS!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'mandokir SAY_GRATS_JINDO'), +(11382, -1309018, 'I''m keeping my eye on you, $N!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'mandokir SAY_WATCH'), +(11382, -1309019, 'Don''t make me angry. You won''t like it when I''m angry.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'mandokir SAY_WATCH_WHISPER'), +(14834, -1309020, 'PRIDE HERALDS THE END OF YOUR WORLD. COME, MORTALS! FACE THE WRATH OF THE SOULFLAYER!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8414, 1, 0, 0, 'hakkar SAY_AGGRO'), +(14834, -1309021, 'Fleeing will do you no good, mortals!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'hakkar SAY_FLEEING'), +(14834, -1309022, 'You dare set foot upon Hakkari holy ground? Minions of Hakkar, destroy the infidels!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'hakkar SAY_MINION_DESTROY'), +(14834, -1309023, 'Minions of Hakkar, hear your God. The sanctity of this temple has been compromised. Invaders encroach upon holy ground! The Altar of Blood must be protected. Kill them all!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'hakkar SAY_PROTECT_ALTAR'), +(11136, -1329000, 'Thanks to Egan', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'freed_soul SAY_ZAPPED0'), +(11136, -1329001, 'Rivendare must die', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'freed_soul SAY_ZAPPED1'), +(11136, -1329002, 'Who you gonna call?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'freed_soul SAY_ZAPPED2'), +(11136, -1329003, 'Don''t cross those beams!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'freed_soul SAY_ZAPPED3'), +(15381, -1350000, 'We must act quickly or all shall be lost!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'ANACHRONOS_SAY_1'), +(15381, -1350001, 'NOW, STAGHELM! WE GO NOW! Prepare your magic!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 81, 'ANACHRONOS_SAY_2'), +(15381, -1350002, 'Stay close...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'ANACHRONOS_SAY_3'), +(15381, -1350003, 'The sands of time will halt, but only for a moment! I will now conjure the barrier.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'ANACHRONOS_SAY_4'), +(15381, -1350004, 'FINISH THE SPELL STAGHELM! I CANNOT HOLD THE GLYPHS OF WARDING IN PLACE MUCH LONGER! CALL FORTH THE ROOTS!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 53, 'ANACHRONOS_SAY_5'), +(15381, -1350005, 'It... It is over, Lord Staghelm. We are victorious. Albeit the cost for this victory was great.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'ANACHRONOS_SAY_6'), +(15381, -1350006, 'There is but one duty that remains...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'ANACHRONOS_SAY_7'), +(15381, -1350007, 'Before I leave this place, I make one final offreing to you, Lord Staghelm. Should a time arise in which you must gain entry to this accursed fortress, use the Scepter of the Shifting Sands on the sacred gong. The magic holding the barrier together will dissipate and the horrors of Ahn''Qiraj will be unleashed upon the world once more.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'ANACHRONOS_SAY_8'), +(15381, -1350008, 'Lord Staghelm, where are you going? You would shatter our bond for the sake of pride?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'ANACHRONOS_SAY_9'), +(15381, -1350009, 'And now you know all that there is to know, mortal...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'ANACHRONOS_SAY_10'), +(15381, -1350010, 'hands the Scepter of the Shifting Sands to Fandral Staghelm.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 1, 'ANACHRONOS_EMOTE_1'), +(15381, -1350011, 'shakes his head in dissapointment.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 274, 'ANACHRONOS_EMOTE_2'), +(15381, -1350012, 'kneels down to pick up the fragments of the shattered scepter.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 87, 'ANACHRONOS_EMOTE_3'), +(15382, -1350013, 'My forces cannot overcome the Qiraji defenses. We will not be able to get close enough to place your precious barrier, dragon.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'FANDRAL_SAY_1'), +(15382, -1350014, 'It is done dragon. Lead the way...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'FANDRAL_SAY_2'), +(15382, -1350015, 'Ancient ones guide my hand... Wake from your slumber! WAKE AND SEAL THIS CURSED PLACE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'FANDRAL_SAY_3'), +(15382, -1350016, 'After the savagery that my people have witnessed and felt, you expect me to accept another burden, dragon? Surely you are mad.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 25, 'FANDRAL_SAY_4'), +(15382, -1350017, 'I want nothing to do with Silithus, the Qiraji and least of all, any damned dragons!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'FANDRAL_SAY_5'), +(15382, -1350018, 'My son''s soul will find no comfort in this hollow victory, dragon. I will have him back.Thought it takes a millennia, I WILL have my son back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 254, 'FANDRAL_SAY_6'), +(15382, -1350019, 'falls to one knee - exhausted.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 16, 'FANDRAL_EMOTE_1'), +(15382, -1350020, 'hurls the Scepter of the Shifting Sands into the barrier, shattering it.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'FANDRAL_EMOTE_2'), +(15379, -1350021, 'Aye, Fandral, remember these words: Let not your grief guide your faith. These thoughts you hold... dark places you go, night elf. Absolution cannot be had through misguided vengeance.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'CAELESTRASZ_SAY_1'), +(15379, -1350022, 'Do not forget the sacrifices made on this day, night elf. We have all suffered immensely at the hands of these beasts.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'CAELESTRASZ_SAY_2'), +(15379, -1350023, 'Alexstrasza grant me the resolve to drive our enemies back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 53, 'CAELESTRASZ_YELL_1'), +(15380, -1350024, 'This distraction will give you and the young druid time enough to seal the gate. Do not falter. Now, let us see how they deal with chaotic magic.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'ARYGOS_SAY_1'), +(15380, -1350025, 'Let them feel the wrath of the Blue Flight! May Malygos protect me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 53, 'ARYGOS_YELL_1'), +(15380, -1350026, 'nods knowingly.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 273, 'ARYGOS_EMOTE_1'), +(15378, -1350027, 'There is a way...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'MERITHRA_SAY_1'), +(15378, -1350028, 'We will push them back, Anachronos. This I vow. Uphold the end of this task. Let not your hands falter as you seal our fates behind the barrier.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'MERITHRA_SAY_2'), +(15378, -1350029, 'Succumb to the endless dream, little ones. Let it consume you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 53, 'MERITHRA_YELL_1'), +(15378, -1350030, 'glances at her compatriots.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 2, 'MERITHRA_EMOTE_1'), +(12056, -1409000, '%s performs one last service for Ragnaros.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'geddon EMOTE_SERVICE'), +(11982, -1409001, '%s goes into a killing frenzy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'magmadar EMOTE_FRENZY'), +(11988, -1409002, '%s refuses to die while its master is in trouble.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'core rager EMOTE_LOWHP'), +(12018, -1409003, 'Reckless mortals, none may challenge the sons of the living flame!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8035, 1, 0, 0, 'majordomo SAY_AGGRO'), +(12018, -1409004, 'The runes of warding have been destroyed! Hunt down the infedels my bretheren.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8039, 1, 0, 0, 'majordomo SAY_SPAWN'), +(12018, -1409005, 'Ashes to Ashes!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8037, 1, 0, 0, 'majordomo SAY_SLAY'), +(12018, -1409006, 'Burn mortals! Burn for this transgression!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8036, 1, 0, 0, 'majordomo SAY_SPECIAL'), +(12018, -1409007, 'Impossible! Stay your attack mortals! I submitt! I submitt! Brashly you have come to rest the secrets of the living flame. You will soon regret the recklessness of your quest. I go now to summon the lord whos house this is. Should you seek an audiance with him your paltry lives will surly be forfit. Nevertheless seek out his lair if you dare!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8038, 1, 0, 0, 'majordomo SAY_DEFEAT'), +(12018, -1409008, 'Behold Ragnaros, the Firelord! He who was ancient when this world was young! Bow before him, mortals! Bow before your ending!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8040, 1, 0, 0, 'ragnaros SAY_SUMMON_MAJ'), +(12018, -1409009, 'TOO SOON! YOU HAVE AWAKENED ME TOO SOON, EXECUTUS! WHAT IS THE MEANING OF THIS INTRUSION?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8043, 1, 0, 0, 'ragnaros SAY_ARRIVAL1_RAG'), +(12018, -1409010, 'These mortal infidels, my lord! They have invaded your sanctum, and seek to steal your secrets!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8041, 1, 0, 0, 'ragnaros SAY_ARRIVAL2_MAJ'), +(12018, -1409011, 'FOOL! YOU ALLOWED THESE INSECTS TO RUN RAMPANT THROUGH THE HALLOWED CORE, AND NOW YOU LEAD THEM TO MY VERY LAIR? YOU HAVE FAILED ME, EXECUTUS! JUSTICE SHALL BE MET, INDEED!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8044, 1, 0, 0, 'ragnaros SAY_ARRIVAL3_RAG'), +(12018, -1409012, 'NOW FOR YOU, INSECTS. BOLDLY YOU SAUGHT THE POWER OF RAGNAROS NOW YOU SHALL SEE IT FIRST HAND.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8045, 1, 0, 0, 'ragnaros SAY_ARRIVAL5_RAG'), +(11502, -1409013, 'COME FORTH, MY SERVANTS! DEFEND YOUR MASTER!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8049, 1, 0, 0, 'ragnaros SAY_REINFORCEMENTS1'), +(11502, -1409014, 'YOU CANNOT DEFEAT THE LIVING FLAME! COME YOU MINIONS OF FIRE! COME FORTH YOU CREATURES OF HATE! YOUR MASTER CALLS!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8050, 1, 0, 0, 'ragnaros SAY_REINFORCEMENTS2'), +(11502, -1409015, 'BY FIRE BE PURGED!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8046, 1, 0, 0, 'ragnaros SAY_HAND'), +(11502, -1409016, 'TASTE THE FLAMES OF SULFURON!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8047, 1, 0, 0, 'ragnaros SAY_WRATH'), +(11502, -1409017, 'DIE INSECT!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8051, 1, 0, 0, 'ragnaros SAY_KILL'), +(11502, -1409018, 'MY PATIENCE IS DWINDLING! COME, GNATS, TO YOUR DEATH!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8048, 1, 0, 0, 'ragnaros SAY_MAGMABURST'), +(12017, -1469000, 'None of your kind should be here! You''ve doomed only yourselves!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8286, 1, 0, 0, 'broodlord SAY_AGGRO'), +(12017, -1469001, 'Clever Mortals but I am not so easily lured away from my sanctum!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8287, 1, 0, 0, 'broodlord SAY_LEASH'), +(14020, -1469002, 'goes into a killing frenzy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'chromaggus EMOTE_FRENZY'), +(14020, -1469003, 'flinches as its skin shimmers.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'chromaggus EMOTE_SHIMMER'), +(10162, -1469004, 'In this world where time is your enemy, it is my greatest ally. This grand game of life that you think you play in fact plays you. To that I say...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'victor_nefarius SAY_GAMESBEGIN_1'), +(10162, -1469005, 'Let the games begin!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8280, 1, 0, 0, 'victor_nefarius SAY_GAMESBEGIN_2'), +(10162, -1469006, 'Ah, the heroes. You are persistent, aren''t you. Your allied attempted to match his power against mine, and had to pay the price. Now he shall serve me, by slaughtering you. Get up little red wyrm and destroy them!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8279, 1, 0, 0, 'victor_nefarius SAY_VAEL_INTRO'), +(11583, -1469007, 'Well done, my minions. The mortals'' courage begins to wane! Now, let''s see how they contend with the true Lord of Blackrock Spire!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8288, 1, 0, 0, 'nefarian SAY_AGGRO'), +(11583, -1469008, 'Enough! Now you vermin shall feel the force of my birthright, the fury of the earth itself.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8289, 1, 0, 0, 'nefarian SAY_XHEALTH'), +(11583, -1469009, 'Burn, you wretches! Burn!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8290, 1, 0, 0, 'nefarian SAY_SHADOWFLAME'), +(11583, -1469010, 'Impossible! Rise my minions! Serve your master once more!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8291, 1, 0, 0, 'nefarian SAY_RAISE_SKELETONS'), +(11583, -1469011, 'Worthless $N! Your friends will join you soon enough!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8293, 1, 0, 0, 'nefarian SAY_SLAY'), +(11583, -1469012, 'This cannot be! I am the Master here! You mortals are nothing to my kind! DO YOU HEAR? NOTHING!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8292, 1, 0, 0, 'nefarian SAY_DEATH'), +(11583, -1469013, 'Mages too? You should be more careful when you play with magic...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'nefarian SAY_MAGE'), +(11583, -1469014, 'Warriors, I know you can hit harder than that! Let''s see it!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'nefarian SAY_WARRIOR'), +(11583, -1469015, 'Druids and your silly shapeshifting. Let''s see it in action!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'nefarian SAY_DRUID'), +(11583, -1469016, 'Priests! If you''re going to keep healing like that, we might as well make it a little more interesting!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'nefarian SAY_PRIEST'), +(11583, -1469017, 'Paladins, I''ve heard you have many lives. Show me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'nefarian SAY_PALADIN'), +(11583, -1469018, 'Shamans, show me what your totems can do!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'nefarian SAY_SHAMAN'), +(11583, -1469019, 'Warlocks, you shouldn''t be playing with magic you don''t understand. See what happens?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'nefarian SAY_WARLOCK'), +(11583, -1469020, 'Hunters and your annoying pea-shooters!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'nefarian SAY_HUNTER'), +(11583, -1469021, 'Rogues? Stop hiding and face me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'nefarian SAY_ROGUE'), +(12435, -1469022, 'You''ll pay for forcing me to do this.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8275, 1, 0, 0, 'razorgore SAY_EGGS_BROKEN1'), +(12435, -1469023, 'Fools! These eggs are more precious than you know.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8276, 1, 0, 0, 'razorgore SAY_EGGS_BROKEN2'), +(12435, -1469024, 'No! Not another one! I''ll have your heads for this atrocity.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8277, 1, 0, 0, 'razorgore SAY_EGGS_BROKEN3'), +(12435, -1469025, 'If I fall into the abyss I''ll take all of you mortals with me...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8278, 1, 0, 0, 'razorgore SAY_DEATH'), +(13020, -1469026, 'Too late...friends. Nefarius'' corruption has taken hold. I cannot...control myself.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8281, 1, 0, 0, 'vaelastrasz SAY_LINE1'), +(13020, -1469027, 'I beg you Mortals, flee! Flee before I lose all control. The Black Fire rages within my heart. I must release it!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8282, 1, 0, 0, 'vaelastrasz SAY_LINE2'), +(13020, -1469028, 'FLAME! DEATH! DESTRUCTION! COWER MORTALS BEFORE THE WRATH OF LORD....NO! I MUST FIGHT THIS!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8283, 1, 0, 0, 'vaelastrasz SAY_LINE3'), +(13020, -1469029, 'Nefarius'' hate has made me stronger than ever before. You should have fled, while you could, mortals! The fury of Blackrock courses through my veins!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8285, 1, 0, 0, 'vaelastrasz SAY_HALFLIFE'), +(13020, -1469030, 'Forgive me $N, your death only adds to my failure.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8284, 1, 0, 0, 'vaelastrasz SAY_KILLTARGET'), +(11981, -1469031, 'goes into a frenzy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'flamegor EMOTE_FRENZY'), +(0, -1509000, 'senses your fear.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'moam EMOTE_AGGRO'), +(0, -1509001, 'bristles with energy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'moan EMOTE_MANA_FULL'), +(0, -1509002, 'sets eyes on $N!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'buru EMOTE_TARGET'), +(0, -1509003, 'They come now. Try not to get yourself killed, young blood.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'andorov SAY_ANDOROV_INTRO'), +(0, -1509004, 'Remember, Rajaxx, when I said I''d kill you last? I lied...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'andorov SAY_ANDOROV_ATTACK'), +(0, -1509005, 'The time of our retribution is at hand! Let darkness reign in the hearts of our enemies!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8612, 1, 0, 0, 'rajaxx SAY_WAVE3'), +(0, -1509006, 'No longer will we wait behind barred doors and walls of stone! No longer will our vengeance be denied! The dragons themselves will tremble before our wrath!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8610, 1, 0, 0, 'rajaxx SAY_WAVE4'), +(0, -1509007, 'Fear is for the enemy! Fear and death!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8608, 1, 0, 0, 'rajaxx SAY_WAVE5'), +(0, -1509008, 'Staghelm will whimper and beg for his life, just as his whelp of a son did! One thousand years of injustice will end this day!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8611, 1, 0, 0, 'rajaxx SAY_WAVE6'), +(0, -1509009, 'Fandral! Your time has come! Go and hide in the Emerald Dream and pray we never find you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8607, 1, 0, 0, 'rajaxx SAY_WAVE7'), +(0, -1509010, 'Impudent fool! I will kill you myself!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8609, 1, 0, 0, 'rajaxx SAY_INTRO'), +(0, -1509011, 'Attack and make them pay dearly!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8603, 1, 0, 0, 'rajaxx SAY_UNK1'), +(0, -1509012, 'Crush them! Drive them out!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8605, 1, 0, 0, 'rajaxx SAY_UNK2'), +(0, -1509013, 'Do not hesitate! Destroy them!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8606, 1, 0, 0, 'rajaxx SAY_UNK3'), +(0, -1509014, 'Warriors! Captains! Continue the fight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8613, 1, 0, 0, 'rajaxx SAY_UNK4'), +(0, -1509015, 'You are not worth my time $N!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8614, 1, 0, 0, 'rajaxx SAY_DEAGGRO'), +(0, -1509016, 'Breath your last!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8604, 1, 0, 0, 'rajaxx SAY_KILLS_ANDOROV'), +(0, -1509017, 'Soon you will know the price of your meddling, mortals... The master is nearly whole... And when he rises, your world will be cease!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'rajaxx SAY_COMPLETE_QUEST'), +(0, -1509018, 'I am rejuvinated!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8593, 1, 0, 0, 'ossirian SAY_SURPREME1'), +(0, -1509019, 'My powers are renewed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8595, 1, 0, 0, 'ossirian SAY_SURPREME2'), +(0, -1509020, 'My powers return!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8596, 1, 0, 0, 'ossirian SAY_SURPREME3'), +(0, -1509021, 'Protect the city at all costs!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8597, 1, 0, 0, 'ossirian SAY_RAND_INTRO1'), +(0, -1509022, 'The walls have been breached!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8599, 1, 0, 0, 'ossirian SAY_RAND_INTRO2'), +(0, -1509023, 'To your posts. Defend the city.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8600, 1, 0, 0, 'ossirian SAY_RAND_INTRO3'); +INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +(0, -1509024, 'Tresspassers will be terminated.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8601, 1, 0, 0, 'ossirian SAY_RAND_INTRO4'), +(0, -1509025, 'Sands of the desert rise and block out the sun!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8598, 1, 0, 0, 'ossirian SAY_AGGRO'), +(0, -1509026, 'You are terminated.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8602, 1, 0, 0, 'ossirian SAY_SLAY'), +(0, -1509027, 'I...have...failed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8594, 1, 0, 0, 'ossirian SAY_DEATH'), +(15263, -1531000, 'Are you so eager to die? I would be happy to accomodate you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8615, 1, 0, 0, 'skeram SAY_AGGRO1'), +(15263, -1531001, 'Cower mortals! The age of darkness is at hand.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8616, 1, 0, 0, 'skeram SAY_AGGRO2'), +(15263, -1531002, 'Tremble! The end is upon you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8621, 1, 0, 0, 'skeram SAY_AGGRO3'), +(15263, -1531003, 'Let your death serve as an example!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8617, 1, 0, 0, 'skeram SAY_SLAY1'), +(15263, -1531004, 'Spineless wretches! You will drown in rivers of blood!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8619, 1, 0, 0, 'skeram SAY_SLAY2'), +(15263, -1531005, 'The screams of the dying will fill the air. A symphony of terror is about to begin!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8620, 1, 0, 0, 'skeram SAY_SLAY3'), +(15263, -1531006, 'Prepare for the return of the ancient ones!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8618, 1, 0, 0, 'skeram SAY_SPLIT'), +(15263, -1531007, 'You only delay... the inevetable.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8622, 1, 0, 0, 'skeram SAY_DEATH'), +(15516, -1531008, 'You will be judged for defiling these sacred grounds! The laws of the Ancients will not be challenged! Trespassers will be annihilated!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8646, 1, 0, 0, 'sartura SAY_AGGRO'), +(15516, -1531009, 'I sentence you to death!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8647, 1, 0, 0, 'sartura SAY_SLAY'), +(15516, -1531010, 'I serve to the last!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8648, 1, 0, 0, 'sartura SAY_DEATH'), +(15727, -1531011, 'is weakened!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'cthun EMOTE_WEAKENED'), +(16151, -1532000, 'Well done Midnight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9173, 1, 0, 0, 'attumen SAY_MIDNIGHT_KILL'), +(16151, -1532001, 'Cowards! Wretches!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9167, 1, 0, 0, 'attumen SAY_APPEAR1'), +(16151, -1532002, 'Who dares attack the steed of the Huntsman?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9298, 1, 0, 0, 'attumen SAY_APPEAR2'), +(16151, -1532003, 'Perhaps you would rather test yourselves against a more formidable opponent?!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9299, 1, 0, 0, 'attumen SAY_APPEAR3'), +(16151, -1532004, 'Come, Midnight, let''s disperse this petty rabble!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9168, 1, 0, 0, 'attumen SAY_MOUNT'), +(15550, -1532005, 'It was... inevitable.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9169, 1, 0, 0, 'attumen SAY_KILL1'), +(15550, -1532006, 'Another trophy to add to my collection!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9300, 1, 0, 0, 'attumen SAY_KILL2'), +(15550, -1532007, 'Weapons are merely a convenience for a warrior of my skill!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9166, 1, 0, 0, 'attumen SAY_DISARMED'), +(15550, -1532008, 'I always knew... someday I would become... the hunted.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9165, 1, 0, 0, 'attumen SAY_DEATH'), +(15550, -1532009, 'Such easy sport.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9170, 1, 0, 0, 'attumen SAY_RANDOM1'), +(15550, -1532010, 'Amateurs! Do not think you can best me! I kill for a living.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9304, 1, 0, 0, 'attumen SAY_RANDOM2'), +(15687, -1532011, 'Hmm, unannounced visitors? Preparations must be made.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9211, 1, 0, 0, 'moroes SAY_AGGRO'), +(15687, -1532012, 'Now, where was I? Oh yes...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9215, 1, 0, 0, 'moroes SAY_SPECIAL_1'), +(15687, -1532013, 'You rang?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9316, 1, 0, 0, 'moroes SAY_SPECIAL_2'), +(15687, -1532014, 'One more for dinner this evening.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9214, 1, 0, 0, 'moroes SAY_KILL_1'), +(15687, -1532015, 'Time... Never enough time.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9314, 1, 0, 0, 'moroes SAY_KILL_2'), +(15687, -1532016, 'I''ve gone and made a mess.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9315, 1, 0, 0, 'moroes SAY_KILL_3'), +(15687, -1532017, 'How terribly clumsy of me...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9213, 1, 0, 0, 'moroes SAY_DEATH'), +(16457, -1532018, 'Your behavior will not be tolerated!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9204, 1, 0, 0, 'maiden SAY_AGGRO'), +(16457, -1532019, 'Ah ah ah...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9207, 1, 0, 0, 'maiden SAY_SLAY1'), +(16457, -1532020, 'This is for the best.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9312, 1, 0, 0, 'maiden SAY_SLAY2'), +(16457, -1532021, 'Impure thoughts lead to profane actions.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9311, 1, 0, 0, 'maiden SAY_SLAY3'), +(16457, -1532022, 'Cast out your corrupt thoughts.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9313, 1, 0, 0, 'maiden SAY_REPENTANCE1'), +(16457, -1532023, 'Your impurity must be cleansed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9208, 1, 0, 0, 'maiden SAY_REPENTANCE2'), +(16457, -1532024, 'Death comes. Will your conscience be clear?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9206, 1, 0, 0, 'maiden SAY_DEATH'), +(17535, -1532025, 'Oh at last, at last. I can go home.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9190, 1, 0, 0, 'dorothee SAY_DOROTHEE_DEATH'), +(17535, -1532026, 'Don''t let them hurt us, Tito! Oh, you won''t, will you?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9191, 1, 0, 0, 'dorothee SAY_DOROTHEE_SUMMON'), +(17535, -1532027, 'Tito, oh Tito, no!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9192, 1, 0, 0, 'dorothee SAY_DOROTHEE_TITO_DEATH'), +(17535, -1532028, 'Oh dear, we simply must find a way home! The old wizard could be our only hope! Strawman, Roar, Tinhead, will you... wait! Oh golly, look! We have visitors!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9195, 1, 0, 0, 'dorothee SAY_DOROTHEE_AGGRO'), +(17546, -1532029, 'Wanna fight? Huh? Do ya? C''mon, I''ll fight you with both claws behind my back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9227, 1, 0, 0, 'roar SAY_ROAR_AGGRO'), +(17546, -1532030, 'You didn''t have to go and do that.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9229, 1, 0, 0, 'roar SAY_ROAR_DEATH'), +(17546, -1532031, 'I think I''m going to go take fourty winks.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9230, 1, 0, 0, 'roar SAY_ROAR_SLAY'), +(17543, -1532032, 'Now what should I do with you? I simply can''t make up my mind.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9254, 1, 0, 0, 'strawman SAY_STRAWMAN_AGGRO'), +(17543, -1532033, 'Don''t let them make a mattress... out of me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9256, 1, 0, 0, 'strawman SAY_STRAWMAN_DEATH'), +(17543, -1532034, 'I guess I''m not a failure after all.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9257, 1, 0, 0, 'strawman SAY_STRAWMAN_SLAY'), +(17547, -1532035, 'I could really use a heart. Say, can I have yours?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9268, 1, 0, 0, 'tinhead SAY_TINHEAD_AGGRO'), +(17547, -1532036, 'Back to being an old rustbucket.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9270, 1, 0, 0, 'tinhead SAY_TINHEAD_DEATH'), +(17547, -1532037, 'Guess I''m not so rusty, after all.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9271, 1, 0, 0, 'tinhead SAY_TINHEAD_SLAY'), +(17547, -1532038, 'begins to rust.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'tinhead EMOTE_RUST'), +(18168, -1532039, 'Woe to each and every one of you my pretties! <cackles>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9179, 1, 0, 0, 'crone SAY_CRONE_AGGRO'), +(18168, -1532040, 'It will all be over soon! <cackles>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9307, 1, 0, 0, 'crone SAY_CRONE_AGGRO2'), +(18168, -1532041, 'How could you? What a cruel, cruel world!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9178, 1, 0, 0, 'crone SAY_CRONE_DEATH'), +(18168, -1532042, 'Fixed you, didn''t I? <cackles>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9180, 1, 0, 0, 'crone SAY_CRONE_SLAY'), +(17521, -1532043, 'All the better to own you with!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9276, 1, 0, 0, 'wolf SAY_WOLF_AGGRO'), +(17521, -1532044, 'Mmmm... delicious.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9277, 1, 0, 0, 'wolf SAY_WOLF_SLAY'), +(17521, -1532045, 'Run away little girl, run away!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9278, 1, 0, 0, 'wolf SAY_WOLF_HOOD'), +(17534, -1532046, 'What devil art thou, that dost torment me thus?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9196, 1, 0, 0, 'julianne SAY_JULIANNE_AGGRO'), +(17534, -1532047, 'Where is my lord? Where is my Romulo?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9199, 1, 0, 0, 'julianne SAY_JULIANNE_ENTER'), +(17534, -1532048, 'Romulo, I come! Oh... this do I drink to thee!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9198, 1, 0, 0, 'julianne SAY_JULIANNE_DEATH01'), +(17534, -1532049, 'Where is my Lord? Where is my Romulo? Ohh, happy dagger! This is thy sheath! There rust, and let me die!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9310, 1, 0, 0, 'julianne SAY_JULIANNE_DEATH02'), +(17534, -1532050, 'Come, gentle night; and give me back my Romulo!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9200, 1, 0, 0, 'julianne SAY_JULIANNE_RESURRECT'), +(17534, -1532051, 'Parting is such sweet sorrow.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9201, 1, 0, 0, 'julianne SAY_JULIANNE_SLAY'), +(17533, -1532052, 'Wilt thou provoke me? Then have at thee, boy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9233, 1, 0, 0, 'romulo SAY_ROMULO_AGGRO'), +(17533, -1532053, 'Thou smilest... upon the stroke that... murders me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9235, 1, 0, 0, 'romulo SAY_ROMULO_DEATH'), +(17533, -1532054, 'This day''s black fate on more days doth depend. This but begins the woe. Others must end.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9236, 1, 0, 0, 'romulo SAY_ROMULO_ENTER'), +(17533, -1532055, 'Thou detestable maw, thou womb of death; I enforce thy rotten jaws to open!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9237, 1, 0, 0, 'romulo SAY_ROMULO_RESURRECT'), +(17533, -1532056, 'How well my comfort is revived by this!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9238, 1, 0, 0, 'romulo SAY_ROMULO_SLAY'), +(15691, -1532057, 'The Menagerie is for guests only.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9183, 1, 0, 0, 'curator SAY_AGGRO'), +(15691, -1532058, 'Gallery rules will be strictly enforced.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9188, 1, 0, 0, 'curator SAY_SUMMON1'), +(15691, -1532059, 'This curator is equipped for gallery protection.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9309, 1, 0, 0, 'curator SAY_SUMMON2'), +(15691, -1532060, 'Your request cannot be processed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9186, 1, 0, 0, 'curator SAY_EVOCATE'), +(15691, -1532061, 'Failure to comply will result in offensive action.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9185, 1, 0, 0, 'curator SAY_ENRAGE'), +(15691, -1532062, 'Do not touch the displays.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9187, 1, 0, 0, 'curator SAY_KILL1'), +(15691, -1532063, 'You are not a guest.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9308, 1, 0, 0, 'curator SAY_KILL2'), +(15691, -1532064, 'This Curator is no longer op... er... ation... al.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9184, 1, 0, 0, 'curator SAY_DEATH'), +(15688, -1532065, 'Your blood will anoint my circle.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9264, 1, 0, 0, 'terestian SAY_SLAY1'), +(15688, -1532066, 'The great one will be pleased.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9329, 1, 0, 0, 'terestian SAY_SLAY2'), +(15688, -1532067, 'My life, is yours. Oh great one.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9262, 1, 0, 0, 'terestian SAY_DEATH'), +(15688, -1532068, 'Ah, you''re just in time. The rituals are about to begin.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9260, 1, 0, 0, 'terestian SAY_AGGRO'), +(15688, -1532069, 'Please, accept this humble offering, oh great one.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9263, 1, 0, 0, 'terestian SAY_SACRIFICE1'), +(15688, -1532070, 'Let the sacrifice serve his testament to my fealty.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9330, 1, 0, 0, 'terestian SAY_SACRIFICE2'), +(15688, -1532071, 'Come, you dwellers in the dark. Rally to my call!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9265, 1, 0, 0, 'terestian SAY_SUMMON1'), +(15688, -1532072, 'Gather, my pets. There is plenty for all.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9331, 1, 0, 0, 'terestian SAY_SUMMON2'), +(16524, -1532073, 'Please, no more. My son... he''s gone mad!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9241, 1, 0, 0, 'aran SAY_AGGRO1'), +(16524, -1532074, 'I''ll not be tortured again!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9323, 1, 0, 0, 'aran SAY_AGGRO2'), +(16524, -1532075, 'Who are you? What do you want? Stay away from me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9324, 1, 0, 0, 'aran SAY_AGGRO3'), +(16524, -1532076, 'I''ll show you this beaten dog still has some teeth!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9245, 1, 0, 0, 'aran SAY_FLAMEWREATH1'), +(16524, -1532077, 'Burn you hellish fiends!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9326, 1, 0, 0, 'aran SAY_FLAMEWREATH2'), +(16524, -1532078, 'I''ll freeze you all!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9246, 1, 0, 0, 'aran SAY_BLIZZARD1'), +(16524, -1532079, 'Back to the cold dark with you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9327, 1, 0, 0, 'aran SAY_BLIZZARD2'), +(16524, -1532080, 'Yes, yes, my son is quite powerful... but I have powers of my own!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9242, 1, 0, 0, 'aran SAY_EXPLOSION1'), +(16524, -1532081, 'I am not some simple jester! I am Nielas Aran!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9325, 1, 0, 0, 'aran SAY_EXPLOSION2'), +(16524, -1532082, 'Surely you would not deny an old man a replenishing drink? No, no I thought not.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9248, 1, 0, 0, 'aran SAY_DRINK'), +(16524, -1532083, 'I''m not finished yet! No, I have a few more tricks up me sleeve.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9251, 1, 0, 0, 'aran SAY_ELEMENTALS'), +(16524, -1532084, 'I want this nightmare to be over!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9250, 1, 0, 0, 'aran SAY_KILL1'), +(16524, -1532085, 'Torment me no more!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9328, 1, 0, 0, 'aran SAY_KILL2'), +(16524, -1532086, 'You''ve wasted enough of my time. Let these games be finished!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9247, 1, 0, 0, 'aran SAY_TIMEOVER'), +(16524, -1532087, 'At last... The nightmare is.. over...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9244, 1, 0, 0, 'aran SAY_DEATH'), +(16524, -1532088, 'Where did you get that?! Did HE send you?!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9249, 1, 0, 0, 'aran SAY_ATIESH'), +(15689, -1532089, 'cries out in withdrawal, opening gates to the warp.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'netherspite EMOTE_PHASE_PORTAL'), +(15689, -1532090, 'goes into a nether-fed rage!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'netherspite EMOTE_PHASE_BANISH'), +(15690, -1532091, 'Madness has brought you here to me. I shall be your undoing!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9218, 1, 0, 0, 'malchezaar SAY_AGGRO'), +(15690, -1532092, 'Simple fools! Time is the fire in which you''ll burn!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9220, 1, 0, 0, 'malchezaar SAY_AXE_TOSS1'), +(15690, -1532093, 'I see the subtlety of conception is beyond primitives such as you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9317, 1, 0, 0, 'malchezaar SAY_AXE_TOSS2'), +(15690, -1532094, 'Who knows what secrets hide in the dark.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9223, 1, 0, 0, 'malchezaar SAY_SPECIAL1'), +(15690, -1532095, 'The cerestial forces are mine to manipulate.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9320, 1, 0, 0, 'malchezaar SAY_SPECIAL2'), +(15690, -1532096, 'How can you hope to withstand against such overwhelming power?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9321, 1, 0, 0, 'malchezaar SAY_SPECIAL3'), +(15690, -1532097, 'Surely you did not think you could win.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9222, 1, 0, 0, 'malchezaar SAY_SLAY1'), +(15690, -1532098, 'Your greed, your foolishness has brought you to this end.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9318, 1, 0, 0, 'malchezaar SAY_SLAY2'), +(15690, -1532099, 'You are, but a plaything, unfit even to amuse.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9319, 1, 0, 0, 'malchezaar SAY_SLAY3'), +(15690, -1532100, 'All realities, all dimensions are open to me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9224, 1, 0, 0, 'malchezaar SAY_SUMMON1'), +(15690, -1532101, 'You face not Malchezaar alone, but the legions I command!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9322, 1, 0, 0, 'malchezaar SAY_SUMMON2'), +(15690, -1532102, 'I refuse to concede defeat. I am a prince of the Eredar! I am...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9221, 1, 0, 0, 'malchezaar SAY_DEATH'), +(16812, -1532103, 'Welcome Ladies and Gentlemen, to this evening''s presentation!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9174, 1, 0, 0, 'barnes OZ1'), +(16812, -1532104, 'Tonight we plumb the depths of the human soul as we join a lost, lonely girl trying desperately -- with the help of her loyal companions -- to find her way home!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9338, 1, 0, 0, 'barnes OZ2'), +(16812, -1532105, 'But she is pursued... by a wicked malevolent crone!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9339, 1, 0, 0, 'barnes OZ3'), +(16812, -1532106, 'Will she survive? Will she prevail? Only time will tell. And now ... on with the show!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9340, 1, 0, 0, 'barnes OZ4'), +(16812, -1532107, 'Good evening, Ladies and Gentlemen! Welcome to this evening''s presentation!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9175, 1, 0, 0, 'barnes HOOD1'), +(16812, -1532108, 'Tonight, things are not what they seem. For tonight, your eyes may not be trusted', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9335, 1, 0, 0, 'barnes HOOD2'), +(16812, -1532109, 'Take for instance, this quiet, elderly woman, waiting for a visit from her granddaughter. Surely there is nothing to fear from this sweet, grey-haired, old lady.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9336, 1, 0, 0, 'barnes HOOD3'), +(16812, -1532110, 'But don''t let me pull the wool over your eyes. See for yourself what lies beneath those covers! And now... on with the show!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9337, 1, 0, 0, 'barnes HOOD4'), +(16812, -1532111, 'Welcome, Ladies and Gentlemen, to this evening''s presentation!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9176, 1, 0, 0, 'barnes RAJ1'), +(16812, -1532112, 'Tonight, we explore a tale of forbidden love!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9341, 1, 0, 0, 'barnes RAJ2'), +(16812, -1532113, 'But beware, for not all love stories end happily, as you may find out. Sometimes, love pricks like a thorn.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9342, 1, 0, 0, 'barnes RAJ3'), +(16812, -1532114, 'But don''t take it from me, see for yourself what tragedy lies ahead when the paths of star-crossed lovers meet. And now...on with the show!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9343, 1, 0, 0, 'barnes RAJ4'), +(15956, -1533000, 'Ahh... welcome to my parlor.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8788, 1, 0, 0, 'anubrekhan SAY_GREET'), +(15956, -1533001, 'Just a little taste...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8785, 1, 0, 0, 'anubrekhan SAY_AGGRO1'), +(15956, -1533002, 'There is no way out.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8786, 1, 0, 0, 'anubrekhan SAY_AGGRO2'), +(15956, -1533003, 'Yes, Run! It makes the blood pump faster!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8787, 1, 0, 0, 'anubrekhan SAY_AGGRO3'), +(15956, -1533004, 'I hear little hearts beating. Yesss... beating faster now. Soon the beating will stop.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8790, 1, 0, 0, 'anubrekhan SAY_TAUNT1'), +(15956, -1533005, 'Where to go? What to do? So many choices that all end in pain, end in death.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8791, 1, 0, 0, 'anubrekhan SAY_TAUNT2'), +(15956, -1533006, 'Which one shall I eat first? So difficult to choose... the all smell so delicious.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8792, 1, 0, 0, 'anubrekhan SAY_TAUNT3'), +(15956, -1533007, 'Closer now... tasty morsels. I''ve been too long without food. Without blood to drink.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8793, 1, 0, 0, 'anubrekhan SAY_TAUNT4'), +(15956, -1533008, 'Shh... it will all be over soon.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8789, 1, 0, 0, 'anubrekhan SAY_SLAY'), +(15953, -1533009, 'Your old lives, your mortal desires, mean nothing. You are acolytes of the master now, and you will serve the cause without question! The greatest glory is to die in the master''s service!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8799, 1, 0, 0, 'faerlina SAY_GREET'), +(15953, -1533010, 'Slay them in the master''s name!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8794, 1, 0, 0, 'faerlina SAY_AGGRO1'), +(15953, -1533011, 'You cannot hide from me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8795, 1, 0, 0, 'faerlina SAY_AGGRO2'), +(15953, -1533012, 'Kneel before me, worm!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8796, 1, 0, 0, 'faerlina SAY_AGGRO3'), +(15953, -1533013, 'Run while you still can!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8797, 1, 0, 0, 'faerlina SAY_AGGRO4'), +(15953, -1533014, 'You have failed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8800, 1, 0, 0, 'faerlina SAY_SLAY1'), +(15953, -1533015, 'Pathetic wretch!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8801, 1, 0, 0, 'faerlina SAY_SLAY2'), +(15953, -1533016, 'The master... will avenge me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8798, 1, 0, 0, 'faerlina SAY_DEATH'), +(16028, -1533017, 'Patchwerk want to play!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8909, 1, 0, 0, 'patchwerk SAY_AGGRO1'), +(16028, -1533018, 'Kel''Thuzad make Patchwerk his Avatar of War!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8910, 1, 0, 0, 'patchwerk SAY_AGGRO2'), +(16028, -1533019, 'No more play?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8912, 1, 0, 0, 'patchwerk SAY_SLAY'), +(16028, -1533020, 'What happened to... Patch...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8911, 1, 0, 0, 'patchwerk SAY_DEATH'), +(16028, -1533021, 'goes into a berserker rage!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'patchwerk EMOTE_BERSERK'), +(16028, -1533022, '%s becomes enraged!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'patchwerk EMOTE_ENRAGE'), +(0, -1533023, 'Stalagg crush you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8864, 1, 0, 0, 'stalagg SAY_STAL_AGGRO'), +(0, -1533024, 'Stalagg kill!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8866, 1, 0, 0, 'stalagg SAY_STAL_SLAY'), +(0, -1533025, 'Master save me...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8865, 1, 0, 0, 'stalagg SAY_STAL_DEATH'), +(0, -1533026, 'Feed you to master!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8802, 1, 0, 0, 'feugen SAY_FEUG_AGGRO'), +(0, -1533027, 'Feugen make master happy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8804, 1, 0, 0, 'feugen SAY_FEUG_SLAY'), +(0, -1533028, 'No... more... Feugen...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8803, 1, 0, 0, 'feugen SAY_FEUG_DEATH'), +(0, -1533029, 'You are too late... I... must... OBEY!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8872, 1, 0, 0, 'thaddius SAY_GREET'), +(15928, -1533030, 'KILL!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8867, 1, 0, 0, 'thaddius SAY_AGGRO1'), +(15928, -1533031, 'EAT YOUR BONES!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8868, 1, 0, 0, 'thaddius SAY_AGGRO2'), +(15928, -1533032, 'BREAK YOU!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8869, 1, 0, 0, 'thaddius SAY_AGGRO3'), +(15928, -1533033, 'You die now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8877, 1, 0, 0, 'thaddius SAY_SLAY'), +(0, -1533034, 'Now YOU feel pain!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8871, 1, 0, 0, 'thaddius SAY_ELECT'), +(15928, -1533035, 'Thank... you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8870, 1, 0, 0, 'thaddius SAY_DEATH'), +(0, -1533036, 'Pleeease!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8873, 1, 0, 0, 'thaddius SAY_SCREAM1'), +(0, -1533037, 'Stop, make it stop!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8874, 1, 0, 0, 'thaddius SAY_SCREAM2'), +(0, -1533038, 'Help me! Save me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8875, 1, 0, 0, 'thaddius SAY_SCREAM3'), +(0, -1533039, 'Please, nooo!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8876, 1, 0, 0, 'thaddius SAY_SCREAM4'), +(16060, -1533040, 'Foolishly you have sought your own demise. Brazenly you have disregarded powers beyond your understanding. You have fought hard to invade the realm of the harvester. Now there is only one way out - to walk the lonely path of the damned.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8807, 1, 0, 0, 'gothik SAY_SPEECH'), +(16060, -1533041, 'Death is the only escape.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8806, 1, 0, 0, 'gothik SAY_KILL'), +(16060, -1533042, 'I... am... undone!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8805, 1, 0, 0, 'gothik SAY_DEATH'), +(16060, -1533043, 'I have waited long enough! Now, you face the harvester of souls!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8808, 1, 0, 0, 'gothik SAY_TELEPORT'), +(16063, -1533044, 'Defend youself!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8892, 1, 0, 0, 'blaumeux SAY_BLAU_AGGRO'), +(16063, -1533045, 'Come, Zeliek, do not drive them out. Not before we''ve had our fun.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8896, 1, 0, 0, 'blaumeux SAY_BLAU_TAUNT1'), +(16063, -1533046, 'I do hope they stay alive long enough for me to... introduce myself.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8897, 1, 0, 0, 'blaumeux SAY_BLAU_TAUNT2'), +(16063, -1533047, 'The first kill goes to me! Anyone care to wager?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8898, 1, 0, 0, 'blaumeux SAY_BLAU_TAUNT3'), +(16063, -1533048, 'Your life is mine!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8895, 1, 0, 0, 'blaumeux SAY_BLAU_SPECIAL'), +(16063, -1533049, 'Who''s next?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8894, 1, 0, 0, 'blaumeux SAY_BLAU_SLAY'), +(16063, -1533050, 'Tou... che!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8893, 1, 0, 0, 'blaumeux SAY_BLAU_DEATH'), +(16063, -1533051, 'Come out and fight, ye wee ninny!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8899, 1, 0, 0, 'korthazz SAY_KORT_AGGRO'), +(16063, -1533052, 'To arms, ye roustabouts! We''ve got company!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8903, 1, 0, 0, 'korthazz SAY_KORT_TAUNT1'), +(16063, -1533053, 'I heard about enough of yer sniveling. Shut yer fly trap ''afore I shut it for ye!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8904, 1, 0, 0, 'korthazz SAY_KORT_TAUNT2'), +(16063, -1533054, 'I''m gonna enjoy killin'' these slack-jawed daffodils!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8905, 1, 0, 0, 'korthazz SAY_KORT_TAUNT3'), +(16063, -1533055, 'I like my meat extra crispy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8902, 1, 0, 0, 'korthazz SAY_KORT_SPECIAl'), +(16063, -1533056, 'Next time, bring more friends!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8901, 1, 0, 0, 'korthazz SAY_KORT_SLAY'), +(16063, -1533057, 'What a bloody waste this is!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8900, 1, 0, 0, 'korthazz SAY_KORT_DEATH'), +(16063, -1533058, 'Flee, before it''s too late!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8913, 1, 0, 0, 'zeliek SAY_ZELI_AGGRO'), +(16063, -1533059, 'Invaders, cease this foolish venture at once! Turn away while you still can!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8917, 1, 0, 0, 'zeliek SAY_ZELI_TAUNT1'), +(16063, -1533060, 'Perhaps they will come to their senses, and run away as fast as they can!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8918, 1, 0, 0, 'zeliek SAY_ZELI_TAUNT2'), +(16063, -1533061, 'Do not continue! Turn back while there''s still time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8919, 1, 0, 0, 'zeliek SAY_ZELI_TAUNT3'), +(16063, -1533062, 'I- I have no choice but to obey!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8916, 1, 0, 0, 'zeliek SAY_ZELI_SPECIAL'), +(16063, -1533063, 'Forgive me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8915, 1, 0, 0, 'zeliek SAY_ZELI_SLAY'), +(16063, -1533064, 'It is... as it should be.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8914, 1, 0, 0, 'zeliek SAY_ZELI_DEATH'), +(16063, -1533065, 'You seek death?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14571, 1, 0, 0, 'rivendare_naxx SAY_RIVE_AGGRO1'), +(16063, -1533066, 'None shall pass!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14572, 1, 0, 0, 'rivendare_naxx SAY_RIVE_AGGRO2'), +(16063, -1533067, 'Be still!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14573, 1, 0, 0, 'rivendare_naxx SAY_RIVE_AGGRO3'), +(16063, -1533068, 'You will find no peace in death.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14574, 1, 0, 0, 'rivendare_naxx SAY_RIVE_SLAY1'), +(16063, -1533069, 'The master''s will is done.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14575, 1, 0, 0, 'rivendare_naxx SAY_RIVE_SLAY2'), +(16063, -1533070, 'Bow to the might of the scourge!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14576, 1, 0, 0, 'rivendare_naxx SAY_RIVE_SPECIAL'), +(16063, -1533071, 'Enough prattling. Let them come! We shall grind their bones to dust.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14577, 1, 0, 0, 'rivendare_naxx SAY_RIVE_TAUNT1'), +(16063, -1533072, 'Conserve your anger! Harness your rage! You will all have outlets for your frustration soon enough.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14578, 1, 0, 0, 'rivendare_naxx SAY_RIVE_TAUNT2'), +(16063, -1533073, 'Life is meaningless. It is in death that we are truly tested.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14579, 1, 0, 0, 'rivendare_naxx SAY_RIVE_TAUNT3'), +(16063, -1533074, 'Death... will not stop me...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14580, 1, 0, 0, 'rivendare_naxx SAY_RIVE_DEATH'), +(15954, -1533075, 'Glory to the master!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8845, 1, 0, 0, 'noth SAY_AGGRO1'), +(15954, -1533076, 'Your life is forfeit!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8846, 1, 0, 0, 'noth SAY_AGGRO2'), +(15954, -1533077, 'Die, trespasser!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8847, 1, 0, 0, 'noth SAY_AGGRO3'), +(15954, -1533078, 'Rise, my soldiers! Rise and fight once more!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8851, 1, 0, 0, 'noth SAY_SUMMON'), +(15954, -1533079, 'My task is done!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8849, 1, 0, 0, 'noth SAY_SLAY1'), +(15954, -1533080, 'Breathe no more!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8850, 1, 0, 0, 'noth SAY_SLAY2'), +(15954, -1533081, 'I will serve the master... in... death!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8848, 1, 0, 0, 'noth SAY_DEATH'), +(15989, -1533082, 'takes in a deep breath...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'sapphiron EMOTE_BREATH'), +(15989, -1533083, '%s enrages!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'sapphiron EMOTE_ENRAGE'), +(0, -1533084, 'Our preparations continue as planned, master.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14467, 1, 0, 0, 'kelthuzad SAY_SAPP_DIALOG1'), +(0, -1533085, 'It is good that you serve me so faithfully. Soon, all will serve the Lich King and in the end, you shall be rewarded...so long as you do not falter.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8881, 1, 0, 0, 'kelthuzad SAY_SAPP_DIALOG2_LICH'), +(0, -1533086, 'I see no complications... Wait... What is this?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14468, 1, 0, 0, 'kelthuzad SAY_SAPP_DIALOG3'), +(0, -1533087, 'Your security measures have failed! See to this interruption immediately!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8882, 1, 0, 0, 'kelthuzad SAY_SAPP_DIALOG4_LICH'), +(0, -1533088, 'Yes, master!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14469, 1, 0, 0, 'kelthuzad SAY_SAPP_DIALOG5'), +(0, -1533089, 'No!!! A curse upon you, interlopers! The armies of the Lich King will hunt you down. You will not escape your fate...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14484, 1, 0, 0, 'kelthuzad SAY_CAT_DIED'), +(0, -1533090, 'Who dares violate the sanctity of my domain? Be warned, all who trespass here are doomed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14463, 1, 0, 0, 'kelthuzad SAY_TAUNT1'), +(0, -1533091, 'Fools, you think yourselves triumphant? You have only taken one step closer to the abyss! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14464, 1, 0, 0, 'kelthuzad SAY_TAUNT2'), +(0, -1533092, 'I grow tired of these games. Proceed, and I will banish your souls to oblivion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14465, 1, 0, 0, 'kelthuzad SAY_TAUNT3'), +(0, -1533093, 'You have no idea what horrors lie ahead. You have seen nothing! The frozen heart of Naxxramas awaits you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14466, 1, 0, 0, 'kelthuzad SAY_TAUNT4'), +(15990, -1533094, 'Pray for mercy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14475, 1, 0, 0, 'kelthuzad SAY_AGGRO1'), +(15990, -1533095, 'Scream your dying breath!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14476, 1, 0, 0, 'kelthuzad SAY_AGGRO2'), +(15990, -1533096, 'The end is upon you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14477, 1, 0, 0, 'kelthuzad SAY_AGGRO3'), +(15990, -1533097, 'The dark void awaits you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14478, 1, 0, 0, 'kelthuzad SAY_SLAY1'), +(15990, -1533098, '<Kel''Thuzad cackles maniacally!>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14479, 1, 0, 0, 'kelthuzad SAY_SLAY2'), +(15990, -1533099, 'AAAAGHHH!... Do not rejoice... your victory is a hollow one... for I shall return with powers beyond your imagining!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14480, 1, 0, 0, 'kelthuzad SAY_DEATH'), +(15990, -1533100, 'Your soul, is bound to me now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14472, 1, 0, 0, 'kelthuzad SAY_CHAIN1'), +(15990, -1533101, 'There will be no escape!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14473, 1, 0, 0, 'kelthuzad SAY_CHAIN2'), +(15990, -1533102, 'I will freeze the blood in your veins!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14474, 1, 0, 0, 'kelthuzad SAY_FROST_BLAST'), +(15990, -1533103, 'Master! I require aid! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14470, 1, 0, 0, 'kelthuzad SAY_REQUEST_AID'), +(15990, -1533104, 'Very well... warriors of the frozen wastes, rise up! I command you to fight, kill, and die for your master. Let none survive...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'kelthuzad SAY_ANSWER_REQUEST'), +(0, -1533105, 'Minions, servants, soldiers of the cold dark, obey the call of Kel''Thuzad!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14471, 1, 0, 0, 'kelthuzad SAY_SUMMON_MINIONS'), +(15990, -1533106, 'Your petty magics are no challenge to the might of the Scourge! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14481, 1, 0, 0, 'kelthuzad SAY_SPECIAL1_MANA_DET'), +(15990, -1533107, 'Enough! I grow tired of these distractions! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14483, 1, 0, 0, 'kelthuzad SAY_SPECIAL3_MANA_DET'), +(15990, -1533108, 'Fools, you have spread your powers too thin. Be free, my minions!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14482, 1, 0, 0, 'kelthuzad SAY_SPECIAL2_DISPELL'), +(15936, -1533109, 'You are mine now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8825, 1, 0, 0, 'heigan SAY_AGGRO1'), +(15936, -1533110, 'I see you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8826, 1, 0, 0, 'heigan SAY_AGGRO2'), +(15936, -1533111, 'You...are next!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8827, 1, 0, 0, 'heigan SAY_AGGRO3'), +(15936, -1533112, 'Close your eyes... sleep!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8829, 1, 0, 0, 'heigan SAY_SLAY'), +(15936, -1533113, 'The races of the world will perish. It is only a matter of time.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8830, 1, 0, 0, 'heigan SAY_TAUNT1'), +(15936, -1533114, 'I see endless suffering, I see torment, I see rage. I see... everything!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8831, 1, 0, 0, 'heigan SAY_TAUNT2'), +(15936, -1533115, 'Soon... the world will tremble!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8832, 1, 0, 0, 'heigan SAY_TAUNT3'), +(15936, -1533116, 'The end is upon you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8833, 1, 0, 0, 'heigan SAY_TAUNT4'), +(15936, -1533117, 'Hungry worms will feast on your rotten flesh!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8834, 1, 0, 0, 'heigan SAY_TAUNT5'), +(15936, -1533118, 'Noo... o...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8828, 1, 0, 0, 'heigan SAY_DEATH'), +(17772, -1534000, 'I''m in jeopardy, help me if you can!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11007, 1, 0, 0, 'jaina hyjal ATTACKED 1'), +(17772, -1534001, 'They''ve broken through!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11049, 1, 0, 0, 'jaina hyjal ATTACKED 2'), +(17772, -1534002, 'Stay alert! Another wave approaches.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11008, 1, 0, 0, 'jaina hyjal INCOMING'), +(17772, -1534003, 'Don''t give up! We must prevail!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11006, 1, 0, 0, 'jaina hyjal BEGIN'), +(17772, -1534004, 'Hold them back as long as possible.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11050, 1, 0, 0, 'jaina hyjal RALLY 1'), +(17772, -1534005, 'We must hold strong!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11051, 1, 0, 0, 'jaina hyjal RALLY 2'), +(17772, -1534006, 'We are lost. Fall back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11009, 1, 0, 0, 'jaina hyjal FAILURE'), +(17772, -1534007, 'We have won valuable time. Now we must pull back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11011, 1, 0, 0, 'jaina hyjal SUCCESS'), +(17772, -1534008, 'I did... my best.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11010, 1, 0, 0, 'jaina hyjal DEATH'), +(17852, -1534009, 'I will lie down for no one!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11031, 1, 0, 0, 'thrall hyjal ATTACKED 1'), +(17852, -1534010, 'Bring the fight to me and pay with your lives!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11061, 1, 0, 0, 'thrall hyjal ATTACKED 2'), +(17852, -1534011, 'Make ready for another wave! LOK-TAR OGAR!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11032, 1, 0, 0, 'thrall hyjal INCOMING'), +(17852, -1534012, 'Hold them back! Do not falter!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11030, 1, 0, 0, 'thrall hyjal BEGIN'), +(17852, -1534013, 'Victory or death!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11059, 1, 0, 0, 'thrall hyjal RALLY 1'), +(17852, -1534014, 'Do not give an inch of ground!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11060, 1, 0, 0, 'thrall hyjal RALLY 2'), +(17852, -1534015, 'It is over. Withdraw! We have failed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11033, 1, 0, 0, 'thrall hyjal FAILURE'), +(17852, -1534016, 'We have played our part and done well. It is up to the others now.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11035, 1, 0, 0, 'thrall hyjal SUCCESS'), +(17852, -1534017, 'Uraaa...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11034, 1, 0, 0, 'thrall hyjal DEATH'), +(0, -1534018, 'All of your efforts have been in vain, for the draining of the World Tree has already begun. Soon the heart of your world will beat no more.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10986, 1, 0, 0, 'archimonde SAY_PRE_EVENTS_COMPLETE'), +(17968, -1534019, 'Your resistance is insignificant.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10987, 1, 0, 0, 'archimonde SAY_AGGRO'), +(17968, -1534020, 'This world will burn!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10990, 1, 0, 0, 'archimonde SAY_DOOMFIRE1'), +(17968, -1534021, 'Manach sheek-thrish!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11041, 1, 0, 0, 'archimonde SAY_DOOMFIRE2'), +(17968, -1534022, 'A-kreesh!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10989, 1, 0, 0, 'archimonde SAY_AIR_BURST1'), +(17968, -1534023, 'Away vermin!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11043, 1, 0, 0, 'archimonde SAY_AIR_BURST2'), +(17968, -1534024, 'All creation will be devoured!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11044, 1, 0, 0, 'archimonde SAY_SLAY1'), +(17968, -1534025, 'Your soul will languish for eternity.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10991, 1, 0, 0, 'archimonde SAY_SLAY2'), +(17968, -1534026, 'I am the coming of the end!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11045, 1, 0, 0, 'archimonde SAY_SLAY3'), +(17968, -1534027, 'At last it is here. Mourn and lament the passing of all you have ever known and all that would have been! Akmin-kurai!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10993, 1, 0, 0, 'archimonde SAY_ENRAGE'), +(17968, -1534028, 'No, it cannot be! Nooo!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10992, 1, 0, 0, 'archimonde SAY_DEATH'), +(17968, -1534029, 'You are mine now.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10988, 1, 0, 0, 'archimonde SAY_SOUL_CHARGE1'), +(17968, -1534030, 'Bow to my will.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11042, 1, 0, 0, 'archimonde SAY_SOUL_CHARGE2'), +(16807, -1540000, 'You wish to fight us all at once? This should be amusing!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10262, 1, 0, 0, 'nethekurse SAY_INTRO'), +(16807, -1540001, 'You can have that one. I no longer need him.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10263, 1, 0, 0, 'nethekurse PEON_ATTACK_1'), +(16807, -1540002, 'Yes, beat him mercilessly. His skull is a thick as an ogres.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10264, 1, 0, 0, 'nethekurse PEON_ATTACK_2'), +(16807, -1540003, 'Don''t waste your time on that one. He''s weak!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10265, 1, 0, 0, 'nethekurse PEON_ATTACK_3'), +(16807, -1540004, 'You want him? Very well, take him!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10266, 1, 0, 0, 'nethekurse PEON_ATTACK_4'), +(16807, -1540005, 'One pitiful wretch down. Go on, take another one.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10267, 1, 0, 0, 'nethekurse PEON_DIE_1'), +(16807, -1540006, 'Ahh, what a waste... Next!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10268, 1, 0, 0, 'nethekurse PEON_DIE_2'), +(16807, -1540007, 'I was going to kill him anyway!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10269, 1, 0, 0, 'nethekurse PEON_DIE_3'), +(16807, -1540008, 'Thank you for saving me the trouble! Now it''s my turn to have some fun...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10270, 1, 0, 0, 'nethekurse PEON_DIE_4'), +(16807, -1540009, 'Beg for your pittyfull life!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10259, 1, 0, 0, 'nethekurse SAY_TAUNT_1'), +(16807, -1540010, 'Run covad, ruun!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10260, 1, 0, 0, 'nethekurse SAY_TAUNT_2'), +(16807, -1540011, 'Your pain amuses me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10261, 1, 0, 0, 'nethekurse SAY_TAUNT_3'), +(16807, -1540012, 'I''m already bored.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10271, 1, 0, 0, 'nethekurse SAY_AGGRO_1'), +(16807, -1540013, 'Come on! ... Show me a real fight.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10272, 1, 0, 0, 'nethekurse SAY_AGGRO_2'), +(16807, -1540014, 'I had more fun torturing the peons.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10273, 1, 0, 0, 'nethekurse SAY_AGGRO_3'), +(16807, -1540015, 'You Loose.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10274, 1, 0, 0, 'nethekurse SAY_SLAY_1'), +(16807, -1540016, 'Ohh! Just die.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10275, 1, 0, 0, 'nethekurse SAY_SLAY_2'), +(16807, -1540017, 'What a ... a shame.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10276, 1, 0, 0, 'nethekurse SAY_DIE'), +(16809, -1540018, 'Smash!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10306, 1, 0, 0, 'omrogg GoCombat_1'), +(16809, -1540019, 'If you nice me let you live.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10308, 1, 0, 0, 'omrogg GoCombat_2'), +(16809, -1540020, 'Me hungry!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10309, 1, 0, 0, 'omrogg GoCombat_3'), +(16809, -1540021, 'Why don''t you let me do the talking?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10317, 1, 0, 0, 'omrogg GoCombatDelay_1'), +(16809, -1540022, 'No, we will NOT let you live!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10318, 1, 0, 0, 'omrogg GoCombatDelay_2'), +(16809, -1540023, 'You always hungry. That why we so fat!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10319, 1, 0, 0, 'omrogg GoCombatDelay_3'), +(16809, -1540024, 'You stay here. Me go kill someone else!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10303, 1, 0, 0, 'omrogg Threat_1'), +(16809, -1540025, 'What are you doing!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10315, 1, 0, 0, 'omrogg Threat_2'), +(16809, -1540026, 'Me kill someone else...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10302, 1, 0, 0, 'omrogg Threat_3'), +(16809, -1540027, 'Me not like this one...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10300, 1, 0, 0, 'omrogg Threat_4'), +(16809, -1540028, 'That''s not funny!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10314, 1, 0, 0, 'omrogg ThreatDelay1_1'), +(16809, -1540029, 'Me get bored...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10305, 1, 0, 0, 'omrogg ThreatDelay1_2'), +(16809, -1540030, 'I''m not done yet, idiot!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10313, 1, 0, 0, 'omrogg ThreatDelay1_3'), +(16809, -1540031, 'Hey you numbskull!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10312, 1, 0, 0, 'omrogg ThreatDelay1_4'), +(16809, -1540032, 'Ha ha ha.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10304, 1, 0, 0, 'omrogg ThreatDelay2_1'), +(16809, -1540033, 'Whhy! He almost dead!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10316, 1, 0, 0, 'omrogg ThreatDelay2_2'), +(16809, -1540034, 'H''ey...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10307, 1, 0, 0, 'omrogg ThreatDelay2_3'), +(16809, -1540035, 'We kill his friend!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10301, 1, 0, 0, 'omrogg ThreatDelay2_4'), +(16809, -1540036, 'This one die easy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10310, 1, 0, 0, 'omrogg Killing_1'), +(16809, -1540037, 'I''m tired. You kill next one!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10320, 1, 0, 0, 'omrogg Killing_2'), +(16809, -1540038, 'That''s because I do all the hard work!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10321, 1, 0, 0, 'omrogg KillingDelay_1'), +(16809, -1540039, 'This all...your fault!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10311, 1, 0, 0, 'omrogg YELL_DIE_L'), +(16809, -1540040, 'I...hate...you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10322, 1, 0, 0, 'omrogg YELL_DIE_R'), +(16809, -1540041, '%s enrages', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'omrogg EMOTE_ENRAGE'), +(16808, -1540042, 'Ours is the true Horde! The only Horde!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10323, 1, 0, 0, 'kargath SAY_AGGRO1'), +(16808, -1540043, 'I''ll carve the meat from your bones!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10324, 1, 0, 0, 'kargath SAY_AGGRO2'), +(16808, -1540044, 'I am called Bladefist for a reason, as you will see!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10325, 1, 0, 0, 'kargath SAY_AGGRO3'), +(16808, -1540045, 'For the real Horde!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10326, 1, 0, 0, 'kargath SAY_SLAY1'), +(16808, -1540046, 'I am the only Warchief!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10327, 1, 0, 0, 'kargath SAY_SLAY2'), +(16808, -1540047, 'The true Horde... will.. prevail...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10328, 1, 0, 0, 'kargath SAY_DEATH'), +(17377, -1542000, 'Who dares interrupt... What is this? What have you done? You ruin everything!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10164, 1, 0, 0, 'kelidan SAY_WAKE'), +(17377, -1542001, 'You mustn''t let him loose!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10166, 1, 0, 0, 'kelidan SAY_ADD_AGGRO_1'), +(17377, -1542002, 'Ignorant whelps!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10167, 1, 0, 0, 'kelidan SAY_ADD_AGGRO_2'); +INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +(17377, -1542003, 'You fools! He''ll kill us all!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10168, 1, 0, 0, 'kelidan SAY_ADD_AGGRO_3'), +(17377, -1542004, 'Just as you deserve!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10169, 1, 0, 0, 'kelidan SAY_KILL_1'), +(17377, -1542005, 'Your friends will soon be joining you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10170, 1, 0, 0, 'kelidan SAY_KILL_2'), +(17377, -1542006, 'Closer... Come closer.. and burn!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10165, 1, 0, 0, 'kelidan SAY_NOVA'), +(17377, -1542007, 'Good luck... you''ll need it..', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10171, 1, 0, 0, 'kelidan SAY_DIE'), +(17380, -1542008, 'Come intruders....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'broggok SAY_AGGRO'), +(17381, -1542009, 'My work must not be interrupted.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10286, 1, 0, 0, 'the_maker SAY_AGGRO_1'), +(17381, -1542010, 'Perhaps I can find a use for you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10287, 1, 0, 0, 'the_maker SAY_AGGRO_2'), +(17381, -1542011, 'Anger... Hate... These are tools I can use.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10288, 1, 0, 0, 'the_maker SAY_AGGRO_3'), +(17381, -1542012, 'Let''s see what I can make of you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10289, 1, 0, 0, 'the_maker SAY_KILL_1'), +(17381, -1542013, 'It is pointless to resist.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10290, 1, 0, 0, 'the_maker SAY_KILL_2'), +(17381, -1542014, 'Stay away from... me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10291, 1, 0, 0, 'the_maker SAY_DIE'), +(17306, -1543000, 'Do you smell that? Fresh meat has somehow breached our citadel. Be wary of any intruders.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'gargolmar SAY_TAUNT'), +(17306, -1543001, 'Heal me! QUICKLY!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10329, 1, 0, 0, 'gargolmar SAY_HEAL'), +(17306, -1543002, 'Back off, pup!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10330, 1, 0, 0, 'gargolmar SAY_SURGE'), +(17306, -1543003, 'What have we here...?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10331, 1, 0, 0, 'gargolmar SAY_AGGRO_1'), +(17306, -1543004, 'Heh... this may hurt a little.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10332, 1, 0, 0, 'gargolmar SAY_AGGRO_2'), +(17306, -1543005, 'I''m gonna enjoy this.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10333, 1, 0, 0, 'gargolmar SAY_AGGRO_3'), +(17306, -1543006, 'Say farewell!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10334, 1, 0, 0, 'gargolmar SAY_KILL_1'), +(17306, -1543007, 'Much too easy...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10335, 1, 0, 0, 'gargolmar SAY_KILL_2'), +(17306, -1543008, 'Hahah.. <cough> ..argh!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10336, 1, 0, 0, 'gargolmar SAY_DIE'), +(17308, -1543009, 'You dare stand against me?!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10280, 1, 0, 0, 'omor SAY_AGGRO_1'), +(17308, -1543010, 'I will not be defeated!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10279, 1, 0, 0, 'omor SAY_AGGRO_2'), +(17308, -1543011, 'Your insolence will be your death.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10281, 1, 0, 0, 'omor SAY_AGGRO_3'), +(17308, -1543012, 'Achor-she-ki! Feast my pet! Eat your fill!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10277, 1, 0, 0, 'omor SAY_SUMMON'), +(17308, -1543013, 'A-Kreesh!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10278, 1, 0, 0, 'omor SAY_CURSE'), +(17308, -1543014, 'Die, weakling!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10282, 1, 0, 0, 'omor SAY_KILL_1'), +(17308, -1543015, 'It is... not over.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10284, 1, 0, 0, 'omor SAY_DIE'), +(17308, -1543016, 'I am victorious!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10283, 1, 0, 0, 'omor SAY_WIPE'), +(17307, -1543017, 'You have faced many challenges, pity they were all in vain. Soon your people will kneel to my lord!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10292, 1, 0, 0, 'vazruden SAY_INTRO'), +(17537, -1543018, 'Is there no one left to test me?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10293, 1, 0, 0, 'vazruden SAY_WIPE'), +(17537, -1543019, 'Your time is running out!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10294, 1, 0, 0, 'vazruden SAY_AGGRO_1'), +(17537, -1543020, 'You are nothing, I answer a higher call!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10295, 1, 0, 0, 'vazruden SAY_AGGRO_2'), +(17537, -1543021, 'The Dark Lord laughs at you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10296, 1, 0, 0, 'vazruden SAY_AGGRO_3'), +(17537, -1543022, 'It is over. Finished!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10297, 1, 0, 0, 'vazruden SAY_KILL_1'), +(17537, -1543023, 'Your days are done!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10298, 1, 0, 0, 'vazruden SAY_KILL_2'), +(17537, -1543024, 'My lord will be the end you all...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10299, 1, 0, 0, 'vazruden SAY_DIE'), +(17537, -1543025, 'descends from the sky', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'vazruden EMOTE'), +(17257, -1544000, 'Wretched, meddling insects. Release me and perhaps I will grant you a merciful death!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10247, 1, 0, 0, 'magtheridon SAY_TAUNT1'), +(17257, -1544001, 'Vermin! Leeches! Take my blood and choke on it!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10248, 1, 0, 0, 'magtheridon SAY_TAUNT2'), +(17257, -1544002, 'Illidan is an arrogant fool. I will crush him and reclaim Outland as my own.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10249, 1, 0, 0, 'magtheridon SAY_TAUNT3'), +(17257, -1544003, 'Away, you mindless parasites. My blood is my own!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10250, 1, 0, 0, 'magtheridon SAY_TAUNT4'), +(17257, -1544004, 'How long do you believe your pathetic sorcery can hold me?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10251, 1, 0, 0, 'magtheridon SAY_TAUNT5'), +(17257, -1544005, 'My blood will be the end of you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10252, 1, 0, 0, 'magtheridon SAY_TAUNT6'), +(17257, -1544006, 'I...am...UNLEASHED!!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10253, 1, 0, 0, 'magtheridon SAY_FREED'), +(17257, -1544007, 'Thank you for releasing me. Now...die!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10254, 1, 0, 0, 'magtheridon SAY_AGGRO'), +(17257, -1544008, 'Not again...NOT AGAIN!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10256, 1, 0, 0, 'magtheridon SAY_BANISH'), +(17257, -1544009, 'I will not be taken so easily. Let the walls of this prison tremble...and FALL!!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10257, 1, 0, 0, 'magtheridon SAY_CHAMBER_DESTROY'), +(17257, -1544010, 'Did you think me weak? Soft? Who is the weak one now?!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10255, 1, 0, 0, 'magtheridon SAY_PLAYER_KILLED'), +(17257, -1544011, 'The Legion...will consume you...all...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10258, 1, 0, 0, 'magtheridon SAY_DEATH'), +(17257, -1544012, '%s becomes enraged!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'magtheridon EMOTE_BERSERK'), +(17257, -1544013, 'begins to cast Blast Nova!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'magtheridon EMOTE_BLASTNOVA'), +(17257, -1544014, 'bonds begin to weaken!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'magtheridon EMOTE_BEGIN'), +(0, -1544015, 'breaks free!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'magtheridon EMOTE_FREED'), +(17797, -1545000, 'Surge forth my pets!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10360, 1, 0, 0, 'thespia SAY_SUMMON'), +(17797, -1545001, 'The depths will consume you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10361, 1, 0, 0, 'thespia SAY_AGGRO_1'), +(17797, -1545002, 'Meet your doom, surface dwellers!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10362, 1, 0, 0, 'thespia SAY_AGGRO_2'), +(17797, -1545003, 'You will drown in blood!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10363, 1, 0, 0, 'thespia SAY_AGGRO_3'), +(17797, -1545004, 'To the depths of oblivion with you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10364, 1, 0, 0, 'thespia SAY_SLAY_1'), +(17797, -1545005, 'For my lady and master!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10365, 1, 0, 0, 'thespia SAY_SLAY_2'), +(17797, -1545006, 'Our matron will be.. the end of.. you..', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10366, 1, 0, 0, 'thespia SAY_DEAD'), +(17796, -1545007, 'I''m bringin'' the pain!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10367, 1, 0, 0, 'mekgineer SAY_MECHANICS'), +(17796, -1545008, 'You''re in for a world of hurt!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10368, 1, 0, 0, 'mekgineer SAY_AGGRO_1'), +(17796, -1545009, 'Eat hot metal, scumbag!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10369, 1, 0, 0, 'mekgineer SAY_AGGRO_2'), +(17796, -1545010, 'I''ll come over there!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10370, 1, 0, 0, 'mekgineer SAY_AGGRO_3'), +(17796, -1545011, 'I''m bringin'' the pain!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10371, 1, 0, 0, 'mekgineer SAY_AGGRO_4'), +(17796, -1545012, 'You just got served, punk!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10372, 1, 0, 0, 'mekgineer SOUND_SLAY_1'), +(17796, -1545013, 'I own you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10373, 1, 0, 0, 'mekgineer SOUND_SLAY_2'), +(17796, -1545014, 'Have fun dyin'', cupcake!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10374, 1, 0, 0, 'mekgineer SOUND_SLAY_3'), +(17796, -1545015, 'Mommy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10375, 1, 0, 0, 'mekgineer SAY_DEATH'), +(17798, -1545016, 'You deem yourselves worthy simply because you bested my guards? Our work here will not be compromised!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10390, 1, 0, 0, 'kalithresh SAY_INTRO'), +(17798, -1545017, 'This is not nearly over...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10391, 1, 0, 0, 'kalithresh SAY_REGEN'), +(17798, -1545018, 'Your head will roll!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10392, 1, 0, 0, 'kalithresh SAY_AGGRO1'), +(17798, -1545019, 'I despise all of your kind!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10393, 1, 0, 0, 'kalithresh SAY_AGGRO2'), +(17798, -1545020, 'Ba''ahntha sol''dorei!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10394, 1, 0, 0, 'kalithresh SAY_AGGRO3'), +(17798, -1545021, 'Scram, surface filth!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10395, 1, 0, 0, 'kalithresh SAY_SLAY1'), +(17798, -1545022, 'Ah ha ha ha ha ha ha!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10396, 1, 0, 0, 'kalithresh SAY_SLAY2'), +(17798, -1545023, 'For her Excellency... for... Vashj!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10397, 1, 0, 0, 'kalithresh SAY_DEATH'), +(21216, -1548000, 'I cannot allow you to interfere!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11289, 1, 0, 0, 'hydross SAY_AGGRO'), +(21216, -1548001, 'Better, much better.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11290, 1, 0, 0, 'hydross SAY_SWITCH_TO_CLEAN'), +(21216, -1548002, 'They have forced me to this...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11291, 1, 0, 0, 'hydross SAY_CLEAN_SLAY1'), +(21216, -1548003, 'I have no choice.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11292, 1, 0, 0, 'hydross SAY_CLEAN_SLAY2'), +(21216, -1548004, 'I am... released...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11293, 1, 0, 0, 'hydross SAY_CLEAN_DEATH'), +(21216, -1548005, 'Aaghh, the poison...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11297, 1, 0, 0, 'hydross SAY_SWITCH_TO_CORRUPT'), +(21216, -1548006, 'I will purge you from this place.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11298, 1, 0, 0, 'hydross SAY_CORRUPT_SLAY1'), +(21216, -1548007, 'You are no better than they!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11299, 1, 0, 0, 'hydross SAY_CORRUPT_SLAY2'), +(21216, -1548008, 'You are the disease, not I', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11300, 1, 0, 0, 'hydross SAY_CORRUPT_DEATH'), +(21215, -1548009, 'Finally, my banishment ends!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11312, 1, 0, 0, 'leotheras SAY_AGGRO'), +(21215, -1548010, 'Be gone, trifling elf. I am in control now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11304, 1, 0, 0, 'leotheras SAY_SWITCH_TO_DEMON'), +(21215, -1548011, 'We all have our demons...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11305, 1, 0, 0, 'leotheras SAY_INNER_DEMONS'), +(21215, -1548012, 'I have no equal.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11306, 1, 0, 0, 'leotheras SAY_DEMON_SLAY1'), +(21215, -1548013, 'Perish, mortal.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11307, 1, 0, 0, 'leotheras SAY_DEMON_SLAY2'), +(21215, -1548014, 'Yes, YES! Ahahah!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11308, 1, 0, 0, 'leotheras SAY_DEMON_SLAY3'), +(21215, -1548015, 'Kill! KILL!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11314, 1, 0, 0, 'leotheras SAY_NIGHTELF_SLAY1'), +(21215, -1548016, 'That''s right! Yes!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11315, 1, 0, 0, 'leotheras SAY_NIGHTELF_SLAY2'), +(21215, -1548017, 'Who''s the master now?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11316, 1, 0, 0, 'leotheras SAY_NIGHTELF_SLAY3'), +(21215, -1548018, 'No... no! What have you done? I am the master! Do you hear me? I am... aaggh! Can''t... contain him...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11313, 1, 0, 0, 'leotheras SAY_FINAL_FORM'), +(21215, -1548019, 'At last I am liberated. It has been too long since I have tasted true freedom!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11309, 1, 0, 0, 'leotheras SAY_FREE'), +(21215, -1548020, 'You cannot kill me! Fools, I''ll be back! I''ll... aarghh...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11317, 1, 0, 0, 'leotheras SAY_DEATH'), +(21214, -1548021, 'Guards, attention! We have visitors...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11277, 1, 0, 0, 'karathress SAY_AGGRO'), +(21214, -1548022, 'Your overconfidence will be your undoing! Guards, lend me your strength!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11278, 1, 0, 0, 'karathress SAY_GAIN_BLESSING'), +(21214, -1548023, 'Go on, kill them! I''ll be the better for it!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11279, 1, 0, 0, 'karathress SAY_GAIN_ABILITY1'), +(21214, -1548024, 'I am more powerful than ever!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11280, 1, 0, 0, 'karathress SAY_GAIN_ABILITY2'), +(21214, -1548025, 'More knowledge, more power!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11281, 1, 0, 0, 'karathress SAY_GAIN_ABILITY3'), +(21214, -1548026, 'Land-dwelling scum!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11282, 1, 0, 0, 'karathress SAY_SLAY1'), +(21214, -1548027, 'Alana be''lendor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11283, 1, 0, 0, 'karathress SAY_SLAY2'), +(21214, -1548028, 'I am rid of you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11284, 1, 0, 0, 'karathress SAY_SLAY3'), +(21214, -1548029, 'Her ... excellency ... awaits!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11285, 1, 0, 0, 'karathress SAY_DEATH'), +(21213, -1548030, 'Flood of the deep, take you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11321, 1, 0, 0, 'morogrim SAY_AGGRO'), +(21213, -1548031, 'By the Tides, kill them at once!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11322, 1, 0, 0, 'morogrim SAY_SUMMON1'), +(21213, -1548032, 'Destroy them my subjects!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11323, 1, 0, 0, 'morogrim SAY_SUMMON2'), +(21213, -1548033, 'There is nowhere to hide!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11324, 1, 0, 0, 'morogrim SAY_SUMMON_BUBL1'), +(21213, -1548034, 'Soon it will be finished!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11325, 1, 0, 0, 'morogrim SAY_SUMMON_BUBL2'), +(21213, -1548035, 'It is done!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11326, 1, 0, 0, 'morogrim SAY_SLAY1'), +(21213, -1548036, 'Strugging only makes it worse.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11327, 1, 0, 0, 'morogrim SAY_SLAY2'), +(21213, -1548037, 'Only the strong survive.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11328, 1, 0, 0, 'morogrim SAY_SLAY3'), +(21213, -1548038, 'Great... currents of... Ageon.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11329, 1, 0, 0, 'morogrim SAY_DEATH'), +(21213, -1548039, 'sends his enemies to their watery graves!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'morogrim EMOTE_WATERY_GRAVE'), +(21213, -1548040, 'The violent earthquake has alerted nearby murlocs!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'morogrim EMOTE_EARTHQUAKE'), +(21213, -1548041, 'summons Watery Globules!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'morogrim EMOTE_WATERY_GLOBULES'), +(21212, -1548042, 'Water is life. It has become a rare commodity here in Outland. A commodity that we alone shall control. We are the Highborne, and the time has come at last for us to retake our rightful place in the world!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11531, 1, 0, 0, 'vashj SAY_INTRO'), +(21212, -1548043, 'I''ll split you from stem to stern!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11532, 1, 0, 0, 'vashj SAY_AGGRO1'), +(21212, -1548044, 'Victory to Lord Illidan!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11533, 1, 0, 0, 'vashj SAY_AGGRO2'), +(21212, -1548045, 'I spit on you, surface filth!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11534, 1, 0, 0, 'vashj SAY_AGGRO3'), +(21212, -1548046, 'Death to the outsiders!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11535, 1, 0, 0, 'vashj SAY_AGGRO4'), +(21212, -1548047, 'I did not wish to lower myself by engaging your kind, but you leave me little choice!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11538, 1, 0, 0, 'vashj SAY_PHASE1'), +(21212, -1548048, 'The time is now! Leave none standing!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11539, 1, 0, 0, 'vashj SAY_PHASE2'), +(21212, -1548049, 'You may want to take cover.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11540, 1, 0, 0, 'vashj SAY_PHASE3'), +(21212, -1548050, 'Straight to the heart!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11536, 1, 0, 0, 'vashj SAY_BOWSHOT1'), +(21212, -1548051, 'Seek your mark!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11537, 1, 0, 0, 'vashj SAY_BOWSHOT2'), +(21212, -1548052, 'Your time ends now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11541, 1, 0, 0, 'vashj SAY_SLAY1'), +(21212, -1548053, 'You have failed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11542, 1, 0, 0, 'vashj SAY_SLAY2'), +(21212, -1548054, 'Be''lamere an''delay', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11543, 1, 0, 0, 'vashj SAY_SLAY3'), +(21212, -1548055, 'Lord Illidan, I... I am... sorry.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11544, 1, 0, 0, 'vashj SAY_DEATH'), +(19516, -1550000, 'Alert, you are marked for extermination!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11213, 1, 0, 0, 'voidreaver SAY_AGGRO'), +(19516, -1550001, 'Extermination, successful.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11215, 1, 0, 0, 'voidreaver SAY_SLAY1'), +(19516, -1550002, 'Imbecile life form, no longer functional.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11216, 1, 0, 0, 'voidreaver SAY_SLAY2'), +(19516, -1550003, 'Threat neutralized.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11217, 1, 0, 0, 'voidreaver SAY_SLAY3'), +(19516, -1550004, 'Systems... shutting... down...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11214, 1, 0, 0, 'voidreaver SAY_DEATH'), +(19516, -1550005, 'Alternative measure commencing...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11218, 1, 0, 0, 'voidreaver SAY_POUNDING1'), +(19516, -1550006, 'Calculating force parameters...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11219, 1, 0, 0, 'voidreaver SAY_POUNDING2'), +(18805, -1550007, 'Tal anu''men no Sin''dorei!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11134, 1, 0, 0, 'solarian SAY_AGGRO'), +(18805, -1550008, 'Ha ha ha! You are hopelessly outmatched!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11139, 1, 0, 0, 'solarian SAY_SUMMON1'), +(18805, -1550009, 'I will crush your delusions of grandeur!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11140, 1, 0, 0, 'solarian SAY_SUMMON2'), +(18805, -1550010, 'Your soul belongs to the Abyss!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11136, 1, 0, 0, 'solarian SAY_KILL1'), +(18805, -1550011, 'By the blood of the Highborne!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11137, 1, 0, 0, 'solarian SAY_KILL2'), +(18805, -1550012, 'For the Sunwell!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11138, 1, 0, 0, 'solarian SAY_KILL3'), +(18805, -1550013, 'The warmth of the sun... awaits.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11135, 1, 0, 0, 'solarian SAY_DEATH'), +(18805, -1550014, 'Enough of this! Now I call upon the fury of the cosmos itself.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'solarian SAY_VOIDA'), +(18805, -1550015, 'I become ONE... with the VOID!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'solarian SAY_VOIDB'), +(19622, -1550016, 'Energy. Power. My people are addicted to it... a dependence made manifest after the Sunwell was destroyed. Welcome... to the future. A pity you are too late to stop it. No one can stop me now! Selama ashal''anore!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11256, 1, 0, 0, 'kaelthas SAY_INTRO'), +(19622, -1550017, 'Capernian will see to it that your stay here is a short one.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11257, 1, 0, 0, 'kaelthas SAY_INTRO_CAPERNIAN'), +(19622, -1550018, 'Well done, you have proven worthy to test your skills against my master engineer, Telonicus.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11258, 1, 0, 0, 'kaelthas SAY_INTRO_TELONICUS'), +(19622, -1550019, 'Let us see how your nerves hold up against the Darkener, Thaladred.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11259, 1, 0, 0, 'kaelthas SAY_INTRO_THALADRED'), +(19622, -1550020, 'You have persevered against some of my best advisors... but none can withstand the might of the Blood Hammer. Behold, Lord Sanguinar!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11260, 1, 0, 0, 'kaelthas SAY_INTRO_SANGUINAR'), +(19622, -1550021, 'As you see, I have many weapons in my arsenal...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11261, 1, 0, 0, 'kaelthas SAY_PHASE2_WEAPON'), +(19622, -1550022, 'Perhaps I underestimated you. It would be unfair to make you fight all four advisors at once, but... fair treatment was never shown to my people. I''m just returning the favor.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11262, 1, 0, 0, 'kaelthas SAY_PHASE3_ADVANCE'), +(19622, -1550023, 'Alas, sometimes one must take matters into one''s own hands. Balamore shanal!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11263, 1, 0, 0, 'kaelthas SAY_PHASE4_INTRO2'), +(19622, -1550024, 'I have not come this far to be stopped! The future I have planned will not be jeopardized! Now you will taste true power!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11273, 1, 0, 0, 'kaelthas SAY_PHASE5_NUTS'), +(19622, -1550025, 'You will not prevail.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11270, 1, 0, 0, 'kaelthas SAY_SLAY1'), +(19622, -1550026, 'You gambled...and lost.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11271, 1, 0, 0, 'kaelthas SAY_SLAY2'), +(19622, -1550027, 'This was Child''s play.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11272, 1, 0, 0, 'kaelthas SAY_SLAY3'), +(19622, -1550028, 'Obey me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11268, 1, 0, 0, 'kaelthas SAY_MINDCONTROL1'), +(19622, -1550029, 'Bow to my will.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11269, 1, 0, 0, 'kaelthas SAY_MINDCONTROL2'), +(19622, -1550030, 'Let us see how you fare when your world is turned upside down.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11264, 1, 0, 0, 'kaelthas SAY_GRAVITYLAPSE1'), +(19622, -1550031, 'Having trouble staying grounded?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11265, 1, 0, 0, 'kaelthas SAY_GRAVITYLAPSE2'), +(19622, -1550032, 'Anara''nel belore!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11267, 1, 0, 0, 'kaelthas SAY_SUMMON_PHOENIX1'), +(19622, -1550033, 'By the power of the sun!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11266, 1, 0, 0, 'kaelthas SAY_SUMMON_PHOENIX2'), +(19622, -1550034, 'For...Quel...thalas!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11274, 1, 0, 0, 'kaelthas SAY_DEATH'), +(20064, -1550035, 'Prepare yourselves!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11203, 1, 0, 0, 'thaladred SAY_THALADRED_AGGRO'), +(20064, -1550036, 'Forgive me, my prince! I have... failed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11204, 1, 0, 0, 'thaladred SAY_THALADRED_DEATH'), +(20064, -1550037, 'sets his gaze on $N!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'thaladred EMOTE_THALADRED_GAZE'), +(20060, -1550038, 'Blood for blood!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11152, 1, 0, 0, 'sanguinar SAY_SANGUINAR_AGGRO'), +(20060, -1550039, 'NO! I ...will... not...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11153, 1, 0, 0, 'sanguinar SAY_SANGUINAR_DEATH'), +(20062, -1550040, 'The sin''dore reign supreme!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11117, 1, 0, 0, 'capernian SAY_CAPERNIAN_AGGRO'), +(20062, -1550041, 'This is not over!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11118, 1, 0, 0, 'capernian SAY_CAPERNIAN_DEATH'), +(20063, -1550042, 'Anar''alah belore!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11157, 1, 0, 0, 'telonicus SAY_TELONICUS_AGGRO'), +(20063, -1550043, 'More perils... await', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11158, 1, 0, 0, 'telonicus SAY_TELONICUS_DEATH'), +(20912, -1552000, 'It is a small matter to control the mind of the weak... for I bear allegiance to powers untouched by time, unmoved by fate. No force on this world or beyond harbors the strength to bend our knee... not even the mighty Legion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11122, 1, 0, 0, 'skyriss SAY_INTRO'), +(20912, -1552001, 'Bear witness to the agent of your demise!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11123, 1, 0, 0, 'skyriss SAY_AGGRO'), +(20912, -1552002, 'Your fate is written!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11124, 1, 0, 0, 'skyriss SAY_KILL_1'), +(20912, -1552003, 'The chaos I have sown here is but a taste...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11125, 1, 0, 0, 'skyriss SAY_KILL_2'), +(20912, -1552004, 'You will do my bidding, weakling.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11127, 1, 0, 0, 'skyriss SAY_MIND_1'), +(20912, -1552005, 'Your will is no longer your own.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11128, 1, 0, 0, 'skyriss SAY_MIND_2'), +(20912, -1552006, 'Flee in terror!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11129, 1, 0, 0, 'skyriss SAY_FEAR_1'), +(20912, -1552007, 'I will show you horrors undreamed of!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11130, 1, 0, 0, 'skyriss SAY_FEAR_2'), +(20912, -1552008, 'We span the universe, as countless as the stars!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11131, 1, 0, 0, 'skyriss SAY_IMAGE'), +(20912, -1552009, 'I am merely one of... infinite multitudes.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11126, 1, 0, 0, 'skyriss SAY_DEATH'), +(20977, -1552010, 'Where in Bonzo''s brass buttons am I? And who are-- yaaghh, that''s one mother of a headache!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11171, 1, 0, 0, 'millhouse SAY_INTRO_1'), +(20977, -1552011, '"Lowly"? I don''t care who you are friend, no one refers to the mighty Millhouse Manastorm as "Lowly"! I have no idea what goes on here, but I will gladly join your fight against this impudent imbecile! Prepare to defend yourself, cretin!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11172, 1, 0, 0, 'millhouse SAY_INTRO_2'), +(20977, -1552012, 'I just need to get some things ready first. You guys go ahead and get started. I need to summon up some water...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11173, 1, 0, 0, 'millhouse SAY_WATER'), +(20977, -1552013, 'Fantastic! Next, some protective spells. Yes! Now we''re cookin''', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11174, 1, 0, 0, 'millhouse SAY_BUFFS'), +(20977, -1552014, 'And of course i''ll need some mana. You guys are gonna love this, just wait.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11175, 1, 0, 0, 'millhouse SAY_DRINK'), +(20977, -1552015, 'Aaalllriiiight!! Who ordered up an extra large can of whoop-ass?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11176, 1, 0, 0, 'millhouse SAY_READY'), +(20977, -1552016, 'I didn''t even break a sweat on that one.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11177, 1, 0, 0, 'millhouse SAY_KILL_1'), +(20977, -1552017, 'You guys, feel free to jump in anytime.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11178, 1, 0, 0, 'millhouse SAY_KILL_2'), +(20977, -1552018, 'I''m gonna light you up, sweet cheeks!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11179, 1, 0, 0, 'millhouse SAY_PYRO'), +(20977, -1552019, 'Ice, ice, baby!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11180, 1, 0, 0, 'millhouse SAY_ICEBLOCK'), +(20977, -1552020, 'Heal me! Oh, for the love of all that is holy, HEAL me! I''m dying!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11181, 1, 0, 0, 'millhouse SAY_LOWHP'), +(20977, -1552021, 'You''ll be hearing from my lawyer...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11182, 1, 0, 0, 'millhouse SAY_DEATH'), +(20977, -1552022, 'Who''s bad? Who''s bad? That''s right: we bad!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11183, 1, 0, 0, 'millhouse SAY_COMPLETE'), +(20904, -1552023, 'I knew the prince would be angry but, I... I have not been myself. I had to let them out! The great one speaks to me, you see. Wait--outsiders. Kael''thas did not send you! Good... I''ll just tell the prince you released the prisoners!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11222, 1, 0, 0, 'mellichar YELL_INTRO1'), +(20904, -1552024, 'The naaru kept some of the most dangerous beings in existence here in these cells. Let me introduce you to another...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11223, 1, 0, 0, 'mellichar YELL_INTRO2'), +(20904, -1552025, 'Yes, yes... another! Your will is mine!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11224, 1, 0, 0, 'mellichar YELL_RELEASE1'), +(20904, -1552026, 'Behold another terrifying creature of incomprehensible power!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11225, 1, 0, 0, 'mellichar YELL_RELEASE2A'), +(20904, -1552027, 'What is this? A lowly gnome? I will do better, O''great one.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11226, 1, 0, 0, 'mellichar YELL_RELEASE2B'), +(20904, -1552028, 'Anarchy! Bedlam! Oh, you are so wise! Yes, I see it now, of course!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11227, 1, 0, 0, 'mellichar YELL_RELEASE3'), +(20904, -1552029, 'One final cell remains. Yes, O''great one, right away!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11228, 1, 0, 0, 'mellichar YELL_RELEASE4'), +(20904, -1552030, 'Welcome, O''great one. I am your humble servant.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11229, 1, 0, 0, 'mellichar YELL_WELCOME'), +(17975, -1553000, 'What are you doing? These specimens are very delicate!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11144, 1, 0, 0, 'freywinn SAY_AGGRO'), +(17975, -1553001, 'Your life cycle is now concluded!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11145, 1, 0, 0, 'freywinn SAY_KILL_1'), +(17975, -1553002, 'You will feed the worms.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11146, 1, 0, 0, 'freywinn SAY_KILL_2'), +(17975, -1553003, 'Endorel aluminor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11147, 1, 0, 0, 'freywinn SAY_TREE_1'), +(17975, -1553004, 'Nature bends to my will!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11148, 1, 0, 0, 'freywinn SAY_TREE_2'), +(17975, -1553005, 'The specimens...must be preserved.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11149, 1, 0, 0, 'freywinn SAY_DEATH'), +(17980, -1553006, 'emits a strange noise.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'laj EMOTE_SUMMON'), +(17977, -1553007, 'Who disturbs this sanctuary?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11230, 1, 0, 0, 'warp SAY_AGGRO'), +(17977, -1553008, 'You must die! But wait: this does not-- No, no... you must die!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11231, 1, 0, 0, 'warp SAY_SLAY_1'), +(17977, -1553009, 'What am I doing? Why do I...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11232, 1, 0, 0, 'warp SAY_SLAY_2'), +(17977, -1553010, 'Children, come to me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11233, 1, 0, 0, 'warp SAY_SUMMON_1'), +(17977, -1553011, 'Maybe this is not-- No, we fight! Come to my aid.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11234, 1, 0, 0, 'warp SAY_SUMMON_2'), +(17977, -1553012, 'So... confused. Do not... belong here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11235, 1, 0, 0, 'warp SAY_DEATH'), +(0, -1554000, 'I predict a painful death.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11101, 1, 0, 0, 'gyro SAY_AGGRO'), +(0, -1554001, 'Measure twice; cut once!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11104, 1, 0, 0, 'gyro SAY_SAW_ATTACK1'), +(0, -1554002, 'If my division is correct, you should be quite dead.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11105, 1, 0, 0, 'gyro SAY_SAW_ATTACK2'), +(0, -1554003, 'Your strategy was flawed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11102, 1, 0, 0, 'gyro SAY_SLAY1'), +(0, -1554004, 'Yes, the only logical outcome.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11103, 1, 0, 0, 'gyro SAY_SLAY2'), +(0, -1554005, 'An unforseen... contingency', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11106, 1, 0, 0, 'gyro SAY_DEATH'), +(19710, -1554006, 'You have approximately five seconds to live.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11109, 1, 0, 0, 'ironhand SAY_AGGRO_1'), +(19710, -1554007, 'With the precise angle and velocity...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11112, 1, 0, 0, 'ironhand SAY_HAMMER_1'), +(19710, -1554008, 'Low tech yet quiet effective!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11113, 1, 0, 0, 'ironhand SAY_HAMMER_2'), +(19710, -1554009, 'A foregone conclusion.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11110, 1, 0, 0, 'ironhand SAY_SLAY_1'), +(19710, -1554010, 'The processing will continue a schedule!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11111, 1, 0, 0, 'ironhand SAY_SLAY_2'), +(19710, -1554011, 'My calculations did not...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11114, 1, 0, 0, 'ironhand SAY_DEATH_1'), +(19710, -1554012, 'raises his hammer menacingly...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'ironhand EMOTE_HAMMER'), +(19221, -1554013, 'Don''t value your life very much, do you?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11186, 1, 0, 0, 'sepethrea SAY_AGGRO'), +(19221, -1554014, 'I am not alone.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11191, 1, 0, 0, 'sepethrea SAY_SUMMON'), +(19221, -1554015, 'Think you can take the heat?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11189, 1, 0, 0, 'sepethrea SAY_DRAGONS_BREATH_1'), +(19221, -1554016, 'Anar''endal dracon!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11190, 1, 0, 0, 'sepethrea SAY_DRAGONS_BREATH_2'), +(19221, -1554017, 'And don''t come back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11187, 1, 0, 0, 'sepethrea SAY_SLAY1'), +(19221, -1554018, 'En''dala finel el''dal', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11188, 1, 0, 0, 'sepethrea SAY_SLAY2'), +(19221, -1554019, 'Anu... bala belore...alon.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11192, 1, 0, 0, 'sepethrea SAY_DEATH'), +(19220, -1554020, 'We are on a strict timetable. You will not interfere!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11193, 1, 0, 0, 'pathaleon SAY_AGGRO'), +(19220, -1554021, 'I''m looking for a team player...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11197, 1, 0, 0, 'pathaleon SAY_DOMINATION_1'), +(19220, -1554022, 'You work for me now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11198, 1, 0, 0, 'pathaleon SAY_DOMINATION_2'), +(19220, -1554023, 'Time to supplement my work force.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11196, 1, 0, 0, 'pathaleon SAY_SUMMON'), +(19220, -1554024, 'I prefeer to be hands-on...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11199, 1, 0, 0, 'pathaleon SAY_ENRAGE'), +(19220, -1554025, 'A minor inconvenience.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11194, 1, 0, 0, 'pathaleon SAY_SLAY_1'), +(19220, -1554026, 'Looks like you lose.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11195, 1, 0, 0, 'pathaleon SAY_SLAY_2'), +(19220, -1554027, 'The project will... continue.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11200, 1, 0, 0, 'pathaleon SAY_DEATH'), +(18731, -1555000, 'Infidels have invaded the sanctuary! Sniveling pests...You have yet to learn the true meaning of agony!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10473, 1, 0, 0, 'hellmaw SAY_INTRO'), +(18731, -1555001, 'Pathetic mortals! You will pay dearly!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10475, 1, 0, 0, 'hellmaw SAY_AGGRO1'), +(18731, -1555002, 'I will break you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10476, 1, 0, 0, 'hellmaw SAY_AGGRO2'), +(18731, -1555003, 'Finally! Something to relieve the tedium!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10477, 1, 0, 0, 'hellmaw SAY_AGGRO3'), +(18731, -1555004, 'Aid me, you fools, before it''s too late!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10474, 1, 0, 0, 'hellmaw SAY_HELP'), +(18731, -1555005, 'Do you fear death?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10478, 1, 0, 0, 'hellmaw SAY_SLAY1'), +(18731, -1555006, 'This is the part I enjoy most.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10479, 1, 0, 0, 'hellmaw SAY_SLAY2'), +(18731, -1555007, 'Do not...grow...overconfident, mortal.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10480, 1, 0, 0, 'hellmaw SAY_DEATH'), +(0, -1555008, 'All flesh must burn.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10482, 1, 0, 0, 'blackhearth SAY_INTRO1'), +(0, -1555009, 'All creation must be unmade!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10483, 1, 0, 0, 'blackhearth SAY_INTRO2'), +(0, -1555010, 'Power will be yours!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10484, 1, 0, 0, 'blackhearth SAY_INTRO3'), +(18667, -1555011, 'You''ll be sorry!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10486, 1, 0, 0, 'blackhearth SAY_AGGRO1'), +(18667, -1555012, 'Time for fun!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10487, 1, 0, 0, 'blackhearth SAY_AGGRO2'), +(18667, -1555013, 'I see dead people!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10488, 1, 0, 0, 'blackhearth SAY_AGGRO3'), +(18667, -1555014, 'No comin'' back for you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10489, 1, 0, 0, 'blackhearth SAY_SLAY1'), +(18667, -1555015, 'Nice try!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10490, 1, 0, 0, 'blackhearth SAY_SLAY2'), +(0, -1555016, 'Help us, hurry!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10485, 1, 0, 0, 'blackhearth SAY_HELP'), +(18667, -1555017, 'This... no... good...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10491, 1, 0, 0, 'blackhearth SAY_DEATH'), +(0, -1555018, 'Be ready for Dark One''s return.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10492, 1, 0, 0, 'blackhearth SAY2_INTRO1'), +(0, -1555019, 'So we have place in new universe.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10493, 1, 0, 0, 'blackhearth SAY2_INTRO2'), +(0, -1555020, 'Dark one promise!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10494, 1, 0, 0, 'blackhearth SAY2_INTRO3'), +(0, -1555021, 'You''ll be sorry!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10496, 1, 0, 0, 'blackhearth SAY2_AGGRO1'), +(0, -1555022, 'Time to kill!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10497, 1, 0, 0, 'blackhearth SAY2_AGGRO2'), +(0, -1555023, 'You be dead people!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10498, 1, 0, 0, 'blackhearth SAY2_AGGRO3'), +(0, -1555024, 'Now you gone for good.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10499, 1, 0, 0, 'blackhearth SAY2_SLAY1'), +(0, -1555025, 'You failed, haha haha', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10500, 1, 0, 0, 'blackhearth SAY2_SLAY2'), +(0, -1555026, 'Help us, hurry!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10495, 1, 0, 0, 'blackhearth SAY2_HELP'), +(0, -1555027, 'Arrgh, aah...ahhh', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10501, 1, 0, 0, 'blackhearth SAY2_DEATH'), +(18732, -1555028, 'Keep your minds focused for the days of reckoning are close at hand. Soon, the destroyer of worlds will return to make good on his promise. Soon the destruction of all that is will begin!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10522, 1, 0, 0, 'vorpil SAY_INTRO'), +(18732, -1555029, 'I''ll make an offering of your blood!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10524, 1, 0, 0, 'vorpil SAY_AGGRO1'), +(18732, -1555030, 'You''ll be a fine example, for the others.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10525, 1, 0, 0, 'vorpil SAY_AGGRO2'), +(18732, -1555031, 'Good, a worthy sacrifice.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10526, 1, 0, 0, 'vorpil SAY_AGGRO3'), +(18732, -1555032, 'Come to my aid, heed your master now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10523, 1, 0, 0, 'vorpil SAY_HELP'), +(18732, -1555033, 'I serve with pride.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10527, 1, 0, 0, 'vorpil SAY_SLAY1'), +(18732, -1555034, 'Your death is for the greater cause!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10528, 1, 0, 0, 'vorpil SAY_SLAY2'), +(18732, -1555035, 'I give my life... Gladly.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10529, 1, 0, 0, 'vorpil SAY_DEATH'), +(18708, -1555036, 'draws energy from the air.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'murmur EMOTE_SONIC_BOOM'), +(18472, -1556000, 'I have pets..<squawk>..of my own!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10502, 1, 0, 0, 'syth SAY_SUMMON'), +(18472, -1556001, 'Hrrmm.. Time to.. hrrm.. make my move.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10503, 1, 0, 0, 'syth SAY_AGGRO_1'), +(18472, -1556002, 'Nice pets..hrm.. Yes! <squawking>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10504, 1, 0, 0, 'syth SAY_AGGRO_2'), +(18472, -1556003, 'Nice pets have.. weapons. Not so..<squawk>..nice.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10505, 1, 0, 0, 'syth SAY_AGGRO_3'), +(18472, -1556004, 'Death.. meeting life is.. <squawking>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10506, 1, 0, 0, 'syth SAY_SLAY_1'), +(18472, -1556005, 'Uhn.. Be free..<squawk>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10507, 1, 0, 0, 'syth SAY_SLAY_2'), +(18472, -1556006, 'No more life..hrm. No more pain. <squawks weakly>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10508, 1, 0, 0, 'syth SAY_DEATH'), +(18473, -1556007, '<squawk>..Trinkets yes pretty Trinkets..<squawk>..power, great power. <squawk>..power in Trinkets..<squawk>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10557, 1, 0, 0, 'ikiss SAY_INTRO'), +(18473, -1556008, 'You make war on Ikiss?..<squawk>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10554, 1, 0, 0, 'ikiss SAY_AGGRO_1'), +(18473, -1556009, 'Ikiss cut you pretty..<squawk>..slice you. Yes!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10555, 1, 0, 0, 'ikiss SAY_AGGRO_2'), +(18473, -1556010, 'No escape for..<squawk>..for you', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10556, 1, 0, 0, 'ikiss SAY_AGGRO_3'), +(18473, -1556011, 'You die..<squawk>..stay away from Trinkets', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10558, 1, 0, 0, 'ikiss SAY_SLAY_1'), +(18473, -1556012, '<squawk>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10559, 1, 0, 0, 'ikiss SAY_SLAY_2'), +(18473, -1556013, 'Ikiss will not..<squawk>..die', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10560, 1, 0, 0, 'ikiss SAY_DEATH'), +(18473, -1556015, 'begins to channel arcane energy...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'ikiss EMOTE_ARCANE_EXP'), +(18344, -1557000, 'What is this? You must forgive me, but I was not expecting company. As you can see, we are somewhat preoccupied right now. But no matter. As I am a gracious host, I will tend to you... personally.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10539, 1, 0, 0, 'shaffar SAY_INTRO'), +(18344, -1557001, 'We have not yet been properly introduced.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10541, 1, 0, 0, 'shaffar SAY_AGGRO_1'), +(18344, -1557002, 'An epic battle. How exciting!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10542, 1, 0, 0, 'shaffar SAY_AGGRO_2'), +(18344, -1557003, 'I have longed for a good adventure.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10543, 1, 0, 0, 'shaffar SAY_AGGRO_3'), +(18344, -1557004, 'It has been... entertaining.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10544, 1, 0, 0, 'shaffar SAY_SLAY_1'), +(18344, -1557005, 'And now we part company.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10545, 1, 0, 0, 'shaffar SAY_SLAY_2'), +(18344, -1557006, 'I have such fascinating things to show you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10540, 1, 0, 0, 'shaffar SAY_SUMMON'), +(18344, -1557007, 'I must bid you... farewell.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10546, 1, 0, 0, 'shaffar SAY_DEAD'), +(18341, -1557008, 'I will feed on your soul.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10561, 1, 0, 0, 'pandemonius SAY_AGGRO_1'), +(18341, -1557009, 'So... full of life!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10562, 1, 0, 0, 'pandemonius SAY_AGGRO_2'), +(18341, -1557010, 'Do not... resist.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10563, 1, 0, 0, 'pandemonius SAY_AGGRO_3'), +(18341, -1557011, 'Yes! I am... empowered!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10564, 1, 0, 0, 'pandemonius SAY_KILL_1'), +(18341, -1557012, 'More... I must have more!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10565, 1, 0, 0, 'pandemonius SAY_KILL_2'), +(18341, -1557013, 'To the void... once... more..', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10566, 1, 0, 0, 'pandemonius SAY_DEATH'), +(18341, -1557014, 'shifts into the void...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'pandemonius EMOTE_DARK_SHELL'), +(18373, -1558000, 'You have defiled the resting place of our ancestors. For this offense, there can be but one punishment. It is fitting that you have come to a place of the dead... for you will soon be joining them.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10509, 1, 0, 0, 'maladaar SAY_INTRO'), +(18373, -1558001, 'Rise my fallen brothers. Take form and fight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10512, 1, 0, 0, 'maladaar SAY_SUMMON'), +(18373, -1558002, 'You will pay with your life!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10513, 1, 0, 0, 'maladaar SAY_AGGRO_1'), +(18373, -1558003, 'There''s no turning back now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10514, 1, 0, 0, 'maladaar SAY_AGGRO_2'), +(18373, -1558004, 'Serve your penitence!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10515, 1, 0, 0, 'maladaar SAY_AGGRO_3'), +(18373, -1558005, 'Let your mind be clouded.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10510, 1, 0, 0, 'maladaar SAY_ROAR'), +(18373, -1558006, 'Stare into the darkness of your soul.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10511, 1, 0, 0, 'maladaar SAY_SOUL_CLEAVE'), +(18373, -1558007, 'These walls will be your doom.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10516, 1, 0, 0, 'maladaar SAY_SLAY_1'), +(18373, -1558008, '<laugh> Now, you''ll stay for eternity!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10517, 1, 0, 0, 'maladaar SAY_SLAY_2'), +(18373, -1558009, 'This is... where.. I belong...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10518, 1, 0, 0, 'maladaar SAY_DEATH'), +(17862, -1560000, 'Thrall! You didn''t really think you would escape did you? You and your allies shall answer to Blackmoore - after I''ve had my fun!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10406, 1, 0, 0, 'skarloc SAY_ENTER'), +(17862, -1560001, 'You''re a slave. That''s all you''ll ever be.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10407, 1, 0, 0, 'skarloc SAY_TAUNT1'), +(17862, -1560002, 'I don''t know what Blackmoore sees in you. For my money, you''re just another ignorant savage!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10408, 1, 0, 0, 'skarloc SAY_TAUNT2'), +(17862, -1560003, 'Thrall will never be free!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10409, 1, 0, 0, 'skarloc SAY_SLAY1'), +(17862, -1560004, 'Did you really think you would leave here alive?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10410, 1, 0, 0, 'skarloc SAY_SLAY2'), +(17862, -1560005, 'Guards! Urgh..Guards..!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10411, 1, 0, 0, 'skarloc SAY_DEATH'), +(17848, -1560006, 'You there, fetch water quickly! Get these flames out before they spread to the rest of the keep! Hurry, damn you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10428, 1, 0, 0, 'lieutenant_drake SAY_ENTER'), +(17848, -1560007, 'I know what you''re up to, and I mean to put an end to it, permanently!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10429, 1, 0, 0, 'lieutenant_drake SAY_AGGRO'), +(17848, -1560008, 'No more middling for you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10432, 1, 0, 0, 'lieutenant_drake SAY_SLAY1'); +INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +(17848, -1560009, 'You will not interfere!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10433, 1, 0, 0, 'lieutenant_drake SAY_SLAY2'), +(17848, -1560010, 'Time to bleed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10430, 1, 0, 0, 'lieutenant_drake SAY_MORTAL'), +(17848, -1560011, 'Run, you blasted cowards!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10431, 1, 0, 0, 'lieutenant_drake SAY_SHOUT'), +(17848, -1560012, 'Thrall... must not... go free.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10434, 1, 0, 0, 'lieutenant_drake SAY_DEATH'), +(18096, -1560013, 'Thrall! Come outside and face your fate!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10418, 1, 0, 0, 'epoch_hunter SAY_ENTER1'), +(18096, -1560014, 'Taretha''s life hangs in the balance. Surely you care for her. Surely you wish to save her...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10419, 1, 0, 0, 'epoch_hunter SAY_ENTER2'), +(18096, -1560015, 'Ah, there you are. I had hoped to accomplish this with a bit of subtlety, but I suppose direct confrontation was inevitable. Your future, Thrall, must not come to pass and so...you and your troublesome friends must die!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10420, 1, 0, 0, 'epoch_hunter SAY_ENTER3'), +(18096, -1560016, 'Enough! I will erase your very existence!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10421, 1, 0, 0, 'epoch_hunter SAY_AGGRO1'), +(18096, -1560017, 'You cannot fight fate!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10422, 1, 0, 0, 'epoch_hunter SAY_AGGRO2'), +(18096, -1560018, 'You are...irrelevant.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10425, 1, 0, 0, 'epoch_hunter SAY_SLAY1'), +(18096, -1560019, 'Thrall will remain a slave. Taretha will die. You have failed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10426, 1, 0, 0, 'epoch_hunter SAY_SLAY2'), +(18096, -1560020, 'Not so fast!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10423, 1, 0, 0, 'epoch_hunter SAY_BREATH1'), +(18096, -1560021, 'Struggle as much as you like!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10424, 1, 0, 0, 'epoch_hunter SAY_BREATH2'), +(18096, -1560022, 'No!...The master... will not... be pleased.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10427, 1, 0, 0, 'epoch_hunter SAY_DEATH'), +(17876, -1560023, 'Very well then. Let''s go!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10465, 1, 0, 0, 'thrall hillsbrad SAY_TH_START_EVENT_PART1'), +(17876, -1560024, 'As long as we''re going with a new plan, I may aswell pick up a weapon and some armor.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'thrall hillsbrad SAY_TH_ARMORY'), +(17876, -1560025, 'A rider approaches!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10466, 0, 0, 0, 'thrall hillsbrad SAY_TH_SKARLOC_MEET'), +(17876, -1560026, 'I''ll never be chained again!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10467, 1, 0, 0, 'thrall hillsbrad SAY_TH_SKARLOC_TAUNT'), +(17876, -1560027, 'Very well. Tarren Mill lies just west of here. Since time is of the essence...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10468, 1, 0, 0, 'thrall hillsbrad SAY_TH_START_EVENT_PART2'), +(17876, -1560028, 'Let''s ride!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10469, 0, 0, 1, 'thrall hillsbrad SAY_TH_MOUNTS_UP'), +(17876, -1560029, 'Taretha must be in the inn. Let''s go.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'thrall hillsbrad SAY_TH_CHURCH_END'), +(17876, -1560030, 'Taretha! What foul magic is this?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'thrall hillsbrad SAY_TH_MEET_TARETHA'), +(17876, -1560031, 'Who or what was that?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10470, 1, 0, 1, 'thrall hillsbrad SAY_TH_EPOCH_WONDER'), +(17876, -1560032, 'No!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10471, 1, 0, 5, 'thrall hillsbrad SAY_TH_EPOCH_KILL_TARETHA'), +(17876, -1560033, 'Goodbye, Taretha. I will never forget your kindness.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10472, 1, 0, 0, 'thrall hillsbrad SAY_TH_EVENT_COMPLETE'), +(17876, -1560034, 'Things are looking grim...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10458, 1, 0, 0, 'thrall hillsbrad SAY_TH_RANDOM_LOW_HP1'), +(17876, -1560035, 'I will fight to the last!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10459, 1, 0, 0, 'thrall hillsbrad SAY_TH_RANDOM_LOW_HP2'), +(17876, -1560036, 'Taretha...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10460, 1, 0, 0, 'thrall hillsbrad SAY_TH_RANDOM_DIE1'), +(17876, -1560037, 'A good day...to die...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10461, 1, 0, 0, 'thrall hillsbrad SAY_TH_RANDOM_DIE2'), +(17876, -1560038, 'I have earned my freedom!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10448, 1, 0, 0, 'thrall hillsbrad SAY_TH_RANDOM_AGGRO1'), +(17876, -1560039, 'This day is long overdue. Out of my way!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10449, 1, 0, 0, 'thrall hillsbrad SAY_TH_RANDOM_AGGRO2'), +(17876, -1560040, 'I am a slave no longer!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10450, 1, 0, 0, 'thrall hillsbrad SAY_TH_RANDOM_AGGRO3'), +(17876, -1560041, 'Blackmoore has much to answer for!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10451, 1, 0, 0, 'thrall hillsbrad SAY_TH_RANDOM_AGGRO4'), +(17876, -1560042, 'You have forced my hand!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10452, 1, 0, 0, 'thrall hillsbrad SAY_TH_RANDOM_KILL1'), +(17876, -1560043, 'It should not have come to this!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10453, 1, 0, 0, 'thrall hillsbrad SAY_TH_RANDOM_KILL2'), +(17876, -1560044, 'I did not ask for this!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10454, 1, 0, 0, 'thrall hillsbrad SAY_TH_RANDOM_KILL3'), +(17876, -1560045, 'I am truly in your debt, strangers.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10455, 1, 0, 0, 'thrall hillsbrad SAY_TH_LEAVE_COMBAT1'), +(17876, -1560046, 'Thank you, strangers. You have given me hope.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10456, 1, 0, 0, 'thrall hillsbrad SAY_TH_LEAVE_COMBAT2'), +(17876, -1560047, 'I will not waste this chance. I will seek out my destiny.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10457, 1, 0, 0, 'thrall hillsbrad SAY_TH_LEAVE_COMBAT3'), +(18887, -1560048, 'I''m free! Thank you all!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'taretha SAY_TA_FREE'), +(18887, -1560049, 'Thrall, you escaped!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'taretha SAY_TA_ESCAPED'), +(22887, -1564000, 'You will die in the name of Lady Vashj!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11450, 1, 0, 0, 'SAY_AGGRO'), +(22887, -1564001, 'Stick around!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11451, 1, 0, 0, 'SAY_NEEDLE1'), +(22887, -1564002, 'I''ll deal with you later!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11452, 1, 0, 0, 'SAY_NEEDLE2'), +(22887, -1564003, 'Your success was short lived!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11455, 1, 0, 0, 'SAY_SLAY1'), +(22887, -1564004, 'Time for you to go!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11456, 1, 0, 0, 'SAY_SLAY2'), +(22887, -1564005, 'Bel''anen dal''lorei!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11453, 1, 0, 0, 'SAY_SPECIAL1'), +(22887, -1564006, 'Blood will flow!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11454, 1, 0, 0, 'SAY_SPECIAL2'), +(22887, -1564007, 'Bal''amer ch''itah!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11457, 1, 0, 0, 'SAY_ENRAGE1'), +(22887, -1564008, 'My patience has ran out! Die, DIE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11458, 1, 0, 0, 'SAY_ENRAGE2'), +(22887, -1564009, 'Lord Illidan will... crush you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11459, 1, 0, 0, 'SAY_DEATH'), +(22898, -1564010, '%s acquires a new target!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'supremus EMOTE_NEW_TARGET'), +(22898, -1564011, '%s punches the ground in anger!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'supremus EMOTE_PUNCH_GROUND'), +(22898, -1564012, 'The ground begins to crack open!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'supremus EMOTE_GROUND_CRACK'), +(22990, -1564013, 'No! Not yet...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11385, 1, 0, 0, 'akama shade SAY_LOW_HEALTH'), +(22990, -1564014, 'I will not last much longer...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11386, 1, 0, 0, 'akama shade SAY_DEATH'), +(22990, -1564015, 'Come out from the shadows! I''ve returned to lead you against our true enemy! Shed your chains and raise your weapons against your Illidari masters!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'akama shade SAY_FREE'), +(22990, -1564016, 'Hail our leader! Hail Akama!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'akama shade broken SAY_BROKEN_FREE_01'), +(22990, -1564017, 'Hail Akama!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'akama shade broken SAY_BROKEN_FREE_02'), +(22947, -1564018, 'You play, you pay.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11501, 1, 0, 0, 'shahraz SAY_TAUNT1'), +(22947, -1564019, 'I''m not impressed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11502, 1, 0, 0, 'shahraz SAY_TAUNT2'), +(22947, -1564020, 'Enjoying yourselves?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11503, 1, 0, 0, 'shahraz SAY_TAUNT3'), +(22947, -1564021, 'So... business or pleasure?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11504, 1, 0, 0, 'shahraz SAY_AGGRO'), +(22947, -1564022, 'You seem a little tense.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11505, 1, 0, 0, 'shahraz SAY_SPELL1'), +(22947, -1564023, 'Don''t be shy.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11506, 1, 0, 0, 'shahraz SAY_SPELL2'), +(22947, -1564024, 'I''m all... yours.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11507, 1, 0, 0, 'shahraz SAY_SPELL3'), +(22947, -1564025, 'Easy come, easy go.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11508, 1, 0, 0, 'shahraz SAY_SLAY1'), +(22947, -1564026, 'So much for a happy ending.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11509, 1, 0, 0, 'shahraz SAY_SLAY2'), +(22947, -1564027, 'Stop toying with my emotions!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11510, 1, 0, 0, 'shahraz SAY_ENRAGE'), +(22947, -1564028, 'I wasn''t... finished.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11511, 1, 0, 0, 'shahraz SAY_DEATH'), +(22948, -1564029, 'Horde will... crush you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11432, 1, 0, 0, 'bloodboil SOUND_AGGRO'), +(22948, -1564030, 'Time to feast!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11433, 1, 0, 0, 'bloodboil SAY_SLAY1'), +(22948, -1564031, 'More! I want more!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11434, 1, 0, 0, 'bloodboil SAY_SLAY2'), +(22948, -1564032, 'Drink your blood! Eat your flesh!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11435, 1, 0, 0, 'bloodboil SAY_SPECIAL1'), +(22948, -1564033, 'I hunger!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11436, 1, 0, 0, 'bloodboil SAY_SPECIAL2'), +(22948, -1564034, '<babbling>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11437, 1, 0, 0, 'bloodboil SAY_ENRAGE1'), +(22948, -1564035, 'I''ll rip the meat from your bones!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11438, 1, 0, 0, 'bloodboil SAY_ENRAGE2'), +(22948, -1564036, 'Aaaahrg...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11439, 1, 0, 0, 'bloodboil SAY_DEATH'), +(22871, -1564037, 'I was the first, you know. For me, the wheel of death has spun many times. <laughs> So much time has passed. I have a lot of catching up to do...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11512, 1, 0, 0, 'teron SAY_INTRO'), +(22871, -1564038, 'Vengeance is mine!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11513, 1, 0, 0, 'teron SAY_AGGRO'), +(22871, -1564039, 'I have use for you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11514, 1, 0, 0, 'teron SAY_SLAY1'), +(22871, -1564040, 'It gets worse...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11515, 1, 0, 0, 'teron SAY_SLAY2'), +(22871, -1564041, 'What are you afraid of?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11517, 1, 0, 0, 'teron SAY_SPELL1'), +(22871, -1564042, 'Death... really isn''t so bad.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11516, 1, 0, 0, 'teron SAY_SPELL2'), +(22871, -1564043, 'Give in!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11518, 1, 0, 0, 'teron SAY_SPECIAL1'), +(22871, -1564044, 'I have something for you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11519, 1, 0, 0, 'teron SAY_SPECIAL2'), +(22871, -1564045, 'YOU WILL SHOW THE PROPER RESPECT!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11520, 1, 0, 0, 'teron SAY_ENRAGE'), +(22871, -1564046, 'The wheel...spins...again....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11521, 1, 0, 0, 'teron SAY_DEATH'), +(23418, -1564047, 'Pain and suffering are all that await you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11415, 1, 0, 0, 'essence SUFF_SAY_FREED'), +(23418, -1564048, 'Don''t leave me alone!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11416, 1, 0, 0, 'essence SUFF_SAY_AGGRO'), +(23418, -1564049, 'Look at what you make me do!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11417, 1, 0, 0, 'essence SUFF_SAY_SLAY1'), +(23418, -1564050, 'I didn''t ask for this!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11418, 1, 0, 0, 'essence SUFF_SAY_SLAY2'), +(23418, -1564051, 'The pain is only beginning!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11419, 1, 0, 0, 'essence SUFF_SAY_SLAY3'), +(23418, -1564052, 'I don''t want to go back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11420, 1, 0, 0, 'essence SUFF_SAY_RECAP'), +(23418, -1564053, 'Now what do I do?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11421, 1, 0, 0, 'essence SUFF_SAY_AFTER'), +(23418, -1564054, '%s becomes enraged!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'essence SUFF_EMOTE_ENRAGE'), +(23419, -1564055, 'You can have anything you desire... for a price.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11408, 1, 0, 0, 'essence DESI_SAY_FREED'), +(23419, -1564056, 'Fulfilment is at hand!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11409, 1, 0, 0, 'essence DESI_SAY_SLAY1'), +(23419, -1564057, 'Yes... you''ll stay with us now...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11410, 1, 0, 0, 'essence DESI_SAY_SLAY2'), +(23419, -1564058, 'Your reach exceeds your grasp.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11412, 1, 0, 0, 'essence DESI_SAY_SLAY3'), +(23419, -1564059, 'Be careful what you wish for...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11411, 1, 0, 0, 'essence DESI_SAY_SPEC'), +(23419, -1564060, 'I''ll be waiting...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11413, 1, 0, 0, 'essence DESI_SAY_RECAP'), +(23419, -1564061, 'I won''t be far...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11414, 1, 0, 0, 'essence DESI_SAY_AFTER'), +(23420, -1564062, 'Beware: I live!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11399, 1, 0, 0, 'essence ANGER_SAY_FREED'), +(23420, -1564063, 'So... foolish.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11400, 1, 0, 0, 'essence ANGER_SAY_FREED2'), +(23420, -1564064, '<maniacal cackle>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11401, 1, 0, 0, 'essence ANGER_SAY_SLAY1'), +(23420, -1564065, 'Enough. No more.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11402, 1, 0, 0, 'essence ANGER_SAY_SLAY2'), +(23420, -1564066, 'On your knees!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11403, 1, 0, 0, 'essence ANGER_SAY_SPEC'), +(23420, -1564067, 'Beware, coward.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11405, 1, 0, 0, 'essence ANGER_SAY_BEFORE'), +(23420, -1564068, 'I won''t... be... ignored.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11404, 1, 0, 0, 'essence ANGER_SAY_DEATH'), +(0, -1564069, 'You wish to test me?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11524, 1, 0, 0, 'council vera AGGRO'), +(0, -1564070, 'I have better things to do...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11422, 1, 0, 0, 'council gath AGGRO'), +(0, -1564071, 'Flee or die!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11482, 1, 0, 0, 'council mala AGGRO'), +(0, -1564072, 'Common... such a crude language. Bandal!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11440, 1, 0, 0, 'council zere AGGRO'), +(0, -1564073, 'Enough games!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11428, 1, 0, 0, 'council gath ENRAGE'), +(0, -1564074, 'You wish to kill me? Hahaha, you first!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11530, 1, 0, 0, 'council vera ENRAGE'), +(0, -1564075, 'For Quel''Thalas! For the Sunwell!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11488, 1, 0, 0, 'council mala ENRAGE'), +(0, -1564076, 'Sha''amoor sine menoor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11446, 1, 0, 0, 'council zere ENRAGE'), +(22949, -1564077, 'Enjoy your final moments!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11426, 1, 0, 0, 'council gath SPECIAL1'), +(22952, -1564078, 'You''re not caught up for this!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11528, 1, 0, 0, 'council vera SPECIAL1'), +(22951, -1564079, 'No second chances!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11486, 1, 0, 0, 'council mala SPECIAL1'), +(22950, -1564080, 'Diel fin''al', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11444, 1, 0, 0, 'council zere SPECIAL1'), +(22949, -1564081, 'You are mine!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11427, 1, 0, 0, 'council gath SPECIAL2'), +(22952, -1564082, 'Anar''alah belore!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11529, 1, 0, 0, 'council vera SPECIAL2'), +(22951, -1564083, 'I''m full of surprises!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11487, 1, 0, 0, 'council mala SPECIAL2'), +(22950, -1564084, 'Sha''amoor ara mashal?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11445, 1, 0, 0, 'council zere SPECIAL2'), +(22949, -1564085, 'Selama am''oronor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11423, 1, 0, 0, 'council gath SLAY'), +(22952, -1564086, 'Valiant effort!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11525, 1, 0, 0, 'council vera SLAY'), +(22951, -1564087, 'My work is done.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11483, 1, 0, 0, 'council mala SLAY'), +(22950, -1564088, 'Shorel''aran.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11441, 1, 0, 0, 'council zere SLAY'), +(22949, -1564089, 'Well done!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11424, 1, 0, 0, 'council gath SLAY_COMT'), +(22951, -1564090, 'A glorious kill!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11526, 1, 0, 0, 'council vera SLAY_COMT'), +(22950, -1564091, 'As it should be!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11484, 1, 0, 0, 'council mala SLAY_COMT'), +(0, -1564092, 'Belesa menoor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11442, 1, 0, 0, 'council zere SLAY_COMT'), +(22949, -1564093, 'Lord Illidan... I...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11425, 1, 0, 0, 'council gath DEATH'), +(22952, -1564094, 'You got lucky!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11527, 1, 0, 0, 'council vera DEATH'), +(22951, -1564095, 'Destiny... awaits.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11485, 1, 0, 0, 'council mala DEATH'), +(22950, -1564096, 'Diel ma''ahn... oreindel''o', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11443, 1, 0, 0, 'council zere DEATH'), +(18831, -1565000, 'Gronn are the real power in outland.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11367, 1, 0, 0, 'maulgar SAY_AGGRO'), +(18831, -1565001, 'You will not defeat the hand of Gruul!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11368, 1, 0, 0, 'maulgar SAY_ENRAGE'), +(18831, -1565002, 'You won''t kill next one so easy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11369, 1, 0, 0, 'maulgar SAY_OGRE_DEATH1'), +(18831, -1565003, 'Pah! Does not prove anything!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11370, 1, 0, 0, 'maulgar SAY_OGRE_DEATH2'), +(18831, -1565004, 'I''m not afraid of you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11371, 1, 0, 0, 'maulgar SAY_OGRE_DEATH3'), +(18831, -1565005, 'Good, now you fight me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11372, 1, 0, 0, 'maulgar SAY_OGRE_DEATH4'), +(18831, -1565006, 'You not so tough afterall!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11373, 1, 0, 0, 'maulgar SAY_SLAY1'), +(18831, -1565007, 'Aha-ha ha ha!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11374, 1, 0, 0, 'maulgar SAY_SLAY2'), +(18831, -1565008, 'Mulgar is king!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11375, 1, 0, 0, 'maulgar SAY_SLAY3'), +(18831, -1565009, 'Gruul... will crush you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11376, 1, 0, 0, 'maulgar SAY_DEATH'), +(19044, -1565010, 'Come... and die.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11355, 1, 0, 0, 'gruul SAY_AGGRO'), +(19044, -1565011, 'Scurry', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11356, 1, 0, 0, 'gruul SAY_SLAM1'), +(19044, -1565012, 'No escape', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11357, 1, 0, 0, 'gruul SAY_SLAM2'), +(19044, -1565013, 'Stay', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11358, 1, 0, 0, 'gruul SAY_SHATTER1'), +(19044, -1565014, 'Beg... for life', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11359, 1, 0, 0, 'gruul SAY_SHATTER2'), +(19044, -1565015, 'No more', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11360, 1, 0, 0, 'gruul SAY_SLAY1'), +(19044, -1565016, 'Unworthy', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11361, 1, 0, 0, 'gruul SAY_SLAY2'), +(19044, -1565017, 'Die', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11362, 1, 0, 0, 'gruul SAY_SLAY3'), +(19044, -1565018, 'Aaargh...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 11363, 1, 0, 0, 'gruul SAY_DEATH'), +(19044, -1565019, '%s grows in size!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'gruul EMOTE_GROW'), +(23578, -1568000, 'Spirits of da wind be your doom!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12031, 1, 0, 0, 'janalai SAY_AGGRO'), +(23578, -1568001, 'I burn ya now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12032, 1, 0, 0, 'janalai SAY_FIRE_BOMBS'), +(23578, -1568002, 'Where ma hatcha? Get to work on dem eggs!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12033, 1, 0, 0, 'janalai SAY_SUMMON_HATCHER'), +(23578, -1568003, 'I show you strength... in numbers.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12034, 1, 0, 0, 'janalai SAY_ALL_EGGS'), +(23578, -1568004, 'You done run outta time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12035, 1, 0, 0, 'janalai SAY_BERSERK'), +(23578, -1568005, 'It all be over now, mon!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12036, 1, 0, 0, 'janalai SAY_SLAY_1'), +(23578, -1568006, 'Tazaga-choo!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12037, 1, 0, 0, 'janalai SAY_SLAY_2'), +(23578, -1568007, 'Zul''jin... got a surprise for you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12038, 1, 0, 0, 'janalai SAY_DEATH'), +(23578, -1568008, 'Come, strangers. The spirit of the dragonhawk hot be hungry for worthy souls.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12039, 1, 0, 0, 'janalai SAY_EVENT_STRANGERS'), +(23578, -1568009, 'Come, friends. Your bodies gonna feed ma hatchlings, and your souls are going to feed me with power!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12040, 1, 0, 0, 'janalai SAY_EVENT_FRIENDS'), +(0, -1568010, 'Get da move on, guards! It be killin'' time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12066, 1, 0, 0, 'nalorakk SAY_WAVE1_AGGRO'), +(0, -1568011, 'Guards, go already! Who you more afraid of, dem... or me?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12067, 1, 0, 0, 'nalorakk SAY_WAVE2_STAIR1'), +(0, -1568012, 'Ride now! Ride out dere and bring me back some heads!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12068, 1, 0, 0, 'nalorakk SAY_WAVE3_STAIR2'), +(0, -1568013, 'I be losin'' me patience! Go on: make dem wish dey was never born!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12069, 1, 0, 0, 'nalorakk SAY_WAVE4_PLATFORM'), +(0, -1568014, 'What could be better than servin'' da bear spirit for eternity? Come closer now. Bring your souls to me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12078, 1, 0, 0, 'nalorakk SAY_EVENT1_SACRIFICE'), +(0, -1568015, 'Don''t be delayin'' your fate. Come to me now. I make your sacrifice quick.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12079, 1, 0, 0, 'nalorakk SAY_EVENT2_SACRIFICE'), +(0, -1568016, 'You be dead soon enough!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12070, 1, 0, 0, 'nalorakk SAY_AGGRO'), +(0, -1568017, 'I bring da pain!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12071, 1, 0, 0, 'nalorakk SAY_SURGE'), +(0, -1568018, 'You call on da beast, you gonna get more dan you bargain for!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12072, 1, 0, 0, 'nalorakk SAY_TOBEAR'), +(0, -1568019, 'Make way for Nalorakk!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12073, 1, 0, 0, 'nalorakk SAY_TOTROLL'), +(0, -1568020, 'You had your chance, now it be too late!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12074, 1, 0, 0, 'nalorakk SAY_BERSERK'), +(0, -1568021, 'Mua-ha-ha! Now whatchoo got to say?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12075, 1, 0, 0, 'nalorakk SAY_SLAY1'), +(0, -1568022, 'Da Amani gonna rule again!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12076, 1, 0, 0, 'nalorakk SAY_SLAY2'), +(0, -1568023, 'I... be waitin'' on da udda side....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12077, 1, 0, 0, 'nalorakk SAY_DEATH'), +(28217, -1571000, 'You save me! We thank you. We going to go back to village now. You come too... you can stay with us! Puppy-men kind of mean anyway. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_END_IRO'), +(28217, -1571001, 'Let me know when you ready to go, okay?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_QUEST_ACCEPT_IRO '), +(28217, -1571002, 'Home time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_START_IRO'), +(30154, -1571003, 'I''m not afraid of anything -- bring it on!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'aggro_Agnetta'), +(25301, -1571004, 'My liege, the infiltration and control of the Alliance power structure by our cultists is well underway.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(26203, -1571005, 'Your progress in this region has been impressive, Blood Prince. I am pleased...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(26203, -1571006, 'The power you''ve bestowed upon me has allowed me great mental influence over human minds. I bear these offerings as proof of my progress.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(26170, -1571007, 'Leryssa!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(26170, -1571008, 'What have you done to my sister, you motherless elf scum!?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(26203, -1571009, 'Now this is a surprise, Thassarian. I hadn''t heard from Mograine or the other death knights for months. You''ve come to rejoin the Scourge, I take it?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(26170, -1571010, 'I would sooner slit my own throat. You will pay for what you did to your own men, Arthas... for what you did to me! I swear it.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(25301, -1571011, 'Allow me to take care of the intruders, lord. I will feed their entrails to the maggots.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(26203, -1571012, 'Do not fail me, San''layn. Return to Icecrown with this fool''s head or do not bother to return.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(25301, -1571013, 'Yes, my lord!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(25250, -1571014, 'What... what happened to me?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(25250, -1571015, 'Ugh! My head won''t stop spinning...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(25251, -1571016, 'Thassarian, you''re alive!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(26170, -1571017, 'Leryssa... you... you''re all right!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(25251, -1571018, 'I thought... I thought you were... dead.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(26170, -1571019, 'I cannot return home with you just yet, Leryssa. I am not quite done with the Scourge.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(25251, -1571020, 'Don''t leave me again! You want to fight for your country, but they don''t even want you! They sent you here to die!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(26170, -1571021, 'You might be right, sister. My obligations to my land and King have been fulfilled. But there is still something that I owe to myself.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(26170, -1571022, 'I know that look in your eye... I''m not going to be able to talk you out of this. If you die on me again...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(26170, -1571023, 'Do not worry, Leryssa. I will come back to you when I''m done. Nothing in the world will stop me from coming home to the only family that I have left.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(25478, -1571024, 'Pathetic fool! A servant of Malygos would sooner die than aid an enemy...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(25478, -1571025, 'Aargh! Do your worst, $C ! I''ll tell you NOTHING!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(25478, -1571026, 'Aahhhh! Release me! I am of no use to you. I swear it!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(25478, -1571027, 'Stop! I beg you, please stop. Please...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(25478, -1571028, 'Alright! I am beaten. Your previous archmage is held in a prison, elevated and sealed. Even if you manage to reach her, Salrand herself holds the key. Your mission is folly!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(25478, -1571029, 'I''ve given you the information, $C ! You''re wasting your time....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(25478, -1571030, 'Noooo! This torture is inhumane! You have what you want... why don''t you just kill me?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(30007, -1571031, 'This battle must be seen to be believed! Once a mild-mannered tuskarr fisherman, our next fighter turned to the life of a soulless mercenary when his entire family was wiped out by a vicious pack of lion seals and III-tempered penguins! Now he''s just In It for the gold! Ladies and gentlemen, ORINOKO TUSKBREAKER!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13363, 1, 0, 0, ''), +(30020, -1571032, 'Whisker! Where are you? Assist me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(30007, -1571033, 'The champion of the Winterax trolls has challenged you, Treeofdoom! I hope you''re ready!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(30007, -1571034, 'Hailling from the distant mountains of Alterac, one of the fiercest competitors this arena has ever seen: KORRAK THE BLOODRAGER!!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13363, 1, 0, 0, ''), +(23953, -1574000, 'Your blood is mine!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13221, 1, 0, 0, 'keleseth SAY_AGGRO'), +(23953, -1574001, 'Not so fast.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13222, 1, 0, 0, 'keleseth SAY_FROST_TOMB'), +(23953, -1574002, 'Aranal, lidel! Their fate shall be yours!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13224, 1, 0, 0, 'keleseth SAY_SKELETONS'), +(23953, -1574003, 'Darkness waits', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13223, 1, 0, 0, 'keleseth SAY_KILL'), +(23953, -1574004, 'I join... the night.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13225, 1, 0, 0, 'keleseth SAY_DEATH'), +(23954, -1574005, 'I''ll paint my face with your blood!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13207, 1, 0, 0, 'ingvar SAY_AGGRO_FIRST'), +(23954, -1574006, 'I return! A second chance to carve out your skull!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13209, 1, 0, 0, 'ingvar SAY_AGGRO_SECOND'), +(23954, -1574007, 'My life for the... death god!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13213, 1, 0, 0, 'ingvar SAY_DEATH_FIRST'), +(23954, -1574008, 'No! I can do... better! I can...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13211, 1, 0, 0, 'ingvar SAY_DEATH_SECOND'), +(23954, -1574009, 'Mjul orm agn gjor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13212, 1, 0, 0, 'ingvar SAY_KILL_FIRST'), +(23954, -1574010, 'I am a warrior born!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13214, 1, 0, 0, 'ingvar SAY_KILL_SECOND'), +(24200, -1574011, 'Dalronn! See if you can muster the nerve to join my attack!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13229, 1, 0, 0, 'skarvald YELL_SKARVALD_AGGRO'), +(24200, -1574012, 'Not... over... yet.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13230, 1, 0, 0, 'skarvald YELL_SKARVALD_DAL_DIED'), +(24200, -1574013, 'A warrior''s death.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13231, 1, 0, 0, 'skarvald YELL_SKARVALD_SKA_DIEDFIRST'), +(24200, -1574014, '???', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13232, 1, 0, 0, 'skarvald YELL_SKARVALD_KILL'), +(24200, -1574015, 'Pagh! What sort of necromancer lets death stop him? I knew you were worthless!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13233, 1, 0, 0, 'skarvald YELL_SKARVALD_DAL_DIEDFIRST'), +(24201, -1574016, 'By all means, don''t assess the situation, you halfwit! Just jump into the fray!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13199, 1, 0, 0, 'dalronn YELL_DALRONN_AGGRO'), +(24201, -1574017, 'See... you... soon.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13200, 1, 0, 0, 'dalronn YELL_DALRONN_SKA_DIED'), +(24201, -1574018, 'There''s no... greater... glory.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13201, 1, 0, 0, 'dalronn YELL_DALRONN_DAL_DIEDFIRST'), +(24201, -1574019, 'You may serve me yet.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13202, 1, 0, 0, 'dalronn YELL_DALRONN_KILL'), +(24201, -1574020, 'Skarvald, you incompetent slug! Return and make yourself useful!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13203, 1, 0, 0, 'dalronn YELL_DALRONN_SKA_DIEDFIRST'), +(26731, -1576000, 'You know what they say about curiosity.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13319, 1, 0, 0, 'grand magus telestra SAY_AGGRO'), +(26731, -1576001, 'Death becomes you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13324, 1, 0, 0, 'grand magus telestra SAY_KILL'), +(26731, -1576002, 'Damn the... luck.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13320, 1, 0, 0, 'grand magus telestra SAY_DEATH'), +(26731, -1576003, 'Now to finish the job!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13323, 1, 0, 0, 'grand magus telestra SAY_MERGE'), +(26731, -1576004, 'There''s plenty of me to go around.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13321, 1, 0, 0, 'grand magus telestra SAY_SPLIT_1'), +(26731, -1576005, 'I''ll give you more than you can handle.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13322, 1, 0, 0, 'grand magus telestra SAY_SPLIT_2'), +(26763, -1576010, 'Chaos beckons.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13186, 1, 0, 0, 'anomalus SAY_AGGRO'), +(26763, -1576011, 'Of course.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13187, 1, 0, 0, 'anomalus SAY_DEATH'), +(26763, -1576012, 'Reality... unwoven.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13188, 1, 0, 0, 'anomalus SAY_RIFT'), +(26763, -1576013, 'Indestructible.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13189, 1, 0, 0, 'anomalus SAY_SHIELD'), +(26794, -1576020, 'Noo!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13328, 1, 0, 0, 'ormorok SAY_AGGRO'), +(26794, -1576021, 'Aaggh!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13330, 1, 0, 0, 'ormorok SAY_DEATH'), +(26794, -1576022, 'Back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13331, 1, 0, 0, 'ormorok SAY_REFLECT'), +(26794, -1576023, 'Bleed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13332, 1, 0, 0, 'ormorok SAY_CRYSTAL_SPIKES'), +(26794, -1576024, 'Aaggh! Kill!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13329, 1, 0, 0, 'ormorok SAY_KILL'), +(26723, -1576040, 'Preserve? Why? There''s no truth in it. No no no... only in the taking! I see that now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13450, 1, 0, 0, 'keristrasza SAY_AGGRO'), +(26723, -1576041, 'Now we''ve come to the truth!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13453, 1, 0, 0, 'keristrasza SAY_SLAY'), +(26723, -1576042, 'Finish it! FINISH IT! Kill me, or I swear by the Dragonqueen you''ll never see daylight again!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13452, 1, 0, 0, 'keristrasza SAY_ENRAGE'), +(26723, -1576043, 'Dragonqueen... Life-Binder... preserve... me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13454, 1, 0, 0, 'keristrasza SAY_DEATH'), +(26723, -1576044, 'Stay. Enjoy your final moments.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13451, 1, 0, 0, 'keristrasza SAY_CRYSTAL_NOVA'), +(24850, -1580000, 'Aggh! No longer will I be a slave to Malygos! Challenge me and you will be destroyed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12422, 1, 0, 0, 'kalecgos SAY_EVIL_AGGRO'), +(24850, -1580001, 'I will purge you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12423, 1, 0, 0, 'kalecgos SAY_EVIL_SPELL1'), +(24850, -1580002, 'Your pain has only begun!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12424, 1, 0, 0, 'kalecgos SAY_EVIL_SPELL2'), +(24850, -1580003, 'In the name of Kil''jaeden!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12425, 1, 0, 0, 'kalecgos SAY_EVIL_SLAY1'), +(24850, -1580004, 'You were warned!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12426, 1, 0, 0, 'kalecgos SAY_EVIL_SLAY2'), +(24850, -1580005, 'My awakening is complete! You shall all perish!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12427, 1, 0, 0, 'kalecgos SAY_EVIL_ENRAGE'), +(24891, -1580006, 'I need... your help... Cannot... resist him... much longer...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12428, 1, 0, 0, 'kalecgos humanoid SAY_GOOD_AGGRO'), +(24891, -1580007, 'Aaahhh! Help me, before I lose my mind!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12429, 1, 0, 0, 'kalecgos humanoid SAY_GOOD_NEAR_DEATH'), +(24891, -1580008, 'Hurry! There is not much of me left!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12430, 1, 0, 0, 'kalecgos humanoid SAY_GOOD_NEAR_DEATH2'), +(24891, -1580009, 'I am forever in your debt. Once we have triumphed over Kil''jaeden, this entire world will be in your debt as well.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12431, 1, 0, 0, 'kalecgos humanoid SAY_GOOD_PLRWIN'), +(24892, -1580010, 'There will be no reprieve. My work here is nearly finished.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12451, 1, 0, 0, 'sathrovarr SAY_SATH_AGGRO'), +(24892, -1580011, 'I''m... never on... the losing... side...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12452, 1, 0, 0, 'sathrovarr SAY_SATH_DEATH'), +(24892, -1580012, 'Your misery is my delight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12453, 1, 0, 0, 'sathrovarr SAY_SATH_SPELL1'), +(24892, -1580013, 'I will watch you bleed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12454, 1, 0, 0, 'sathrovarr SAY_SATH_SPELL2'), +(24892, -1580014, 'Pitious mortal!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12455, 1, 0, 0, 'sathrovarr SAY_SATH_SLAY1'), +(24892, -1580015, 'Haven''t you heard? I always win!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12456, 1, 0, 0, 'sathrovarr SAY_SATH_SLAY2'), +(24892, -1580016, 'I have toyed with you long enough!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12457, 1, 0, 0, 'sathrovarr SAY_SATH_ENRAGE'), +(24882, -1580017, 'Puny lizard! Death is the only answer you''ll find here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12458, 1, 0, 0, 'brutallus YELL_INTRO'), +(24882, -1580018, 'Grah! Your magic is weak!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12459, 1, 0, 0, 'brutallus YELL_INTRO_BREAK_ICE'), +(24882, -1580019, 'I will crush you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12460, 1, 0, 0, 'brutallus YELL_INTRO_CHARGE'), +(24882, -1580020, 'That was fun.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12461, 1, 0, 0, 'brutallus YELL_INTRO_KILL_MADRIGOSA'), +(24882, -1580021, 'Come, try your luck!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12462, 1, 0, 0, 'brutallus YELL_INTRO_TAUNT'), +(24882, -1580022, 'Ahh! More lambs to the slaughter!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12463, 1, 0, 0, 'brutallus YELL_AGGRO'), +(24882, -1580023, 'Perish, insect!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12464, 1, 0, 0, 'brutallus YELL_KILL1'), +(24882, -1580024, 'You are meat!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12465, 1, 0, 0, 'brutallus YELL_KILL2'), +(24882, -1580025, 'Too easy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12466, 1, 0, 0, 'brutallus YELL_KILL3'), +(24882, -1580026, 'Bring the fight to me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12467, 1, 0, 0, 'brutallus YELL_LOVE1'), +(24882, -1580027, 'Another day, another glorious battle!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12468, 1, 0, 0, 'brutallus YELL_LOVE2'), +(24882, -1580028, 'I live for this!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12469, 1, 0, 0, 'brutallus YELL_LOVE3'), +(24882, -1580029, 'So much for a real challenge... Die!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12470, 1, 0, 0, 'brutallus YELL_BERSERK'), +(24882, -1580030, 'Gah! Well done... Now... this gets... interesting...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12471, 1, 0, 0, 'brutallus YELL_DEATH'), +(24882, -1580031, 'Hold, friends! There is information to be had before this devil meets his fate!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12472, 1, 0, 0, 'madrigosa YELL_MADR_ICE_BARRIER'), +(24882, -1580032, 'Where is Anveena, demon? What has become of Kalec?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12473, 1, 0, 0, 'madrigosa YELL_MADR_INTRO'), +(24882, -1580033, 'You will tell me where they are!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12474, 1, 0, 0, 'madrigosa YELL_MADR_ICE_BLOCK'), +(24882, -1580034, 'Speak, I grow weary of asking!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12475, 1, 0, 0, 'madrigosa YELL_MADR_TRAP'), +(24882, -1580035, 'Malygos, my lord! I did my best!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12476, 1, 0, 0, 'madrigosa YELL_MADR_DEATH'), +(25038, -1580036, 'Glory to Kil''jaeden! Death to all who oppose!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12477, 1, 0, 0, 'felmyst - YELL_BIRTH'), +(25038, -1580037, 'I kill for the master!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12480, 1, 0, 0, 'felmyst - YELL_KILL1'), +(25038, -1580038, 'The end has come!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12481, 1, 0, 0, 'felmyst - YELL_KILL2'), +(25038, -1580039, 'Choke on your final breath!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12478, 1, 0, 0, 'felmyst - YELL_BREATH'), +(25038, -1580040, 'I am stronger than ever before!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12479, 1, 0, 0, 'felmyst- YELL_TAKEOFF'), +(25038, -1580041, 'No more hesitation! Your fates are written!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12482, 1, 0, 0, 'felmyst - YELL_BERSERK'), +(25038, -1580042, 'Kil''jaeden... will... prevail...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12483, 1, 0, 0, 'felmyst - YELL_DEATH'), +(25038, -1580043, 'Madrigosa deserved a far better fate. You did what had to be done, but this battle is far from over.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12439, 1, 0, 0, 'felmyst - YELL_KALECGOS'), +(25166, -1580044, 'Fire to the aid of shadow!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12489, 1, 0, 0, 'eredar - YELL_CANFLAGRATION'), +(25166, -1580045, 'Sacrolash!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12492, 1, 0, 0, 'eredar - YELL_SISTER_SACROLASH_DEAD'), +(25166, -1580046, 'Fire consume.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12490, 1, 0, 0, 'eredar - YELL_ALY_KILL_1'), +(25166, -1580047, 'Ed-ir Halach!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12491, 1, 0, 0, 'eredar - YELL_ALY_KILL_2'), +(25166, -1580048, 'De-ek Anur!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12494, 1, 0, 0, 'eredar - YELL_ALY_DEAD'), +(25166, -1580049, 'Your luck has run its curse!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12493, 1, 0, 0, 'eredar - YELL_BERSERK'), +(25165, -1580050, 'Shadow to the aid of fire!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12485, 1, 0, 0, 'eredar - YELL_SHADOW_NOVA'), +(25165, -1580051, 'Alythess! Your fire burns within me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12488, 1, 0, 0, 'eredar - YELL_SISTER_ALYTHESS_DEAD'), +(25165, -1580052, 'Shadow engulf.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12486, 1, 0, 0, 'eredar - YELL_SAC_KILL_1'), +(25165, -1580053, 'Ee-nok Kryul!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12487, 1, 0, 0, 'eredar - YELL_SAC_KILL_2'), +(25165, -1580054, 'I... fade.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'eredar - YELL_SAC_DEAD'), +(25165, -1580055, 'Time is a luxury you no longer possess!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'eredar - YELL_ENRAGE'), +(25166, -1580056, 'Misery...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12484, 1, 0, 0, 'eredar - YELL_INTRO_SAC_1'), +(25166, -1580057, 'Depravity...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'eredar - YELL_INTRO_ALY_2'), +(25166, -1580058, 'Confusion...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'eredar - YELL_INTRO_SAC_3'), +(25166, -1580059, 'Hatred...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'eredar - YELL_INTRO_ALY_4'), +(25166, -1580060, 'Mistrust...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'eredar - YELL_INTRO_SAC_5'), +(25166, -1580061, 'Chaos...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'eredar - YELL_INTRO_ALY_6'), +(25166, -1580062, 'These are the hallmarks...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'eredar - YELL_INTRO_SAC_7'), +(25166, -1580063, 'These are the pillars...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'eredar - YELL_INTRO_ALY_8'), +(25165, -1580064, '%s directs Shadow Nova at $N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'eredar - emote shadow nova'), +(25166, -1580065, '%s directs Conflagration at $N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'eredar - emote conflagration'), +(25608, -1580066, 'All my plans have led to this!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12495, 1, 0, 0, 'KJ - SAY_KJ_OFFCOMBAT1'), +(25608, -1580067, 'Stay on task! Do not waste time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12496, 1, 0, 0, 'KJ - SAY_KJ_OFFCOMBAT2'), +(25608, -1580068, 'I have waited long enough!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12497, 1, 0, 0, 'KJ - SAY_KJ_OFFCOMBAT3'), +(25608, -1580069, 'Fail me and suffer for eternity!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12498, 1, 0, 0, 'KJ - SAY_KJ_OFFCOMBAT4'), +(25608, -1580070, 'Drain the girl! Drain her power until there is nothing but a vacant shell!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12499, 1, 0, 0, 'KJ - SAY_KJ_OFFCOMBAT5'), +(25315, -1580071, 'The expendible have perished... So be it! Now I shall succeed where Sargeras could not! I will bleed this wretched world and secure my place as the true master of the Burning Legion. The end has come! Let the unraveling of this world commence!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12500, 1, 0, 0, 'KJ - SAY_KJ_EMERGE'), +(25315, -1580072, 'Another step towards destruction!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12501, 1, 0, 0, 'KJ - SAY_KJ_SLAY1'), +(25315, -1580073, 'Anak-ky''ri!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12502, 1, 0, 0, 'KJ - SAY_KJ_SLAY2'), +(25315, -1580074, 'Who can you trust?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12503, 1, 0, 0, 'KJ - SAY_KJ_REFLECTION1'), +(25315, -1580075, 'The enemy is among you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12504, 1, 0, 0, 'KJ - SAY_KJ_REFLECTION2'), +(25315, -1580076, 'Chaos!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12505, 1, 0, 0, 'KJ - SAY_KJ_DARKNESS1'), +(25315, -1580077, 'Destruction!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12506, 1, 0, 0, 'KJ - SAY_KJ_DARKNESS2'), +(25315, -1580078, 'Oblivion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12507, 1, 0, 0, 'KJ - SAY_KJ_DARKNESS3'), +(25315, -1580079, 'I will not be denied! This world shall fall!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12508, 1, 0, 0, 'KJ - SAY_KJ_PHASE3'), +(25315, -1580080, 'Do not harbor false hope. You cannot win!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12509, 1, 0, 0, 'KJ - SAY_KJ_PHASE4'), +(25315, -1580081, 'Aggghh! The powers of the Sunwell... turned... against me! What have you done? WHAT HAVE YOU DONE?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12510, 1, 0, 0, 'KJ - SAY_KJ_PHASE5'), +(25315, -1580082, 'Anveena, you must awaken, this world needs you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12445, 1, 0, 0, 'KJ - SAY_KALECGOS_AWAKEN'), +(25315, -1580083, 'I serve only the Master now.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12511, 1, 0, 0, 'KJ - SAY_ANVEENA_IMPRISONED'); +INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +(25315, -1580084, 'You must let go! You must become what you were always meant to be! The time is now, Anveena!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12446, 1, 0, 0, 'KJ - SAY_KALECGOS_LETGO'), +(25315, -1580085, 'But I''m... lost... I cannot find my way back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12512, 1, 0, 0, 'KJ - SAY_ANVEENA_LOST'), +(25315, -1580086, 'Anveena, I love you! Focus on my voice, come back for me now! Only you can cleanse the Sunwell!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12447, 1, 0, 0, 'KJ - SAY_KALECGOS_FOCUS'), +(25315, -1580087, 'Kalec... Kalec?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12513, 1, 0, 0, 'KJ - SAY_ANVEENA_KALEC'), +(25315, -1580088, 'Yes, Anveena! Let fate embrace you now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12448, 1, 0, 0, 'KJ - SAY_KALECGOS_FATE'), +(25315, -1580089, 'The nightmare is over, the spell is broken! Goodbye, Kalec, my love!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12514, 1, 0, 0, 'KJ - SAY_ANVEENA_GOODBYE'), +(25315, -1580090, 'Goodbye, Anveena, my love. Few will remember your name, yet this day you change the course of destiny. What was once corrupt is now pure. Heroes, do not let her sacrifice be in vain.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12450, 1, 0, 0, 'KJ - SAY_KALECGOS_GOODBYE'), +(25315, -1580091, 'Strike now, heroes, while he is weakened! Vanquish the Deceiver!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12449, 1, 0, 0, 'KJ - SAY_KALECGOS_ENCOURAGE'), +(25319, -1580092, 'You are not alone. The Blue Dragonflight shall help you vanquish the Deceiver.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12438, 1, 0, 0, 'KJ - SAY_KALECGOS_JOIN'), +(25315, -1580093, 'Nooooooooooooo!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12527, 1, 0, 0, 'KJ - SAY_KJ_DEATH'), +(25315, -1580094, '%s begins to channel dark energy', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'KJ - EMOTE_KJ_DARKNESS'), +(25319, -1580095, 'I will channel my power into the orbs, be ready!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12440, 1, 0, 0, 'KJ - SAY_KALEC_ORB_READY1'), +(25319, -1580096, 'I have empowered another orb! Use it quickly!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12441, 1, 0, 0, 'KJ - SAY_KALEC_ORB_READY2'), +(25319, -1580097, 'Another orb is ready! Make haste!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12442, 1, 0, 0, 'KJ - SAY_KALEC_ORB_READY3'), +(25319, -1580098, 'I have channeled all I can! The power is in your hands!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12443, 1, 0, 0, 'KJ - SAY_KALEC_ORB_READY4'), +(0, -1580099, 'Mortal heroes, your victory here today was foretold long ago. My brother''s anguished cry of defeat will echo across the universe, bringing renewed hope to all those who still stand against the Burning Crusade.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12515, 0, 0, 0, 'prophet velen - SAY1'), +(0, -1580100, 'As the Legion''s final defeat draws ever-nearer, stand proud in the knowledge that you have saved worlds without number from the flame. Just as this day marks an ending, so too does it herald a new beginning...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12516, 0, 0, 0, 'prophet velen - SAY2'), +(0, -1580101, 'The creature Entropius, whom you were forced to destroy, was once the noble naaru, M''uru. In life, M''uru channeled vast energies of LIGHT and HOPE. For a time, a misguided few sought to steal those energies...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12518, 0, 0, 0, 'prophet velen - SAY3'), +(0, -1580102, 'Then fortunate it is, that I have reclaimed the noble naaru''s spark from where it fell! Where faith dwells, hope is never lost, young blood elf.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12519, 0, 0, 0, 'prophet velen - SAY4'), +(0, -1580103, 'Gaze now, mortals - upon the HEART OF M''URU! Unblemished. Bathed by the light of Creation - just as it was at the Dawn.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12520, 0, 0, 0, 'prophet velen - SAY5'), +(0, -1580104, 'In time, the light and hope held within - will rebirth more than this mere fount of power... Mayhap, they will rebirth the soul of a nation.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12521, 0, 0, 0, 'prophet velen - SAY6'), +(0, -1580105, 'Salvation, young one. It waits for us all.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12522, 0, 0, 0, 'prophet velen - SAY7'), +(0, -1580106, 'Farewell...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12523, 0, 0, 0, 'prophet velen - SAY8'), +(0, -1580107, 'Our arrogance was unpardonable. We damned one of the most noble beings of all. We may never atone for this sin.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12524, 0, 0, 0, 'lady liadrinn - SAY1'), +(0, -1580108, 'Can it be?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12525, 0, 0, 0, 'lady liadrinn - SAY2'), +(0, -1580109, 'Blessed ancestors! I feel it... so much love... so much grace... there are... no words... impossible to describe...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12525, 0, 0, 0, 'lady liadrinn - SAY3'), +(24723, -1585000, 'You only waste my time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12378, 1, 0, 0, 'selin SAY_AGGRO'), +(24723, -1585001, 'My hunger knows no bounds!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12381, 1, 0, 0, 'selin SAY_ENERGY'), +(24723, -1585002, 'Yes! I am a god!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12382, 1, 0, 0, 'selin SAY_EMPOWERED'), +(24723, -1585003, 'Enough distractions!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12388, 1, 0, 0, 'selin SAY_KILL_1'), +(24723, -1585004, 'I am invincible!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12385, 1, 0, 0, 'selin SAY_KILL_2'), +(24723, -1585005, 'No! More... I must have more!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12383, 1, 0, 0, 'selin SAY_DEATH'), +(24723, -1585006, '%s begins to channel from the nearby Fel Crystal...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'selin EMOTE_CRYSTAL'), +(24744, -1585007, 'Drain...life!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12389, 1, 0, 0, 'vexallus SAY_AGGRO'), +(24744, -1585008, 'Un...con...tainable.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12392, 1, 0, 0, 'vexallus SAY_ENERGY'), +(24744, -1585009, 'Un...leash...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12390, 1, 0, 0, 'vexallus SAY_OVERLOAD'), +(24744, -1585010, 'Con...sume.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12393, 1, 0, 0, 'vexallus SAY_KILL'), +(24744, -1585011, 'discharges pure energy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'vexallus EMOTE_DISCHARGE_ENERGY'), +(24560, -1585012, 'Annihilate them!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12395, 1, 0, 0, 'delrissa SAY_AGGRO'), +(24560, -1585013, 'Oh, the horror.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12398, 1, 0, 0, 'delrissa LackeyDeath1'), +(24560, -1585014, 'Well, aren''t you lucky?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12400, 1, 0, 0, 'delrissa LackeyDeath2'), +(24560, -1585015, 'Now I''m getting annoyed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12401, 1, 0, 0, 'delrissa LackeyDeath3'), +(24560, -1585016, 'Lackies be damned! I''ll finish you myself!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12403, 1, 0, 0, 'delrissa LackeyDeath4'), +(24560, -1585017, 'I call that a good start.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12405, 1, 0, 0, 'delrissa PlayerDeath1'), +(24560, -1585018, 'I could have sworn there were more of you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12407, 1, 0, 0, 'delrissa PlayerDeath2'), +(24560, -1585019, 'Not really much of a group, anymore, is it?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12409, 1, 0, 0, 'delrissa PlayerDeath3'), +(24560, -1585020, 'One is such a lonely number.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12410, 1, 0, 0, 'delrissa PlayerDeath4'), +(24560, -1585021, 'It''s been a kick, really.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12411, 1, 0, 0, 'delrissa PlayerDeath5'), +(24560, -1585022, 'Not what I had... planned...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12397, 1, 0, 0, 'delrissa SAY_DEATH'), +(24664, -1585023, 'Don''t look so smug! I know what you''re thinking, but Tempest Keep was merely a set back. Did you honestly believe I would trust the future to some blind, half-night elf mongrel? Oh no, he was merely an instrument, a stepping stone to a much larger plan! It has all led to this, and this time, you will not interfere!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12413, 1, 0, 0, 'kaelthas MT SAY_AGGRO'), +(24664, -1585024, 'Vengeance burns!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12415, 1, 0, 0, 'kaelthas MT SAY_PHOENIX'), +(24664, -1585025, 'Felomin ashal!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12417, 1, 0, 0, 'kaelthas MT SAY_FLAMESTRIKE'), +(24664, -1585026, 'I''ll turn your world... upside... down...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12418, 1, 0, 0, 'kaelthas MT SAY_GRAVITY_LAPSE'), +(24664, -1585027, 'Master... grant me strength.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12419, 1, 0, 0, 'kaelthas MT SAY_TIRED'), +(24664, -1585028, 'Do not... get too comfortable.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12420, 1, 0, 0, 'kaelthas MT SAY_RECAST_GRAVITY'), +(24664, -1585029, 'My demise accomplishes nothing! The Master will have you! You will drown in your own blood! This world shall burn! Aaaghh!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12421, 1, 0, 0, 'kaelthas MT SAY_DEATH'), +(33993, -1590000, 'Emalon the Storm Watcher overcharges a Tempest Minion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'emalon EMOTE_OVERCHARGE_TEMPEST_MINION'), +(33993, -1590001, 'A Tempest Minion appears to defend Emalon!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'emalon EMOTE_MINION_RESPAWN'), +(33993, -1590002, 'Archavon the Stone Watcher goes into a berserker rage!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'archavon EMOTE_BERSERK'), +(29120, -1601003, 'You shall experience my torment, first-hand!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14055, 1, 0, 0, ''), +(29120, -1601002, 'You have made your choice.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14056, 1, 0, 0, ''), +(29120, -1601000, 'Eternal aggony awaits you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14054, 1, 0, 0, ''), +(29120, -1601001, 'Soon, the Master''s voice will call to you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14057, 1, 0, 0, ''), +(28586, -1602000, 'I am the greatest of my father''s sons! Your end has come!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14149, 1, 0, 0, 'bjarngrim SAY_AGGRO'), +(28586, -1602001, 'So ends your curse!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14153, 1, 0, 0, 'bjarngrim SAY_SLAY_1'), +(28586, -1602002, 'Flesh... is... weak!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14154, 1, 0, 0, 'bjarngrim SAY_SLAY_2'), +(28586, -1602003, '...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14155, 1, 0, 0, 'bjarngrim SAY_SLAY_3'), +(28586, -1602004, 'How can it be...? Flesh is not... stronger!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14156, 1, 0, 0, 'bjarngrim SAY_DEATH'), +(28586, -1602005, 'Defend yourself, for all the good it will do!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14151, 1, 0, 0, 'bjarngrim SAY_BATTLE_STANCE'), +(28586, -1602006, '%s switches to Battle Stance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'bjarngrim EMOTE_BATTLE_STANCE'), +(28586, -1602007, 'GRAAAAAH! Behold the fury of iron and steel!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14152, 1, 0, 0, 'bjarngrim SAY_BERSEKER_STANCE'), +(28586, -1602008, '%s switches to Berserker Stance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'bjarngrim EMOTE_BERSEKER_STANCE'), +(28586, -1602009, 'Give me your worst!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14150, 1, 0, 0, 'bjarngrim SAY_DEFENSIVE_STANCE'), +(28586, -1602010, '%s switches to Defensive Stance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'bjarngrim EMOTE_DEFENSIVE_STANCE'), +(28546, -1602011, 'You wish to confront the master? You must weather the storm!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14453, 1, 0, 0, 'ionar SAY_AGGRO'), +(28546, -1602012, 'Shocking ... I know!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14456, 1, 0, 0, 'ionar SAY_SLAY_1'), +(28546, -1602013, 'You atempt the unpossible.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14457, 1, 0, 0, 'ionar SAY_SLAY_2'), +(28546, -1602014, 'Your spark of light is ... extinguish.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14458, 1, 0, 0, 'ionar SAY_SLAY_3'), +(28546, -1602015, 'Master... you have guests.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14459, 1, 0, 0, 'ionar SAY_DEATH'), +(28546, -1602016, 'The slightest spark shall be your undoing.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14454, 1, 0, 0, 'ionar SAY_SPLIT_1'), +(28546, -1602017, 'No one is safe!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14455, 1, 0, 0, 'ionar SAY_SPLIT_2'), +(28923, -1602018, 'What hope is there for you? None!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14162, 1, 0, 0, 'loken SAY_AGGRO0'), +(28923, -1602019, 'I have witnessed the rise and fall of empires. The birth and extinction of entire species. Over countless millennia the foolishness of mortals has remained beyond a constant. Your presence here confirms this.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14160, 1, 0, 0, 'loken SAY_INTRO_1'), +(28923, -1602020, 'My master has shown me the future, and you have no place in it. Azeroth will be reborn in darkness. Yogg-Saron shall be released! The Pantheon shall fall!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14162, 1, 0, 0, 'loken SAY_INTRO_2'), +(28923, -1602021, 'Only mortal...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14166, 1, 0, 0, 'loken SAY_SLAY_1'), +(28923, -1602022, 'I... am... FOREVER!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14167, 1, 0, 0, 'loken SAY_SLAY_2'), +(28923, -1602023, 'What little time you had, you wasted!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14168, 1, 0, 0, 'loken SAY_SLAY_3'), +(28923, -1602024, 'My death... heralds the end of this world.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14172, 1, 0, 0, 'loken SAY_DEATH'), +(28923, -1602025, 'You cannot hide from fate!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14163, 1, 0, 0, 'loken SAY_NOVA_1'), +(28923, -1602026, 'Come closer. I will make it quick.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14164, 1, 0, 0, 'loken SAY_NOVA_2'), +(28923, -1602027, 'Your flesh cannot hold out for long.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14165, 1, 0, 0, 'loken SAY_NOVA_3'), +(28923, -1602028, 'You stare blindly into the abyss!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14169, 1, 0, 0, 'loken SAY_75HEALTH'), +(28923, -1602029, 'Your ignorance is profound. Can you not see where this path leads?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14170, 1, 0, 0, 'loken SAY_50HEALTH'), +(28923, -1602030, 'You cross the precipice of oblivion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14171, 1, 0, 0, 'loken SAY_25HEALTH'), +(28923, -1602031, '%s begins to cast Lightning Nova!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'loken EMOTE_NOVA'), +(28587, -1602032, 'It is you who have destroyed my children? You... shall... pay!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13960, 1, 0, 0, 'volkhan SAY_AGGRO'), +(28587, -1602033, 'The armies of iron will conquer all!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13965, 1, 0, 0, 'volkhan SAY_SLAY_1'), +(28587, -1602034, 'Ha, pathetic!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13966, 1, 0, 0, 'volkhan SAY_SLAY_2'), +(28587, -1602035, 'You have cost me too much work!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13967, 1, 0, 0, 'volkhan SAY_SLAY_3'), +(28587, -1602036, 'The master was right... to be concerned.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13968, 1, 0, 0, 'volkhan SAY_DEATH'), +(28587, -1602037, 'I will crush you beneath my boots!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13963, 1, 0, 0, 'volkhan SAY_STOMP_1'), +(28587, -1602038, 'All my work... undone!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13964, 1, 0, 0, 'volkhan SAY_STOMP_2'), +(28587, -1602039, 'Life from the lifelessness... death for you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13961, 1, 0, 0, 'volkhan SAY_FORGE_1'), +(28587, -1602040, 'Nothing is wasted in the process. You will see....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13962, 1, 0, 0, 'volkhan SAY_FORGE_2'), +(28587, -1602041, '%s runs to his anvil!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'volkhan EMOTE_TO_ANVIL'), +(28587, -1602042, '%s prepares to shatter his Brittle Golems!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'volkhan EMOTE_SHATTER'), +(27975, -1599000, 'You shouldn''t have come...now you will die!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13487, 1, 0, 0, 'maiden of grief SAY_AGGRO'), +(27975, -1599001, 'Why must it be this way?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13488, 1, 0, 0, 'maiden of grief SAY_SLAY_1'), +(27975, -1599002, 'You had it coming!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13489, 1, 0, 0, 'maiden of grief SAY_SLAY_2'), +(27975, -1599003, 'My burden grows heavier.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13490, 1, 0, 0, 'maiden of grief SAY_SLAY_3'), +(27975, -1599004, 'This is your own fault!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13491, 1, 0, 0, 'maiden of grief SAY_SLAY_4'), +(27975, -1599005, 'I hope you all rot! I never...wanted...this.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13493, 1, 0, 0, 'maiden of grief SAY_DEATH'), +(27975, -1599006, 'So much lost time... that you''ll never get back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13492, 1, 0, 0, 'maiden of grief SAY_STUN'), +(27977, -1599007, 'Crush....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14176, 1, 0, 0, 'krystallus SAY_AGGRO'), +(27977, -1599008, 'Ha...ha...ha...ha...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14177, 1, 0, 0, 'krystallus SAY_KILL'), +(27977, -1599009, 'Uuuuhhhhhhhhhh......', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14179, 1, 0, 0, 'krystallus SAY_DEATH'), +(27977, -1599010, 'Break.... you....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14178, 1, 0, 0, 'krystallus SAY_SHATTER'), +(27978, -1599011, 'Soft, vulnerable shells. Brief, fragile lives. You can not escape the curse of flesh!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14180, 1, 0, 0, 'Sjonnir SAY_AGGRO'), +(27978, -1599012, 'Flesh is no match for iron!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14182, 1, 0, 0, 'Sjonnir SAY_SLAY_1'), +(27978, -1599013, 'Armies of iron will smother the world!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14183, 1, 0, 0, 'Sjonnir SAY_SLAY_2'), +(32871, -1603000, 'Your actions are illogical. All possible results for this encounter have been calculated. The Pantheon will receive the Observer''s message regardless of outcome.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15386, 1, 0, 0, 'algalon SAY_AGGRO'), +(27978, -1599015, 'Loken will not rest, until the forge is retaken. You changed nothing!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14184, 1, 0, 0, 'Sjonnir SAY_DEATH'), +(28070, -1599016, 'Now that''s owning your supper!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14244, 1, 0, 0, 'brann SAY_KILL_1'), +(28070, -1599017, 'Press on, that''s the way!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14245, 1, 0, 0, 'brann SAY_KILL_2'), +(28070, -1599018, 'Keep it up now. Plenty of death-dealing for everyone!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14246, 1, 0, 0, 'brann SAY_KILL_3'), +(28070, -1599019, 'I''m all kinds of busted up. Might not... make it...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14257, 1, 0, 0, 'brann SAY_LOW_HEALTH'), +(28070, -1599020, 'Not yet, not... yet-', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14258, 1, 0, 0, 'brann SAY_DEATH'), +(28070, -1599021, 'I''m doing everything I can!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14260, 1, 0, 0, 'brann SAY_PLAYER_DEATH_1'), +(28070, -1599022, 'Light preserve you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14261, 1, 0, 0, 'brann SAY_PLAYER_DEATH_2'), +(28070, -1599023, 'I hope this is all worth it!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14262, 1, 0, 0, 'brann SAY_PLAYER_DEATH_3'), +(28070, -1599024, 'Time to get some answers! Let''s get this show on the road!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14259, 1, 0, 0, 'brann SAY_ESCORT_START'), +(28070, -1599025, 'Don''t worry. Old Brann has got your back. Keep that metal monstrosity busy and I''ll see if I can sweet talk this machine into helping you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14274, 1, 0, 0, 'brann SAY_SPAWN_DWARF'), +(28070, -1599026, 'This is a wee bit trickier that before... Oh, bloody--incomin''!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14275, 1, 0, 0, 'brann SAY_SPAWN_TROGG'), +(28070, -1599027, 'What in the name o'' Madoran did THAT do? Oh! Wait: I just about got it...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14276, 1, 0, 0, 'brann SAY_SPAWN_OOZE'), +(28070, -1599028, 'Ha, that did it. Help''s a-coming. Take this you glow-eying brute!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14277, 1, 0, 0, 'brann SAY_SPAWN_EARTHEN'), +(28070, -1599029, 'Take a moment and relish this with me! Soon all will be revealed! Okay then, let''s do this!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14247, 1, 0, 0, 'brann SAY_EVENT_INTRO_1'), +(28070, -1599030, 'Now keep an eye out! I''ll have this licked in two shakes of a--', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14248, 1, 0, 0, 'brann SAY_EVENT_INTRO_2'), +(28070, -1599031, 'Warning! Life form pattern not recognized. Archival processing terminated. Continued interference will result in targeted response.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13765, 1, 0, 0, 'brann SAY_EVENT_INTRO_3_ABED'), +(28070, -1599032, 'Oh, that doesn''t sound good. We might have a complication or two...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14249, 1, 0, 0, 'brann SAY_EVENT_A_1'), +(28070, -1599033, 'Security breach in progress. Analysis of historical archives transferred to lower priority queue. Countermeasures engaged.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13756, 1, 0, 0, 'brann SAY_EVENT_A_2_KADD'), +(28070, -1599034, 'Ah, you want to play hardball, eh? That''s just my game!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14250, 1, 0, 0, 'brann SAY_EVENT_A_3'), +(28070, -1599035, 'Couple more minutes and I''ll--', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14251, 1, 0, 0, 'brann SAY_EVENT_B_1'), +(28070, -1599036, 'Threat index threshold exceeded. Celestial archive aborted. Security level heightened.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13761, 1, 0, 0, 'brann SAY_EVENT_B_2_MARN'), +(28070, -1599037, 'Heightened? What''s the good news?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14252, 1, 0, 0, 'brann SAY_EVENT_B_3'), +(28070, -1599038, 'So that was the problem? Now I''m makin'' progress...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14253, 1, 0, 0, 'brann SAY_EVENT_C_1'), +(28070, -1599039, 'Critical threat index. Void analysis diverted. Initiating sanitization protocol.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13767, 1, 0, 0, 'brann SAY_EVENT_C_2_ABED'), +(28070, -1599040, 'Hang on! Nobody''s gonna'' be sanitized as long as I have a say in it!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14254, 1, 0, 0, 'brann SAY_EVENT_C_3'), +(28070, -1599041, 'Ha! The old magic fingers finally won through! Now let''s get down to-', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14255, 1, 0, 0, 'brann SAY_EVENT_D_1'), +(28070, -1599042, 'Alert! Security fail safes deactivated. Beginning memory purge...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13768, 1, 0, 0, 'brann SAY_EVENT_D_2_ABED'), +(28070, -1599043, 'Purge? No no no no no! Where did I-- Aha, this should do the trick...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14256, 1, 0, 0, 'brann SAY_EVENT_D_3'), +(28070, -1599044, 'System online. Life form pattern recognized. Welcome Branbronzan. Query?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13769, 1, 0, 0, 'brann SAY_EVENT_D_4_ABED'), +(28070, -1599064, 'Well now. That''s a lot to digest. I''m gonna need some time to take all of this in. Thank you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14273, 1, 0, 0, 'brann SAY_EVENT_END_20'), +(28070, -1599046, 'Tell me how that dwarfs came to be! And start at the beginning!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14264, 1, 0, 0, 'brann SAY_EVENT_END_02'), +(28070, -1599047, 'Accessing prehistoric data. Retrieved. In the beginning Earthen were created to-', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13770, 1, 0, 0, 'brann SAY_EVENT_END_03_ABED'), +(28070, -1599048, 'Right, right! I know that the Earthen were made of stone to shape the deep reaches of the world but what about the anomalies? Matrix non-stabilizing and whatnot.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14265, 1, 0, 0, 'brann SAY_EVENT_END_04'), +(28070, -1599049, 'Accessing. In the early stages of its development cycle Azeroth suffered infection by parasitic, necrophotic symbiotes.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13771, 1, 0, 0, 'brann SAY_EVENT_END_05_ABED'), +(28070, -1599050, 'Necro-what? Speak bloody common will ya?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14266, 1, 0, 0, 'brann SAY_EVENT_END_06'), +(28070, -1599051, 'Designation: Old Gods. Old Gods rendered all systems, including Earthen defenseless in order to facilitate assimilation. This matrix destabilization has been termed the Curse of Flesh. Effects of destabilization increased over time.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13772, 1, 0, 0, 'brann SAY_EVENT_END_07_ABED'), +(28070, -1599052, 'Old Gods eh? So they zapped the Earthen with this Curse of Flesh. And then what?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14267, 1, 0, 0, 'brann SAY_EVENT_END_08'), +(28070, -1599053, 'Accessing. Creators arrived to extirpate symbiotic infection. Assessment revealed that Old God infestation had grown malignant. Excising parasites would result in loss of host.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13757, 1, 0, 0, 'brann SAY_EVENT_END_09_KADD'), +(28070, -1599054, 'If they killed the Old Gods Azeroth would have been destroyed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14268, 1, 0, 0, 'brann SAY_EVENT_END_10'), +(28070, -1599055, 'Correct. Creators neutralized parasitic threat and contained it within the host. Forge of Wills and other systems were instituted to create new Earthen. Safeguards were implemented and protectors were appointed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13758, 1, 0, 0, 'brann SAY_EVENT_END_11_KADD'), +(28070, -1599056, 'What protectors?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14269, 1, 0, 0, 'brann SAY_EVENT_END_12'), +(28070, -1599057, 'Designations: Aesir and Vanir or in common nomenclator Storm and Earth Giants. Sentinel Loken designated supreme. Dragon Aspects appointed to monitor evolution of Azeroth.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13759, 1, 0, 0, 'brann SAY_EVENT_END_13_KADD'), +(28070, -1599058, 'Aesir and Vanir. Okay. So the Forge of Wills started to make new Earthen. But what happened to the old ones?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14270, 1, 0, 0, 'brann SAY_EVENT_END_14'), +(28070, -1599059, 'Additional background is relevant to your query. Following global combat between-', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13762, 1, 0, 0, 'brann SAY_EVENT_END_15_MARN'), +(28070, -1599060, 'Hold everything! The Aesir and Vanir went to war? Why?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14271, 1, 0, 0, 'brann SAY_EVENT_END_16'), +(28070, -1599061, 'Unknown. Data suggests that impetus for global combat originated with prime designate Loken who neutralized all remaining Aesir and Vanir affecting termination of conflict. Prime designate Loken then initiated stasis of several seed races including Earthen, Giant and Vrykul at designated holding facilities.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13763, 1, 0, 0, 'brann SAY_EVENT_END_17_MARN'), +(28070, -1599062, 'This Loken sounds like a nasty character. Glad we don''t have to worry about the likes of him anymore. So if I''m understanding you lads the original Earthen eventually woke up from this statis. And by that time this destabily-whatever had turned them into our brother dwarfs. Or at least dwarf ancestors. Hm?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14272, 1, 0, 0, 'brann SAY_EVENT_END_18'), +(28070, -1599063, 'Essentially that is correct.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13764, 1, 0, 0, 'brann SAY_EVENT_END_19_MARN'), +(28070, -1599045, 'Query? What do you think I''m here for? Tea and biscuits? Spill the beans already!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14263, 1, 0, 0, 'brann SAY_EVENT_END_01'), +(28070, -1599065, 'Acknowledged Branbronzan. Session terminated.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13773, 1, 0, 0, 'brann SAY_EVENT_END_21_ABED'), +(28070, -1599066, 'Loken?! That''s downright bothersome... We might''ve neutralized the iron dwarves, but I''d lay odds there''s another machine somewhere else churnin'' out a whole mess o'' these iron vrykul!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14278, 1, 0, 0, 'brann SAY_VICTORY_SJONNIR_1'), +(28070, -1599067, 'I''ll use the forge to make badtches o'' earthen to stand guard... But our greatest challenge still remains: find and stop Loken!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14279, 1, 0, 0, 'brann SAY_VICTORY_SJONNIR_2'), +(28070, -1599068, 'I think it''s time to see what''s behind the door near the entrance. I''m going to sneak over there, nice and quiet. Meet me at the door and I''ll get us in.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'brann SAY_ENTRANCE_MEET'), +(29305, -1604010, 'We fought back da Scourge. What chance joo be thinkin'' JOO got?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'SAY_AGGRO boss_moorabi'), +(29305, -1604012, 'Who gonna stop me; you? ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'SAY_SLAY_2 boss_moorabi'), +(29305, -1604013, 'Not so tough now.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'SAY_SLAY_3 boss_moorabi'), +(29305, -1604014, 'If our gods can die... den so can we... ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'SAY_DEATH boss_moorabi'), +(29305, -1604015, 'Get ready for somethin''... much... BIGGAH! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'SAY_TRANSFORM boss_moorabi'), +(29305, -1604016, 'Da ground gonna swallow you up', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'SAY_QUAKE boss_moorabi'), +(29305, -1604017, '%s begins to transform!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'EMOTE_TRANSFORM boss_moorabi'), +(31134, -1608000, 'We finish this now, champions of Kirin Tor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13947, 1, 0, 0, 'cyanigosa SAY_AGGRO'), +(30451, -1615000, 'I fear nothing! Least of all you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14111, 1, 0, 0, 'shadron SAY_SHADRON_AGGRO'), +(30451, -1615001, 'You are insignificant!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14112, 1, 0, 0, 'shadron SAY_SHADRON_SLAY_1'), +(30451, -1615002, 'Such mediocre resistance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14113, 1, 0, 0, 'shadron SAY_SHADRON_SLAY_2'), +(30451, -1615003, 'We...are superior! How could this...be...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14118, 1, 0, 0, 'shadron SAY_SHADRON_DEATH'), +(30451, -1615004, 'You are easily bested! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14114, 1, 0, 0, 'shadron SAY_SHADRON_BREATH'), +(30451, -1615005, 'I will take pity on you Sartharion, just this once.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14117, 1, 0, 0, 'shadron SAY_SHADRON_RESPOND'), +(30451, -1615006, 'Father tought me well!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14115, 1, 0, 0, 'shadron SAY_SHADRON_SPECIAL_1'), +(30451, -1615007, 'On your knees!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14116, 1, 0, 0, 'shadron SAY_SHADRON_SPECIAL_2'), +(28860, -1615008, 'A Shadron Disciple appears in the Twilight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 5, 0, 0, 'shadron WHISPER_SHADRON_DICIPLE'), +(30452, -1615009, 'You have no place here. Your place is among the departed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14122, 1, 0, 0, 'tenebron SAY_TENEBRON_AGGRO'), +(30452, -1615010, 'No contest.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14123, 1, 0, 0, 'tenebron SAY_TENEBRON_SLAY_1'), +(30452, -1615011, 'Typical... Just as I was having fun.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14124, 1, 0, 0, 'tenebron SAY_TENEBRON_SLAY_2'), +(30452, -1615012, 'I should not... have held back...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14129, 1, 0, 0, 'tenebron SAY_TENEBRON_DEATH'), +(30452, -1615013, 'To darkness I condemn you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14125, 1, 0, 0, 'tenebron SAY_TENEBRON_BREATH'), +(30452, -1615014, 'It is amusing to watch you struggle. Very well, witness how it is done.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14128, 1, 0, 0, 'tenebron SAY_TENEBRON_RESPOND'), +(30452, -1615015, 'Arrogant little creatures! To challenge powers you do not yet understand...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14126, 1, 0, 0, 'tenebron SAY_TENEBRON_SPECIAL_1'), +(30452, -1615016, 'I am no mere dragon! You will find I am much, much, more...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14127, 1, 0, 0, 'tenebron SAY_TENEBRON_SPECIAL_2'), +(28860, -1615017, '%s begins to hatch eggs in the twilight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 5, 0, 0, 'tenebron WHISPER_HATCH_EGGS'), +(28860, -1615018, 'It is my charge to watch over these eggs. I will see you burn before any harm comes to them!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14093, 1, 0, 0, 'sartharion SAY_SARTHARION_AGGRO'), +(28860, -1615019, 'This pathetic siege ends NOW!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14103, 1, 0, 0, 'sartharion SAY_SARTHARION_BERSERK'), +(28860, -1615020, 'Burn, you miserable wretches!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14098, 1, 0, 0, 'sartharion SAY_SARTHARION_BREATH'), +(28860, -1615021, 'Shadron! Come to me, all is at risk!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14105, 1, 0, 0, 'sartharion SARTHARION_CALL_SHADRON'), +(28860, -1615022, 'Tenebron! The eggs are yours to protect as well!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14106, 1, 0, 0, 'sartharion SAY_SARTHARION_CALL_TENEBRON'), +(28860, -1615023, 'Vesperon! The clutch is in danger! Assist me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14104, 1, 0, 0, 'sartharion SAY_SARTHARION_CALL_VESPERON'), +(28860, -1615024, 'Such is the price... of failure...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14107, 1, 0, 0, 'sartharion SAY_SARTHARION_DEATH'), +(28860, -1615025, 'Such flammable little insects....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14099, 1, 0, 0, 'sartharion SAY_SARTHARION_SPECIAL_1'), +(28860, -1615026, 'Your charred bones will litter the floor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14100, 1, 0, 0, 'sartharion SAY_SARTHARION_SPECIAL_2'), +(28860, -1615027, 'How much heat can you take?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14101, 1, 0, 0, 'sartharion SAY_SARTHARION_SPECIAL_3'), +(28860, -1615028, 'All will be reduced to ash!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14102, 1, 0, 0, 'sartharion SAY_SARTHARION_SPECIAL_4'), +(28860, -1615029, 'You will make a fine meal for the hatchlings.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14094, 1, 0, 0, 'sartharion SAY_SARTHARION_SLAY_1'), +(28860, -1615030, 'You are the grave disadvantage.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14096, 1, 0, 0, 'sartharion SAY_SARTHARION_SLAY_2'), +(28860, -1615031, 'This is why we call you lesser beeings.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14097, 1, 0, 0, 'sartharion SAY_SARTHARION_SLAY_3'), +(28860, -1615032, 'The lava surrounding %s churns!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 5, 0, 0, 'sartharion WHISPER_LAVA_CHURN'), +(30449, -1615033, 'You pose no threat, lesser beings...give me your worst!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14133, 1, 0, 0, 'vesperon SAY_VESPERON_AGGRO'), +(30449, -1615034, 'The least you could do is put up a fight...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14134, 1, 0, 0, 'vesperon SAY_VESPERON_SLAY_1'), +(30449, -1615035, 'Was that the best you can do?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14135, 1, 0, 0, 'vesperon SAY_VESPERON_SLAY_2'), +(30449, -1615036, 'I still have some...fight..in...me...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14140, 1, 0, 0, 'vesperon SAY_VESPERON_DEATH'), +(30449, -1615037, 'I will pick my teeth with your bones!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14136, 1, 0, 0, 'vesperon SAY_VESPERON_BREATH'), +(30449, -1615038, 'Father was right about you, Sartharion...You are a weakling!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14139, 1, 0, 0, 'vesperon SAY_VESPERON_RESPOND'), +(30449, -1615039, 'Aren''t you tricky...I have a few tricks of my own...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14137, 1, 0, 0, 'vesperon SAY_VESPERON_SPECIAL_1'), +(30449, -1615040, 'Unlike, I have many talents.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14138, 1, 0, 0, 'vesperon SAY_VESPERON_SPECIAL_2'), +(28860, -1615041, 'A Vesperon Disciple appears in the Twilight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 5, 0, 0, 'shadron WHISPER_VESPERON_DICIPLE'), +(28860, -1615042, '%s begins to open a Twilight Portal!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 5, 0, 0, 'sartharion drake WHISPER_OPEN_PORTAL'), +(29308, -1619021, 'I will feast on your remains.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'prince taldaram SAY_AGGRO'), +(29308, -1619022, 'I will drink no blood before it''s time.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'prince taldaram SAY_SLAY_1'), +(29308, -1619023, 'One final embrace.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'prince taldaram SAY_SLAY_2'), +(29308, -1619024, 'Still I hunger, still I thirst.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'prince taldaram SAY_DEATH'), +(29308, -1619025, 'So appetizing.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'prince taldaram SAY_FEED1'), +(29308, -1619026, 'Fresh, warm blood. It has been too long.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'prince taldaram SAY_FEED2'), +(29308, -1619027, 'Your heartbeat is music to my ears.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'prince taldaram SAY_VANISH1'), +(29308, -1619028, 'I am nowhere. I am everywhere. I am the watcher, unseen.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'prince taldaram SAY_VANISH2'), +(0, -1999900, 'Let the games begin.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8280, 1, 0, 0, 'example_creature SAY_AGGRO'), +(0, -1999901, 'I see endless suffering. I see torment. I see rage. I see everything.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8831, 1, 0, 0, 'example_creature SAY_RANDOM_0'), +(0, -1999902, 'Muahahahaha', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8818, 1, 0, 0, 'example_creature SAY_RANDOM_1'), +(0, -1999903, 'These mortal infedels my lord, they have invaded your sanctum and seek to steal your secrets.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8041, 1, 0, 0, 'example_creature SAY_RANDOM_2'), +(0, -1999904, 'You are already dead.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8581, 1, 0, 0, 'example_creature SAY_RANDOM_3'), +(0, -1999905, 'Where to go? What to do? So many choices that all end in pain, end in death.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8791, 1, 0, 0, 'example_creature SAY_RANDOM_4'), +(0, -1999906, '$N, I sentance you to death!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8588, 1, 0, 0, 'example_creature SAY_BESERK'), +(0, -1999907, 'The suffering has just begun!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'example_creature SAY_PHASE'), +(0, -1999908, 'I always thought I was a good dancer.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_creature SAY_DANCE'), +(0, -1999909, 'Move out Soldier!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_creature SAY_SALUTE'), +(0, -1999910, 'Help $N! I''m under attack!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_escort SAY_AGGRO1'), +(0, -1999911, 'Die scum!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_escort SAY_AGGRO2'), +(0, -1999912, 'Hmm a nice day for a walk alright', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_escort SAY_WP_1'), +(0, -1999913, 'Wild Felboar attack!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_escort SAY_WP_2'), +(0, -1999914, 'Time for me to go! See ya around $N!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 3, 'example_escort SAY_WP_3'), +(0, -1999915, 'Bye Bye!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 3, 'example_escort SAY_WP_4'), +(0, -1999916, 'How dare you leave me like that! I hate you! =*(', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'example_escort SAY_DEATH_1'), +(0, -1999917, '...no...how could you let me die $N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_escort SAY_DEATH_2'), +(0, -1999918, 'ugh...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_escort SAY_DEATH_3'), +(0, -1999919, 'Taste death!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_escort SAY_SPELL'), +(0, -1999920, 'Fireworks!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_escort SAY_RAND_1'), +(0, -1999921, 'Hmm, I think I could use a buff.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_escort SAY_RAND_2'), +(0, -1999922, 'Normal select, guess you''re not interested.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_gossip_codebox SAY_NOT_INTERESTED'), +(0, -1999923, 'Wrong!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_gossip_codebox SAY_WRONG'), +(0, -1999924, 'You''re right, you are allowed to see my inner secrets.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_gossip_codebox SAY_CORRECT'), +(0, -1999925, 'Hi!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'example_areatrigger SAY_HI'), +(29519, -1609000, 'You have made a grave error, fiend!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_START_1'), +(29519, -1609001, 'I was a soldier of the Light once... Look at what I have become... ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_START_2'), +(29519, -1609002, 'You are hopelessly outmatched, $R.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_START_3'), +(29519, -1609003, 'They brand me unworthy? I will show them unmorthy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_START_4'), +(29519, -1609004, 'You will allow me a weapon and armor, yes?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_START_5'), +(29519, -1609005, 'I will win my freedom and leave this cursed place!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_START_6'), +(29519, -1609006, 'I will dismantle this festering hellhole!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_START_7'), +(29519, -1609007, 'There can be only one survivor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_START_8'), +(29519, -1609008, 'To battle!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_1'), +(29519, -1609009, 'Let your fears consume you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_2'), +(29519, -1609010, 'HAH! You can barely hold a blade! Yours will be a quick death.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_3'), +(29519, -1609011, 'And now you die', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_4'), +(29519, -1609012, 'To battle!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_5'), +(29519, -1609013, 'There is no hope for our future...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_6'), +(29519, -1609014, 'Sate your hunger on cold steel, $R', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_7'), +(29519, -1609015, 'It ends here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_8'), +(29519, -1609016, 'Death is the only cure!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_9'), +(29032, -1609025, 'Come to finish the job, have you?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_START_1'), +(29032, -1609026, 'Come to finish the job, have ye?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_START_2'), +(29032, -1609027, 'Come ta finish da job, mon?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_START_3'), +(29032, -1609028, 'You''ll look me in the eyes when...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 25, 'special_surprise SAY_EXEC_PROG_1'), +(29032, -1609029, 'Well this son o'' Ironforge would like...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 25, 'special_surprise SAY_EXEC_PROG_2'), +(29032, -1609030, 'Ironic, isn''t it? To be killed...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 25, 'special_surprise SAY_EXEC_PROG_3'), +(29032, -1609031, 'If you''d allow me just one...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 25, 'special_surprise SAY_EXEC_PROG_4'), +(29032, -1609032, 'I''d like to stand for...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 25, 'special_surprise SAY_EXEC_PROG_5'), +(29032, -1609033, 'I want to die like an orc...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 25, 'special_surprise SAY_EXEC_PROG_6'), +(29032, -1609034, 'Dis troll gonna stand for da...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 25, 'special_surprise SAY_EXEC_PROG_7'), +(29032, -1609035, '$N?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_NAME_1'), +(29032, -1609036, '$N? Mon?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_NAME_2'), +(29032, -1609037, '$N, I''d recognize that face anywhere... What... What have they done to you, $N?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_RECOG_1'), +(29032, -1609038, '$N, I''d recognize those face tentacles anywhere... What... What have they done to you, $N?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_RECOG_2'), +(29032, -1609039, '$N, I''d recognize that face anywhere... What... What have they done to ye, $Glad:lass;?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_RECOG_3'), +(29032, -1609040, '$N, I''d recognize that decay anywhere... What... What have they done to you, $N?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_RECOG_4'), +(29032, -1609041, '$N, I''d recognize those horns anywhere... What have they done to you, $N?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_RECOG_5'), +(29032, -1609042, '$N, I''d recognize dem tusks anywhere... What... What have dey done ta you, mon?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_RECOG_6'), +(29032, -1609043, 'You don''t remember me, do you? Blasted Scourge... They''ve tried to drain you of everything that made you a righteous force of reckoning. Every last ounce of good... Everything that made you a draenei!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_NOREM_1'), +(29032, -1609044, 'Ye don''t remember me, do ye? Blasted Scourge... They''ve tried to drain ye o'' everything that made ye a righteous force o'' reckoning. Every last ounce o'' good... Everything that made you a $Gson:daughter; of Ironforge!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_NOREM_2'), +(29032, -1609045, 'You don''t remember me, do you? We were humans once - long, long ago - until Lordaeron fell to the Scourge. Your transformation to a Scourge zombie came shortly after my own. Not long after that, our minds were freed by the Dark Lady.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_NOREM_3'), +(29032, -1609046, 'You don''t remember me, do you? Blasted Scourge... They''ve tried to drain you of everything that made you a pint-sized force of reckoning. Every last ounce of good... Everything that made you a gnome!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_NOREM_4'); +INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +(29032, -1609047, 'You don''t remember me, do you? Blasted Scourge...They''ve tried to drain of everything that made you a righteous force of reckoning. Every last ounce of good...Everything that made you a human!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_NOREM_5'), +(29032, -1609048, 'You don''t remember me? When you were a child your mother would leave you in my care while she served at the Temple of the Moon. I held you in my arms and fed you with honey and sheep''s milk to calm you until she would return. You were my little angel. Blasted Scourge... What have they done to you, $N?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_NOREM_6'), +(29032, -1609049, 'You don''t recognize me, do you? Blasted Scourge... They''ve tried to drain you of everything that made you a righteous force of reckoning. Every last ounce of good... Everything that made you an orc!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_NOREM_7'), +(29032, -1609050, 'You don''t remember me, do you? Blasted Scourge... They''ve tried to drain you of everything that made you a righteous force of reckoning. Every last ounce of good... Everything that made you a tauren!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_NOREM_8'), +(29032, -1609051, 'You don''t remember me, mon? Damn da Scourge! Dey gone ta drain you of everytin dat made ya a mojo masta. Every last ounce of good... Everytin'' dat made ya a troll hero, mon!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_NOREM_9'), +(29032, -1609052, 'A pact was made, $Gbrother:sister;! We vowed vengeance against the Lich King! For what he had done to us! We battled the Scourge as Forsaken, pushing them back into the plaguelands and freeing Tirisfal! You and I were champions of the Forsaken!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_THINK_1'), +(29032, -1609053, 'You must remember the splendor of life, $Gbrother:sister;. You were a champion of the Kaldorei once! This isn''t you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_THINK_2'), +(29032, -1609054, 'Think, $N. Think back. Try and remember the majestic halls of Silvermoon City, where you were born. Remember the splendor of life, $Gbrother:sister;. You were a champion of the sin''dorei once! This isn''t you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 6, 'special_surprise SAY_EXEC_THINK_3'), +(29032, -1609055, 'Think, $N. Think back. Try and remember the proud mountains of Argus, where you were born. Remember the splendor of life, $Gbrother:sister;. You were a champion of the draenei once! This isn''t you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 6, 'special_surprise SAY_EXEC_THINK_4'), +(29032, -1609056, 'Think, $N. Think back. Try and remember the snow capped mountains o'' Dun Morogh! Ye were born there, $Glad:lass;. Remember the splendor o'' life, $N! Ye were a champion o'' the dwarves once! This isn''t ye!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 6, 'special_surprise SAY_EXEC_THINK_5'), +(29032, -1609057, 'Think, $N. Think back. Try and remember Gnomeregan before those damned troggs! Remember the feel of an [arclight spanner] $Gbrother:sister;. You were a champion of gnome-kind once! This isn''t you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 6, 'special_surprise SAY_EXEC_THINK_6'), +(29032, -1609058, 'Think, $N. Think back. Try and remember the hills and valleys of Elwynn, where you were born. Remember the splendor of life, $Gbrother:sister;. You were a champion of the Alliance once! This isn''t you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 6, 'special_surprise SAY_EXEC_THINK_7'), +(29032, -1609059, 'Think, $N. Think back. Try and remember Durotar, $Gbrother:sister;! Remember the sacrifices our heroes made so that we could be free of the blood curse. Harken back to the Valley of Trials, where we were reborn into a world without demonic influence. We found the splendor of life, $N. Together! This isn''t you. You were a champion of the Horde once!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 6, 'special_surprise SAY_EXEC_THINK_8'), +(29032, -1609060, 'Think, $N. Think back. Try and remember the rolling plains of Mulgore, where you were born. Remember the splendor of life, $Gbrother:sister;. You were a champion of the tauren once! This isn''t you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 6, 'special_surprise SAY_EXEC_THINK_9'), +(29032, -1609061, 'TINK $N. Tink back, mon! We be Darkspear, mon! Bruddas and sistas! Remember when we fought the Zalazane and done took he head and freed da Echo Isles? MON! TINK! You was a champion of da Darkspear trolls!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 6, 'special_surprise SAY_EXEC_THINK_10'), +(29032, -1609062, 'Listen to me, $N. You must fight against the Lich King''s control. He is a monster that wants to see this world - our world - in ruin. Don''t let him use you to accomplish his goals. You were once a hero and you can be again. Fight, damn you! Fight his control!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 5, 'special_surprise SAY_EXEC_LISTEN_1'), +(29032, -1609063, 'Listen to me, $N Ye must fight against the Lich King''s control. He''s a monster that wants to see this world - our world - in ruin. Don''t let him use ye to accomplish his goals. Ye were once a hero and ye can be again. Fight, damn ye! Fight his control!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 5, 'special_surprise SAY_EXEC_LISTEN_2'), +(29032, -1609064, 'Listen to me, $N. You must fight against the Lich King''s control. He is a monster that wants to see this world - our world - in ruin. Don''t let him use you to accomplish his goals AGAIN. You were once a hero and you can be again. Fight, damn you! Fight his control!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 5, 'special_surprise SAY_EXEC_LISTEN_3'), +(29032, -1609065, 'Listen ta me, $Gbrudda:sista;. You must fight against da Lich King''s control. He be a monstar dat want ta see dis world - our world - be ruined. Don''t let he use you ta accomplish he goals. You be a hero once and you be a hero again! Fight it, mon! Fight he control!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 5, 'special_surprise SAY_EXEC_LISTEN_4'), +(29032, -1609066, 'What''s going on in there? What''s taking so long, $N?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'special_surprise SAY_PLAGUEFIST'), +(29032, -1609067, 'There... There''s no more time for me. I''m done for. Finish me off, $N. Do it or they''ll kill us both. $N... Remember Silvermoon. This world is worth saving!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 18, 'special_surprise SAY_EXEC_TIME_1'), +(29032, -1609068, 'There... There''s no more time for me. I''m done for. Finish me off, $N. Do it or they''ll kill us both. $N... Remember Argus. Don''t let that happen to this world.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 18, 'special_surprise SAY_EXEC_TIME_2'), +(29032, -1609069, 'There... There''s no more time for me. I''m done for. Finish me off, $N. Do it or they''ll kill us both $N... For KHAAAAAAAAZZZ MODAAAAAANNNNNN!!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 18, 'special_surprise SAY_EXEC_TIME_3'), +(29032, -1609070, 'There... There''s no more time for me. I''m done for. Finish me off, $N. Do it or they''ll kill us both. $N... Remember Tirisfal! This world is worth saving!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 18, 'special_surprise SAY_EXEC_TIME_4'), +(29032, -1609071, 'There... There''s no more time for me. I''m done for. Finish me off, $N. Do it or they''ll kill us both. $N... Remember Gnomeregan! This world is worth saving.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 18, 'special_surprise SAY_EXEC_TIME_5'), +(29032, -1609072, 'There... There''s no more time for me. I''m done for. FInish me off, $N. Do it or they''ll kill us both. $N...Remember Elwynn. This world is worth saving.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 18, 'special_surprise SAY_EXEC_TIME_6'), +(29032, -1609073, 'There... There''s no more time for me. I''m done for. Finish me off, $N. Do it or they''ll kill us both. $N... Remember Teldrassil, our beloved home. This world is worth saving.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 18, 'special_surprise SAY_EXEC_TIME_7'), +(29032, -1609074, 'There... There''s no more time for me. I''m done for. Finish me off, $N. Do it or they''ll kill us both. $N... For the Horde! This world is worth saving.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 18, 'special_surprise SAY_EXEC_TIME_8'), +(29032, -1609075, 'There... There''s no more time for me. I''m done for. Finish me off, $N. Do it or they''ll kill us both. $N... Remember Mulgore. This world is worth saving.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 18, 'special_surprise SAY_EXEC_TIME_9'), +(29032, -1609076, 'Der... Der''s no more time for me. I be done for. Finish me off $N. Do it or they''ll kill us both. $N... Remember Sen''jin Village, mon! Dis world be worth saving!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 18, 'special_surprise SAY_EXEC_TIME_10'), +(29032, -1609077, 'Do it, $N! Put me out of my misery!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'special_surprise SAY_EXEC_WAITING'), +(29032, -1609078, '%s dies from his wounds.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'special_surprise EMOTE_DIES'), +(28406, -1609080, 'No potions!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dk_initiate SAY_DUEL_A'), +(28406, -1609081, 'Remember this day, $n, for it is the day that you will be thoroughly owned.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dk_initiate SAY_DUEL_B'), +(28406, -1609082, 'I''m going to tear your heart out, cupcake!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dk_initiate SAY_DUEL_C'), +(28406, -1609083, 'Don''t make me laugh.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dk_initiate SAY_DUEL_D'), +(28406, -1609084, 'Here come the tears...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dk_initiate SAY_DUEL_E'), +(28406, -1609085, 'You have challenged death itself!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dk_initiate SAY_DUEL_F'), +(28406, -1609086, 'The Lich King will see his true champion on this day!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dk_initiate SAY_DUEL_G'), +(28406, -1609087, 'You''re going down!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dk_initiate SAY_DUEL_H'), +(28406, -1609088, 'You don''t stand a chance, $n', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'dk_initiate SAY_DUEL_I'), +(0, -1609089, 'I''ll need to get my runeblade and armor... Just need a little more time.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 399, 'koltira SAY_BREAKOUT1'), +(0, -1609090, 'I''m still weak, but I think I can get an anti-magic barrier up. Stay inside it or you''ll be destroyed by their spells.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'koltira SAY_BREAKOUT2'), +(0, -1609091, 'Maintaining this barrier will require all of my concentration. Kill them all!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 16, 'koltira SAY_BREAKOUT3'), +(0, -1609092, 'There are more coming. Defend yourself! Don''t fall out of the anti-magic field! They''ll tear you apart without its protection!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'koltira SAY_BREAKOUT4'), +(0, -1609093, 'I can''t keep barrier up much longer... Where is that coward?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'koltira SAY_BREAKOUT5'), +(0, -1609094, 'The High Inquisitor comes! Be ready, death knight! Do not let him draw you out of the protective bounds of my anti-magic field! Kill him and take his head!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'koltira SAY_BREAKOUT6'), +(0, -1609095, 'Stay in the anti-magic field! Make them come to you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'koltira SAY_BREAKOUT7'), +(0, -1609096, 'The death of the High Inquisitor of New Avalon will not go unnoticed. You need to get out of here at once! Go, before more of them show up. I''ll be fine on my own.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'koltira SAY_BREAKOUT8'), +(0, -1609097, 'I''ll draw their fire, you make your escape behind me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'koltira SAY_BREAKOUT9'), +(0, -1609098, 'Your High Inquisitor is nothing more than a pile of meat, Crusaders! There are none beyond the grasp of the Scourge!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'koltira SAY_BREAKOUT10'), +(28939, -1609501, 'I''ll tear the secrets from your soul! Tell me about the "Crimson Dawn" and your life may be spared!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'player SAY_PERSUADE1'), +(28939, -1609502, 'Tell me what you know about "Crimson Dawn" or the beatings will continue!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'player SAY_PERSUADE2'), +(28939, -1609503, 'I''m through being courteous with your kind, human! What is the "Crimson Dawn?"', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'player SAY_PERSUADE3'), +(28939, -1609504, 'Is your life worth so little? Just tell me what I need to know about "Crimson Dawn" and I''ll end your suffering quickly.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'player SAY_PERSUADE4'), +(28939, -1609505, 'I can keep this up for a very long time, Scarlet dog! Tell me about the "Crimson Dawn!"', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'player SAY_PERSUADE5'), +(28939, -1609506, 'What is the "Crimson Dawn?"', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'player SAY_PERSUADE6'), +(28939, -1609507, '"Crimson Dawn!" What is it! Speak!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'player SAY_PERSUADE7'), +(28939, -1609508, 'You''ll be hanging in the gallows shortly, Scourge fiend!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'crusader SAY_CRUSADER1'), +(28939, -1609509, 'You''ll have to kill me, monster! I will tell you NOTHING!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'crusader SAY_CRUSADER2'), +(28939, -1609510, 'You hit like a girl. Honestly. Is that the best you can do?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'crusader SAY_CRUSADER3'), +(28939, -1609511, 'ARGH! You burned my last good tabard!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'crusader SAY_CRUSADER4'), +(28939, -1609512, 'Argh... The pain... The pain is almost as unbearable as the lashings I received in grammar school when I was but a child.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'crusader SAY_CRUSADER5'), +(28939, -1609513, 'I used to work for Grand Inquisitor Isillien! Your idea of pain is a normal mid-afternoon for me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'crusader SAY_CRUSADER6'), +(28939, -1609514, 'I''ll tell you everything! STOP! PLEASE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 20, 'break crusader SAY_PERSUADED1'), +(28939, -1609515, 'We... We have only been told that the "Crimson Dawn" is an awakening. You see, the Light speaks to the High General. It is the Light...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 20, 'break crusader SAY_PERSUADED2'), +(28939, -1609516, 'The Light that guides us. The movement was set in motion before you came... We... We do as we are told. It is what must be done.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 20, 'break crusader SAY_PERSUADED3'), +(28939, -1609517, 'I know very little else... The High General chooses who may go and who must stay behind. There''s nothing else... You must believe me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 20, 'break crusader SAY_PERSUADED4'), +(28939, -1609518, 'LIES! The pain you are about to endure will be talked about for years to come!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'break crusader SAY_PERSUADED5'), +(28939, -1609519, 'NO! PLEASE! There is one more thing that I forgot to mention... A courier comes soon... From Hearthglen. It...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 20, 'break crusader SAY_PERSUADED6'), +(29076, -1609531, 'Hrm, what a strange tree. I must investigate.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Scarlet Courier SAY_TREE1'), +(29076, -1609532, 'What''s this!? This isn''t a tree at all! Guards! Guards!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Scarlet Courier SAY_TREE2'), +(28912, -1609561, 'I''ll need to get my runeblade and armor... Just need a little more time.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 399, 'Koltira Deathweaver SAY_BREAKOUT1'), +(28912, -1609562, 'I''m still weak, but I think I can get an anti-magic barrier up. Stay inside it or you''ll be destroyed by their spells.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Koltira Deathweaver SAY_BREAKOUT2'), +(28912, -1609563, 'Maintaining this barrier will require all of my concentration. Kill them all!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 16, 'Koltira Deathweaver SAY_BREAKOUT3'), +(28912, -1609564, 'There are more coming. Defend yourself! Don''t fall out of the anti-magic field! They''ll tear you apart without its protection!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Koltira Deathweaver SAY_BREAKOUT4'), +(28912, -1609565, 'I can''t keep barrier up much longer... Where is that coward?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Koltira Deathweaver SAY_BREAKOUT5'), +(28912, -1609566, 'The High Inquisitor comes! Be ready, death knight! Do not let him draw you out of the protective bounds of my anti-magic field! Kill him and take his head!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Koltira Deathweaver SAY_BREAKOUT6'), +(28912, -1609567, 'Stay in the anti-magic field! Make them come to you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Koltira Deathweaver SAY_BREAKOUT7'), +(28912, -1609568, 'The death of the High Inquisitor of New Avalon will not go unnoticed. You need to get out of here at once! Go, before more of them show up. I''ll be fine on my own.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Koltira Deathweaver SAY_BREAKOUT8'), +(28912, -1609569, 'I''ll draw their fire, you make your escape behind me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Koltira Deathweaver SAY_BREAKOUT9'), +(28912, -1609570, 'Your High Inquisitor is nothing more than a pile of meat, Crusaders! There are none beyond the grasp of the Scourge!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'Koltira Deathweaver SAY_BREAKOUT10'), +(29001, -1609581, 'The Crusade will purge your kind from this world!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'High Inquisitor Valroth start'), +(29001, -1609582, 'It seems that I''ll need to deal with you myself. The High Inquisitor comes for you, Scourge!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'High Inquisitor Valroth aggro'), +(29001, -1609583, 'You have come seeking deliverance? I have come to deliver!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'High Inquisitor Valroth yell'), +(29001, -1609584, 'LIGHT PURGE YOU!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'High Inquisitor Valroth yell'), +(29001, -1609585, 'Coward!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'High Inquisitor Valroth yell'), +(29001, -1609586, 'High Inquisitor Valroth''s remains fall to the ground.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'High Inquisitor Valroth death'), +(29173, -1609201, 'Soldiers of the Scourge, stand ready! You will soon be able to unleash your fury upon the Argent Dawn!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14677, 1, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609202, 'The sky weeps at the devastation of sister earth! Soon, tears of blood will rain down upon us!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14678, 1, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609203, 'Death knights of Acherus, the death march begins!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14681, 1, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609204, 'Soldiers of the Scourge, death knights of Acherus, minions of the darkness: hear the call of the Highlord!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14679, 1, 0, 22, 'Highlord Darion Mograine'), +(29173, -1609205, 'RISE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14680, 1, 0, 15, 'Highlord Darion Mograine'), +(29173, -1609206, 'The skies turn red with the blood of the fallen! The Lich King watches over us, minions! Onward! Leave only ashes and misery in your destructive wake!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14682, 1, 0, 25, 'Highlord Darion Mograine'), +(29173, -1609207, 'Scourge armies approach!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'Korfax, Champion of the Light'), +(29173, -1609208, 'Stand fast, brothers and sisters! The Light will prevail!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14487, 1, 0, 0, 'Lord Maxwell Tyrosus'), +(29173, -1609209, 'Kneel before the Highlord!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14683, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609210, 'You stand no chance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14684, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609211, 'The Scourge will destroy this place!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14685, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609212, 'Your life is forfeit.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14686, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609213, 'Life is meaningless without suffering.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14687, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609214, 'How much longer will your forces hold out?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14688, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609215, 'The Argent Dawn is finished!"', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14689, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609216, 'Spare no one!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14690, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609217, 'What is this?! My... I cannot strike...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14691, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609218, 'Obey me, blade!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14692, 1, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609219, 'You will do as I command! I am in control here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14693, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609220, 'I can not... the blade fights me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14694, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609221, 'What is happening to me?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14695, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609222, 'Power...wanes...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14696, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609223, 'Ashbringer defies me...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14697, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609224, 'Minions, come to my aid!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14698, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609225, 'You cannot win, Darion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14584, 1, 0, 0, 'Highlord Tirion Fordring'), +(29173, -1609226, 'Bring them before the chapel!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14585, 1, 0, 0, 'Highlord Tirion Fordring'), +(29173, -1609227, 'Stand down, death knights. We have lost... The Light... This place... No hope...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14699, 0, 0, 68, 'Highlord Darion Mograine'), +(29173, -1609228, 'Have you learned nothing, boy? You have become all that your father fought against! Like that coward, Arthas, you allowed yourself to be consumed by the darkness...the hate... Feeding upon the misery of those you tortured and killed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14586, 0, 0, 378, 'Highlord Tirion Fordring'), +(29173, -1609229, 'Your master knows what lies beneath the chapel. It is why he dares not show his face! He''s sent you and your death knights to meet their doom, Darion.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14587, 0, 0, 25, 'Highlord Tirion Fordring'), +(29173, -1609230, 'What you are feeling right now is the anguish of a thousand lost souls! Souls that you and your master brought here! The Light will tear you apart, Darion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14588, 0, 0, 1, 'Highlord Tirion Fordring'), +(29173, -1609231, 'Save your breath, old man. It might be the last you ever draw.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14700, 0, 0, 25, 'Highlord Darion Mograine'), +(29173, -1609232, 'My son! My dear, beautiful boy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14493, 0, 0, 0, 'Highlord Alexandros Mograine'), +(29173, -1609233, 'Father!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14701, 0, 0, 5, 'Highlord Darion Mograine'), +(29173, -1609234, 'Argh...what...is...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14702, 0, 0, 68, 'Highlord Darion Mograine'), +(29173, -1609235, 'Father, you have returned!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14703, 0, 0, 0, 'Darion Mograine'), +(29173, -1609236, 'You have been gone a long time, father. I thought...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14704, 0, 0, 0, 'Darion Mograine'), +(29173, -1609237, 'Nothing could have kept me away from here, Darion. Not from my home and family.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14494, 0, 0, 1, 'Highlord Alexandros Mograine'), +(29173, -1609238, 'Father, I wish to join you in the war against the undead. I want to fight! I can sit idle no longer!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14705, 0, 0, 6, 'Darion Mograine'), +(29173, -1609239, 'Darion Mograine, you are barely of age to hold a sword, let alone battle the undead hordes of Lordaeron! I couldn''t bear losing you. Even the thought...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14495, 0, 0, 1, 'Highlord Alexandros Mograine'), +(29173, -1609240, 'If I die, father, I would rather it be on my feet, standing in defiance against the undead legions! If I die, father, I die with you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14706, 0, 0, 6, 'Darion Mograine'), +(29173, -1609241, 'My son, there will come a day when you will command the Ashbringer and, with it, mete justice across this land. I have no doubt that when that day finally comes, you will bring pride to our people and that Lordaeron will be a better place because of you. But, my son, that day is not today.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14496, 0, 0, 1, 'Highlord Alexandros Mograine'), +(29173, -1609242, 'Do not forget...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14497, 0, 0, 6, 'Highlord Alexandros Mograine'), +(29173, -1609243, 'Touching...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14803, 1, 0, 0, 'The Lich King'), +(29173, -1609244, 'You have''ve betrayed me! You betrayed us all you monster! Face the might of Mograine!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14707, 1, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609245, 'He''s mine now...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14805, 0, 0, 0, 'The Lich King'), +(29173, -1609246, 'Pathetic...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14804, 0, 0, 0, 'The Lich King'), +(29173, -1609247, 'You''re a damned monster, Arthas!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14589, 0, 0, 25, 'Highlord Tirion Fordring'), +(29173, -1609248, 'You were right, Fordring. I did send them in to die. Their lives are meaningless, but yours...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14806, 0, 0, 1, 'The Lich King'), +(29173, -1609249, 'How simple it was to draw the great Tirion Fordring out of hiding. You''ve left yourself exposed, paladin. Nothing will save you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14807, 0, 0, 1, 'The Lich King'), +(29173, -1609250, 'ATTACK!!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14488, 1, 0, 0, 'Lord Maxwell Tyrosus'), +(29173, -1609251, 'APOCALYPSE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14808, 1, 0, 0, 'The Lich King'), +(29173, -1609252, 'That day is not today...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14708, 0, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609253, 'Tirion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14709, 1, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609254, 'ARTHAS!!!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14591, 1, 0, 0, 'Highlord Tirion Fordring'), +(29173, -1609255, 'What is this?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14809, 1, 0, 0, 'The Lich King'), +(29173, -1609256, 'Your end.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14592, 1, 0, 0, 'Highlord Tirion Fordring'), +(29173, -1609257, 'Impossible...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14810, 1, 0, 0, 'The Lich King'), +(29173, -1609258, 'This... isn''t... over...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14811, 1, 0, 25, 'The Lich King'), +(29173, -1609259, 'When next we meet it won''t be on holy ground, paladin.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14812, 1, 0, 1, 'The Lich King'), +(29173, -1609260, 'Rise, Darion, and listen...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14593, 0, 0, 0, 'Highlord Tirion Fordring'), +(29173, -1609261, 'We have all been witness to a terrible tragedy. The blood of good men has been shed upon this soil! Honorable knights, slain defending their lives - our lives!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14594, 0, 0, 0, 'Highlord Tirion Fordring'), +(29173, -1609262, 'And while such things can never be forgotten, we must remain vigilant in our cause!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14595, 0, 0, 0, 'Highlord Tirion Fordring'), +(29173, -1609263, 'The Lich King must answer for what he has done and must not be allowed to cause further destruction to our world.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14596, 0, 0, 0, 'Highlord Tirion Fordring'), +(29173, -1609264, 'I make a promise to you now, brothers and sisters: The Lich King will be defeated! On this day, I call for a union.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14597, 0, 0, 0, 'Highlord Tirion Fordring'), +(29173, -1609265, 'The Argent Dawn and the Order of the Silver Hand will come together as one! We will succeed where so many before us have failed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14598, 0, 0, 0, 'Highlord Tirion Fordring'), +(29173, -1609266, 'We will take the fight to Arthas and tear down the walls of Icecrown!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14599, 0, 0, 15, 'Highlord Tirion Fordring'), +(29173, -1609267, 'The Argent Crusade comes for you, Arthas!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14600, 1, 0, 15, 'Highlord Tirion Fordring'), +(29173, -1609268, 'So too do the Knights of the Ebon Blade... While our kind has no place in your world, we will fight to bring an end to the Lich King. This I vow!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14710, 0, 0, 1, 'Highlord Darion Mograine'), +(29173, -1609269, 'Thousands of Scourge rise up at the Highlord''s command.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, ''), +(29173, -1609270, 'The army marches towards Light''s Hope Chapel.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, ''), +(29173, -1609271, 'After over a hundred Defenders of the Light fall, Highlord Tirion Fordring arrives.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, ''), +(29173, -1609272, '%s flee', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Orbaz'), +(29173, -1609273, '%s kneels in defeat before Tirion Fordring.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609274, '%s arrives.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Highlord Alexandros Mograine'), +(29173, -1609275, '%s becomes a shade of his past, and walks up to his father.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609276, '%s hugs his father.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Darion Mograine'), +(29173, -1609277, '%s disappears, and the Lich King appears.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Alexandros'), +(29173, -1609278, '%s becomes himself again...and is now angry.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609279, '%s casts a spell on Tirion.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'The Lich King'), +(29173, -1609280, '%s gasps for air.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Highlord Tirion Fordring'), +(29173, -1609281, '%s casts a powerful spell, killing the Defenders and knocking back the others.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'The Lich King'), +(29173, -1609282, '%s throws the Corrupted Ashbringer to Tirion, who catches it. Tirion becomes awash with Light, and the Ashbringer is cleansed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609283, '%s collapses.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Highlord Darion Mograine'), +(29173, -1609284, '%s charges towards the Lich King, Ashbringer in hand and strikes the Lich King.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Highlord Tirion Fordring'), +(29173, -1609285, '%s disappears. Tirion walks over to where Darion lay', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'The Lich King'), +(29173, -1609286, 'Light washes over the chapel ? the Light of Dawn is uncovered.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, ''), +(4832, -1048000, 'Just...Dust...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5803, 1, 0, 0, ''), +(4832, -1048001, 'Sleep...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5804, 1, 0, 0, ''), +(4832, -1048002, 'Who dares disturb my meditation!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5805, 1, 0, 0, ''), +(30007, -1571035, 'The battle is about to begin! Am I reading this card right It... It''s the nefarious magnataur lord, STINKBEARD! Yes, folks, STINKBEARD! Chitchat dosen''t stand a chance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13363, 1, 0, 0, ''), +(25504, -1750040, 'My father''s aura is quite strong,he cannot be far. Could you be a doll and fight off the monsters wandering throught the mist?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_mootoo_the_younger'), +(25504, -1750041, 'Watch out for the monsters!Which way should we go first? Let''s try this way...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_mootoo_the_younger'), +(25504, -1750042, 'What could this be?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_mootoo_the_younger'), +(25504, -1750043, 'There''s no sign of it ending! Where could my father be?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_mootoo_the_younger'), +(25504, -1750044, 'Father! You''re safe!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_mootoo_the_younger'), +(25589, -1700003, 'I''ll make you a deal: If you get me out of here alive,you''ll get a reward larger than you can imagine!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_bonker_togglevolt'), +(25589, -1700002, 'I AM NOT AN APPETIZER!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_bonker_togglevolt'), +(25589, -1700001, 'Right then,no time to waste. Lets get outa here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_bonker_togglevolt'), +(349, -1000464, 'My wounds are grave. Forgive my slow pace but my injuries won''t allow me to walk any faster.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(349, -1000465, 'Ah,fresh air,at last! I need a moment to reset.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(349, -1000466, 'The Blackrock infestation is thick in these parts. I will do my best to keep the pace. Let''s go!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(349, -1000467, 'Marshal Marris,sir. Corporal Keeshan of the 12th Sabre Regiment returned from battle and reporting for duty!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(349, -1000468, 'Brave adventurer,thank you for rescuing me! I am sure Marshal Marris will reward your kind deed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(6729, -1048003, 'Aku''mai is dead! At last,I can leave this wretched place.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(6729, -1048004, 'Speak with me to hear my tale', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(4275, -1033009, 'Who dares interfere with the Sons of Arugal?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(7998, -1090000, 'With your help,I can evaluate these tunnels.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090001, 'Let''s see if we can find out where these Troggs are coming from... and put a stop to the invasion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090002, 'Such devastation... what horrible mess...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090003, 'It''s quiet here...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090004, '...too quiet.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090005, 'Look! Over there at the tunnel wall!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090006, 'Trogg incrusion! Defend me while i blast the hole closed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090007, 'The charges are set. Get back before they blow!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090008, 'Incoming blast in 10 seconds!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(7998, -1090009, 'Incoming blast in 5 seconds. Clear the tunnel!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(7998, -1090010, 'FIRE IN THE HOLE', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(7998, -1090011, 'Well done! Without your help I would have never been able to thwart that wave of troggs.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090012, 'Did you hear something?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090013, 'I heard something over there.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090014, 'More troggs! Ward them off as I prepare the explosives!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090015, 'The final charge is set. Stand back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(7998, -1090016, 'The final charge is set. Stand back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090017, 'Incoming blast in 10 seconds!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(7998, -1090018, 'Incoming blast in 5 seconds. Clear the tunnel!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(7998, -1090019, 'I don''t think one charge is going to cut it. Keep fending them off!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090020, 'FIRE IN THE HOLE', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(7998, -1090021, 'Well done! Without your help I would have never been able to thwart that wave of troggs.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090022, 'Did you hear something?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090023, 'I heard something over there.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090024, 'More troggs! Ward them off as I prepare the explosives!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090025, 'The final charge is set. Stand back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(7998, -1090026, '10 seconds to blast! Stand back!!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(7998, -1090027, '5 seconds until detonation!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(7361, -1090028, 'We come from below! You can never stop us!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(23861, -1000469, 'It is too late for us,living one. Take yourself and your friend away from here before you both are... claimed...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(23861, -1000470, 'Go away,whoever you are! Witch Hill is mine... mine!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(23861, -1000471, 'It was... terrible... the demon...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, ''), +(23864, -1000472, 'This land was mine long before your wretched kind set foot here.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(23864, -1000473, 'All who venture here belong to me,including you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(26631, -1600000, 'The chill that you feel is the herald of your doom!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13173, 1, 0, 0, 'novos SAY_AGGRO'), +(26631, -1600001, 'Such is the fate of all who oppose the Lich King.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13175, 1, 0, 0, 'novos SAY_KILL'), +(26631, -1600002, 'Your efforts... are in vain.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13174, 1, 0, 0, 'novos SAY_DEATH'), +(26631, -1600003, 'Bolster my defenses! Hurry, curse you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13176, 1, 0, 0, 'novos SAY_NECRO_ADD'), +(26631, -1600004, 'Surely you can see the futility of it all!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13177, 1, 0, 0, 'novos SAY_REUBBLE_1'), +(26631, -1600005, 'Just give up and die already!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13178, 1, 0, 0, 'novos SAY_REUBBLE_2'), +(26630, -1600006, 'More grunts, more glands, more FOOD!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13181, 1, 0, 0, 'trollgore SAY_AGGRO'), +(26630, -1600007, 'You have gone, me gonna eat you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13185, 1, 0, 0, 'trollgore SAY_KILL'), +(26630, -1600008, 'So hungry! Must feed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13182, 1, 0, 0, 'trollgore SAY_CONSUME'), +(26630, -1600009, 'Corpse go boom!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13184, 1, 0, 0, 'trollgore SAY_EXPLODE'), +(26630, -1600010, 'Aaaargh...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13183, 1, 0, 0, 'trollgore SAY_DEATH'), +(26632, -1600011, 'Tharon''ja sees all! The work of mortals shall not end the eternal dynasty!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13862, 1, 0, 0, 'tharon''ja SAY_AGGRO'), +(26632, -1600012, 'As Tharon''ja predicted.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13863, 1, 0, 0, 'tharon''ja SAY_KILL_1'), +(26632, -1600013, 'As it was written.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13864, 1, 0, 0, 'tharon''ja SAY_KILL_2'), +(26632, -1600014, 'Your flesh serves Tharon''ja now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13865, 1, 0, 0, 'tharon''ja SAY_FLESH_1'), +(26632, -1600015, 'Tharon''ja has a use for your mortal shell!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13866, 1, 0, 0, 'tharon''ja SAY_FLESH_2'), +(26632, -1600016, 'No! A taste... all too brief!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13867, 1, 0, 0, 'tharon''ja SAY_SKELETON_1'), +(26632, -1600017, 'Tharon''ja will have more!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13868, 1, 0, 0, 'tharon''ja SAY_SKELETON_2'), +(26632, -1600018, 'I''m... impossible! Tharon''ja is eternal! Tharon''ja... is...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13869, 1, 0, 0, 'tharon''ja SAY_DEATH'), +(31134, -1608001, 'I will end the Kirin Tor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13952, 1, 0, 0, 'cyanigosa SAY_SLAY_1'), +(31134, -1608002, 'Dalaran will fall!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13953, 1, 0, 0, 'cyanigosa SAY_SLAY_2'), +(31134, -1608003, 'So ends your defiance of the Spell-Weaver!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13954, 1, 0, 0, 'cyanigosa SAY_SLAY_3'), +(31134, -1608004, 'Perhaps... we have... underestimated... you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13955, 1, 0, 0, 'cyanigosa SAY_DEATH'), +(31134, -1608005, 'A valiant defense, but this city must be razed. I will fulfill Malygos''s wishes myself!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13946, 1, 0, 0, 'cyanigosa SAY_SPAWN'), +(31134, -1608006, 'Am I interrupting?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13951, 1, 0, 0, 'cyanigosa SAY_DISRUPTION'), +(31134, -1608007, 'Shiver and die!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13948, 1, 0, 0, 'cyanigosa SAY_BREATH_ATTACK'), +(31134, -1608008, 'The world has forgotten what true magic is! Let this be a reminder!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13949, 1, 0, 0, 'cyanigosa SAY_SPECIAL_ATTACK_1'), +(31134, -1608009, 'Who among you can withstand my power?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13950, 1, 0, 0, 'cyanigosa SAY_SPECIAL_ATTACK_2'), +(29315, -1608010, 'Not--caww--get in way of--rrak-rrak--flee!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14219, 1, 0, 0, 'erekem SAY_AGGRO'), +(29315, -1608011, 'Ya ya ya yaaaa', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14222, 1, 0, 0, 'erekem SAY_SLAY_1'), +(29315, -1608012, 'Preeciouuss life---Ra-aak---Wasted!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14223, 1, 0, 0, 'erekem SAY_SLAY_2'), +(29315, -1608013, 'Only the strong---Ra-aak---Survive!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14224, 1, 0, 0, 'erekem SAY_SLAY_3'), +(29315, -1608014, 'No--kaw, kaw--flee...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14225, 1, 0, 0, 'erekem SAY_DEATH'), +(29315, -1608015, 'Free to--mm--fly now. Ra-aak... Not find us--ekh-ekh! Escape!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14218, 1, 0, 0, 'erekem SAY_SPAWN'), +(29315, -1608016, 'My---raaak--favorite! Awk awk awk! Raa-kaa!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14220, 1, 0, 0, 'erekem SAY_ADD_KILLED'), +(29315, -1608017, 'Nasty little...A-ak, kaw! Kill! Yes, kill you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14221, 1, 0, 0, 'erekem SAY_BOTH_ADDS_KILLED'), +(29313, -1608018, 'Stand aside, mortals!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14230, 1, 0, 0, 'ichoron SAY_AGGRO'), +(29313, -1608019, 'I am a force of nature!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14234, 1, 0, 0, 'ichoron SAY_SLAY_1'), +(29313, -1608020, 'I shall pass!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14235, 1, 0, 0, 'ichoron SAY_SLAY_2'), +(29313, -1608021, 'You can not stop the tide!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14236, 1, 0, 0, 'ichoron SAY_SLAY_3'), +(29313, -1608022, 'I... recede.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14237, 1, 0, 0, 'ichoron SAY_DEATH'), +(29313, -1608023, 'I... am fury... unrestrained!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14229, 1, 0, 0, 'ichoron SAY_SPAWN'), +(29313, -1608024, 'I shall consume, decimate, devastate, and destroy! Yield now to the wrath of the pounding sea!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14231, 1, 0, 0, 'ichoron SAY_ENRAGE'), +(29313, -1608025, 'I will not be contained! Ngyah!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14233, 1, 0, 0, 'ichoron SAY_SHATTER'), +(29313, -1608026, 'Water can hold any form, take any shape... overcome any obstacle.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14232, 1, 0, 0, 'ichoron SAY_BUBBLE'), +(29266, -1608027, 'It seems my freedom must be bought with blood...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14498, 1, 0, 0, 'Xevozz SAY_AGGRO'), +(29266, -1608028, 'Nothing personal.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14504, 1, 0, 0, 'Xevozz SAY_SLAY_1'), +(29266, -1608029, 'Business concluded.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14505, 1, 0, 0, 'Xevozz SAY_SLAY_2'), +(29266, -1608030, 'Profit!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14506, 1, 0, 0, 'Xevozz SAY_SLAY_3'), +(29266, -1608031, 'This is an... unrecoverable... loss.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14507, 1, 0, 0, 'Xevozz SAY_DEATH'), +(29266, -1608032, 'Back in business! Now to execute an exit strategy.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14498, 1, 0, 0, 'Xevozz SAY_SPAWN'), +(29266, -1608033, 'It would seem that a renegotiation is in order.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14503, 1, 0, 0, 'Xevozz SAY_CHARGED'), +(29266, -1608034, 'The air teems with latent energy... quite the harvest!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14501, 1, 0, 0, 'Xevozz SAY_REPEAT_SUMMON_1'); +INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +(29266, -1608035, 'Plentiful, exploitable resources... primed for acquisition!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14502, 1, 0, 0, 'Xevozz SAY_REPEAT_SUMMON_2'), +(29266, -1608036, 'Intriguing... a high quantity of arcane energy is near. Time for some prospecting...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14500, 1, 0, 0, 'Xevozz SAY_SUMMON_ENERGY'), +(29314, -1608037, 'Eradicate.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13996, 1, 0, 0, 'zuramat SAY_AGGRO'), +(29314, -1608038, 'More... energy.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13999, 1, 0, 0, 'zuramat SAY_SLAY_1'), +(29314, -1608039, 'Relinquish.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14000, 1, 0, 0, 'zuramat SAY_SLAY_2'), +(29314, -1608040, 'Fall... to shadow.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14001, 1, 0, 0, 'zuramat SAY_SLAY_3'), +(29314, -1608041, 'Disperse.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14002, 1, 0, 0, 'zuramat SAY_DEATH'), +(29314, -1608042, 'I am... renewed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13995, 1, 0, 0, 'zuramat SAY_SPAWN'), +(29314, -1608043, 'Know... my... pain.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13997, 1, 0, 0, 'zuramat SAY_SHIELD'), +(29314, -1608044, 'Gaze... into the void.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13998, 1, 0, 0, 'zuramat SAY_WHISPER'), +(30658, -1608045, 'Prison guards, we are leaving! These adventurers are taking over! Go go go', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'sinclari SAY_SINCLARI_1'), +(26588, -1800013, 'Thank you for helping me get back to the camp. Go tell Walter that I''m safe now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, '12027'), +(26588, -1800012, 'Are you ready, Mr. Floppy? Stay close to me and watch out for those wolves!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, '12027'), +(26588, -1800011, 'The Ravenous Worg chomps down on Mr. Floppy', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, '12027'), +(26588, -1800010, 'Mr. Floppy revives', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, '12027'), +(26588, -1800009, 'I think I see the camp! We''re almost home, Mr. Floppy! Let''s go!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, '12027'), +(26588, -1800008, 'Mr. Floppy, you''re ok! Thank you so much for saving Mr. Floppy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, '12027'), +(26588, -1800007, 'Don''t go toward the light, Mr. Floppy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, '12027'), +(26588, -1800006, 'Let''s get out of here before more wolves find us!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, '12027'), +(26588, -1800005, 'There''s a big meanie attacking Mr. Floppy! Help! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, '12027'), +(26588, -1800004, 'He''s gonna eat Mr. Floppy! You gotta help Mr. Floppy! You just gotta!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, '12027'), +(26588, -1800003, 'Oh, no! Look, it''s another wolf, and it''s a biiiiiig one!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, '12027'), +(26588, -1800002, 'He''s going for Mr. Floppy! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, '12027'), +(26588, -1800001, 'Um... I think one of those wolves is back...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, '12027'), +(28090, -1571036, 'We''ll cleanse this place! Arthas beware!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'crusade recruit RECRUIT_SAY1'), +(28090, -1571037, 'Your''re right! We can do this!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'crusade recruit RECRUIT_SAY2'), +(28090, -1571038, 'Your''re right! What was I thinking? Bring on the Scourge!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'crusade recruit RECRUIT_SAY3'), +(32871, -1603001, 'Loss of life, unavoidable.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15387, 1, 0, 0, 'algalon SAY_SLAY_1'), +(32871, -1603002, 'I do what I must.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15388, 1, 0, 0, 'algalon SAY_SLAY_2'), +(32871, -1603003, 'See your world through my eyes: A universe so vast as to be immeasurable - incomprehensible even to your greatest minds.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15390, 1, 0, 0, 'algalon SAY_ENGADED_FOR_FIRTS_TIME'), +(32871, -1603004, 'Beware!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15391, 1, 0, 0, 'algalon SAY_PHASE_2'), +(32871, -1603005, 'The stars come to my aid.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15392, 1, 0, 0, 'algalon SAY_SUMMON_COLLAPSING_STAR'), +(32871, -1603006, 'I have seen worlds bathed in the Makers'' flames. Their denizens fading without so much as a whimper. Entire planetary systems born and raised in the time that it takes your mortal hearts to beat once. Yet all throughout, my own heart, devoid of emotion... of empathy. I... have... felt... NOTHING! A million, million lives wasted. Had they all held within them your tenacity? Had they all loved life as you do?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15393, 1, 0, 0, 'algalon SAY_DEATH_1'), +(32871, -1603007, 'Perhaps it is your imperfection that which grants you free will. That allows you to persevere against cosmically calculated odds. You prevailed where the Titans'' own perfect creations have failed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15401, 1, 0, 0, 'algalon SAY_DEATH_2'), +(32871, -1603008, 'I''ve rearranged the reply code. Your planet will be spared. I cannot be certain of my own calculations anymore.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15402, 1, 0, 0, 'algalon SAY_DEATH_3'), +(32871, -1603009, 'I lack the strength to transmit the signal. You must hurry. Find a place of power close to the skies.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15403, 1, 0, 0, 'algalon SAY_DEATH_4'), +(32871, -1603010, 'Do not worry about my fate $N. If the signal is not transmitted in time re-origination will proceed regardless. Save. Your. World.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15404, 1, 0, 0, 'algalon SAY_DEATH_5'), +(32871, -1603011, 'You are... out of time.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15394, 1, 0, 0, 'algalon SAY_BERSERK'), +(32871, -1603012, 'Witness the fury of cosmos!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15396, 1, 0, 0, 'algalon SAY_BIGBANG_1'), +(32871, -1603013, 'Behold the tools of creation!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15397, 1, 0, 0, 'algalon SAY_BIGBANG_2'), +(32871, -1603014, 'Analysis complete. There is partial corruption in the planet''s life-support systems as well as complete corruption in most of the planet''s defense mechanisms.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15398, 1, 0, 0, 'algalon SAY_TIMER_1'), +(32871, -1603015, 'Begin uplink: Reply Code: ''Omega''. Planetary re-origination requested.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15399, 1, 0, 0, 'algalon SAY_TIMER_2'), +(32871, -1603016, 'Farewell, mortals. Your bravery is admirable, for such flawed creatures.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15400, 1, 0, 0, 'algalon SAY_TIMER_3'), +(32871, -1603017, 'Trans-location complete. Commencing planetary analysis of Azeroth.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15405, 1, 0, 0, 'algalon SAY_SUMMON_1'), +(32871, -1603018, 'Stand back, mortals. I am not here to fight you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15406, 1, 0, 0, 'algalon SAY_SUMMON_2'), +(32871, -1603019, 'It is in the universe''s best interest to re-originate this planet should my analysis find systemic corruption. Do not interfere.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15407, 1, 0, 0, 'algalon SAY_SUMMON_3'), +(32867, -1603020, 'You will not defeat the Assembly of Iron so easily, invaders!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15674, 1, 0, 0, 'steelbreaker SAY_AGGRO'), +(32867, -1603021, 'So fragile and weak!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15675, 1, 0, 0, 'steelbreaker SAY_SLAY_1'), +(32867, -1603022, 'Flesh... such a hindrance.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15676, 1, 0, 0, 'steelbreaker SAY_SLAY_2'), +(32867, -1603023, 'You seek the secrets of Ulduar? Then take them!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15677, 1, 0, 0, 'steelbreaker SAY_POWER'), +(32867, -1603024, 'My death only serves to hasten your demise.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15678, 1, 0, 0, 'steelbreaker SAY_DEATH_1'), +(32867, -1603025, 'Impossible!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15679, 1, 0, 0, 'steelbreaker SAY_DEATH_2'), +(32867, -1603026, 'This meeting of the Assembly of Iron is adjourned!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15680, 1, 0, 0, 'steelbreaker SAY_BERSERK'), +(32927, -1603030, 'Nothing short of total decimation will suffice.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15657, 1, 0, 0, 'Molgeim SAY_AGGRO'), +(32927, -1603031, 'The world suffers yet another insignificant loss.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15658, 1, 0, 0, 'Molgeim SAY_SLAY_1'), +(32927, -1603032, 'Death is the price of your arrogance.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15659, 1, 0, 0, 'Molgeim SAY_SLAY_2'), +(32927, -1603033, 'Decipher this!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15660, 1, 0, 0, 'Molgeim SAY_RUNE_DEATH'), +(32927, -1603034, 'Face the lightning surge!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15661, 1, 0, 0, 'Molgeim SAY_SUMMON'), +(32927, -1603035, 'The legacy of storms shall not be undone.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15662, 1, 0, 0, 'Molgeim SAY_DEATH_1'), +(32927, -1603036, 'What have you gained from my defeat? You are no less doomed, mortals!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15663, 1, 0, 0, 'Molgeim SAY_DEATH_2'), +(32927, -1603037, 'This meeting of the Assembly of Iron is adjourned!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15664, 1, 0, 0, 'Molgeim SAY_BERSERK'), +(32857, -1603040, 'Whether the world''s greatest gnats or the world''s greatest heroes, you''re still only mortal!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15684, 1, 0, 0, 'Brundir SAY_AGGRO'), +(32857, -1603041, 'A merciful kill!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15685, 1, 0, 0, 'Brundir SAY_SLAY_1'), +(32857, -1603042, 'HAH!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15686, 1, 0, 0, 'Brundir SAY_SLAY_2'), +(32857, -1603043, 'Stand still and stare into the light!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15687, 1, 0, 0, 'Brundir SAY_SPECIAL'), +(32857, -1603044, 'Let the storm clouds rise and rain down death from above!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15688, 1, 0, 0, 'Brundir SAY_FLIGHT'), +(32857, -1603045, 'The power of the storm lives on...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15689, 1, 0, 0, 'Brundir SAY_DEATH_1'), +(32857, -1603046, 'You rush headlong into the maw of madness!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15690, 1, 0, 0, 'Brundir SAY_DEATH_2'), +(32857, -1603047, 'This meeting of the Assembly of Iron is adjourned!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15691, 1, 0, 0, 'Brundir SAY_BERSERK'), +(33515, -1603050, 'Some things are better left alone!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15473, 1, 0, 0, 'Auriaya SAY_AGGRO'), +(33515, -1603051, 'The secret dies with you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15474, 1, 0, 0, 'Auriaya SAY_SLAY_1'), +(33515, -1603052, 'There is no escape!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15475, 1, 0, 0, 'Auriaya SAY_SLAY_2'), +(33515, -1603053, 'Auriaya screams in agony.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 6, 0, 15476, 'Auriaya SAY_DEATH'), +(33515, -1603054, 'You waste my time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15477, 1, 0, 0, 'Auriaya SAY_BERSERK'), +(33113, -1603060, 'Hostile entities detected. Threat assessment protocol active. Primary target engaged. Time minus thirty seconds to re-evaluation.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15506, 1, 0, 0, 'Flame Leviathan SAY_AGGRO'), +(33113, -1603061, 'Threat assessment routine modified. Current target threat level: zero. Acquiring new target.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15521, 1, 0, 0, 'Flame Leviathan SAY_SLAY'), +(33113, -1603062, 'Total systems failure. Defense protocols breached. Leviathan Unit shutting down.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15520, 1, 0, 0, 'Flame Leviathan SAY_DEATH'), +(33113, -1603063, 'Threat re-evaluated. Target assessment complete. Changing course.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15507, 1, 0, 0, 'Flame Leviathan SAY_TARGET_1'), +(33113, -1603064, 'Pursuit objective modified. Changing course.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15508, 1, 0, 0, 'Flame Leviathan SAY_TARGET_2'), +(33113, -1603065, 'Hostile entity stratagem predicted. Rerouting battle function. Changing course.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15509, 1, 0, 0, 'Flame Leviathan SAY_TARGET_3'), +(33113, -1603066, 'Orbital countermeasures enabled.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15510, 1, 0, 0, 'Flame Leviathan SAY_HARDMODE'), +(33113, -1603067, 'Alert! Static defense system failure. Orbital countermeasures disabled.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15511, 1, 0, 0, 'Flame Leviathan SAY_TOWER_NONE'), +(33113, -1603068, '''Hodir''s Fury'' online. Acquiring target.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15512, 1, 0, 0, 'Flame Leviathan SAY_TOWER_FROST'), +(33113, -1603069, '''Mimiron''s Inferno'' online. Acquiring target.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15513, 1, 0, 0, 'Flame Leviathan SAY_TOWER_FLAME'), +(33113, -1603070, '''Freya''s Ward'' online. Acquiring target.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15514, 1, 0, 0, 'Flame Leviathan SAY_TOWER_NATURE'), +(33113, -1603071, '''Thorim''s Hammer'' online. Acquiring target.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15515, 1, 0, 0, 'Flame Leviathan SAY_TOWER_STORM'), +(33113, -1603072, 'Unauthorized entity attempting circuit overload. Activating anti-personnel countermeasures.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15516, 1, 0, 0, 'Flame Leviathan SAY_PLAYER_RIDING'), +(33113, -1603073, 'System malfunction. Diverting power to support systems.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15517, 1, 0, 0, 'Flame Leviathan SAY_OVERLOAD_1'), +(33113, -1603074, 'Combat matrix overload. Powering do-o-o-own...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15518, 1, 0, 0, 'Flame Leviathan SAY_OVERLOAD_2'), +(33113, -1603075, 'System restart required. Deactivating weapon systems.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15519, 1, 0, 0, 'Flame Leviathan SAY_OVERLOAD_3'), +(32906, -1603180, 'The Conservatory must be protected!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15526, 1, 0, 0, 'Freya SAY_AGGRO'), +(32906, -1603181, 'Elders, grant me your strength!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15527, 1, 0, 0, 'Freya SAY_AGGRO_WITH_ELDER'), +(32906, -1603182, 'Forgive me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15529, 1, 0, 0, 'Freya SAY_SLAY_1'), +(32906, -1603183, 'From your death springs life anew!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15530, 1, 0, 0, 'Freya SAY_SLAY_2'), +(32906, -1603184, 'His hold on me dissipates. I can see clearly once more. Thank you, heroes.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15531, 1, 0, 0, 'Freya SAY_DEATH'), +(32906, -1603185, 'You have strayed too far, wasted too much time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15532, 1, 0, 0, 'Freya SAY_BERSERK'), +(32906, -1603186, 'Eonar, your servant requires aid!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15528, 1, 0, 0, 'Freya SAY_SUMMON_CONSERVATOR'), +(32906, -1603187, 'Children, assist me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15533, 1, 0, 0, 'Freya SAY_SUMMON_TRIO'), +(32906, -1603188, 'The swarm of the elements shall overtake you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15534, 1, 0, 0, 'Freya SAY_SUMMON_LASHERS'), +(32906, -1603189, 'Eonar, your servant calls for your blessing!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15535, 1, 0, 0, 'Freya SAY_YS_HELP'), +(32915, -1603190, 'Matron, the Conservatory has been breached!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15483, 1, 0, 0, 'Elder Brightleaf SAY_AGGRO'), +(32915, -1603191, 'Fertilizer.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15485, 1, 0, 0, 'Elder Brightleaf SAY_SLAY_1'), +(32915, -1603192, 'Your corpse will nourish the soil!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15486, 1, 0, 0, 'Elder Brightleaf SAY_SLAY_2'), +(32915, -1603193, 'Matron, one has fallen!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15487, 1, 0, 0, 'Elder Brightleaf SAY_DEATH'), +(32913, -1603194, 'Mortals have no place here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15493, 1, 0, 0, 'Elder Ironbranch SAY_AGGRO'), +(32913, -1603195, 'I return you whence you came!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15494, 1, 0, 0, 'Elder Ironbranch SAY_SLAY_1'), +(32913, -1603196, 'BEGONE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15495, 1, 0, 0, 'Elder Ironbranch SAY_SLAY_2'), +(32913, -1603197, 'Freya! They come for you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15496, 1, 0, 0, 'Elder Ironbranch SAY_DEATH'), +(32914, -1603198, 'This place will serve as your graveyard.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15500, 1, 0, 0, 'Elder Stonebark SAY_AGGRO'), +(32914, -1603199, '<Angry roar>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15501, 1, 0, 0, 'Elder Stonebark SAY_SLAY_1'), +(32914, -1603200, 'Such a waste.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15502, 1, 0, 0, 'Elder Stonebark SAY_SLAY_2'), +(32914, -1603201, 'Matron, flee! They are ruthless....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15503, 1, 0, 0, 'Elder Stonebark SAY_DEATH'), +(32845, -1603210, 'You will suffer for this trespass!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15552, 1, 0, 0, 'Hodir SAY_AGGRO'), +(32845, -1603211, 'Tragic. To come so far, only to fail.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15553, 1, 0, 0, 'Hodir SAY_SLAY_1'), +(32845, -1603212, 'Welcome to the endless winter.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15554, 1, 0, 0, 'Hodir SAY_SLAY_2'), +(32845, -1603213, 'Winds of the north consume you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15555, 1, 0, 0, 'Hodir SAY_FLASH_FREEZE'), +(32845, -1603214, 'Hodir roars furious.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15556, 6, 0, 0, 'Hodir SAY_STALACTITE'), +(32845, -1603215, 'I... I am released from his grasp... at last.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15557, 1, 0, 0, 'Hodir SAY_DEATH'), +(32845, -1603216, 'Enough! This ends now!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15558, 1, 0, 0, 'Hodir SAY_BERSERK'), +(32845, -1603217, 'The veil of winter will protect you, champions!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15559, 1, 0, 0, 'Hodir SAY_YS_HELP'), +(32845, -1603218, 'Hodir shatters the Rare Cache of Hodir!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 6, 0, 0, 'Hodir SAY_HARD_MODE_MISSED'), +(33118, -1603220, 'Insolent whelps! Your blood will temper the weapons used to reclaim this world!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15564, 1, 0, 0, 'Ignis SAY_AGGRO'), +(33118, -1603221, 'More scraps for the scrapheap!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15569, 1, 0, 0, 'Ignis SAY_SLAY_1'), +(33118, -1603222, 'Your bones will serve as kindling!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15570, 1, 0, 0, 'Ignis SAY_SLAY_2'), +(33118, -1603223, 'I. Have. Failed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15572, 1, 0, 0, 'Ignis SAY_DEATH'), +(33118, -1603224, 'Arise, soldiers of the Iron Crucible! The Makers'' will be done!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15565, 1, 0, 0, 'Ignis SAY_SUMMON'), +(33118, -1603225, 'I will burn away your impurities!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15566, 1, 0, 0, 'Ignis SAY_SLAG_POT'), +(33118, -1603226, 'Let the inferno consume you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15567, 1, 0, 0, 'Ignis SAY_SCORCH_1'), +(33118, -1603227, 'BURN! Burn in the makers fire!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15568, 1, 0, 0, 'Ignis SAY_SCORCH_2'), +(33118, -1603228, 'Let it be finished!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15571, 1, 0, 0, 'Ignis SAY_BERSERK'), +(32930, -1603230, 'None shall pass!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15586, 1, 0, 0, 'Kologarn SAY_AGGRO'), +(32930, -1603231, 'KOL-THARISH!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15587, 1, 0, 0, 'Kologarn SAY_SLAY_1'), +(32930, -1603232, 'YOU FAIL!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15588, 1, 0, 0, 'Kologarn SAY_SLAY_2'), +(32930, -1603233, 'Just a scratch!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15589, 1, 0, 0, 'Kologarn SAY_LEFT_ARM_GONE'), +(32930, -1603234, 'Only a flesh wound!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15590, 1, 0, 0, 'Kologarn SAY_RIGHT_ARM_GONE'), +(32930, -1603235, 'OBLIVION!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15591, 1, 0, 0, 'Kologarn SAY_SHOCKWAVE'), +(32930, -1603236, 'I will squeeze the life from you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15592, 1, 0, 0, 'Kologarn SAY_GRAB_PLAYER'), +(32930, -1603237, 'Master, they come...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15593, 1, 0, 0, 'Kologarn SAY_DEATH'), +(32930, -1603238, 'I am invincible!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15594, 1, 0, 0, 'Kologarn SAY_BERSERK'), +(33350, -1603240, 'Oh, my! I wasn''t expecting company! The workshop is such a mess! How embarrassing!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15611, 1, 0, 0, 'Mimiron SAY_AGGRO'), +(33350, -1603241, 'Now why would you go and do something like that? Didn''t you see the sign that said ''DO NOT PUSH THIS BUTTON!''? How will we finish testing with the self-destruct mechanism active?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15629, 1, 0, 0, 'Mimiron SAY_HARDMODE_ON'), +(33350, -1603242, 'We haven''t much time, friends! You''re going to help me test out my latest and greatest creation. Now, before you change your minds, remember, that you kind of owe it to me after the mess you made with the XT-002.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15612, 1, 0, 0, 'Mimiron SAY_MKII_ACTIVATE'), +(33350, -1603243, 'MEDIC!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15613, 1, 0, 0, 'Mimiron SAY_MKII_SLAY_1'), +(33350, -1603244, 'I can fix that... or, maybe not! Sheesh, what a mess...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15614, 1, 0, 0, 'Mimiron SAY_MKII_SLAY_2'), +(33350, -1603245, 'WONDERFUL! Positively marvelous results! Hull integrity at 98.9 percent! Barely a dent! Moving right along.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15615, 1, 0, 0, 'Mimiron SAY_MKII_DEATH'), +(33350, -1603246, 'Behold the VX-001 Anti-personnel Assault Cannon! You might want to take cover.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15616, 1, 0, 0, 'Mimiron SAY_VX001_ACTIVATE'), +(33350, -1603247, 'Fascinating. I think they call that a "clean kill".', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15617, 1, 0, 0, 'Mimiron SAY_VX001_SLAY_1'), +(33350, -1603248, 'Note to self: Cannon highly effective against flesh.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15618, 1, 0, 0, 'Mimiron SAY_VX001_SLAY_2'), +(33350, -1603249, 'Thank you, friends! Your efforts have yielded some fantastic data! Now, where did I put-- oh, there it is!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15619, 1, 0, 0, 'Mimiron SAY_VX001_DEATH'), +(33350, -1603250, 'Isn''t it beautiful? I call it the magnificent aerial command unit!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15620, 1, 0, 0, 'Mimiron SAY_AERIAL_ACTIVATE'), +(33350, -1603251, 'Outplayed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15621, 1, 0, 0, 'Mimiron SAY_AERIAL_SLAY_1'), +(33350, -1603252, 'You can do better than that!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15622, 1, 0, 0, 'Mimiron SAY_AERIAL_SLAY_2'), +(33350, -1603253, 'Preliminary testing phase complete. Now comes the true test!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15623, 1, 0, 0, 'Mimiron SAY_AERIAL_DEATH'), +(33350, -1603254, 'Gaze upon its magnificence! Bask in its glorious, um, glory! I present you... V-07-TR-0N!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15624, 1, 0, 0, 'Mimiron SAY_V07TRON_ACTIVATE'), +(33350, -1603255, 'Prognosis: Negative!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15625, 1, 0, 0, 'Mimiron SAY_V07TRON_SLAY_1'), +(33350, -1603256, 'You''re not going to get up from that one, friend.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15626, 1, 0, 0, 'Mimiron SAY_V07TRON_SLAY_2'), +(33350, -1603257, 'It would appear that I''ve made a slight miscalculation. I allowed my mind to be corrupted by the fiend in the prison, overriding my primary directive. All systems seem to be functional now. Clear.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15627, 1, 0, 0, 'Mimiron SAY_V07TRON_DEATH'), +(33350, -1603258, 'Oh, my! It would seem that we are out of time, my friends!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15628, 1, 0, 0, 'Mimiron SAY_BERSERK'), +(33350, -1603259, 'Combat matrix enhanced. Behold wonderous rapidity!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15630, 1, 0, 0, 'Mimiron SAY_YS_HELP'), +(33210, -1603260, 'Welcome, champions! All of our attempts at grounding her have failed. We could use a hand in bring her down with these harpoon guns.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15647, 0, 0, 0, 'Exp. Commander SAY_INTRO'), +(33210, -1603261, 'Move! Quickly! She won''t remain grounded for long.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15648, 1, 0, 0, 'Exp. Commander SAY_GROUND'), +(33413, -1603270, 'Interlopers! You mortals who dare to interfere with my sport will pay... Wait--you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15733, 1, 0, 0, 'Thorim SAY_AGGRO_1'), +(33413, -1603271, 'I remember you... In the mountains... But you... what is this? Where am--', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15734, 1, 0, 0, 'Thorim SAY_AGGRO_2'), +(33413, -1603272, 'Behold the power of the storms and despair!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15735, 1, 0, 0, 'Thorim SAY_SPECIAL_1'), +(33413, -1603273, 'Do not hold back! Destroy them!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15736, 1, 0, 0, 'Thorim SAY_SPECIAL_2'), +(33413, -1603274, 'Have you begun to regret your intrusion?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15737, 1, 0, 0, 'Thorim SAY_SPECIAL_3'), +(33413, -1603275, 'Impertinent whelps! You dare challenge me atop my pedestal! I will crush you myself!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15738, 1, 0, 0, 'Thorim SAY_JUMPDOWN'), +(33413, -1603276, 'Can''t you at least put up a fight!?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15739, 1, 0, 0, 'Thorim SAY_SLAY_1'), +(33413, -1603277, 'Pathetic!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15740, 1, 0, 0, 'Thorim SAY_SLAY_2'), +(33413, -1603278, 'My patience has reached its limit!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15741, 1, 0, 0, 'Thorim SAY_BERSERK'), +(33413, -1603279, 'Failures! Weaklings!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15742, 1, 0, 0, 'Thorim SAY_WIPE'), +(33413, -1603280, 'Stay your arms! I yield!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15743, 1, 0, 0, 'Thorim SAY_DEATH'), +(33413, -1603281, 'I feel as though I am awakening from a nightmare, but the shadows in this place yet linger.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15744, 1, 0, 0, 'Thorim SAY_END_NORMAL_1'), +(33413, -1603282, 'Sif... was Sif here? Impossible--she died by my brother''s hand. A dark nightmare indeed....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15745, 1, 0, 0, 'Thorim SAY_END_NORMAL_2'), +(33413, -1603283, 'I need time to reflect.... I will aid your cause if you should require it. I owe you at least that much. Farewell.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15746, 1, 0, 0, 'Thorim SAY_END_NORMAL_3'), +(33413, -1603284, 'You! Fiend! You are not my beloved! Be gone!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15747, 1, 0, 0, 'Thorim SAY_END_HARD_1'), +(33413, -1603285, 'Behold the hand behind all the evil that has befallen Ulduar! Left my kingdom in ruins, corrupted my brother and slain my wife!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15748, 1, 0, 0, 'Thorim SAY_END_HARD_2'), +(33413, -1603286, 'And now it falls to you, champions, to avenge us all! The task before you is great, but I will lend you my aid as I am able. You must prevail!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15749, 1, 0, 0, 'Thorim SAY_END_HARD_3'), +(33413, -1603287, 'Golganneth, lend me your strengh! Grant my mortal allies the power of thunder!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15750, 1, 0, 0, 'Thorim SAY_YS_HELP'), +(33271, -1603290, 'Your destruction will herald a new age of suffering!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15542, 1, 0, 0, 'Vezax SAY_AGGRO'), +(33271, -1603291, 'You thought to stand before the legions of death... and survive?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15543, 1, 0, 0, 'Vezax SAY_SLAY_1'), +(33271, -1603292, 'Defiance... a flaw of mortality.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15544, 1, 0, 0, 'Vezax SAY_SLAY_2'), +(33271, -1603293, 'The black blood of Yogg-Saron courses through me! I. AM. UNSTOPPABLE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15545, 1, 0, 0, 'Vezax SAY_SURGE_DARKNESS'), +(33271, -1603294, 'Oh, what horrors await....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15546, 1, 0, 0, 'Vezax SAY_DEATH'), +(33271, -1603295, 'Your defeat was inevitable!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15547, 1, 0, 0, 'Vezax SAY_BERSERK'), +(33271, -1603296, 'Behold, now! Terror, absolute!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15548, 1, 0, 0, 'Vezax SAY_HARDMODE_ON'), +(33293, -1603300, 'New toys? For me? I promise I won''t break them this time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15724, 1, 0, 0, 'XT002 SAY_AGGRO'), +(33293, -1603301, 'So tired. I will rest for just a moment!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15725, 1, 0, 0, 'XT002 SAY_HEART_OPENED'), +(33293, -1603302, 'I''m ready to play!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15726, 1, 0, 0, 'XT002 SAY_HEART_CLOSED'), +(33293, -1603303, 'NO! NO! NO! NO! NO!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15727, 1, 0, 0, 'XT002 SAY_TYMPANIC_TANTRUM'), +(33293, -1603304, 'I... I think I broke it.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15728, 1, 0, 0, 'XT002 SAY_SLAY_1'), +(33293, -1603305, 'I guess it doesn''t bend that way.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15729, 1, 0, 0, 'XT002 SAY_SLAY_2'), +(33293, -1603306, 'I''m tired of these toys. I don''t want to play anymore!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15730, 1, 0, 0, 'XT002 SAY_BERSERK'), +(33293, -1603307, 'You are bad... Toys... Very... Baaaaad!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15731, 1, 0, 0, 'XT002 SAY_DEATH'), +(33293, -1603308, 'Time for a new game! My old toys will fight my new toys!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15732, 1, 0, 0, 'XT002 SAY_SUMMON'), +(33134, -1603310, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15771, 1, 0, 0, 'Sara SAY_PREFIGHT_1'), +(33134, -1603311, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15772, 1, 0, 0, 'Sara SAY_PREFIGHT_2'), +(33134, -1603312, 'The time to strike at the head of the beast will soon be upon us! Focus your anger and hatred on his minions!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15775, 1, 0, 0, 'Sara SAY_AGGRO_1'), +(33134, -1603313, 'Yes! YES! Show them no mercy! Give no pause to your attacks!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15773, 1, 0, 0, 'Sara SAY_AGGRO_2'), +(33134, -1603314, 'Let hatred and rage guide your blows!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15774, 1, 0, 0, 'Sara SAY_AGGRO_3'), +(33134, -1603315, 'Powerless to act...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15778, 1, 0, 0, 'Sara SAY_SLAY_1'), +(33134, -1603316, 'Could they have been saved?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15779, 1, 0, 0, 'Sara SAY_SLAY_2'), +(33134, -1603317, 'Weak-minded fools!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15780, 5, 0, 0, 'Sara WHISP_INSANITY'), +(33134, -1603318, 'Suffocate upon your own hate!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15776, 1, 0, 0, 'Sara SAY_PHASE2_1'), +(33134, -1603319, 'Tremble, mortals, before the coming of the end!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15777, 1, 0, 0, 'Sara SAY_PHASE2_2'), +(33288, -1603330, 'I am the lucid dream.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15754, 1, 0, 0, 'YoggSaron SAY_PHASE2_1'), +(33288, -1603331, 'The monster in your nightmares.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'YoggSaron SAY_PHASE2_2'), +(33288, -1603332, 'The fiend of a thousand faces.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'YoggSaron SAY_PHASE2_3'), +(33288, -1603333, 'Cower before my true form.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'YoggSaron SAY_PHASE2_4'), +(33288, -1603334, 'BOW DOWN BEFORE THE GOD OF DEATH!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'YoggSaron SAY_PHASE2_5'), +(33288, -1603335, 'Look upon the true face of death and know that your end comes soon!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15755, 1, 0, 0, 'YoggSaron SAY_PHASE3'), +(33288, -1603336, 'MADNESS WILL CONSUME YOU!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15756, 1, 0, 0, 'YoggSaron SAY_VISION'), +(33288, -1603337, 'Hoohehehahahaha... AHAHAHAHAHAHA!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15757, 1, 0, 0, 'YoggSaron SAY_SLAY_1'), +(33288, -1603338, 'Eternal suffering awaits!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15758, 1, 0, 0, 'YoggSaron SAY_SLAY_2'), +(33288, -1603339, 'Your will is no longer you own...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15759, 5, 0, 0, 'YoggSaron WHISP_INSANITY_1'), +(33288, -1603340, 'Destroy them minion, your master commands it!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15760, 5, 0, 0, 'YoggSaron WHISP_INSANITY_2'), +(33288, -1603341, 'Your fate is sealed. The end of days is finally upon you and ALL who inhabit this miserable little seedling. Uulwi ifis halahs gag erh''ongg w''ssh.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15761, 1, 0, 0, 'YoggSaron SAY_DEATH'), +(26532, -1595000, 'Prince Arthas Menethil, on this day, a powerful darkness has taken hold of your soul. The death you are destined to visit upon others will this day be your own.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13408, 1, 0, 0, 'epoch SAY_INTRO | culling SAY_PHASE314'), +(26532, -1595001, 'We''ll see about that, young prince.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13409, 1, 0, 0, 'epoch SAY_AGGRO'), +(26532, -1595002, 'Tick tock, tick tock...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13410, 1, 0, 0, 'epoch SAY_TIME_WARP_1'), +(26532, -1595003, 'Not quick enough!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13411, 1, 0, 0, 'epoch SAY_TIME_WARP_2'), +(26532, -1595004, 'Let''s get this over with. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13412, 1, 0, 0, 'epoch SAY_TIME_WARP_3'), +(26532, -1595005, 'There is no future for you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13413, 1, 0, 0, 'epoch SAY_SLAY_1'), +(26532, -1595006, 'This is the hour of our greatest triumph!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13414, 1, 0, 0, 'epoch SAY_SLAY_2'), +(26532, -1595007, 'You were destined to fail.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13415, 1, 0, 0, 'epoch SAY_SLAY_3'), +(26532, -1595008, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13416, 0, 0, 0, 'epoch SAY_DEATH'), +(26533, -1595009, 'Yes, this is the beginning. I''ve been waiting for you, young prince. I am Mal''Ganis.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14410, 0, 0, 1, 'mal_ganis SAY_INTRO_1 | culling SAY_PHASE206'), +(26533, -1595010, 'As you can see, your people are now mine. I will now turn this city household by household, until the flame of life has been snuffed out... forever.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14411, 0, 0, 1, 'mal_ganis SAY_INTRO_2 | culling SAY_PHASE207'), +(26533, -1595011, 'This will be a fine test...Prince Arthas...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14413, 1, 0, 0, 'mal_ganis SAY_AGGRO'), +(26533, -1595012, 'All too easy...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14416, 1, 0, 0, 'mal_ganis SAY_KILL_1'), +(26533, -1595013, 'The dark lord is displeased with your interference...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14417, 1, 0, 0, 'mal_ganis SAY_KILL_2'), +(26533, -1595014, 'It is Prince Arthas I want... not you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14418, 1, 0, 0, 'mal_ganis SAY_KILL_3'), +(26533, -1595015, 'Anak''Keri...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14422, 1, 0, 0, 'mal_ganis SAY_SLAY_1'), +(26533, -1595016, 'My onslaught will wash over the Lich King''s forces...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14423, 1, 0, 0, 'mal_ganis SAY_SLAY_2'), +(26533, -1595017, 'Your death is in vain, tiny mortal...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14424, 1, 0, 0, 'mal_ganis SAY_SLAY_3'), +(26533, -1595018, 'Your time has come to an end!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14425, 1, 0, 0, 'mal_ganis SAY_SLAY_4'), +(26533, -1595019, 'Time out...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14414, 1, 0, 0, 'mal_ganis SAY_SLEEP_1'), +(26533, -1595020, 'You seem...tired...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14415, 1, 0, 0, 'mal_ganis SAY_SLEEP_2'), +(26533, -1595021, 'I spent too much time in that weak little shell...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14426, 1, 0, 0, 'mal_ganis SAY_30HEALTH'), +(26533, -1595022, '(Eredun) I AM MAL''GANIS! I AM ETERNAL!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14427, 1, 0, 0, 'mal_ganis SAY_15HEALTH'), +(26533, -1595023, 'ENOUGH! I waste my time here...I must gather my strength on the home world...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14428, 1, 0, 0, 'mal_ganis SAY_ESCAPE_SPEECH_1'), +(26533, -1595024, 'You''ll never defeat the Lich King without my forces! I''ll have my revenge...on him, AND you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14429, 1, 0, 0, 'mal_ganis SAY_ESCAPE_SPEECH_2'), +(26533, -1595025, 'Your journey has just begun, young prince. Gather your forces and meet me in the artic land of Northrend. It is there that we shall settle the score between us. It is there that your true destiny will unfold.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14412, 1, 0, 1, 'mal_ganis SAY_OUTRO'), +(26529, -1595026, 'Play time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13428, 1, 0, 0, 'meathook SAY_AGGRO'), +(26529, -1595027, 'Boring...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13430, 1, 0, 0, 'meathook SAY_SLAY_1'), +(26529, -1595028, 'Why you stop moving?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13431, 1, 0, 0, 'meathook SAY_SLAY_2'), +(26529, -1595029, 'Get up! Me not done!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13432, 1, 0, 0, 'meathook SAY_SLAY_3'), +(26529, -1595030, 'New toys!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13429, 1, 0, 0, 'meathook SAY_SPAWN'), +(26529, -1595031, 'This... not fun...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13433, 1, 0, 0, 'meathook SAY_DEATH'), +(26530, -1595032, 'Ah, the entertainment has arrived!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13472, 1, 0, 0, 'salramm SAY_AGGRO'), +(26530, -1595033, 'You are too late, champion of Lordaeron. The dead shall have their day.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13471, 1, 0, 0, 'salramm SAY_SPAWN'), +(26530, -1595034, 'The fun is just beginning!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13473, 1, 0, 0, 'salramm SAY_SLAY_1'), +(26530, -1595035, 'Aah, quality materials!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13474, 1, 0, 0, 'salramm SAY_SLAY_2'), +(26530, -1595036, 'Don''t worry, I''ll make good use of you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13475, 1, 0, 0, 'salramm SAY_SLAY_3'), +(26530, -1595037, 'You only advance... the master''s plan...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13483, 1, 0, 0, 'salramm SAY_DEATH'), +(26530, -1595038, 'BOOM! Hahahahah...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13478, 1, 0, 0, 'salramm SAY_EXPLODE_GHOUL_1'), +(26530, -1595039, 'Blood... destruction... EXHILARATING!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13479, 1, 0, 0, 'salramm SAY_EXPLODE_GHOUL_2'), +(26530, -1595040, 'I want a sample...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13480, 1, 0, 0, 'salramm SAY_STEAL_FLESH_1'), +(26530, -1595041, 'Such strength... it must be mine!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13481, 1, 0, 0, 'salramm SAY_STEAL_FLESH_2'), +(26530, -1595042, 'Your flesh betrays you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13482, 1, 0, 0, 'salramm SAY_STEAL_FLESH_3'), +(26530, -1595043, 'Say hello to some friends of mine.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13476, 1, 0, 0, 'salramm SAY_SUMMON_GHOULS_1'), +(26530, -1595044, 'Come, citizen of Stratholme! Meet your saviors.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13477, 1, 0, 0, 'salramm SAY_SUMMON_GHOULS_2'), +(32273, -1595045, 'How dare you interfere with our work here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'infinite SAY_AGGRO'), +(32273, -1595046, 'My work here is finished!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'infinite SAY_FAIL'), +(32273, -1595047, 'My time... has run out...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'infinite SAY_DEATH'), +(26499, -1595070, 'Glad you could make it, Uther.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12828, 0, 0, 1, 'culling SAY_PHASE101'), +(26528, -1595071, 'Watch your tone with me, boy. You may be the prince, but I''m still your superior as a paladin!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12839, 0, 0, 25, 'culling SAY_PHASE102'), +(26499, -1595072, 'As if I could forget. Listen, Uther, there''s something about the plague you should know... ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12829, 0, 0, 0, 'culling SAY_PHASE103'), +(26499, -1595073, 'Oh, no. We''re too late. These people have all been infected! They may look fine now, but it''s just a matter of time before they turn into the undead!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12830, 0, 0, 1, 'culling SAY_PHASE104'), +(26528, -1595074, 'What?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12840, 0, 0, 5, 'culling SAY_PHASE105'), +(26499, -1595075, 'This entire city must be purged.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12831, 0, 0, 1, 'culling SAY_PHASE106'), +(26528, -1595076, 'How can you even consider that? There''s got to be some other way.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12841, 0, 0, 1, 'culling SAY_PHASE107'), +(26499, -1595077, 'Damn it, Uther! As your future king, I order you to purge this city!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12832, 1, 0, 5, 'culling SAY_PHASE108'), +(26528, -1595078, 'You are not my king yet, boy! Nor would I obey that command even if you were!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12842, 1, 0, 22, 'culling SAY_PHASE109'), +(26499, -1595079, 'Then I must consider this an act of treason.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12833, 0, 0, 0, 'culling SAY_PHASE110'), +(26528, -1595080, 'Treason? Have you lost your mind, Arthas?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12843, 0, 0, 5, 'culling SAY_PHASE111'), +(26499, -1595081, 'Have I? Lord Uther, by my right of succession and the sovereignty of my crown, I hereby relieve you of your command and suspend your paladins from service.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12834, 0, 0, 1, 'culling SAY_PHASE112'), +(26497, -1595082, 'Arthas! You can''t just--', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12837, 0, 0, 1, 'culling SAY_PHASE113'), +(26499, -1595083, 'It''s done! Those of you who have the will to save this land, follow me! The rest of you... get out of my sight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12835, 0, 0, 0, 'culling SAY_PHASE114'), +(26528, -1595084, 'You''ve just crossed a terrible threshold, Arthas.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12844, 0, 0, 25, 'culling SAY_PHASE115'), +(26499, -1595085, 'Jaina?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12836, 0, 0, 1, 'culling SAY_PHASE116'), +(26497, -1595086, 'I''m sorry, Arthas. I can''t watch you do this.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12838, 0, 0, 1, 'culling SAY_PHASE117'), +(26499, -1595087, 'Take position here, and I will lead a small force inside Stratholme to begin the culling. We must contain and purge the infected for the sake of all Lordaeron!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14327, 0, 0, 1, 'culling SAY_PHASE118'), +(26499, -1595088, 'Everyone looks ready. Remember, these people are all infected with the plague and will die soon. We must purge Stratholme to protect the remainder of Lordaeron from the Scourge. Let''s go.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14293, 0, 0, 1, 'culling SAY_PHASE201'), +(0, -1595089, 'Prince Arthas, may the light be praised! Many people in the town have begun to fall seriously ill, can you help us?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'culling SAY_PHASE202'), +(26499, -1595090, 'I can only help you with a clean death.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14294, 0, 0, 0, 'culling SAY_PHASE203'), +(0, -1595091, 'What? This can''t be!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'culling SAY_PHASE204'), +(26499, -1595092, 'That was just the beginning.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14295, 0, 0, 1, 'culling SAY_PHASE205'), +(26499, -1595093, 'I won''t allow it, Mal''Ganis! Better that these people die by my hand than serve as your slaves in death!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14296, 0, 0, 5, 'culling SAY_PHASE208'), +(26499, -1595094, 'Mal''ganis will send out some of his Scourge minions to interfere with us. Those of you with the strongest steel and magic shall go forth and destroy them. I will lead the rest of my forces in purging Stratholme of the infected.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14885, 0, 0, 1, 'culling SAY_PHASE209'), +(26499, -1595095, 'Champions, meet me at town hall at once! We must take the fight to Mal''Ganis.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14297, 0, 0, 1, 'culling SAY_PHASE210'), +(26499, -1595096, 'Follow me. I know the way trought.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14298, 0, 0, 1, 'culling SAY_PHASE301'), +(0, -1595097, 'Ah, you''ve finally arrived Prince Arthas. You''re just in the nick of time.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'culling SAY_PHASE302'), +(26499, -1595098, 'Yes, I''m glad i could get you before the plague.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14299, 0, 0, 1, 'culling SAY_PHASE303'), +(26499, -1595099, 'What is this sorcery?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14300, 0, 0, 0, 'culling SAY_PHASE304'), +(0, -1595100, 'There''s no need for you to understand, Arthas. All you need to do is die!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'culling SAY_PHASE305'), +(26499, -1595101, 'Mal''Ganis appears to have more than scourge in his arsenal. We should make haste.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14301, 0, 0, 0, 'culling SAY_PHASE306'), +(26499, -1595102, 'More vile sorcery! Be ready for anything.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14302, 0, 0, 0, 'culling SAY_PHASE307'), +(26499, -1595103, 'Let''s move on.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14303, 0, 0, 0, 'culling SAY_PHASE308'), +(26499, -1595104, 'Watch your backs... they have us surrounded in this hall.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14304, 0, 0, 0, 'culling SAY_PHASE309'), +(26499, -1595105, 'One less obstacle to deal with.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'culling SAY_PHASE310'), +(26499, -1595106, 'Mal''Ganis is not making this easy...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14305, 0, 0, 0, 'culling SAY_PHASE311'), +(26499, -1595107, 'They''re very persistent.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14306, 0, 0, 0, 'culling SAY_PHASE312'), +(26499, -1595108, 'What else can be put in my way?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14307, 0, 0, 0, 'culling SAY_PHASE313'), +(26499, -1595109, 'I do what i must for Lordaeron. And neither your words nor your actions will stop me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14309, 0, 0, 5, 'culling SAY_PHASE315'), +(26499, -1595110, 'The quickest path to Mal''Ganis lays behind that bookshelf ahead.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14308, 0, 0, 0, 'culling SAY_PHASE401'), +(26499, -1595111, 'This will only take a moment.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14310, 0, 0, 0, 'culling SAY_PHASE402'), +(26499, -1595112, 'I believe that secret passage still works!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14311, 0, 0, 0, 'culling SAY_PHASE403'), +(26499, -1595113, 'Let''s move trought here as quickly as possible. If the undead don''t kill us the fires might.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14312, 0, 0, 0, 'culling SAY_PHASE404'), +(26499, -1595114, 'Rest a moment and clear your lungs. But we must move again soon.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14313, 0, 0, 0, 'culling SAY_PHASE405'); +INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +(26499, -1595115, 'That''s enough, we must move again. Mal''Ganis awaits.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14314, 0, 0, 0, 'culling SAY_PHASE406'), +(26499, -1595116, 'At last some good luck, Market Row has not caught fire yet. Mal''Ganis is supposed to be on Crusader Square which is just ahead. Tell me when you''re ready to move forth.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14315, 0, 0, 0, 'culling SAY_PHASE407'), +(26499, -1595117, 'Justice will be done!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14316, 0, 0, 0, 'culling SAY_PHASE501'), +(26499, -1595118, 'We''re going to finish this right now Mal''Ganis... just you and me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14317, 0, 0, 0, 'culling SAY_PHASE502'), +(26499, -1595119, 'I''ll hunt you to the ends of the earth if I have to! Do you hear me? To the ends of the earth!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14318, 1, 0, 5, 'culling SAY_PHASE503'), +(26499, -1595120, 'You performed well this day. Anything that Mal''Ganis has left behind is yours. Take it as your reward. I must now begin plans for an expedition to Northrend.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14319, 0, 0, 5, 'culling SAY_PHASE504'), +(36494, -1658001, 'Tiny creatures under feet, you bring Garfrost something good to eat!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16912, 1, 0, 0, 'garfrost SAY_AGGRO'), +(36494, -1658002, 'Will save for snack. For later.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16913, 1, 0, 0, 'garfrost SAY_SLAY_1'), +(36494, -1658003, 'That one maybe not so good to eat now. Stupid Garfrost! BAD! BAD!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16914, 1, 0, 0, 'garfrost SAY_SLAY_2'), +(36494, -1658004, 'Garfrost hope giant underpants clean. Save boss great shame. For later.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16915, 1, 0, 0, 'garfrost SAY_DEATH'), +(36494, -1658005, 'Axe too weak. Garfrost make better and CRUSH YOU!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16916, 1, 0, 0, 'garfrost SAY_PHASE2'), +(36494, -1658006, 'Garfrost tired of puny mortals. Now your bones will freeze!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16917, 1, 0, 0, 'garfrost SAY_PHASE3'), +(36658, -1658007, 'Another shall take his place. You waste your time.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16752, 1, 0, 0, 'Tyrannus SAY_TYRANNUS_DEATH'), +(36477, -1658010, 'Our work must not be interrupted! Ick! Take care of them!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16926, 1, 0, 0, 'Krick SAY_AGGRO'), +(36477, -1658011, 'Ooh...We could probably use these parts!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16927, 1, 0, 0, 'Krick SAY_SLAY_1'), +(36477, -1658012, 'Arms and legs are in short supply...Thanks for your contribution!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16928, 1, 0, 0, 'Krick SAY_SLAY_2'), +(36477, -1658013, 'Enough moving around! Hold still while I blow them all up!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16929, 1, 0, 0, 'Krick SAY_BARRAGE_1'), +(36477, -1658014, 'Krick begins rapidly conjuring explosive mines!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'Krick SAY_BARRAGE_2'), +(36477, -1658015, 'Quickly! Poison them all while they''re still close!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16930, 1, 0, 0, 'Krick SAY_POISON_NOVA'), +(36477, -1658016, 'No! That one! That one! Get that one!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16931, 1, 0, 0, 'Krick SAY_CHASE_1'), +(36477, -1658017, 'I''ve changed my mind...go get that one instead!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16932, 1, 0, 0, 'Krick SAY_CHASE_2'), +(36477, -1658018, 'What are you attacking him for? The dangerous one is over there,fool!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16933, 1, 0, 0, 'Krick SAY_CHASE_3'), +(36476, -1658020, 'Ick begins to unleash a toxic poison cloud!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'Ick SAY_ICK_POISON_NOVA'), +(36476, -1658021, 'Ick is chasing you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'Ick SAY_ICK_CHASE_1'), +(36477, -1658030, 'Wait! Stop! Don''t kill me, please! I''ll tell you everything!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16934, 1, 0, 0, 'Krick SAY_KRICK_OUTRO_1'), +(36993, -1658031, 'I''m not so naive as to believe your appeal for clemency, but I will listen.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16611, 1, 0, 0, 'Jaina SAY_JAINA_OUTRO_2'), +(36990, -1658032, 'Why should the Banshee Queen spare your miserable life?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17033, 1, 0, 0, 'Sylvanas SAY_SYLVANAS_OUTRO_2'), +(36477, -1658033, 'What you seek is in the master''s lair, but you must destroy Tyrannus to gain entry. Within the Halls of Reflection you will find Frostmourne. It... it holds the truth.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16935, 1, 0, 0, 'Krick SAY_KRICK_OUTRO_3'), +(36993, -1658034, 'Frostmourne lies unguarded? Impossible!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16612, 1, 0, 0, 'Jaina SAY_JAINA_OUTRO_4'), +(36990, -1658035, 'Frostmourne? The Lich King is never without his blade! If you are lying to me...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17034, 1, 0, 0, 'Sylvanas SAY_SYLVANAS_OUTRO_4'), +(36477, -1658036, 'I swear it is true! Please, don''t kill me!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16936, 1, 0, 0, 'Krick SAY_KRICK_OUTRO_5'), +(36658, -1658037, 'Worthless gnat! Death is all that awaits you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16753, 1, 0, 0, 'Tyrannus SAY_TYRANNUS_OUTRO_7'), +(36477, -1658038, 'Urg... no!!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16937, 1, 0, 0, 'Krick SAY_KRICK_OUTRO_8'), +(36658, -1658039, 'Do not think that I shall permit you entry into my master''s sanctum so easily. Pursue me if you dare.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16754, 1, 0, 0, 'Tyrannus SAY_TYRANNUS_OUTRO_9'), +(36993, -1658040, 'What a cruel end. Come, heroes. We must see if the gnome''s story is true. If we can separate Arthas from Frostmourne, we might have a chance at stopping him.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16613, 1, 0, 0, 'Jaina SAY_JAINA_OUTRO_10'), +(36990, -1658041, 'A fitting end for a traitor. Come, we must free the slaves and see what is within the Lich King''s chamber for ourselves.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17035, 1, 0, 0, 'Sylvanas SAY_SYLVANAS_OUTRO_10'), +(37592, -1658065, 'This day will stand as a testament not only to your valor, but to the fact that no foe, not even the Lich King himself, can stand when Alliance and Horde set aside their differences and ---', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'Gorkun SAY_GORKUN_OUTRO_2'), +(37592, -1658064, 'Brave champions, we owe you our lives, our freedom... Though it be a tiny gesture in the face of this enormous debt, I pledge that from this day forth, all will know of your deeds, and the blazing path of light you cut through the shadow of this dark citadel.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'Gorkun SAY_GORKUN_OUTRO_1'), +(36658, -1658062, 'Power... overwhelming!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16765, 1, 0, 0, 'Tyrannus SAY_DARK_MIGHT_1'), +(36658, -1658063, 'Scourgelord Tyrannus roars and swells with dark might!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'Tyrannus SAY_DARK_MIGHT_2'), +(36658, -1658061, 'The frostwyrm Rimefang gazes at $N and readies an icy attack!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'Tyrannus SAY_MARK_RIMEFANG_2'), +(36658, -1658060, 'Rimefang, destroy this fool!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16764, 1, 0, 0, 'Tyrannus SAY_MARK_RIMEFANG_1'), +(36658, -1658059, 'Impossible! Rimefang... Warn...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16763, 1, 0, 0, 'Tyrannus SAY_DEATH'), +(36658, -1658058, 'Perhaps you should have stayed in the mountains!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16762, 1, 0, 0, 'Tyrannus SAY_SLAY_2'), +(36658, -1658057, 'Such a shameful display... You are better off dead!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16761, 1, 0, 0, 'Tyrannus SAY_SLAY_1'), +(36658, -1658056, 'I shall not fail The Lich King! Come and meet your end!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16760, 1, 0, 0, 'Tyrannus SAY_AGGRO'), +(36658, -1658055, 'Ha, such an amusing gesture from the rabble. When I have finished with you, my master''s blade will feast upon your souls. Die!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16759, 1, 0, 0, 'Tyrannus SAY_TYRANNUS_INTRO_3'), +(37592, -1658054, 'Heroes! We will hold off the undead as long as we can, even to our dying breath. Deal with the Scourgelord!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17150, 1, 0, 0, 'Gorkun SAY_GORKUN_INTRO_2'), +(36658, -1658053, 'Alas, brave, brave adventurers, your meddling has reached its end. Do you hear the clatter of bone and steel coming up the tunnel behind you? That is the sound of your impending demise.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16758, 1, 0, 0, 'Tyrannus SAY_TYRANNUS_INTRO_1'), +(36658, -1658052, 'Rimefang! Trap them within the tunnel! Bury them alive!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16757, 1, 0, 0, 'Tyrannus SAY_GAUNTLET_START'), +(36658, -1658051, 'Persistent whelps! You will not reach the entrance of my lord''s lair! Soldiers, destroy them!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16756, 1, 0, 0, 'Tyrannus SAY_AMBUSH_2'), +(36658, -1658050, 'Your pursuit shall be in vain, adventurers, for the Lich King has placed an army of undead at my command! Behold!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16755, 1, 0, 0, 'Tyrannus SAY_AMBUSH_1'), +(36497, -1632001, 'Finally...a captive audience!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16595, 1, 0, 0, 'Bronjham SAY_AGGRO'), +(36497, -1632002, 'Fodder for the engine!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16596, 1, 0, 0, 'Bronjham SAY_SLAY_1'), +(36497, -1632003, 'Another soul to strengthen the host!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16597, 1, 0, 0, 'Bronjham SAY_SLAY_2'), +(36497, -1632004, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16598, 1, 0, 0, 'Bronjham SAY_DEATH'), +(36497, -1632005, 'The vortex of the harvested calls to you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16599, 1, 0, 0, 'Bronjham SAY_SOUL_STORM'), +(36497, -1632006, 'I will sever the soul from your body!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16600, 1, 0, 0, 'Bronjham SAY_CORRUPT_SOUL'), +(36502, -1632010, 'You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16884, 1, 0, 0, 'Devoureur SAY_FACE_ANGER_AGGRO'), +(36502, -1632011, 'You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16890, 1, 0, 0, 'Devoureur SAY_FACE_DESIRE_AGGRO'), +(36502, -1632012, 'Damnation!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16885, 1, 0, 0, 'Devoureur SAY_FACE_ANGER_SLAY_1'), +(36502, -1632013, 'Damnation!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16896, 1, 0, 0, 'Devoureur SAY_FACE_SORROW_SLAY_1'), +(36502, -1632014, 'Damnation!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16891, 1, 0, 0, 'Devoureur SAY_FACE_DESIRE_SLAY_1'), +(36502, -1632015, 'Doomed for eternity!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16886, 1, 0, 0, 'Devoureur SAY_FACE_ANGER_SLAY_2'), +(36502, -1632016, 'Doomed for eternity!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16897, 1, 0, 0, 'Devoureur SAY_FACE_SORROW_SLAY_2'), +(36502, -1632017, 'Doomed for eternity!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16892, 1, 0, 0, 'Devoureur SAY_FACE_DESIRE_SLAY_2'), +(36502, -1632018, 'The swell of souls will not be abated! You only delay the inevitable!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16887, 1, 0, 0, 'Devoureur SAY_FACE_ANGER_DEATH'), +(36502, -1632019, 'The swell of souls will not be abated! You only delay the inevitable!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16898, 1, 0, 0, 'Devoureur SAY_FACE_SORROW_DEATH'), +(36502, -1632020, 'The swell of souls will not be abated! You only delay the inevitable!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16893, 1, 0, 0, 'Devoureur SAY_FACE_DESIRE_DEATH'), +(36502, -1632021, 'Devourer of Souls begins to cast Mirrored Soul!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'Devoureur EMOTE_MIRRORED_SOUL'), +(36502, -1632022, 'Devourer of Souls begins to Unleash Souls!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'Devoureur EMOTE_UNLEASH_SOUL'), +(36502, -1632023, 'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16888, 1, 0, 0, 'Devoureur SAY_FACE_ANGER_UNLEASH_SOUL'), +(36502, -1632024, 'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16899, 1, 0, 0, 'Devoureur SAY_FACE_SORROW_UNLEASH_SOUL'), +(36502, -1632025, 'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16894, 1, 0, 0, 'Devoureur SAY_FACE_DESIRE_UNLEASH_SOUL'), +(36502, -1632026, 'Devourer of Souls begins to cast Wailing Souls!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'Devoureur EMOTE_WAILING_SOUL'), +(36502, -1632027, 'Stare into the abyss, and see your end!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16889, 1, 0, 0, 'Devoureur SAY_FACE_ANGER_WAILING_SOUL'), +(36502, -1632028, 'Stare into the abyss, and see your end!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16895, 1, 0, 0, 'Devoureur SAY_FACE_DESIRE_WAILING_SOUL'), +(38160, -1632029, 'Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside it when you''re ready for your next mission. I will meet you on the other side.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16625, 1, 0, 0, 'Jaina SAY_JAINA_OUTRO'), +(38161, -1632030, 'Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside when you are ready for your next mission. I will meet you on the other side.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17044, 1, 0, 0, 'Sylvanas SAY_SYLVANAS_OUTRO'), +(37597, -1632040, 'Thank the light for seeing you here safely. We have much work to do if we are to defeat the Lich King and put an end to the Scourge.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16617, 0, 0, 0, 'Jaina SAY_INTRO_1'), +(37597, -1632041, 'Our allies within the Argent Crusade and the Knights of the Ebon Blade have broken through the front gate of Icecrown and are attempting to establish a foothold within the Citadel.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16618, 0, 0, 0, 'Jaina SAY_INTRO_2'), +(37597, -1632042, 'Their success hinges upon what we discover in these cursed halls. Although our mission is a wrought with peril, we must persevere!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16619, 0, 0, 0, 'Jaina SAY_INTRO_3'), +(37597, -1632043, 'With the attention of the Lich King drawn toward the front gate, we will be working our way through the side in search of information that will enable us to defeat the Scourge - once and for all.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16620, 0, 0, 0, 'Jaina SAY_INTRO_4'), +(37597, -1632044, 'King Varian''s SI7 agents have gathered information about a private sanctum of the Lich King''s deep within a place called the Halls of Reflection.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16621, 0, 0, 0, 'Jaina SAY_INTRO_5'), +(37597, -1632045, 'We will carve a path through this wretched place and find a way to enter the Halls of Reflection. I sense powerful magic hidden away within those walls... Magic that could be the key to destroy the Scourge.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16622, 0, 0, 0, 'Jaina SAY_INTRO_6'), +(37597, -1632046, 'Your first mission is to destroy the machines of death within this malevolent engine of souls, and clear a path for our soldiers.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16623, 0, 0, 0, 'Jaina SAY_INTRO_7'), +(37597, -1632047, 'Make haste, champions! I will prepare the troops to fall in behind you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16624, 0, 0, 0, 'Jaina SAY_INTRO_8'), +(37596, -1632050, 'The Argent Crusade and the Knights of the Ebon Blade have assaulted the gates of Icecrown Citadel and are preparing for a massive attack upon the Scourge. Our missition is a bit more subtle, but equally as important.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17038, 0, 0, 0, 'Sylvanas SAY_INTRO_1'), +(37596, -1632051, 'With the attention of the Lich King turned towards the front gate, we''ll be working our way through the side in search of information that will enable us to defeat the Lich King - once and for all.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17039, 0, 0, 0, 'Sylvanas SAY_INTRO_2'), +(37596, -1632052, 'Our scouts have reported that the Lich King has a private chamber, outside of the Frozen Throne, deep within a place called the Halls of Reflection. That is our target, champions.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17040, 0, 0, 0, 'Sylvanas SAY_INTRO_3'), +(37596, -1632053, 'We will cut a swath of destruction through this cursed place and find a way to enter the Halls of Reflection. If there is anything of value to be found here, it will be found in the Halls.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17041, 0, 0, 0, 'Sylvanas SAY_INTRO_4'), +(37596, -1632054, 'Your first mission is to destroy the machines of death within this wretched engine of souls, and clear a path for our soldiers.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17042, 0, 0, 0, 'Sylvanas SAY_INTRO_5'), +(37596, -1632055, 'The Dark Lady watches over you. Make haste!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17043, 0, 0, 0, 'Sylvanas SAY_INTRO_6'), +(29120, -1601004, 'Ahhh... RAAAAAGH! Never thought... I would be free of him...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14069, 1, 0, 0, ''), +(29120, -1601005, 'Your armor is useless againts my locusts.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14060, 1, 0, 0, ''), +(29120, -1601006, 'Uunak-hissss tik-k-k-k-k!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14067, 1, 0, 0, ''), +(29120, -1601007, 'The pestilence upon you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14068, 1, 0, 0, ''), +(29120, -1601008, 'Auum na-l ak-k-k-k, isshhh.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14058, 1, 0, 0, ''), +(29120, -1601009, 'Come forth my brethren! Feast on their flesh.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14059, 1, 0, 0, ''), +(29120, -1601010, 'I was king of this empire once, long ago. In life I stood as champion. In death I returned as conqueror. Now I protect the kingdom once more. Ironic, yes? ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14053, 1, 0, 0, ''), +(28684, -1601011, 'This kingdom belongs to the Scourge! Only the dead may enter.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14075, 1, 0, 0, ''), +(28684, -1601012, 'You were foolish to come.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14077, 1, 0, 0, ''), +(28684, -1601013, 'As Anub''Arak commands!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14078, 1, 0, 0, ''), +(28684, -1601014, 'I should be grateful. But I long ago lost the capacity.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14087, 1, 0, 0, ''), +(28684, -1601015, 'They hunger.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14085, 1, 0, 0, ''), +(28684, -1601016, 'Dinner time, my pets.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14086, 1, 0, 0, ''), +(28684, -1601017, 'Keep an eye on the tunnel. We must not let anyone through!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14082, 1, 0, 0, ''), +(28684, -1601018, 'I hear footsteps. Be on your guard.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14083, 1, 0, 0, ''), +(28684, -1601019, 'I sense the living. Be ready.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14084, 1, 0, 0, ''), +(28684, -1601020, 'We are besieged. Strike out and bring back their corpses!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14079, 1, 0, 0, ''), +(28684, -1601021, 'We must hold the gate. Attack! Tear them limb from limb!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14080, 1, 0, 0, ''), +(28684, -1601022, 'The gate must be protected at all costs. Rip them to shreds!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14081, 1, 0, 0, ''), +(27577, -1800038, 'You cannot stop Thel''zan! He bears the dark gift,bestowed upon him by the Lich King himself! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(27577, -1800037, 'How? Humans truly are stupid,yes? Thel''zan the Duskbringer! Thel''zan the Lich! He who is born of human flesh and bone,sacrificed all power,protected by the Lich King! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(27577, -1800035, 'Humans... Beneath the earth of Wintergarde Village you built a mausoleum! Why do you think Naxxramas attacked that spot? Thel''zan hides deep in your own crypt and sends a thousand-thousand corpses at you! Perish you will... ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(27577, -1800034, 'NOOOO!!! I tell you! I tell you everything! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(27577, -1800032, 'It tells of the coming apocalypse. How this world will burn and be reborn from death. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(27577, -1800028, 'Never felt hurt like this! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(27577, -1800025, 'IT BURNSSSSS! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(27577, -1800020, 'The book is your salvation,yes... but nothing will you know. NOTHING I SAY! NOTHING! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(27577, -1800019, 'What can you do to me that Kel''Thuzad has not? That the Lich King will not? ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(27577, -1800018, 'Tell you nothing,preacher. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(27463, -1800046, 'Thank you. $Class!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'RANDOM_SAY_3'), +(27463, -1800045, 'Whoa.. i nearly died there. Thank you, $Race!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'RANDOM_SAY_2'), +(27463, -1800044, 'Ahh..better..', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'RANDOM_SAY_1'), +(29434, -1800042, 'Let me know when you''re ready. I''d prefer sooner than later... what with the slowly dying from poison and all. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'injured goblin SAY_QUEST_START'), +(29434, -1800043, 'I''m going to bring the venom sack to Ricket... and then... you know... collapse. Thank you for helping me! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'injured goblin SAY_END_WP_REACHED'), +(28787, -1800047, 'Let''s get the hell out of here', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(28787, -1800048, 'Listen up, Venture Company goons! Rule #1: Never keep the prisoner near the explosives.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(28787, -1800049, 'Or THIS is what you get. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(28787, -1800050, 'It''s getting a little hot over here. Shall we move on? ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(28787, -1800051, 'Oh, look, it''s another cartload of explosives! Let''s help them dispose of it. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(28787, -1800052, 'You really shouldn''t play with this stuff. Someone could get hurt.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(28787, -1800053, 'We made it! Thank you for getting me out of that hell hole. Tell Hemet to expect me! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(12717, -1800054, 'Are you sure that you are ready? If we do not have a group of your allies to aid us, we will surely fail.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'muglash SAY_MUG_START1'), +(12717, -1800055, 'This will be a though fight, $N. Follow me closely.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'muglash SAY_MUG_START2'), +(12717, -1800056, 'This is the brazier, $N. Put it out. Vorsha is a beast, worthy of praise from no one!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'muglash SAY_MUG_BRAZIER'), +(12717, -1800057, 'Now we must wait. It won''t be long before the naga realize what we have done.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'muglash SAY_MUG_BRAZIER_WAIT'), +(12717, -1800058, 'Be on your guard, $N!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'muglash SAY_MUG_ON_GUARD'), +(12717, -1800059, 'Perhaps we will get a moment to rest. But I will not give up until we have faced off against Vorsha!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'muglash SAY_MUG_REST'), +(12717, -1800060, 'We have done it!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'muglash SAY_MUG_DONE'), +(12717, -1800061, 'You have my deepest gratitude. I thank you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'muglash SAY_MUG_GRATITUDE'), +(12717, -1800062, 'I am going to patrol the area for a while longer and ensure that things are truly safe.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'muglash SAY_MUG_PATROL'), +(12717, -1800063, 'Please return to Zoram''gar and report our success to the Warsong runner.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'muglash SAY_MUG_RETURN'), +(30014, -1571039, 'Yggdras emerges!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, ''), +(30017, -1571040, 'Stinkbeard comin'' for you, little ones!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(30007, -1571041, 'Do you fell that folks? The air is cracking with energy! Than can only mean one thing...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(37221, -1668001, 'The chill of this place... Brr... I can feel my blood freezing.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16631, 1, 0, 0, 'Jaina SAY_JAINA_INTRO_1'), +(37221, -1668002, 'What is that? Up ahead! Could it be... ? Heroes at my side!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16632, 1, 0, 0, 'Jaina SAY_JAINA_INTRO_2'), +(37221, -1668003, 'Frostmourne! The blade that destroyed our kingdom...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16633, 1, 0, 0, 'Jaina SAY_JAINA_INTRO_3'), +(37221, -1668004, 'Stand back! Touch that blade and your soul will be scarred for all eternity! I must attempt to commune with the spirits locked away within Frostmourne. Give me space, back up please!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16634, 1, 0, 0, 'Jaina SAY_JAINA_INTRO_4'), +(37225, -1668005, 'Jaina! Could it truly be you?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16666, 1, 0, 0, 'Uther SAY_UTHER_INTRO_A2_1'), +(37221, -1668006, 'Uther! Dear Uther! ... I... I''m so sorry.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16635, 0, 0, 0, 'Jaina SAY_JAINA_INTRO_5'), +(37225, -1668007, 'Jaina you haven''t much time. The Lich King sees what the sword sees. He will be here shortly!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16667, 0, 0, 0, 'Uther SAY_UTHER_INTRO_A2_2'), +(37221, -1668008, 'Arthas is here? Maybe I...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16636, 0, 0, 0, 'Jaina SAY_JAINA_INTRO_6'), +(37225, -1668009, 'No, girl. Arthas is not here. Arthas is merely a presence within the Lich King''s mind. A dwindling presence...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16668, 0, 0, 0, 'Uther SAY_UTHER_INTRO_A2_3'), +(37221, -1668010, 'But Uther, if there''s any hope of reaching Arthas. I... I must try.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16637, 0, 0, 0, 'Jaina SAY_JAINA_INTRO_7'), +(37225, -1668011, 'Jaina, listen to me. You must destroy the Lich King. You cannot reason with him. He will kill you and your allies and raise you all as powerful soldiers of the Scourge.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16669, 0, 0, 0, 'Uther SAY_UTHER_INTRO_A2_4'), +(37221, -1668012, 'Tell me how, Uther? How do I destroy my prince? My...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16638, 0, 0, 0, 'Jaina SAY_JAINA_INTRO_8'), +(37225, -1668013, 'Snap out of it, girl. You must destroy the Lich King at the place where he merged with Ner''zhul - atop the spire, at the Frozen Throne. It is the only way.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16670, 0, 0, 0, 'Uther SAY_UTHER_INTRO_A2_5'), +(37221, -1668014, 'You''re right, Uther. Forgive me. I... I don''t know what got a hold of me. We will deliver this information to the King and the knights that battle the Scourge within Icecrown Citadel.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16639, 0, 0, 0, 'Jaina SAY_JAINA_INTRO_9'), +(37225, -1668015, 'There is... something else that you should know about the Lich King. Control over the Scourge must never be lost. Even if you were to strike down the Lich King, another would have to take his place. For without the control of its master, the Scourge would run rampant across the world - destroying all living things.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16671, 0, 0, 0, 'Uther SAY_UTHER_INTRO_A2_6'), +(37225, -1668016, 'A grand sacrifice by a noble soul...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16672, 0, 0, 0, 'Uther SAY_UTHER_INTRO_A2_7'), +(37221, -1668017, 'Who could bear such a burden?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16640, 0, 0, 0, 'Jaina SAY_JAINA_INTRO_10'), +(37225, -1668018, 'I do not know, Jaina. I suspect that the piece of Arthas that might be left inside the Lich King is all that holds the Scourge from annihilating Azeroth.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16673, 0, 0, 0, 'Uther SAY_UTHER_INTRO_A2_8'), +(37221, -1668019, 'Then maybe there is still hope...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16641, 0, 0, 0, 'Jaina SAY_JAINA_INTRO_11'), +(37225, -1668020, 'No, Jaina! Aargh! He... He is coming! You... You must...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16674, 0, 0, 0, 'Uther SAY_UTHER_INTRO_A2_9'), +(37223, -1668021, 'I... I don''t believe it! Frostmourne stands before us, unguarded! Just as the Gnome claimed. Come, heroes!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17049, 1, 0, 0, 'Sylvanas SAY_SYLVANAS_INTRO_1'), +(37223, -1668022, 'Standing this close to the blade that ended my life... The pain... It is renewed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17050, 1, 0, 0, 'Sylvanas SAY_SYLVANAS_INTRO_2'), +(37223, -1668023, 'I dare not touch it. Stand back! Stand back as I attempt to commune with the blade! Perhaps our salvation lies within...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17051, 1, 0, 0, 'Sylvanas SAY_SYLVANAS_INTRO_3'), +(37225, -1668024, 'Careful, girl. I''ve heard talk of that cursed blade saving us before. Look around you and see what has been born of Frostmourne.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16659, 0, 0, 0, 'Uther SAY_UTHER_INTRO_H2_1'), +(37223, -1668025, 'Uther...Uther the Lightbringer. How...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17052, 0, 0, 0, 'Sylvanas SAY_SYLVANAS_INTRO_4'), +(37225, -1668026, 'You haven''t much time. The Lich King sees what the sword sees. He will be here shortly.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16660, 0, 0, 0, 'Uther SAY_UTHER_INTRO_H2_2'), +(37223, -1668027, 'The Lich King is here? Then my destiny shall be fulfilled today!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17053, 0, 0, 0, 'Sylvanas SAY_SYLVANAS_INTRO_5'), +(37225, -1668028, 'You cannot defeat the Lich King. Not here. You would be a fool to try. He will kill those who follow you and raise them as powerful servants of the Scourge. But for you, Sylvanas, his reward for you would be worse than the last.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16661, 0, 0, 0, 'Uther SAY_UTHER_INTRO_H2_3'), +(37223, -1668029, 'There must be a way... ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17054, 0, 0, 0, 'Sylvanas SAY_SYLVANAS_INTRO_6'), +(37225, -1668030, 'Perhaps, but know this: there must always be a Lich King. Even if you were to strike down Arthas, another would have to take his place, for without the control of the Lich King, the Scourge would wash over this world like locusts, destroying all that they touched.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16662, 0, 0, 0, 'Uther SAY_UTHER_INTRO_H2_4'), +(37223, -1668031, 'Who could bear such a burden?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17055, 0, 0, 0, 'Sylvanas SAY_SYLVANAS_INTRO_7'), +(37225, -1668032, 'I do not know, Banshee Queen. I suspect that the piece of Arthas that might be left inside the Lich King is all that holds the Scourge from annihilating Azeroth.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16663, 0, 0, 0, 'Uther SAY_UTHER_INTRO_H2_5'), +(37225, -1668033, 'Alas, the only way to defeat the Lich King is to destroy him at the place he was created.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16664, 0, 0, 0, 'Uther SAY_UTHER_INTRO_H2_6'), +(37223, -1668034, 'The Frozen Throne...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17056, 0, 0, 0, 'Sylvanas SAY_SYLVANAS_INTRO_8'), +(37225, -1668035, 'I... Aargh... He... He is coming... You... You must...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16665, 0, 0, 0, 'Uther SAY_UTHER_INTRO_H2_7'), +(37226, -1668036, 'SILENCE, PALADIN!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17225, 1, 0, 0, 'Lich King SAY_LK_INTRO_1'), +(37226, -1668037, 'So you wish to commune with the dead? You shall have your wish.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17226, 1, 0, 0, 'Lich King SAY_LK_INTRO_2'), +(37226, -1668038, 'Falric. Marwyn. Bring their corpses to my chamber when you are through.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17227, 1, 0, 0, 'Lich King SAY_LK_INTRO_3'), +(38112, -1668039, 'As you wish, my lord.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16717, 1, 0, 0, 'Falric SAY_FALRIC_INTRO_1'), +(38113, -1668040, 'As you wish, my lord.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16741, 1, 0, 0, 'Marwyn SAY_MARWYN_INTRO_1'), +(38112, -1668041, 'Soldiers of Lordaeron, rise to meet your master''s call!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16714, 1, 0, 0, 'Falric SAY_FALRIC_INTRO_2'), +(37221, -1668042, 'You won''t deny me this Arthas! I must know! I must find out!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16642, 1, 0, 0, 'Jaina SAY_JAINA_INTRO_END'), +(37223, -1668043, 'You will not escape me that easily, Arthas! I will have my vengeance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17057, 1, 0, 0, 'Sylvanas SAY_SYLVANAS_INTRO_END'), +(38112, -1668050, 'Men, women and children... None were spared the master''s wrath. Your death will be no different.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16710, 1, 0, 0, 'Falric SAY_AGGRO'), +(38112, -1668051, 'Sniveling maggot!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16711, 1, 0, 0, 'Falric SAY_SLAY_1'), +(38112, -1668052, 'The children of Stratholme fought with more ferocity!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16712, 1, 0, 0, 'Falric SAY_SLAY_2'), +(38112, -1668053, 'Marwyn, finish them...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16713, 1, 0, 0, 'Falric SAY_DEATH'), +(38112, -1668054, 'Despair... so delicious...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16715, 1, 0, 0, 'Falric SAY_IMPENDING_DESPAIR'), +(38112, -1668055, 'Fear... so exhilarating...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16716, 1, 0, 0, 'Falric SAY_DEFILING_HORROR'), +(38113, -1668060, 'Death is all that you will find here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16734, 1, 0, 0, 'Marwyn SAY_AGGRO'), +(38113, -1668061, 'I saw the same look in his eyes when he died. Terenas could hardly believe it. Hahahaha!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16735, 1, 0, 0, 'Marwyn SAY_SLAY_1'), +(38113, -1668062, 'Choke on your suffering!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16736, 1, 0, 0, 'Marwyn SAY_SLAY_2'), +(38113, -1668063, 'Yes... Run... Run to meet your destiny... Its bitter, cold embrace, awaits you.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16737, 1, 0, 0, 'Marwyn SAY_DEATH'), +(38113, -1668064, 'Your flesh has decayed before your very eyes!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16739, 1, 0, 0, 'Marwyn SAY_CORRUPTED_FLESH_1'), +(38113, -1668065, 'Waste away into nothingness!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16740, 1, 0, 0, 'Marwyn SAY_CORRUPTED_FLESH_2'), +(27655, -1578000, 'What do we have here... those that would defy the Spell-Weaver? Those without foresight our understanding. How can i make you see? Malygos is saving the world from itself! Bah! You are hardly worth my time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(27655, -1578001, 'Clearly my pets failed. Perhaps another demonstration is in order.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(27655, -1578002, 'Still you fight. Still you cling to misguided principles. If you survive, you''ll find me in the center ring.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(27655, -1578003, 'Poor blind fools!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(27655, -1578004, 'A taste... just a small taste... of the Spell-Weaver''s power!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, ''), +(26861, -1575028, 'You invade my home and then dare to challenge me? I will tear the hearts from your chests and offer them as gifts to the death god! Rualg nja gaborr!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13609, 1, 0, 0, 'King Ymirom - SAY_AGGRO'), +(26861, -1575029, 'Your death is only the beginning!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13614, 1, 0, 0, 'King Ymirom - SAY_SLAY_1'), +(26861, -1575030, 'You have failed your people!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13615, 1, 0, 0, 'King Ymirom - SAY_SLAY_2'), +(26861, -1575031, 'There is a reason I am king!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13616, 1, 0, 0, 'King Ymirom - SAY_SLAY_3'), +(26861, -1575032, 'Bleed no more!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13617, 1, 0, 0, 'King Ymirom - SAY_SLAY_4'), +(26861, -1575033, 'What... awaits me... now?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13618, 1, 0, 0, 'King Ymirom - SAY_DEATH'), +(26861, -1575034, 'Bjorn of the Black Storm! Honor me now with your presence!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13610, 1, 0, 0, 'King Ymirom - SAY_SUMMON_BJORN'), +(26861, -1575035, 'Haldor of the Rocky Cliffs, grant me your strength!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13611, 1, 0, 0, 'King Ymirom - SAY_SUMMON_HALDOR'), +(26861, -1575036, 'Ranulf of the Screaming Abyss, snuff these maggots with darkest night! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13612, 1, 0, 0, 'King Ymirom - SAY_SUMMON_RANULF'), +(26861, -1575037, 'Tor of the Brutal Siege! Bestow your might upon me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13613, 1, 0, 0, 'King Ymirom - SAY_SUMMON_TORGYN'), +(26693, -1575004, 'What mongrels dare intrude here? Look alive, my brothers! A feast for the one that brings me their heads!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13497, 1, 0, 0, 'Skadi - SAY_AGGRO'), +(26693, -1575005, 'Not so brash now, are you?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13504, 1, 0, 0, 'Skadi - SAY_KILL_1'), +(26693, -1575006, 'I''ll mount your skull from the highest tower!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13505, 1, 0, 0, 'Skadi - SAY_KILL_2'), +(26693, -1575007, '%s in within range of the harpoon launchers!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'Skadi - EMOTE_RANGE'), +(26693, -1575008, 'ARGH! You call that... an attack? I''ll... show... aghhhh...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13506, 1, 0, 0, 'Skadi - SAY_DEATH'), +(26693, -1575009, '%s in within range of the harpoon launchers!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'Skadi - EMOTE_RANGE'), +(26693, -1575010, 'You motherless knaves! Your corpses will make fine morsels for my new drake!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13507, 1, 0, 0, 'Skadi - SAY_DRAKE_DEATH'), +(26693, -1575011, 'Sear them to the bone!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13498, 1, 0, 0, 'Skadi - SAY_DRAKE_BREATH_1'), +(26693, -1575012, 'Go now! Leave nothing but ash in your wake!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13499, 1, 0, 0, 'Skadi - SAY_DRAKE_BREATH_2'), +(26693, -1575013, 'Cleanse our sacred halls with flame!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13500, 1, 0, 0, 'Skadi - SAY_DRAKE_BREATH_3'), +(17375, -1000474, '[Fulborg] The Stillpine furbolgs will not soon forget your bravery!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Stillpine Capitive free say text 1'), +(17375, -1000475, '[Fulborg] Thank you, $N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Stillpine Capitive free say text 2'), +(17375, -1000476, '[Fulborg] Those remaining at Stillpine Hold will welcome you as a hero!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Stillpine Capitive free say text 3'), +(7607, -1209000, 'Oh no! Here they come!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'Weegli Blastfuse SAY_WEEGLI_OHNO'), +(7607, -1209001, 'OK. Here I go.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'Weegli Blastfuse SAY_WEEGLI_OK_I_GO'), +(7604, -1209002, 'Placeholder 1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'Sergeant Bly SAY_1'), +(7604, -1209003, 'Placeholder 2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, 'Sergeant Bly SAY_2'), +(0, -1649000, 'My slaves! Destroy the enemy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34796'), +(0, -1649010, '%s buries itself in the earth!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34564'), +(0, -1649011, '%s getting out of the ground!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34564'), +(0, -1649012, 'After the death of sister %s goes berserk!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34799'), +(0, -1649020, '%s looks at |3-3($n) and emits a guttural howl!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34797'), +(0, -1649021, '%s crashes into a wall of the Colosseum and lose focus!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34797'), +(0, -1649022, '|3-3(%s) covers boiling rage, and he tramples all in its path!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34797'), +(0, -1649030, 'Trifling gnome, your arrogance will be your undoing!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16143, 1, 0, 0, '34780'), +(0, -1649031, 'You face Jaraxxus, eredar lord of the Burning Legion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16144, 1, 0, 0, '34780'), +(0, -1649032, 'Another will take my place. Your world is doomed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16147, 1, 0, 0, '34780'), +(0, -1649033, '$n has |cFF00FFFFIncinerate flesh!|R Heal $ghim:her;!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34780'), +(0, -1649034, 'FLESH FROM BONE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16149, 1, 0, 0, '34780'), +(0, -1649035, '|cFFFF0000Legion Flame|R on $n', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34780'), +(0, -1649036, '%s creates the gates of the Void!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34780'), +(0, -1649037, 'Come forth, sister! Your master calls!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16150, 1, 0, 0, '34780'), +(0, -1649038, '%s creates an |cFF00FF00Infernal Volcano!|R', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34780'), +(0, -1649039, 'INFERNO!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16151, 1, 0, 0, '34780'), +(0, -1649115, 'Weakling!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, '34995'), +(0, -1649116, 'Pathetic!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, '34995'), +(0, -1649117, 'Overpowered.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, '34995'), +(0, -1649118, 'Lok''tar!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, '34995'), +(0, -1649120, 'HAH!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, '34990'), +(0, -1649121, 'Hardly a challenge!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, '34990'), +(0, -1649122, 'Worthless scrub.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, '34990'), +(0, -1649123, 'Is this the best the Horde has to offer?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, '34990'), +(0, -1649040, 'In the name of our dark master. For the Lich King. You. Will. Die.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16272, 1, 0, 0, '34497'), +(0, -1649041, 'The Scourge cannot be stopped...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16275, 1, 0, 0, '34496'), +(0, -1649042, 'YOU ARE FINISHED!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16273, 1, 0, 0, '34497'), +(0, -1649043, '%s begins to read the spell Treaty twins!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34497'), +(0, -1649044, 'CHAOS!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16274, 3, 0, 0, '34497'), +(0, -1649045, 'UNWORTHY!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16277, 1, 0, 0, '34496'), +(0, -1649046, 'You appreciated and acknowledged nothing.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16276, 1, 0, 0, '34497'), +(0, -1649047, '%s begins to read a spell |cFFFFFFFFLight Vortex!|R switch to |cFFFFFFFFLight|r essence!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34497'), +(0, -1649048, 'Let the light consume you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16279, 1, 0, 0, '34496'), +(0, -1649049, '%s begins to read a spell |cFF9932CDBlack Vortex!|R switch to |cFF9932CDBlack|r essence!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34496'), +(0, -1649050, 'Let the dark consume you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16278, 1, 0, 0, '34496'), +(0, -1649055, 'Ahhh... Our guests arrived, just as the master promised.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16235, 1, 0, 0, '34564'), +(0, -1649056, 'This place will serve as your tomb!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16234, 1, 0, 0, '34564'), +(0, -1649057, 'F-lakkh shir!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16236, 1, 0, 0, '34564'), +(0, -1649058, 'Another soul to sate the host.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16237, 1, 0, 0, '34564'), +(0, -1649059, 'I have failed you, master...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16238, 1, 0, 0, '34564'), +(0, -1649060, '%s spikes pursuing $n!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34564'), +(0, -1649061, 'Auum na-l ak-k-k-k, isshhh. Rise, minions. Devour...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16240, 1, 0, 0, '34564'), +(0, -1649062, '%s produces a swarm of beetles Peon to restore your health!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, '34564'), +(0, -1649063, 'The swarm shall overtake you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16241, 1, 0, 0, '34564'), +(0, -1649070, 'Welcome champions, you have heard the call of the Argent Crusade and you have boldly answered. It is here in the crusaders coliseum that you will face your greatest challenges. Those of you who survive the rigors of the coliseum will join the Argent Crusade on its marsh to ice crown citadel.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16036, 1, 0, 0, '34996'), +(0, -1649071, 'Hailing from the deepest, darkest carverns of the storm peaks, Gormok the Impaler! Battle on, heroes!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16038, 1, 0, 0, '34996'), +(0, -1649072, 'Your beast will be no match for my champions Tirion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16069, 1, 0, 0, '34990'), +(0, -1649073, 'I have seen more worthy challenges in the ring of blood, you waste our time paladin.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16026, 1, 0, 0, '34995'), +(0, -1649074, 'Steel yourselves, heroes, for the twin terrors Acidmaw and Dreadscale. Enter the arena!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16039, 1, 0, 0, '34996'), +(0, -1649075, 'The air freezes with the introduction of our next combatant, Icehowl! Kill or be killed, champions!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16040, 1, 0, 0, '34996'), +(0, -1649076, 'The monstrous menagerie has been vanquished!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16041, 1, 0, 0, '34996'), +(0, -1649077, 'Tragic... They fought valiantly, but the beasts of Northrend triumphed. Let us observe a moment of silence for our fallen heroes.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16042, 1, 0, 0, '34996'), +(0, -1649080, 'Grand Warlock Wilfred Fizzlebang will summon forth your next challenge. Stand by for his entry!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16043, 1, 0, 0, '34996'), +(0, -1649081, 'Thank you, Highlord! Now challengers, I will begin the ritual of summoning! When I am done, a fearsome Doomguard will appear!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16268, 1, 0, 0, '35458'), +(0, -1649082, 'Prepare for oblivion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16269, 1, 0, 0, '35458'), +(0, -1649083, 'Ah ha! Behold the absolute power of Wilfred Fizzlebang, master summoner! You are bound to ME, demon!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16270, 1, 0, 0, '35458'); +INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +(0, -1649084, 'But I am in charge here-', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16271, 1, 0, 0, '35458'), +(0, -1649085, '...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, '35458'), +(0, -1649086, 'Quickly, heroes! Destroy the demon lord before it can open a portal to its twisted demonic realm!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16044, 1, 0, 0, '34996'), +(0, -1649087, 'The loss of Wilfred Fizzlebang, while unfortunate, should be a lesson to those that dare dabble in dark magic. Alas, you are victorious and must now face the next challenge.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16045, 1, 0, 0, '34996'), +(0, -1649088, 'Treacherous Alliance dogs! You summon a demon lord against warriors of the Horde!? Your deaths will be swift!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16021, 1, 0, 0, '34995'), +(0, -1649089, 'The Alliance doesnt need the help of a demon lord to deal with Horde filth. Come, pig!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16064, 1, 0, 0, '34990'), +(0, -1649090, 'Everyone, calm down! Compose yourselves! There is no conspiracy at play here. The warlock acted on his own volition - outside of influences from the Alliance. The tournament must go on!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16046, 1, 0, 0, '34996'), +(0, -1649091, 'The next battle will be against the Argent Crusades most powerful knights! Only by defeating them will you be deemed worthy...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16047, 1, 0, 0, '34996'), +(0, -1649092, 'Our honor has been besmirched! They make wild claims and false accusations against us. I demand justice! Allow my champions to fight in place of your knights, Tirion. We challenge the Horde!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16066, 1, 0, 0, '34990'), +(0, -1649093, 'The Horde demands justice! We challenge the Alliance. Allow us to battle in place of your knights, paladin. We will show these dogs what it means to insult the Horde!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16023, 1, 0, 0, '34995'), +(0, -1649094, 'Very well, I will allow it. Fight with honor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16048, 1, 0, 0, '34996'), +(0, -1649095, 'Fight for the glory of the Alliance, heroes! Honor your king and your people!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16065, 1, 0, 0, '34990'), +(0, -1649096, 'Show them no mercy, Horde champions! LOK-TAR OGAR!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16022, 1, 0, 0, '34995'), +(0, -1649097, 'GLORY OF THE ALLIANCE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16067, 1, 0, 0, '34990'), +(0, -1649098, 'LOK-TAR OGAR!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16024, 1, 0, 0, '34995'), +(0, -1649099, 'A shallow and tragic victory. We are weaker as a whole from the losses suffered today. Who but the Lich King could benefit from such foolishness? Great warriors have lost their lives. And for what? The true threat looms ahead - the Lich King awaits us all in death.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16049, 1, 0, 0, '34996'), +(0, -1649100, 'Only by working together will you overcome the final challenge. From the depths of Icecrown come two of the Scourges most powerful lieutenants: fearsome valkyr, winged harbingers of the Lich King!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16050, 1, 0, 0, '34996'), +(0, -1649101, 'Let the games begin!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16037, 1, 0, 0, '34996'), +(0, -1649102, 'Not even the Lich King most powerful minions can stand against the Alliance! All hail our victors!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16068, 1, 0, 0, '34990'), +(0, -1649103, 'Do you still question the might of the horde paladin? We will take on all comers.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16025, 1, 0, 0, '34995'), +(0, -1649104, 'A mighty blow has been dealt to the Lich King! You have proven yourselves able bodied champions of the Argent Crusade. Together we will strike at Icecrown Citadel and destroy what remains of the Scourge! There is no challenge that we cannot face united!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16051, 1, 0, 0, '34996'), +(0, -1649105, 'You will have your challenge, Fordring.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16321, 1, 0, 0, '35877'), +(0, -1649106, 'Arthas! You are hopelessly outnumbered! Lay down Frostmourne and I will grant you a just death.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16052, 1, 0, 0, '34996'), +(0, -1649107, 'The Nerubians built an empire beneath the frozen wastes of Northrend. An empire that you so foolishly built your structures upon. MY EMPIRE.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16322, 1, 0, 0, '35877'), +(0, -1649108, 'The souls of your fallen champions will be mine, Fordring.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16323, 1, 0, 0, '35877'), +(0, -1649109, 'Champions, you are alive! Not only have you defeated every challenge of the Trial of the Crusader, but thwarted Arthas directly! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of my mages to transport you back to the surface!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, '36095'), +(0, -1649110, 'Let me hand you the chests as a reward, and let its contents will serve you faithfully in the campaign against Arthas in the heart of the Icecrown Citadel!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, '36095'), +(5391, -1000500, 'Help! Please, You must help me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Galen - periodic say'), +(5391, -1000501, 'Let us leave this place.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Galen - quest accepted'), +(5391, -1000502, 'Look out! The $c attacks!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Galen - aggro 1'), +(5391, -1000503, 'Help! I''m under attack!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Galen - aggro 2'), +(5391, -1000504, 'Thank you $N. I will remember you always. You can find my strongbox in my camp, north of Stonard.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Galen - quest complete'), +(5391, -1000505, '%s whispers to $N the secret to opening his strongbox.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Galen - emote whisper'), +(5391, -1000506, '%s disappears into the swamp.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'Galen - emote disapper'), +(19589, -1000575, 'All systems on-line. Prepare yourself, we leave shortly.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'max_a_million SAY_START'), +(19589, -1000576, 'Be careful in there and come back in one piece!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'bot-specialist_alley SAY_ALLEY_FAREWELL'), +(19589, -1000577, 'Proceed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'max_a_million SAY_CONTINUE'), +(19589, -1000578, 'You are back! Were you able to get all of the machines?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'bot-specialist_alley SAY_ALLEY_FINISH'), +(4880, -1000507, 'Ok, let''s get started.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'stinky - quest accepted'), +(4880, -1000508, 'Now let''s look for the herb.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'stinky - say1'), +(4880, -1000509, 'Nope, not here...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'stinky - say2'), +(4880, -1000510, 'There must be one around here somewhere...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'stinky - say3'), +(4880, -1000511, 'Ah, there''s one! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'stinky - say4'), +(4880, -1000512, 'Come, $N! Let''s go over there and collect it!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'stinky - say5'), +(4880, -1000513, 'Ok, now let''s get out of here! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'stinky - say6'), +(4880, -1000514, 'I can make it from here. Thanks, $N! And talk to my employer about a reward!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'stinky - quest complete'), +(4880, -1000515, 'Help! The beast is on me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'stinky - aggro'), +(4880, -1000516, '%s disappears back into the swamp.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'stinky - emote disapper'), +(0, -1000517, 'A-Me good. Good, A-Me. Follow... follow A-Me. Home. A-Me go home.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_ame - SAY_READY'), +(0, -1000518, '$c, no hurt A-Me. A-Me good.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_ame - SAY_AGGRO1'), +(0, -1000519, 'Good... good, A-Me. A-Me good. Home. Find home.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_ame - SAY_SEARCH'), +(0, -1000520, 'Danger. Danger! $c try hurt A-Me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_ame - SAY_AGGRO2'), +(0, -1000521, 'Bad, $c. $c, bad!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_ame - SAY_AGGRO3'), +(0, -1000522, 'A-Me home! A-Me good! Good A-Me. Home. Home. Home.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_ame - SAY_FINISH'), +(0, -1000523, 'Saeed is currently engaged or awaiting orders to engage. You may check directly east of me and see if Saeed is ready for you. If he is not present then he is off fighting another battle. I recommend that you wait for him to return before attacking Dimensius.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 4, 0, 0, 'npc_professor_dabiri - WHISPER_DABIRI'), +(0, -1000524, 'Bessy, is that you?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_bessy - SAY_THADELL_1'), +(0, -1000525, 'Thank you for bringing back my Bessy, $N. I couldn''t live without her!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_bessy - SAY_THADELL_2'), +(0, -1000571, 'Ok let''s get out of here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_isla_starmane - SAY_PROGRESS_1'), +(0, -1000572, 'You sure you''re ready? Take a moment.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_isla_starmane - SAY_PROGRESS_2'), +(0, -1000573, 'Alright, let''s do this!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_isla_starmane - SAY_PROGRESS_3'), +(0, -1000574, 'Ok, I think I can make it on my own from here. Thank you so much for breaking me out of there!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_isla_starmane - SAY_PROGRESS_4'), +(0, -1000606, 'Come, $N. Lord Stormrage awaits.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'OVERLORD_SAY_1'), +(0, -1000607, 'Lord Illidan will be here shortly.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'OVERLORD_SAY_2'), +(0, -1000609, 'But... My lord, I do not understand. $N... He is the orc that has...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'OVERLORD_SAY_4'), +(0, -1000610, 'It will be done, my lord.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'OVERLORD_SAY_5'), +(0, -1000611, 'So you thought to make a fool of Mor''ghor, eh? Before you are delivered to Lord Illidan, you will feel pain that you could not know to exist. I will take pleasure in exacting my own vengeance.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 25, 'OVERLORD_SAY_6'), +(0, -1000612, 'Warriors of Dragonmaw, gather ''round! One among you has attained the rank of highlord! Bow your heads in reverence! Show your respect and allegiance to Highlord $N!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 22, 'OVERLORD_YELL_1'), +(0, -1000613, 'All hail Lord Illidan!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 66, 'OVERLORD_YELL_2'), +(0, -1000614, 'What is the meaning of this, Mor''ghor?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'LORD_ILLIDAN_SAY_1'), +(0, -1000615, 'SILENCE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 22, 'LORD_ILLIDAN_SAY_2'), +(0, -1000616, 'Blathering idiot. You incomprehensibly incompetent buffoon...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'LORD_ILLIDAN_SAY_3'), +(0, -1000617, 'THIS is your hero?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 6, 'LORD_ILLIDAN_SAY_4'), +(0, -1000618, 'You have been deceived, imbecile.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'LORD_ILLIDAN_SAY_5'), +(0, -1000619, 'This... whole... operation... HAS BEEN COMPROMISED!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 22, 'LORD_ILLIDAN_SAY_6'), +(0, -1000620, 'I expect to see this insect''s carcass in pieces in my lair within the hour. Fail and you will suffer a fate so much worse than death.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'LORD_ILLIDAN_SAY_7'), +(0, -1000621, 'You will not harm the boy, Mor''ghor! Quickly, $N, climb on my back!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 22, 'YARZILL_THE_MERC_SAY'), +(0, -1000629, 'What''s the big idea, Spark?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'geezle - GEEZLE_SAY_1'), +(0, -1000630, 'What''s the big idea? You nearly blew my cover, idiot! I told you to put the compass and navigation maps somewhere safe - not out in the open for any fool to discover.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 4, 'geezle - SPARK_SAY_2'), +(0, -1000631, 'The Master has gone to great lengths to secure information about the whereabouts of the Exodar. You could have blown the entire operation, including the cover of our spy on the inside.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'geezle - SPARK_SAY_3'), +(0, -1000632, 'Relax, Spark! I have it all under control. We''ll strip mine the Exodar right out from under ''em - making both you and I very, very rich in the process.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 4, 'geezle - GEEZLE_SAY_4'), +(0, -1000633, 'Relax? Do you know what Kael''thas does to those that fail him, Geezle? Eternal suffering and pain... Do NOT screw this up, fool.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'geezle - SPARK_SAY_5'), +(0, -1000634, 'Our Bloodmyst scouts have located our contact. The fool, Velen, will soon leave himself open and defenseless -- long enough for us to strike! Now get out of my sight before I vaporize you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'geezle - SPARK_SAY_6'), +(0, -1000635, 'Yes, sir. It won''t happen again...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'geezle - GEEZLE_SAY_7'), +(0, -1000636, 'picks up the naga flag.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'geezle - EMOTE_SPARK'), +(0, -1800064, 'Beware! We are attacked!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 1, 'npc_anchorite_truuen - SAY_WP_0'), +(0, -1800065, 'It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to attack us. We must proceed with caution lest we be overwhelmed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 1, 'npc_anchorite_truuen - SAY_WP_1'), +(0, -1800066, 'This land truly needs to be cleansed by the Light! Let us continue on to the tomb. It isn''t far now...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 1, 'npc_anchorite_truuen - SAY_WP_2'), +(0, -1800067, 'Be welcome, friends!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 1, 'npc_anchorite_truuen - SAY_WP_3'), +(0, -1800068, 'Thank you for coming here in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man''s heart. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 1, 'npc_anchorite_truuen - SAY_WP_4'), +(0, -1800069, 'Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 1, 'npc_anchorite_truuen - SAY_WP_5'), +(0, -1800070, 'Thank you my friend for making this possible. This is a day that I shall never forget! I think I will stay a while. Please return to High Priestess MacDonnell at the camp. I know that she''ll be keenly interested to know of what has transpired here.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 1, 'npc_anchorite_truuen - SAY_WP_6'), +(0, -1000600, 'Ow! OK, I''ll get back to work, $N!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 'npc_lazy_peon - SAY_WP_0'), +(28604, -1571042, 'Ouch! Watch where you''re tugging!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'adventurous dwarf SAY_DWARF_OUCH'), +(28604, -1571043, 'Glad I could help!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'adventurous dwarf SAY_DWARF_HELP'), +(29281, -1575015, 'My liege! I have done as you asked, and now beseech you for your blessing!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Svala Sorrowgrave SAY_DIALOG_WITH_ARTHAS_1'), +(29281, -1575016, 'The sensation is... beyond my imagining. I am yours to command, my king.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Svala Sorrowgrave SAY_DIALOG_WITH_ARTHAS_2'), +(29281, -1575017, 'I will be happy to slaughter them in your name! Come, enemies of the Scourge! I will show you the might of the Lich King!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Svala Sorrowgrave SAY_DIALOG_WITH_ARTHAS_3'), +(26668, -1575018, 'I will vanquish your soul!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Svala Sorrowgrave SAY_AGGRO'), +(26668, -1575022, 'Nooo! I did not come this far... to...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Svala Sorrowgrave SAY_DEATH'), +(26687, -1575000, 'What this place? I will destroy you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Gortok Palehoof SAY_AGGRO'), +(26687, -1575001, 'You die! That what master wants!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Gortok Palehoof SAY_SLAY_1'), +(26687, -1575002, 'An easy task!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Gortok Palehoof SAY_SLAY_2'), +(27978, -1599014, 'Folvynn buul hrom onn!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Sjonnir The Ironshaper SAY_SLAY_3'), +(29304, -1604018, 'Ye not breathin''! Good.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Slad''ran SAY_SLAY_1'), +(29304, -1604019, 'You ssscared now?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Slad''ran SAY_SLAY_2'), +(29304, -1604020, 'I''ll eat you next, mon!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Slad''ran SAY_SLAY_3'), +(29304, -1604021, 'I sssee now... Ssscourge wasss not... our greatessst enemy...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Slad''ran SAY_DEATH'), +(29304, -1604022, 'Minionsss of the scale, heed my call!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Slad''ran SAY_SUMMON_SNAKES'), +(29304, -1604023, 'A thousssand fangs gonna rend your flesh!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Slad''ran SAY_SUMMON_CONSTRICTORS'), +(29306, -1604000, 'I''m gonna spill your guts, mon!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Gal''darah SAY_AGGRO'), +(29306, -1604001, 'What a rush!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Gal''darah SAY_SLAY_1'), +(29306, -1604003, 'I told ya so!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Gal''darah SAY_SLAY_3'), +(29306, -1604004, 'Even the mighty... can fall.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Gal''darah SAY_DEATH'), +(29306, -1604005, 'Gut them! Impale them!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Gal''darah SAY_SUMMON_RHINO_1'), +(29306, -1604006, 'KILL THEM ALL!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Gal''darah SAY_SUMMON_RHINO_2'), +(29306, -1604007, 'Say hello to my BIG friend!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Gal''darah SAY_SUMMON_RHINO_3'), +(29306, -1604008, 'Ain''t gonna be nottin'' left after this!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Gal''darah SAY_TRANSFORM_1'), +(29309, -1619017, 'Perhaps we will be allies soon.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Elder Nadox SAY_SLAY_3'), +(29309, -1619018, 'Master, is my service complete?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Elder Nadox SAY_DEATH'), +(29309, -1619019, 'The young must not grow hungry...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Elder Nadox SAY_EGG_SAC_1'), +(29310, -1619000, 'These are sacred halls! Your intrusion will be met with death.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Jedoga Shadowseeker SAY_AGGRO'), +(29310, -1619001, 'Who among you is devoted?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Jedoga Shadowseeker SAY_SACRIFICE_1_1'), +(29310, -1619002, 'You there! Step forward!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Jedoga Shadowseeker SAY_SACRIFICE_1_2'), +(29310, -1619008, 'Do not expect your sacrilege... to go unpunished.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Jedoga Shadowseeker SAY_DEATH'), +(29310, -1619009, 'The elements themselves will rise up against the civilized world! Only the faithful will be spared!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Jedoga Shadowseeker SAY_PREACHING_1'), +(29311, -1619030, 'Shgla''yos plahf mh''naus.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Herald Volazj SAY_AGGRO'), +(29311, -1619034, 'Iilth vwah, uhn''agth fhssh za.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Herald Volazj SAY_DEATH_1'), +(33118, -1603229, 'Ignis the Furnace Master begins to cast Flame Jets!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'IGNIS EMOTE_JETS'), +(26668, -1575019, 'You were a fool to challenge the power of the Lich King!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Svala Sorrowgrave SAY_SLAY_1'), +(26668, -1575020, 'Your will is done, my king.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Svala Sorrowgrave SAY_SLAY_2'), +(29306, -1604002, 'Who needs gods, when WE ARE GODS!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Gal''darah SAY_SLAY_2'), +(29306, -1604009, 'You wanna see power? I''m gonna show you power!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Gal''darah SAY_TRANSFORM_2'), +(29310, -1619003, 'Yogg-Saron, grant me your power!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Jedoga Shadowseeker SAY_SACRIFICE_2_1'), +(29310, -1619004, 'Master, a gift for you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Jedoga Shadowseeker SAY_SACRIFICE_2_2'), +(29310, -1619005, 'Glory to Yogg-Saron!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Jedoga Shadowseeker SAY_SLAY_1'), +(29310, -1619007, 'Get up! You haven''t suffered enough.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Jedoga Shadowseeker SAY_SLAY_3'), +(29310, -1619010, 'Immortality can be yours. But only if you pledge yourself fully to Yogg-Saron!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Jedoga Shadowseeker SAY_PREACHING_2'), +(29310, -1619011, 'Here on the very borders of his domain. You will experience powers you would never have imagined!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Jedoga Shadowseeker SAY_PREACHING_3'), +(29310, -1619012, 'You have traveled long and risked much to be here. Your devotion shall be rewarded.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Jedoga Shadowseeker SAY_PREACHING_4'), +(29310, -1619013, 'The faithful shall be exalted! But there is more work to be done. We will press on until all of Azeroth lies beneath his shadow!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Jedoga Shadowseeker SAY_PREACHING_5'), +(29309, -1619020, 'Shhhad ak kereeesshh chak-k-k!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Elder Nadox SAY_EGG_SAC_2'), +(29311, -1619031, 'Ywaq puul skshgn: on''ma yeh''glu zuq.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Herald Volazj SAY_SLAY_1'), +(29311, -1619032, 'Ywaq ma phgwa''cul hnakf.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Herald Volazj SAY_SLAY_2'), +(29311, -1619033, 'Ywaq maq oou; ywaq maq ssaggh. Ywaq ma shg''fhn.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Herald Volazj SAY_SLAY_3'), +(33186, -1603268, 'Razorscale grounded permanently!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'EMOTE_PERMA'), +(33186, -1603267, 'Razorscale takes a deep breath...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'EMOTE_BREATH'), +(33287, -1603266, 'Harpoon Turret is ready for use!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'EMOTE_HARPOON'), +(33287, -1603265, 'Fires out! Let''s rebuild those turrets!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'SAY_TURRETS'), +(33287, -1603264, 'Ready to move out, keep those dwarves off of our backs!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'SAY_AGGRO_3'), +(33287, -1603263, 'Be on the lookout! Mole machines will be surfacing soon with those nasty Iron dwarves aboard!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'SAY_AGGRO_2'), +(33287, -1603262, 'Give us a moment to prepare to build the turrets.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'SAY_AGGRO_1'), +(0, -1000002, '%s goes into a frenzy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'EMOTE_GENERIC_FRENZY'), +(0, -1000003, '%s becomes enraged!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'EMOTE_GENERIC_ENRAGED'), +(26668, -1575023, 'Your death approaches.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13850, 1, 0, 0, 'svala SAY_SACRIFICE_1'), +(26668, -1575024, 'Go now to my master.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13851, 1, 0, 0, 'svala SAY_SACRIFICE_2'), +(26668, -1575025, 'Your end is inevitable.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13852, 1, 0, 0, 'svala SAY_SACRIFICE_3'), +(26668, -1575026, 'Yor-guul mak!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13853, 1, 0, 0, 'svala SAY_SACRIFICE_4'), +(26668, -1575027, 'Any last words?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13854, 1, 0, 0, 'svala SAY_SACRIFICE_5'), +(29309, -1619015, 'Sleep now, in the cold dark.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Elder Nadox SAY_SLAY_1'), +(29310, -1619006, 'You are unworthy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Jedoga Shadowseeker SAY_SLAY_2'), +(26668, -1575021, 'Another soul for my master.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Svala Sorrowgrave SAY_SLAY_3'), +(29309, -1619016, 'For the Lich King!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Elder Nadox SAY_SLAY_2'), +(25248, -1571047, 'I suppose this is it, then? I won''t go down quietly!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_hidden_cultist SAY_HIDDEN_CULTIST_4'), +(25827, -1571046, 'You don''t know who you''re messing with! Death beckons!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_hidden_cultist SAY_HIDDEN_CULTIST_3'), +(25828, -1571045, 'Finally! This charade is over... Arthas give me strength!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_hidden_cultist SAY_HIDDEN_CULTIST_2'), +(25248, -1571044, 'Well...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_hidden_cultist SAY_HIDDEN_CULTIST_1'), +(4979, -1603502, 'Hey, thanks.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Theramore Guard - SAY_QUEST1'), +(4979, -1603503, '...receive 50 percent off deserter undergarments? What is this garbage?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Theramore Guard - SAY_QUEST2'), +(4979, -1603504, '...to establish a fund for the purchase of hair gel? I like my hair the way it is, thanks!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Theramore Guard - SAY_QUEST3'), +(4979, -1603505, '...the deserters seek a Theramore where citizens will be free to juggle at all hours of the day? What is this nonsense?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Theramore Guard - SAY_QUEST4'), +(4979, -1603506, '...to establish the chicken as the official symbol of Theramore?! These guys are nuts!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Theramore Guard - SAY_QUEST5'), +(4979, -1603507, '...as a deserter, you''ll enjoy activities like tethered swimming and dog grooming? How ridiculous!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Theramore Guard - SAY_QUEST6'), +(4979, -1603508, 'This... this is a joke, right?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Theramore Guard - SAY_QUEST7'), +(4979, -1603509, 'I''d never join anything like this. Better keep this, though. It''ll come in handy in the privy...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Theramore Guard - SAY_QUEST8'), +(4979, -1603510, 'What a bunch of lunatics! You actually believe this stuff?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Theramore Guard - SAY_QUEST9'), +(27570, -1603535, 'We''re all gonna die!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Smoke ''Em Out - Say1'), +(27570, -1603536, 'Gotta get out of here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Smoke ''Em Out - Say2'), +(27570, -1603537, 'No way I''m stickin'' around!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Smoke ''Em Out - Say3'), +(27570, -1603538, 'Forget this! I''m going home!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Smoke ''Em Out - Say4'), +(27570, -1603539, 'I didn''t sign up for this!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'Smoke ''Em Out - Say5'), +(33271, -1603289, 'A cloud of saronite vapors coalesces nearby!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'General Vezax - Emote1'), +(33271, -1603297, 'The saronite vapors mass and swirl violently, merging into a monstrous form!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'General Vezax - Emote2'), +(33271, -1603298, 'A saronite barrier appears around General Vezax!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'General Vezax - Emote3'), +(33271, -1603299, 'General Vezax roars and surges with dark might!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 3, 0, 0, 'General Vezax - Emote4'), +(36993, -1658066, 'Heroes, to me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16614, 1, 0, 0, 'Jaina SAY_JAYNA_OUTRO_3'), +(36990, -1658067, 'Take cover behind me! Quickly!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17037, 1, 0, 0, 'Sylvanas SAY_SYLVANAS_OUTRO_3'), +(36993, -1658068, 'The Frost Queen is gone. We must keep moving - our objective is near.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16615, 0, 0, 0, 'Jaina SAY_JAYNA_OUTRO_4'), +(36990, -1658069, 'I thought he''d never shut up. At last, Sindragosa silenced that long-winded fool. To the Halls of Reflection, champions! Our objective is near... I can sense it.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17036, 0, 0, 0, 'Sylvanas SAY_SYLVANAS_OUTRO_4'), +(36993, -1658070, 'I... I could not save them... Damn you, Arthas! DAMN YOU!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16616, 0, 0, 0, 'Jaina SAY_JAYNA_OUTRO_5'), +(18445, -1800071, 'Thanks, $C! I''m sure my dad will reward you greatly! Bye!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(20812, -1800072, 'This is the last time I get caught!I promise! Bye!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(18369, -1800073, 'Thank you for saving me again!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(17682, -1800074, 'Go to the west', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL), +(10096, -1230003, 'You have been sentenced to death for crimes against the Dark Iron nation!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'npc_grimstone SCRIPT_TEXT1'), +(10096, -1230004, 'The Sons of Thaurissan shall watch you perish in the Ring of the Law!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'npc_grimstone SCRIPT_TEXT2'), +(10096, -1230005, 'Unleash the fury and let it be done!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'npc_grimstone SCRIPT_TEXT3'), +(10096, -1230006, 'Haha! I bet you thought you were done!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'npc_grimstone SCRIPT_TEXT4'), +(10096, -1230007, 'But your real punishment lies ahead.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'npc_grimstone SCRIPT_TEXT5'), +(10096, -1230008, 'Good riddance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'npc_grimstone SCRIPT_TEXT6'), +(27654, -1578005, 'The prisoners shall not go free! The word of Malygos is law!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13594, 1, 0, 0, 'SAY_AGGRO'), +(27654, -1578006, 'A fitting punishment!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13602, 1, 0, 0, 'SAY_KILL_1'), +(27654, -1578007, 'Sentence: executed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13603, 1, 0, 0, 'SAY_KILL_2'), +(27654, -1578008, 'Another casualty of war!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13604, 1, 0, 0, 'SAY_KILL_3'), +(27654, -1578009, 'The war... goes on.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13605, 1, 0, 0, 'SAY_DEATH'), +(27654, -1578010, 'It is too late to run!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13598, 1, 0, 0, 'SAY_PULL_1'), +(27654, -1578011, 'Gather ''round....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13599, 1, 0, 0, 'SAY_PULL_2'), +(27654, -1578012, 'None shall escape!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13600, 1, 0, 0, 'SAY_PULL_3'), +(27654, -1578013, 'I condemn you to death!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13601, 1, 0, 0, 'SAY_PULL_4'), +(27654, -1578014, 'Tremble, worms!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13595, 1, 0, 0, 'SAY_STOMP_1'), +(27654, -1578015, 'I will crush you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13596, 1, 0, 0, 'SAY_STOMP_2'), +(27654, -1578016, 'Can you fly?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13597, 1, 0, 0, 'SAY_STOMP_3'); diff --git a/sql/updates/world/2012_01_08_16_world_misc.sql b/sql/updates/world/2012_01_08_16_world_misc.sql new file mode 100644 index 00000000000..63cd81ff869 --- /dev/null +++ b/sql/updates/world/2012_01_08_16_world_misc.sql @@ -0,0 +1,117 @@ +/* Texts */ + +-- Move text used in Svala Sorrowgrave from script_texts to creature_text +-- Remove old script text for boss_svala.cpp +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1575027 AND -1575015; + +DELETE FROM `creature_text` WHERE `entry` IN (26668,29281); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(26668,0,0, 'The sensation is... beyond my imagining. I am yours to command, my king.',14,0,0,0,0,13857, 'Svala Sorrowgrave SAY_DIALOG_WITH_ARTHAS_2'), +(26668,1,0, 'I will be happy to slaughter them in your name! Come, enemies of the Scourge! I will show you the might of the Lich King!',14,0,0,0,0,13858, 'Svala Sorrowgrave SAY_DIALOG_WITH_ARTHAS_3'), +(26668,2,0, 'I will vanquish your soul!',14,0,0,0,0,13842, 'Svala Sorrowgrave SAY_AGGRO'), +(26668,3,0, 'You were a fool to challenge the power of the Lich King!',14,0,0,0,0,13845, 'Svala Sorrowgrave SAY_SLAY_1'), +(26668,3,1, 'Your will is done, my king.',14,0,0,0,0,13847, 'Svala Sorrowgrave SAY_SLAY_2'), +(26668,3,2, 'Another soul for my master.',14,0,0,0,0,13848, 'Svala Sorrowgrave SAY_SLAY_3'), +(26668,4,0, 'Nooo! I did not come this far... to...',14,0,0,0,0,13855, 'Svala Sorrowgrave SAY_DEATH'), +(26668,5,0, 'Your death approaches.',14,0,0,0,0,13850, 'Svala Sorrowgrave SAY_SACRIFICE_1'), +(26668,5,1, 'Go now to my master.',14,0,0,0,0,13851, 'Svala Sorrowgrave SAY_SACRIFICE_2'), +(26668,5,2, 'Your end is inevitable.',14,0,0,0,0,13852, 'Svala Sorrowgrave SAY_SACRIFICE_3'), +(26668,5,3, 'Yor-guul mak!',14,0,0,0,0,13853, 'Svala Sorrowgrave SAY_SACRIFICE_4'), +(26668,5,4, 'Any last words?',14,0,0,0,0,13854, 'Svala Sorrowgrave SAY_SACRIFICE_5'), +(29281,0,0, 'My liege! I have done as you asked, and now beseech you for your blessing!',14,0,0,0,0,13856, 'Svala SAY_DIALOG_WITH_ARTHAS_1'); + +/* Templates */ + +UPDATE `creature_template` SET `unit_flags`=2 WHERE `entry` IN (29281, 30809); -- And this, fixes her flag so script can be started (credit to ric) +UPDATE `creature` SET `spawntimesecs`=86400 WHERE `id`=29281; -- Set Svala's spawn time +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|1 WHERE `entry`=30809; -- Set flags_extra = 1 for Svala hero difficulty +UPDATE `creature_template` SET `InhabitType`=7, `flags_extra`=`flags_extra`|130 WHERE `entry`=30805; -- Set same data on heroic ver to triggers +UPDATE `creature_template` SET `InhabitType`=7, `flags_extra`=`flags_extra`|128 WHERE `entry`=30771; -- Set same data on heroic ver to triggers + +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask` +|1 -- CHARM +|2 -- DISORIENTED +|4 -- DISARM +|8 -- DISTRACT +|16 -- FEAR +|32 -- GRIP +|64 -- ROOT +|128 -- PACIFY +|256 -- SILENCE +|512 -- SLEEP +|1024 -- SNARE +|2048 -- STUN +|4096 -- FREEZE +|8192 -- KNOCKOUT +|65536 -- POLYMORPH +|131072 -- BANISH +|524288 -- SHACKLE +|4194304 -- TURN +|8388608 -- HORROR +|67108864 -- DAZE +|536870912 -- SAPPED +WHERE `entry` IN (29281, 30809, 26668, 30810); + +-- Apply Image of Arthas Visual Effect +DELETE FROM `creature_template_addon` WHERE `entry`=29280; +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +(29280, 0, 0, 0, 1, 0, '54134'); + +-- Flame Brazier triggers deletion (will spawn them after activating event 17841 called by spell Call Flames 48258) +DELETE FROM `creature` WHERE `id`=27273 AND `map`=575; +DELETE FROM `creature_addon` WHERE `guid` IN (126121, 126122); + +/* Spells */ + +DELETE FROM `spell_target_position` WHERE `id` IN (48267,48276, 48271, 48274, 48275); +INSERT INTO `spell_target_position` (`id`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES +(48267, 575, 296.632, -346.075, 90.5474, 4.60767), -- Svala Ritual - Player teleport position +(48276, 575, 296.651, -346.293, 108.5474, 1.58), -- Svala Ritual - Svala teleport position +(48271, 575, 296.42, -355.01, 90.94, 1.58), -- Summon Ritual Channeler positions +(48274, 575, 302.36, -352.01, 90.54, 2.20), -- Summon Ritual Channeler positions +(48275, 575, 291.39, -352.01, 90.54, 0.91); -- Summon Ritual Channeler positions + +DELETE FROM `conditions` WHERE `SourceEntry` IN (48331,48246,48277) AND `SourceTypeOrReferenceId`=13; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 0, 48331, 0, 18, 1, 27327, 0, 0, '', NULL), -- Spell script target for flying sword +(13, 0, 48246, 0, 18, 1, 0, 0, 0, '', NULL), -- Spell script target for Flame Brazier's (on players only) +(13, 0, 48277, 0, 18, 1, 26555, 0, 0, '', NULL), -- Spell script target for Ritual Strike DMG -- Players +(13, 0, 48277, 0, 18, 1, 27327, 0, 0, '', NULL); -- Spell script target for Ritual Strike DMG -- Ritual Target + +/* Achivements */ + +-- The Incredible Hulk achievement 2043 +DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=7322; +DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=7322 AND `type`=11; +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES +(7322, 11, 0, 0, 'achievement_incredible_hulk'); + +/* AI */ + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=26555; -- Scourge Hulk +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=27273; -- Flame Brazier + +-- Add Send Script Event (17841) summon 3 triggers +DELETE FROM `event_scripts` WHERE `id`=17841; +INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES +(17841, 0, 10, 27273, 10000, 0, 285.6, -357.5, 91.0833, 5.75959), +(17841, 3, 10, 27273, 10000, 0, 307, -357.5, 91.0833, 6.02139), +(17841, 6, 10, 27273, 10000, 0, 285.6, -357.5, 91.0833, 5.75959); + +-- SmartAI script Flame Brazier's cast Ball of Flame (48246) on random player +DELETE FROM `smart_scripts` WHERE `entryorguid`=27273 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 +(27273, 0, 0, 0, 1, 0, 100, 1, 100, 100, 100, 100, 11, 48246, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Flame Brazier - Ball of Flame'); + +/* Script names */ + +UPDATE `creature_template` SET `AIName`='', `ScriptName`='npc_scourge_hulk' WHERE `entry`=26555; +UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=26668; -- "boss_svala_sorrowgrave" script is now merged with "boss_svala" script +UPDATE `creature_template` SET `ScriptName`='npc_spectator' WHERE `entry`=26667; -- Spectators escape script +UPDATE `creature_template` SET `ScriptName`='npc_ritual_channeler' WHERE `entry`=27281; -- Change 'mob_ritual_channeler' to 'npc_ritual_channeler' + +-- Paralyze -- Filter targets -- cast only on sacrafacing target +DELETE FROM `spell_script_names` WHERE `spell_id`=48278; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(48278, 'spell_paralyze_pinnacle'); + diff --git a/sql/updates/world/2012_01_08_18_world_achievement_criteria_data.sql b/sql/updates/world/2012_01_08_18_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..e20fd1c55bb --- /dev/null +++ b/sql/updates/world/2012_01_08_18_world_achievement_criteria_data.sql @@ -0,0 +1,5 @@ +-- Lightning Struck achievement +DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=6835; +DELETE FROM `achievement_criteria_data` WHERE `type`=11 AND `criteria_id`=6835; +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES +(6835, 11, 0, 0, 'achievement_lightning_struck'); diff --git a/sql/updates/world/2012_01_08_18_world_creature_addon.sql b/sql/updates/world/2012_01_08_18_world_creature_addon.sql new file mode 100644 index 00000000000..7570cc14afe --- /dev/null +++ b/sql/updates/world/2012_01_08_18_world_creature_addon.sql @@ -0,0 +1,3 @@ +-- HoL General Bjarngrim event Temporary Electrical Charge +-- Clear wrong aura +UPDATE `creature_addon` SET `auras`='' WHERE `guid` = 126981; diff --git a/sql/updates/world/2012_01_08_18_world_spell_linked_spell.sql b/sql/updates/world/2012_01_08_18_world_spell_linked_spell.sql new file mode 100644 index 00000000000..927c6c0c663 --- /dev/null +++ b/sql/updates/world/2012_01_08_18_world_spell_linked_spell.sql @@ -0,0 +1,4 @@ +-- add spell link for Temporary Electrical Charge +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`='-52098' AND `spell_effect`='52092'; +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +('-52098', '52092', '0', 'Charge Up - Temporary Electrical Charge'); diff --git a/sql/updates/world/2012_01_08_18_world_waypoint_data.sql b/sql/updates/world/2012_01_08_18_world_waypoint_data.sql new file mode 100644 index 00000000000..e443f7c055a --- /dev/null +++ b/sql/updates/world/2012_01_08_18_world_waypoint_data.sql @@ -0,0 +1,8 @@ +-- Set 10 sec delay on platforms where boss gets Temporary Electrical Charge +UPDATE `waypoint_data` SET `delay`=10000 WHERE `id`=1269810 AND `point` IN (2, 5, 11, 14); + +-- Cast self Charge Up to get Temporary Electrical Charge +UPDATE `waypoint_data` SET `action`=12698101 WHERE `id`=1269810 AND `point` IN (5, 14); + +-- Remove aura Temporary Electrical Charge +UPDATE `waypoint_data` SET `action`=12698102 WHERE `id`=1269810 AND `point` IN (2, 3, 4, 11, 12, 13); diff --git a/sql/updates/world/2012_01_08_18_world_waypoint_scripts.sql b/sql/updates/world/2012_01_08_18_world_waypoint_scripts.sql new file mode 100644 index 00000000000..f6c147155ea --- /dev/null +++ b/sql/updates/world/2012_01_08_18_world_waypoint_scripts.sql @@ -0,0 +1,10 @@ +-- Cast self Charge Up to get Temporary Electrical Charge +DELETE FROM `waypoint_scripts` WHERE `id`=12698101; +INSERT INTO `waypoint_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`, `guid`) VALUES +(12698101, 0, 14, 52092, 1, 0, 0, 0, 0, 0, 855), +(12698101, 2, 15, 52098, 1, 0, 0, 0, 0, 0, 856); + +-- Remove aura Temporary Electrical Charge +DELETE FROM `waypoint_scripts` WHERE `id`=12698102; +INSERT INTO `waypoint_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`, `guid`) VALUES +(12698102, 0, 14, 52092, 1, 0, 0, 0, 0, 0, 857); diff --git a/sql/updates/world/2012_01_08_19_world_achievement_criteria_data.sql b/sql/updates/world/2012_01_08_19_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..6cd1a367e81 --- /dev/null +++ b/sql/updates/world/2012_01_08_19_world_achievement_criteria_data.sql @@ -0,0 +1,5 @@ +-- Lightning Struck achievement move from criteria script to DB thx Vincent-Michael +DELETE FROM `achievement_criteria_data` WHERE `ScriptName`='achievement_lightning_struck'; +DELETE FROM `achievement_criteria_data` WHERE `type`=7 AND `criteria_id`=6835; +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES +(6835, 7, 52092, 0, ''); diff --git a/sql/updates/world/2012_01_09_00_world_creature_text.sql b/sql/updates/world/2012_01_09_00_world_creature_text.sql new file mode 100644 index 00000000000..2a70be00b12 --- /dev/null +++ b/sql/updates/world/2012_01_09_00_world_creature_text.sql @@ -0,0 +1,5 @@ +DELETE FROM `creature_text` WHERE `entry`=16011; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(16011,0,0, 'An aura of necrotic energy blocks all healing!',41,0,100,0,0,0, 'Loatheb'), +(16011,1,0, 'The aura fades away, allowing for healing once more!',41,0,100,0,0,0, 'Loatheb'), +(16011,2,0, 'The aura''s power begins to wane!',41,0,100,0,0,0, 'Loatheb'); diff --git a/sql/updates/world/2012_01_09_00_world_spell_script_names.sql b/sql/updates/world/2012_01_09_00_world_spell_script_names.sql new file mode 100644 index 00000000000..7279fc54413 --- /dev/null +++ b/sql/updates/world/2012_01_09_00_world_spell_script_names.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=59481; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(59481, 'spell_loatheb_necrotic_aura_warning'); diff --git a/sql/updates/world/2012_01_09_01_world_achievement_criteria_data.sql b/sql/updates/world/2012_01_09_01_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..ae3c2ec960a --- /dev/null +++ b/sql/updates/world/2012_01_09_01_world_achievement_criteria_data.sql @@ -0,0 +1,7 @@ +DELETE FROM `disables` WHERE `sourceType`=4 AND `entry` IN (7612,7613); +DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (7612,7613); +INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES +(7612,11,0,0, 'achievement_spore_loser'), +(7612,12,0,0,''), +(7613,11,0,0, 'achievement_spore_loser'), +(7613,12,1,0,''); diff --git a/sql/updates/world/2012_01_09_01_world_creature_text.sql b/sql/updates/world/2012_01_09_01_world_creature_text.sql new file mode 100644 index 00000000000..d1ec26bd7f4 --- /dev/null +++ b/sql/updates/world/2012_01_09_01_world_creature_text.sql @@ -0,0 +1,5 @@ +-- Missing Image of Arthas say text +DELETE FROM `creature_text` WHERE `entry`=29280; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(29280,0,0, 'Your sacrifice is a testament to your obedience. Indeed you are worthy of this charge. Arise, and forever be known as Svala Sorrowgrave!',14,0,0,0,0,14732, 'Image of Arthas SAY_DIALOG_OF_ARTHAS_1'), +(29280,1,0, 'Your first test awaits you. Destroy our uninvited guests.',14,0,0,0,0,14733, 'Image of Arthas SAY_DIALOG_OF_ARTHAS_2'); diff --git a/sql/updates/world/2012_01_09_01_world_smart_scripts.sql b/sql/updates/world/2012_01_09_01_world_smart_scripts.sql new file mode 100644 index 00000000000..a7304fa6e6a --- /dev/null +++ b/sql/updates/world/2012_01_09_01_world_smart_scripts.sql @@ -0,0 +1,2 @@ +-- Fix spamming of spell Ball of Flame (48246) +UPDATE `smart_scripts` SET `event_type`=54, `event_param1`=0, `event_param2`=0, `event_param3`=0, `event_param4`=0 WHERE `entryorguid`=27273; diff --git a/sql/updates/world/2012_01_11_00_world_achievement_criteria_data.sql b/sql/updates/world/2012_01_11_00_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..6c5d8ae7866 --- /dev/null +++ b/sql/updates/world/2012_01_11_00_world_achievement_criteria_data.sql @@ -0,0 +1,4 @@ +DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (7604, 7605) AND `type` = 18; +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `scriptname`) VALUES +(7604, 18, 0, 0, ""), +(7605, 18, 0, 0, ""); diff --git a/sql/updates/world/2012_01_11_00_world_disables.sql b/sql/updates/world/2012_01_11_00_world_disables.sql new file mode 100644 index 00000000000..18f9a5c3964 --- /dev/null +++ b/sql/updates/world/2012_01_11_00_world_disables.sql @@ -0,0 +1 @@ +DELETE FROM `disables` WHERE `sourcetype` = 4 AND `entry` IN (7604, 7605); diff --git a/sql/updates/world/2012_01_11_00_world_spell_script_names.sql b/sql/updates/world/2012_01_11_00_world_spell_script_names.sql new file mode 100644 index 00000000000..82428ef989e --- /dev/null +++ b/sql/updates/world/2012_01_11_00_world_spell_script_names.sql @@ -0,0 +1,6 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` IN (28062, 28085, 39090, 39093); +INSERT INTO `spell_script_names`(`spell_id`, `scriptname`) VALUES +(28062, "spell_thaddius_pos_neg_charge"), +(28085, "spell_thaddius_pos_neg_charge"), +(39090, "spell_thaddius_pos_neg_charge"), +(39093, "spell_thaddius_pos_neg_charge"); diff --git a/sql/updates/world/2012_01_11_01_world_achievement_criteria_data.sql b/sql/updates/world/2012_01_11_01_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..aa3ec94a5a8 --- /dev/null +++ b/sql/updates/world/2012_01_11_01_world_achievement_criteria_data.sql @@ -0,0 +1,4 @@ +DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (7604, 7605) AND `type` IN (18,11); +INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES +(7604,11,0,0, 'achievement_polarity_switch'), +(7605,11,0,0, 'achievement_polarity_switch'); diff --git a/sql/updates/world/2012_01_11_01_world_spell_script_names.sql b/sql/updates/world/2012_01_11_01_world_spell_script_names.sql new file mode 100644 index 00000000000..4600f190c4e --- /dev/null +++ b/sql/updates/world/2012_01_11_01_world_spell_script_names.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` IN (39090, 39093); +INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES +(39090, 'spell_capacitus_polarity_shift'), +(39093, 'spell_capacitus_polarity_shift'); diff --git a/sql/updates/world/2012_01_12_00_world_sai.sql b/sql/updates/world/2012_01_12_00_world_sai.sql new file mode 100644 index 00000000000..6acbd0bd293 --- /dev/null +++ b/sql/updates/world/2012_01_12_00_world_sai.sql @@ -0,0 +1,1905 @@ +-- Text that's used in all EAI +DELETE FROM `creature_ai_texts` WHERE `entry` IN (-548,-549); + +-- Enraged Felbat SAI +SET @ENTRY := 9521; +SET @SPELL_POISON := 744; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,2000,5000,12000,15000,11,@SPELL_POISON,1,0,0,0,0,2,0,0,0,0,0,0,0,"Enraged Felbat - In Combat - Cast Poison"); + +-- Enraged Gryphon SAI +SET @ENTRY := 9526; +SET @SPELL_REND := 18106; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,3000,6000,12000,15000,11,@SPELL_REND,1,0,0,0,0,2,0,0,0,0,0,0,0,"Enraged Gryphon - In Combat - Cast Rend"); + +-- Enraged Wyvern SAI +SET @ENTRY := 9297; +SET @SPELL_POISON := 744; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,2000,5000,12000,15000,11,@SPELL_POISON,1,0,0,0,0,2,0,0,0,0,0,0,0,"Enraged Wyvern - In Combat - Cast Poison"); + +-- Enraged Hippogryph SAI +SET @ENTRY := 9527; +SET @SPELL_REND := 18106; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,3000,6000,12000,15000,11,@SPELL_REND,1,0,0,0,0,2,0,0,0,0,0,0,0,"Enraged Hippogryph - In Combat - Cast Rend"); + +-- Dungar Longdrink SAI +SET @ENTRY := 352; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Dungar Longdrink - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Dungar Longdrink - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dungar Longdrink - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Dungar Longdrink"); + +-- Thor SAI +SET @ENTRY := 523; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Thor - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Thor - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Thor - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Thor"); + +-- Ariena Stormfeather SAI +SET @ENTRY := 931; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Ariena Stormfeather - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Ariena Stormfeather - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Ariena Stormfeather - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Ariena Stormfeather"); + +-- Thysta SAI +SET @ENTRY := 1387; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Thysta - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Thysta - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Thysta - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Thysta"); + +-- Shellei Brondir SAI +SET @ENTRY := 1571; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Shellei Brondir - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Shellei Brondir - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shellei Brondir - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Shellei Brondir"); + +-- Thorgrum Borrelson SAI +SET @ENTRY := 1572; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Thorgrum Borrelson - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Thorgrum Borrelson - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Thorgrum Borrelson - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Thorgrum Borrelson"); + +-- Gryth Thurden SAI +SET @ENTRY := 1573; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gryth Thurden - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gryth Thurden - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gryth Thurden - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Gryth Thurden"); + +-- Karos Razok SAI +SET @ENTRY := 2226; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Karos Razok - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Karos Razok - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Karos Razok - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Karos Razok"); + +-- Borgus Stoutarm SAI +SET @ENTRY := 2299; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Borgus Stoutarm - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Borgus Stoutarm - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Borgus Stoutarm - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Borgus Stoutarm"); + +-- Zarise SAI +SET @ENTRY := 2389; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Zarise - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Zarise - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Zarise - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Zarise"); + +-- Felicia Maline SAI +SET @ENTRY := 2409; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Felicia Maline - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Felicia Maline - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Felicia Maline - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Felicia Maline"); + +-- Darla Harris SAI +SET @ENTRY := 2432; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Darla Harris - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Darla Harris - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Darla Harris - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Darla Harris"); + +-- Cedrik Prose SAI +SET @ENTRY := 2835; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Cedrik Prose - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Cedrik Prose - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Cedrik Prose - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Cedrik Prose"); + +-- Urda SAI +SET @ENTRY := 2851; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Urda - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Urda - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Urda - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Urda"); + +-- Gringer SAI +SET @ENTRY := 2858; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gringer - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gringer - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gringer - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Gringer"); + +-- Gyll SAI +SET @ENTRY := 2859; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gyll - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gyll - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gyll - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Gyll"); + +-- Gorrik SAI +SET @ENTRY := 2861; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gorrik - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gorrik - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gorrik - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Gorrik"); + +-- Lanie Reed SAI +SET @ENTRY := 2941; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Lanie Reed - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Lanie Reed - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lanie Reed - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Lanie Reed"); + +-- Tal SAI +SET @ENTRY := 2995; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Tal - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Tal - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tal - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Tal"); + +-- Grisha SAI +SET @ENTRY := 3305; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Grisha - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Grisha - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Grisha - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Grisha"); + +-- Doras SAI +SET @ENTRY := 3310; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Doras - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Doras - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Doras - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Doras"); + +-- Devrak SAI +SET @ENTRY := 3615; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Devrak - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Devrak - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Devrak - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Devrak"); + +-- Vesprystus SAI +SET @ENTRY := 3838; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Vesprystus - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Vesprystus - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Vesprystus - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Vesprystus"); + +-- Caylais Moonfeather SAI +SET @ENTRY := 3841; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Caylais Moonfeather - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Caylais Moonfeather - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Caylais Moonfeather - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Caylais Moonfeather"); + +-- Daelyshia SAI +SET @ENTRY := 4267; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Daelyshia - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Daelyshia - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Daelyshia - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Daelyshia"); + +-- Tharm SAI +SET @ENTRY := 4312; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Tharm - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Tharm - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tharm - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Tharm"); + +-- Gorkas SAI +SET @ENTRY := 4314; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gorkas - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gorkas - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gorkas - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Gorkas"); + +-- Nyse SAI +SET @ENTRY := 4317; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Nyse - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Nyse - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Nyse - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Nyse"); + +-- Thyssiana SAI +SET @ENTRY := 4319; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Thyssiana - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Thyssiana - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Thyssiana - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Thyssiana"); + +-- Baldruc SAI +SET @ENTRY := 4321; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Baldruc - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Baldruc - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Baldruc - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Baldruc"); + +-- Teloren SAI +SET @ENTRY := 4407; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Teloren - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Teloren - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Teloren - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Teloren"); + +-- Michael Garrett SAI +SET @ENTRY := 4551; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Michael Garrett - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Michael Garrett - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Michael Garrett - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Michael Garrett"); + +-- Breyk SAI +SET @ENTRY := 6026; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Breyk - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Breyk - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Breyk - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Breyk"); + +-- Baritanas Skyriver SAI +SET @ENTRY := 6706; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Baritanas Skyriver - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Baritanas Skyriver - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Baritanas Skyriver - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Baritanas Skyriver"); + +-- Thalon SAI +SET @ENTRY := 6726; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Thalon - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Thalon - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Thalon - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Thalon"); + +-- Bera Stonehammer SAI +SET @ENTRY := 7823; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Bera Stonehammer - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Bera Stonehammer - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bera Stonehammer - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Bera Stonehammer"); + +-- Bulkrek Ragefist SAI +SET @ENTRY := 7824; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Bulkrek Ragefist - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Bulkrek Ragefist - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bulkrek Ragefist - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Bulkrek Ragefist"); + +-- Guthrum Thunderfist SAI +SET @ENTRY := 8018; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Guthrum Thunderfist - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Guthrum Thunderfist - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Guthrum Thunderfist - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Guthrum Thunderfist"); + +-- Fyldren Moonfeather SAI +SET @ENTRY := 8019; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Fyldren Moonfeather - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Fyldren Moonfeather - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Fyldren Moonfeather - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Fyldren Moonfeather"); + +-- Shyn SAI +SET @ENTRY := 8020; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Shyn - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Shyn - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shyn - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Shyn"); + +-- Alexandra Constantine SAI +SET @ENTRY := 8609; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Alexandra Constantine - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Alexandra Constantine - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Alexandra Constantine - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Alexandra Constantine"); + +-- Kroum SAI +SET @ENTRY := 8610; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kroum - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kroum - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kroum - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Kroum"); + +-- Omusa Thunderhorn SAI +SET @ENTRY := 10378; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Omusa Thunderhorn - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Omusa Thunderhorn - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Omusa Thunderhorn - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Omusa Thunderhorn"); + +-- Gryfe SAI +SET @ENTRY := 10583; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gryfe - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gryfe - On Aggro - Summon Enraged Wyvern"); + +-- Sindrayl SAI +SET @ENTRY := 10897; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Sindrayl - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Sindrayl - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sindrayl - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Sindrayl"); + +-- Maethrya SAI +SET @ENTRY := 11138; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Maethrya - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Maethrya - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Maethrya - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Maethrya"); + +-- Yugrek SAI +SET @ENTRY := 11139; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Yugrek - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Yugrek - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Yugrek - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Yugrek"); + +-- Shardi SAI +SET @ENTRY := 11899; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Shardi - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Shardi - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shardi - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Shardi"); + +-- Brakkar SAI +SET @ENTRY := 11900; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Brakkar - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Brakkar - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Brakkar - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Shardi"); + +-- Andruk SAI +SET @ENTRY := 11901; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Andruk - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Andruk - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Andruk - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Andruk"); + +-- Jarrodenus SAI +SET @ENTRY := 12577; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Jarrodenus - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Jarrodenus - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jarrodenus - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Jarrodenus"); + +-- Mishellena SAI +SET @ENTRY := 12578; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Mishellena - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Mishellena - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mishellena - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Mishellena"); + +-- Bibilfaz Featherwhistle SAI +SET @ENTRY := 12596; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Bibilfaz Featherwhistle - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Bibilfaz Featherwhistle - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bibilfaz Featherwhistle - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Bibilfaz Featherwhistle"); + +-- Vhulgra SAI +SET @ENTRY := 12616; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Vhulgra - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Vhulgra - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Vhulgra - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Vhulgra"); + +-- Khaelyn Steelwing SAI +SET @ENTRY := 12617; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Khaelyn Steelwing - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Khaelyn Steelwing - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Khaelyn Steelwing - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Khaelyn Steelwing"); + +-- Georgia SAI +SET @ENTRY := 12636; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Georgia - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Georgia - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Georgia - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Georgia"); + +-- Faustron SAI +SET @ENTRY := 12740; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Faustron - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Faustron - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Faustron - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Faustron"); + +-- Vahgruk SAI +SET @ENTRY := 13177; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Vahgruk - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Vahgruk - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Vahgruk - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Vahgruk"); + +-- Cloud Skydancer SAI +SET @ENTRY := 15177; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Cloud Skydancer - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Cloud Skydancer - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Cloud Skydancer - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Cloud Skydancer"); + +-- Runk Windtamer SAI +SET @ENTRY := 15178; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Runk Windtamer - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Runk Windtamer - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Runk Windtamer - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Runk Windtamer"); + +-- Skymaster Sunwing SAI +SET @ENTRY := 16189; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Skymaster Sunwing - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Skymaster Sunwing - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skymaster Sunwing - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Skymaster Sunwing"); + +-- Skymistress Gloaming SAI +SET @ENTRY := 16192; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Skymistress Gloaming - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Skymistress Gloaming - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skymistress Gloaming - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Skymistress Gloaming"); + +-- Bragok SAI +SET @ENTRY := 16227; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Bragok - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Bragok - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bragok - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Skymistress Gloaming"); + +-- Barley SAI +SET @ENTRY := 16587; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Barley - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Barley - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Barley - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Barley"); + +-- Flightmaster Krill Bitterhue SAI +SET @ENTRY := 16822; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Flightmaster Krill Bitterhue - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Flightmaster Krill Bitterhue - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Flightmaster Krill Bitterhue - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Flightmaster Krill Bitterhue"); + +-- Laando SAI +SET @ENTRY := 17554; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Laando - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Laando - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Laando - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Laando"); + +-- Stephanos SAI +SET @ENTRY := 17555; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Stephanos - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Stephanos - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stephanos - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Stephanos"); + +-- Kuma SAI +SET @ENTRY := 18785; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kuma - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kuma - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kuma - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Kuma"); + +-- Munci SAI +SET @ENTRY := 17555; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Munci - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Munci - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Munci - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Munci"); + +-- Furgu SAI +SET @ENTRY := 18789; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Furgu - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Furgu - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Furgu - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Furgu"); + +-- Du'ga SAI +SET @ENTRY := 18791; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Du'ga - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Du'ga - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Du'ga - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Du'ga"); + +-- Kerna SAI +SET @ENTRY := 18807; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kerna - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kerna - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kerna - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Kerna"); + +-- Gursha SAI +SET @ENTRY := 18808; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gursha - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gursha - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gursha - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Gursha"); + +-- Furnan Skysoar SAI +SET @ENTRY := 18809; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Furnan Skysoar - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Furnan Skysoar - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Furnan Skysoar - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Furnan Skysoar"); + +-- Amerun Leafshade SAI +SET @ENTRY := 18937; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Amerun Leafshade - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Amerun Leafshade - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Amerun Leafshade - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Amerun Leafshade"); + +-- Krexcil SAI +SET @ENTRY := 18938; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Krexcil - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Krexcil - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Krexcil - On Aggro - Say Line 0"); + +-- Brubeck Stormfoot SAI +SET @ENTRY := 18939; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Brubeck Stormfoot - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Brubeck Stormfoot - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Brubeck Stormfoot - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Brubeck Stormfoot"); + +-- Nutral SAI +SET @ENTRY := 18940; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Nutral - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Nutral - On Aggro - Summon Enraged Wyvern"); + +-- Innalia SAI +SET @ENTRY := 18942; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Innalia - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Innalia - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Innalia - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Innalia"); + +-- Unoke Tenderhoof SAI +SET @ENTRY := 18953; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Unoke Tenderhoof - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Unoke Tenderhoof - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Unoke Tenderhoof - On Aggro - Say Line 0"); + +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Unoke Tenderhoof"); + +-- Drek'Gol SAI +SET @ENTRY := 19317; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Drek'Gol - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Drek'Gol - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Drek'Gol - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Drek'Gol"); + +-- Amilya Airheart SAI +SET @ENTRY := 19558; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Amilya Airheart - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Amilya Airheart - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Amilya Airheart - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Amilya Airheart"); + +-- Maddix SAI +SET @ENTRY := 19581; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Maddix - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Maddix - On Aggro - Summon Enraged Wyvern"); + +-- Grennik SAI +SET @ENTRY := 19583; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Grennik - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Grennik - On Aggro - Summon Enraged Wyvern"); + +-- Harpax SAI +SET @ENTRY := 20515; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Harpax - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Harpax - On Aggro - Summon Enraged Wyvern"); + +-- Alieshor SAI +SET @ENTRY := 21766; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Alieshor - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Alieshor - On Aggro - Summon Enraged Wyvern"); + +-- Fhyn Leafshadow SAI +SET @ENTRY := 22216; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Fhyn Leafshadow - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Fhyn Leafshadow - On Aggro - Summon Enraged Wyvern"); + +-- Sky-Master Maxxor SAI +SET @ENTRY := 22455; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Sky-Master Maxxor - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Sky-Master Maxxor - On Aggro - Summon Enraged Wyvern"); + +-- Gorrim SAI +SET @ENTRY := 22931; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gorrim - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gorrim - On Aggro - Summon Enraged Wyvern"); + +-- Dyslix Silvergrub SAI +SET @ENTRY := 23612; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Dyslix Silvergrub - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Dyslix Silvergrub - On Aggro - Summon Enraged Wyvern"); + +-- Kiz Coilspanner SAI +SET @ENTRY := 24851; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kiz Coilspanner - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kiz Coilspanner - On Aggro - Summon Enraged Wyvern"); + +-- Ohura SAI +SET @ENTRY := 26560; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Ohura - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Ohura - On Aggro - Summon Enraged Felbat"); + +-- Grimwing SAI +SET @ENTRY := 29480; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Grimwing - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Grimwing - On Aggro - Summon Enraged Wyvern"); + +-- Nutral SAI +SET @ENTRY := 18940; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Nutral - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Nutral - On Aggro - Summon Enraged Wyvern"); + +-- Runetog Wildhammer SAI +SET @ENTRY := 20234; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Runetog Wildhammer - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Runetog Wildhammer - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Runetog Wildhammer - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Runetog Wildhammer"); + +-- Gur'zil SAI +SET @ENTRY := 20762; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gur'zil - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gur'zil - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gur'zil - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Gur'zil"); + +-- Rip Pedalslam SAI +SET @ENTRY := 21107; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Rip Pedalslam - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Rip Pedalslam - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rip Pedalslam - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Rip Pedalslam"); + +-- Halu SAI +SET @ENTRY := 22485; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Halu - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Halu - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Halu - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Halu"); + +-- Suralais Farwind SAI +SET @ENTRY := 22935; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Suralais Farwind - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Suralais Farwind - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Suralais Farwind - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Suralais Farwind"); + +-- Nizzle SAI +SET @ENTRY := 24366; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Nizzle - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Nizzle - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Nizzle - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Nizzle"); + +-- Tomas Riverwell SAI +SET @ENTRY := 26879; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Tomas Riverwell - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Tomas Riverwell - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tomas Riverwell - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Tomas Riverwell"); + +-- Pricilla Winterwind SAI +SET @ENTRY := 23736; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Pricilla Winterwind - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Pricilla Winterwind - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Pricilla Winterwind - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Pricilla Winterwind"); + +-- Celea Frozenmane SAI +SET @ENTRY := 24032; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Celea Frozenmane - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Celea Frozenmane - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Celea Frozenmane - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,2,100,0,0,0,"Celea Frozenmane"); + +-- James Ormsby SAI +SET @ENTRY := 24061; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"James Ormsby - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"James Ormsby - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"James Ormsby - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"James Ormsby"); + +-- Tobias Sarkhoff SAI +SET @ENTRY := 24155; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Tobias Sarkhoff - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Tobias Sarkhoff - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tobias Sarkhoff - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Tobias Sarkhoff"); + +-- Turida Coldwind SAI +SET @ENTRY := 25288; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Turida Coldwind - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Turida Coldwind - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Turida Coldwind - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Turida Coldwind"); + +-- Narzun Skybreaker SAI +SET @ENTRY := 26566; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Narzun Skybreaker - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Narzun Skybreaker - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Narzun Skybreaker - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Narzun Skybreaker"); + +-- Kara Thricestar SAI +SET @ENTRY := 26602; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kara Thricestar - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kara Thricestar - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kara Thricestar - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Kara Thricestar"); + +-- Lilleth Radescu SAI +SET @ENTRY := 26844; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Lilleth Radescu - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Lilleth Radescu - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lilleth Radescu - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Lilleth Radescu"); + +-- Junter Weiss SAI +SET @ENTRY := 26845; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Junter Weiss - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Junter Weiss - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Junter Weiss - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Junter Weiss"); + +-- Kareg SAI +SET @ENTRY := 26846; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kareg - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kareg - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kareg - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Kareg"); + +-- Omu Spiritbreeze SAI +SET @ENTRY := 26847; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Omu Spiritbreeze - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Omu Spiritbreeze - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Omu Spiritbreeze - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Omu Spiritbreeze"); + +-- Kimbiza SAI +SET @ENTRY := 26848; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kimbiza - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kimbiza - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kimbiza - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Kimbiza"); + +-- Numo Spiritbreeze SAI +SET @ENTRY := 26850; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Numo Spiritbreeze - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Numo Spiritbreeze - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Numo Spiritbreeze - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Numo Spiritbreeze"); + +-- Kragh SAI +SET @ENTRY := 26852; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kragh - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kragh - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kragh - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Kragh"); + +-- Makki Wintergale SAI +SET @ENTRY := 26853; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Makki Wintergale - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Makki Wintergale - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Makki Wintergale - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Makki Wintergale"); + +-- Samuel Clearbook SAI +SET @ENTRY := 26876; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Samuel Clearbook - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Samuel Clearbook - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Samuel Clearbook - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Samuel Clearbook"); + +-- Derek Rammel SAI +SET @ENTRY := 26877; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Derek Rammel - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Derek Rammel - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Derek Rammel - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Derek Rammel"); + +-- Rodney Wells SAI +SET @ENTRY := 26878; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Rodney Wells - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Rodney Wells - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rodney Wells - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Rodney Wells"); + +-- Vana Grey SAI +SET @ENTRY := 26880; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Vana Grey - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Vana Grey - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Vana Grey - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Vana Grey"); + +-- Palena Silvercloud SAI +SET @ENTRY := 26881; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Palena Silvercloud - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Palena Silvercloud - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Palena Silvercloud - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Palena Silvercloud"); + +-- Warmage Adami SAI +SET @ENTRY := 27046; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Warmage Adami - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Warmage Adami - On Aggro - Summon Enraged Wyvern"); + +-- Bat Handler Adeline SAI +SET @ENTRY := 27344; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Bat Handler Adeline - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Bat Handler Adeline - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bat Handler Adeline - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Bat Handler Adeline"); + +-- The Spirit of Gnomeregan SAI +SET @ENTRY := 28037; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"The Spirit of Gnomeregan - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"The Spirit of Gnomeregan - On Aggro - Summon Enraged Wyvern"); + +-- Bilko Driftspark SAI +SET @ENTRY := 28195; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Bilko Driftspark - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Bilko Driftspark - On Aggro - Summon Enraged Wyvern"); + +-- Cid Flounderfix SAI +SET @ENTRY := 28196; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Cid Flounderfix - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Cid Flounderfix - On Aggro - Summon Enraged Wyvern"); + +-- Kip Trawlskip SAI +SET @ENTRY := 28197; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kip Trawlskip - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kip Trawlskip - On Aggro - Summon Enraged Wyvern"); + +-- Marvin Wobblesprocket SAI +SET @ENTRY := 28574; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Marvin Wobblesprocket - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Marvin Wobblesprocket - On Aggro - Summon Enraged Wyvern"); + +-- Baneflight SAI +SET @ENTRY := 28615; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Baneflight - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Baneflight - On Aggro - Summon Enraged Wyvern"); + +-- Danica Saint SAI +SET @ENTRY := 28618; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Danica Saint - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Danica Saint - On Aggro - Summon Enraged Wyvern"); + +-- Gurric SAI +SET @ENTRY := 28623; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gurric - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Gurric - On Aggro - Summon Enraged Wyvern"); + +-- Maaka SAI +SET @ENTRY := 28624; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Maaka - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Maaka - On Aggro - Summon Enraged Wyvern"); + +-- Aludane Whitecloud SAI +SET @ENTRY := 28674; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Aludane Whitecloud - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Aludane Whitecloud - On Aggro - Summon Enraged Wyvern"); + +-- Skizzle Slickslide SAI +SET @ENTRY := 29721; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Skizzle Slickslide - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Skizzle Slickslide - On Aggro - Summon Enraged Wyvern"); + +-- Faldorf Bitterchill SAI +SET @ENTRY := 29750; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Faldorf Bitterchill - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Faldorf Bitterchill - On Aggro - Summon Enraged Wyvern"); + +-- Kabarg Windtamer SAI +SET @ENTRY := 29757; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kabarg Windtamer - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Kabarg Windtamer - On Aggro - Summon Enraged Wyvern"); + +-- Breck Rockbrow SAI +SET @ENTRY := 29950; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Breck Rockbrow - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Breck Rockbrow - On Aggro - Summon Enraged Wyvern"); + +-- Shavalius the Fancy SAI +SET @ENTRY := 29951; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Shavalius the Fancy - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Shavalius the Fancy - On Aggro - Summon Enraged Wyvern"); + +-- Morlia Doomwing SAI +SET @ENTRY := 30314; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Morlia Doomwing - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Morlia Doomwing - On Aggro - Summon Enraged Wyvern"); + +-- Aedan Moran SAI +SET @ENTRY := 30433; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Aedan Moran - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Aedan Moran - On Aggro - Summon Enraged Wyvern"); + +-- Rafae SAI +SET @ENTRY := 30569; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Rafae - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Rafae - On Aggro - Summon Enraged Wyvern"); + +-- Arzo Safeflight SAI +SET @ENTRY := 30869; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Arzo Safeflight - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Arzo Safeflight - On Aggro - Summon Enraged Wyvern"); + +-- Herzo Safeflight SAI +SET @ENTRY := 30870; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Herzo Safeflight - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Herzo Safeflight - On Aggro - Summon Enraged Wyvern"); + +-- Penumbrius SAI +SET @ENTRY := 31069; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Penumbrius - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Penumbrius - On Aggro - Summon Enraged Wyvern"); + +-- Dreadwind SAI +SET @ENTRY := 31078; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Dreadwind - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Dreadwind - On Aggro - Summon Enraged Wyvern"); + +-- Halvdan SAI +SET @ENTRY := 32571; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Halvdan - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Halvdan - On Aggro - Summon Enraged Wyvern"); + +-- Helidan Lightwing SAI +SET @ENTRY := 33849; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Helidan Lightwing - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Helidan Lightwing - On Aggro - Summon Enraged Wyvern"); + +-- Frax Bucketdrop SAI +SET @ENTRY := 37888; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Frax Bucketdrop - On Aggro - Summon Enraged Gryphon"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Frax Bucketdrop - On Aggro - Summon Enraged Wyvern"); + +-- Galendror Whitewing SAI +SET @ENTRY := 30271; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Galendror Whitewing - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Galendror Whitewing - On Aggro - Summon Enraged Hippogryph"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Galendror Whitewing - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Galendror Whitewing"); + +-- Doras SAI +SET @ENTRY := 31426; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Doras - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Doras - On Aggro - Summon Enraged Wyvern"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Doras - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Doras"); + +-- Timothy Cunningham SAI +SET @ENTRY := 37915; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Timothy Cunningham - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0,"Timothy Cunningham - On Aggro - Summon Enraged Felbat"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Timothy Cunningham - On Aggro - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Timothy Cunningham");
\ No newline at end of file diff --git a/sql/updates/world/2012_01_13_00_world_creature.sql b/sql/updates/world/2012_01_13_00_world_creature.sql new file mode 100644 index 00000000000..bb20ec25863 --- /dev/null +++ b/sql/updates/world/2012_01_13_00_world_creature.sql @@ -0,0 +1,24 @@ +-- Add missing Terokkar Triggers to db +SET @GUID :=40253; +DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+12; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES +(@GUID+0,23102,530,1,1,0,0,-2414.89038,4436.77,163.188354,0.209439516,120,0,0,1,0,0), +(@GUID+1,23102,530,1,1,0,0,-2414.979,4458.585,165.8086,2.80998015,120,0,0,1,0,0), +(@GUID+2,23102,530,1,1,0,0,-2418.69775,4446.772,165.705322,2.18166161,120,0,0,1,0,0), +(@GUID+3,23102,530,1,1,0,0,-2423.714,4453.51563,165.694977,0.575958669,120,0,0,1,0,0), +(@GUID+4,23102,530,1,1,0,0,-2426.56567,4437.25732,168.060211,3.63028479,120,0,0,1,0,0), +(@GUID+5,23102,530,1,1,0,0,-2428.65723,4460.04932,166.3208,0.7679449,120,0,0,1,0,0), +(@GUID+6,23102,530,1,1,0,0,-2432.37817,4444.567,170.260162,4.59021568,120,0,0,1,0,0), +(@GUID+7,23102,530,1,1,0,0,-2432.45435,4434.5835,170.945572,0.820304751,120,0,0,1,0,0), +(@GUID+8,23102,530,1,1,0,0,-2432.74561,4458.09668,166.1593,1.27409029,120,0,0,1,0,0), +(@GUID+9,23102,530,1,1,0,0,-2435.68359,4440.8667,171.700333,4.049164,120,0,0,1,0,0), +(@GUID+10,23102,530,1,1,0,0,-2443.70239,4634.14355,158.2777,0,120,0,0,1,0,0), +(@GUID+11,23102,530,1,1,0,0,-2466.943,4699.982,155.832977,0,120,0,0,1,0,0), +(@GUID+12,23102,530,1,1,0,0,-2482.24243,4661.68066,161.495926,0,120,0,0,1,0,0); +-- Set Terokkar Trigger as Trigger +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry`=23102; +-- Missing Go +SET @GUID :=226; +DELETE FROM `gameobject` WHERE `guid`=@GUID; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(@GUID,185863,530,1,1,-2466.60474,4700.11963,155.7146,1.81514192,0,0,0,0,120,0,1); diff --git a/sql/updates/world/2012_01_13_01_world_gossip_menu.sql b/sql/updates/world/2012_01_13_01_world_gossip_menu.sql new file mode 100644 index 00000000000..968e169ecab --- /dev/null +++ b/sql/updates/world/2012_01_13_01_world_gossip_menu.sql @@ -0,0 +1,18 @@ +-- Gossip for npc 6497 Astor Hadren from sniff +UPDATE `creature_template` SET `gossip_menu_id`=126,`AIName`='SmartAI',`ScriptName`='' WHERE `entry`=6497; +DELETE FROM `gossip_menu` WHERE `entry`=126 AND `text_id`=623; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (126,623); +DELETE FROM `gossip_menu` WHERE `entry`=125 AND `text_id`=624; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (125,624); +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (126,125); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`) VALUES +(126,0,0, "You''re Astor Hadren, right?",1,1,125), +(125,0,0, "You''ve got something I need, Astor. And I''ll be taking it now.",1,1,0); +-- SAI for npc 6497 Astor Hadren +DELETE FROM `smart_scripts` WHERE `entryorguid`=6497; +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 +(6497,0,0,0,62,0,100,0,125,0,0,0,2,21,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Astor Hadren - Make Hostile on Gossip Select'); +-- Gossip option condition +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=126; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`Comment`) VALUES +(15,126,0,0,9,14420, 'Show Gossip Option If quest The Deathstalkers(new) is Incomplete'); diff --git a/sql/updates/world/2012_01_13_02_world_sai.sql b/sql/updates/world/2012_01_13_02_world_sai.sql new file mode 100644 index 00000000000..1a11714c5c7 --- /dev/null +++ b/sql/updates/world/2012_01_13_02_world_sai.sql @@ -0,0 +1,53 @@ +-- Quest 12180 "The Captive Prospectors" 37013 +-- Creature updates +UPDATE `creature` SET `spawntimesecs`=120 WHERE `id` IN (27113,27114,27115); +UPDATE `creature_template` SET `InhabitType`=1 WHERE `entry` IN (27113,27114,27115); +-- SAI for Prospector Gann +SET @ENTRY := 27113; -- NPC entry +SET @SPELL := 47978; -- Open Dun Argol Cage +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Gann - On Spellhit - Run script'), +(@ENTRY*100,9,0,0,0,0,100,0,1000,1000,1000,1000,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Gann - Script - set run'), +(@ENTRY*100,9,1,0,0,0,100,0,1000,1000,1000,1000,69,0,0,0,0,0,0,1,0,0,0,3579.263,-5125.724,167.1185,0,'Prospector Gann - Script - Moveto'), +(@ENTRY*100,9,2,0,0,0,100,0,2000,2000,2000,2000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Gann - Script - Say 0'), +(@ENTRY*100,9,3,0,0,0,100,0,5000,5000,5000,5000,69,0,0,0,0,0,0,1,0,0,0,3600.135,-5119.964,166.4886,0,'Prospector Gann - Script - Moveto'), +(@ENTRY*100,9,4,0,0,0,100,0,2000,2000,2000,2000,32,0,0,0,0,0,0,14,59407,188554,0,0,0,0,0,'Prospector Gann - Script - reset go'), +(@ENTRY*100,9,5,0,0,0,100,0,1000,1000,1000,1000,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Gann - Script - despawn'); +-- SAI for Prospector Torgan +SET @ENTRY := 27114; -- NPC entry +SET @SPELL := 47978; -- Open Dun Argol Cage +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Torgan - On Spellhit - Run script'), +(@ENTRY*100,9,0,0,0,0,100,0,1000,1000,1000,1000,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Torgan - Script - set run'), +(@ENTRY*100,9,1,0,0,0,100,0,1000,1000,1000,1000,69,0,0,0,0,0,0,1,0,0,0,3467.921,-5114.096,236.9127,0,'Prospector Torgan - Script - Moveto'), +(@ENTRY*100,9,2,0,0,0,100,0,2000,2000,2000,2000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Torgan - Script - Say 0'), +(@ENTRY*100,9,3,0,0,0,100,0,5000,5000,5000,5000,69,0,0,0,0,0,0,1,0,0,0,3489.064,-5102.472,236.8901,0,'Prospector Torgan - Script - Moveto'), +(@ENTRY*100,9,4,0,0,0,100,0,2000,2000,2000,2000,32,0,0,0,0,0,0,14,59409,188554,0,0,0,0,0,'Prospector Torgan - Script - reset go'), +(@ENTRY*100,9,5,0,0,0,100,0,1000,1000,1000,1000,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Torgan - Script - despawn'); +-- SAI for Prospector Varana +SET @ENTRY := 27115; -- NPC entry +SET @SPELL := 47978; -- Open Dun Argol Cage +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Varana - On Spellhit - Run script'), +(@ENTRY*100,9,0,0,0,0,100,0,1000,1000,1000,1000,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Varana - Script - set run'), +(@ENTRY*100,9,1,0,0,0,100,0,1000,1000,1000,1000,69,0,0,0,0,0,0,1,0,0,0,3379.451,-5100.344,326.5531,0,'Prospector Varana - Script - Moveto'), +(@ENTRY*100,9,2,0,0,0,100,0,2000,2000,2000,2000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Varana - Script - Say 0'), +(@ENTRY*100,9,3,0,0,0,100,0,5000,5000,5000,5000,69,0,0,0,0,0,0,1,0,0,0,3375.131,-5065.586,326.4890,0,'Prospector Varana - Script - Moveto'), +(@ENTRY*100,9,4,0,0,0,100,0,2000,2000,2000,2000,32,0,0,0,0,0,0,14,59408,188554,0,0,0,0,0,'Prospector Varana - Script - reset go'), +(@ENTRY*100,9,5,0,0,0,100,0,1000,1000,1000,1000,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Varana - Script - despawn'); +-- NPC talk text insert from sniff +DELETE FROM `creature_text` WHERE `entry` IN (27113,27114,27115) AND `groupid` IN (0); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(27113,0,0, 'Thank you for rescuing me, but the others are still held on the tiers above!',12,0,100,1,0,0, 'Prospector Gann'), +(27114,0,0, 'Thank goodness! I was worried they were going to press me into service in their war against the stone giants!',12,0,100,1,0,0, 'Prospector Torgan'), +(27115,0,0, 'These irons are crazy! They keep talking about serving their ''master Loken'' but from what I can tell, only a few receive orders from him.',12,0,100,1,0,0, 'Prospector Varana'); +-- Made in Canada. Export to EU forbidden. diff --git a/sql/updates/world/2012_01_13_03_world_gossip_menu.sql b/sql/updates/world/2012_01_13_03_world_gossip_menu.sql new file mode 100644 index 00000000000..98dda69bf1a --- /dev/null +++ b/sql/updates/world/2012_01_13_03_world_gossip_menu.sql @@ -0,0 +1,62 @@ +-- Quest 11082 Seeker of Truth +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=8701 AND `text_id`=10940; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8701,10940); +DELETE FROM `gossip_menu` WHERE `entry`=8695 AND `text_id`=10941; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8695,10941); +DELETE FROM `gossip_menu` WHERE `entry`=8700 AND `text_id`=10942; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8700,10942); +DELETE FROM `gossip_menu` WHERE `entry`=8699 AND `text_id`=10943; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8699,10943); +DELETE FROM `gossip_menu` WHERE `entry`=8698 AND `text_id`=10944; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8698,10944); +DELETE FROM `gossip_menu` WHERE `entry`=8697 AND `text_id`=10945; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8697,10945); +DELETE FROM `gossip_menu` WHERE `entry`=8696 AND `text_id`=10946; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8696,10946); +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=8701 WHERE `entry`=23309; +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (8701,8695,8700,8699,8698,8697) AND `id`=0; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(8701,0,0, 'I am here for you, overseer.',1,1,8695,0,0,0, ''), +(8695,0,0, 'How dare you question an overseer of the Dragonmaw!',1,1,8700,0,0,0, ''), +(8700,0,0, 'Who speaks of me? What are you talking about, broken?',1,1,8699,0,0,0, ''), +(8699,0,0, 'Continue please.',1,1,8698,0,0,0, ''), +(8698,0,0, 'Who are these bidders?',1,1,8697,0,0,0, ''), +(8697,0,0, 'Well... yes.',1,1,8696,0,0,0, ''); +-- Gossip conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=8701; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,8701,0,0,9,11082,0,0,0,'','Show gossip option if player has Quest 11082 Seeker of Truth'); +-- Insert npc_text from http://www.wowwiki.com/Quest:Seeker_of_Truth +DELETE FROM `npc_text` WHERE `ID` BETWEEN 10940 AND 10946; +INSERT INTO `npc_text` (`ID`,`prob0`,`text0_0`,`text0_1`,`lang0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`prob1`,`text1_0`,`text1_1`,`lang1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`prob2`,`text2_0`,`text2_1`,`lang2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`prob3`,`text3_0`,`text3_1`,`lang3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`prob4`,`text4_0`,`text4_1`,`lang4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`prob5`,`text5_0`,`text5_1`,`lang5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`prob6`,`text6_0`,`text6_1`,`lang6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`prob7`,`text7_0`,`text7_1`,`lang7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`,`WDBVerified`) VALUES +(10940,1,'<The Murkblood overseer grunts.>','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,1), +(10941,1,'They sent you to kill me, eh? So predictable... Creatures ruled by terror are all the same.$B$BBut you... You are not one of them...','',0,0,6,0,274,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,1), +(10942,1,'Overseer?$B$BYou are no more an overseer than I am the king of Stormwind. Yes... You are the one they speak of.','',0,0,6,0,396,0,273,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,1), +(10943,1,'The Netherwing. They speak to us. They offered us peace and protection. Something the broken have never truly felt. We accepted their offer and assisted Toranaku in rousing the creatures of this mine - at great personal cost to us. Many of my brothers gave their lives for this offensive. We were attempting to make the mine uninhabitable, forcing the Dragonmaw to relocate and ultimately move off of this island.','',0,0,396,0,396,0,396,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,1), +(10944,1,'The Dragonmaw are corrupt. They are strip-mining this island of all natural resources and using those resources to supply Illidan''s armies out of the Black Temple. They take much for themselves, however, and sell whatever they have hidden away to the highest bidder.','',0,0,396,0,396,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,1), +(10945,1,'We do not know. We believe that the Black dragonflight is involved as are some independent third parties. That is why you are here, <race>. You will unravel this mystery from the inside and bring redemption to Netherwing.$B$BAnd now... I can only assume she asked you to bring back my hand.','',0,0,274,0,396,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,1), +(10946,1,'I gladly make such a sacrifice if it means the downfall of the Dragonmaw.','',0,0,273,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,1); +-- SAI for Murkblood Overseer +SET @ENTRY := 23309; -- NPC entry +SET @SPELL := 41121; -- Giving a Hand +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,62,0,100,0,8697,0,0,0,11,@SPELL,0,0,0,0,0,7,0,0,0,0,0,0,0,'Murkblood Overseer - On gossip Option select - cast spell'); +-- Add item 32726 "Murkblood Escape Plans" to creature loot by Warpten +DELETE FROM `creature_loot_template` WHERE `item`=32726; +INSERT INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES +(23286,32726,15,1,0,1,1), +(23324,32726,15,1,0,1,1); +-- Loot Conditions by mweinelt +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=1 AND `SourceGroup` IN (23286,23324) AND `SourceEntry`=32726; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(1,23286,32726,0,5,1015,4,0,0, '', 'Murkblood Escape Plans - when Netherwing friendly'), +(1,23324,32726,0,5,1015,4,0,0, '', 'Murkblood Escape Plans - when Netherwing friendly'), +(1,23286,32726,1,2,32726,1,0,0, '', 'Murkblood Escape Plans - can only have one at a time'), +(1,23324,32726,1,2,32726,1,0,0, '', 'Murkblood Escape Plans - can only have one at a time'), +(1,23286,32726,2,9,11081,1,0,0, '', 'Murkblood Escape Plans - not when q11081 already taken'), +(1,23324,32726,2,9,11081,1,0,0, '', 'Murkblood Escape Plans - not when q11081 already taken'); diff --git a/sql/updates/world/2012_01_13_04_world_creature_texts.sql b/sql/updates/world/2012_01_13_04_world_creature_texts.sql new file mode 100644 index 00000000000..ffab5673873 --- /dev/null +++ b/sql/updates/world/2012_01_13_04_world_creature_texts.sql @@ -0,0 +1,19 @@ +-- Remove old script text for npc_millhouse_manastorm +DELETE FROM `script_texts` WHERE `entry` IN (-1552010, -1552022); + +-- Add new creature_text for Millhouse ManaStorm +DELETE FROM `creature_text` WHERE `entry`=20977; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(20977, 0, 0, 'Where in Bonzo''s brass buttons am I? And who are-- yaaghh, that''s one mother of a headache!', 12, 0, 100, 0, 0, 0, 'Millhouse Manastorm'), +(20977, 1, 0, '"Lowly"? I don''t care who you are friend, no one refers to the mighty Millhouse Manastorm as "Lowly"! I have no idea what goes on here, but I will gladly join your fight against this impudent imbecile! Prepare to defend yourself, cretin!', 12, 0, 100, 0, 0, 0, 'Millhouse Manastorm'), +(20977, 2, 0, 'I just need to get some things ready first. You guys go ahead and get started. I need to summon up some water...', 12, 0, 100, 0, 0, 0, 'Millhouse Manastorm'), +(20977, 3, 0, 'Fantastic! Next, some protective spells. Yes! Now we''re cookin''', 12, 0, 100, 0, 0, 0, 'Millhouse Manastorm'), +(20977, 4, 0, 'And of course I''ll need some mana. You guys are gonna love this, just wait.', 12, 0, 100, 0, 0, 0, 'Millhouse Manastorm'), +(20977, 5, 0, 'Aaalllriiiight!! Who ordered up an extra large can of whoop-ass?', 12, 0, 100, 0, 0, 0, 'Millhouse Manastorm'), +(20977, 6, 0, 'I didn''t even break a sweat on that one.', 12, 0, 100, 0, 0, 0, 'Millhouse Manastorm'), +(20977, 6, 1, 'You guys, feel free to jump in anytime.', 12, 0, 100, 0, 0, 0, 'Millhouse Manastorm'), +(20977, 7, 0, 'I''m gonna light you up, sweet cheeks!', 12, 0, 100, 0, 0, 0, 'Millhouse Manastorm'), +(20977, 8, 0, 'Ice, ice, baby!', 12, 0, 100, 0, 0, 0, 'Millhouse Manastorm'), +(20977, 9, 0, 'Heal me! Oh, for the love of all that is holy, HEAL me! I''m dying!', 12, 0, 100, 0, 0, 0, 'Millhouse Manastorm'), +(20977, 10, 0, 'You''ll be hearing from my lawyer...', 12, 0, 100, 0, 0, 0, 'Millhouse Manastorm'), +(20977, 11, 0, 'Who''s bad? Who''s bad? That''s right: we bad!', 12, 0, 100, 0, 0, 0, 'Millhouse Manastorm'); diff --git a/sql/updates/world/2012_01_13_05_world_creature_texts.sql b/sql/updates/world/2012_01_13_05_world_creature_texts.sql new file mode 100644 index 00000000000..87aee698a11 --- /dev/null +++ b/sql/updates/world/2012_01_13_05_world_creature_texts.sql @@ -0,0 +1,15 @@ +-- Remove old script text for npc_warden_mellichar +DELETE FROM `script_texts` WHERE `entry` IN (-1552023, -1552030); + +-- Add new creature_text for Warden Mellichar +DELETE FROM `creature_text` WHERE `entry`=20904; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(20904, 0, 0, 'I knew the prince would be angry but, I... I have not been myself. I had to let them out! The great one speaks to me, you see. Wait--outsiders. Kael''thas did not send you! Good... I''ll just tell the prince you released the prisoners!', 14, 0, 100, 0, 0, 0, 'Warden Mellichar'), +(20904, 1, 0, 'The naaru kept some of the most dangerous beings in existence here in these cells. Let me introduce you to another...', 14, 0, 100, 0, 0, 0, 'Warden Mellichar'), +(20904, 2, 0, 'Yes, yes... another! Your will is mine!', 14, 0, 100, 0, 0, 0, 'Warden Mellichar'), +(20904, 3, 0, 'Behold another terrifying creature of incomprehensible power!', 14, 0, 100, 0, 0, 0, 'Warden Mellichar'), +(20904, 4, 0, 'What is this? A lowly gnome? I will do better, O great one.', 14, 0, 100, 0, 0, 0, 'Warden Mellichar'), +(20904, 5, 0, 'Anarchy! Bedlam! Oh, you are so wise! Yes, I see it now, of course!', 14, 0, 100, 0, 0, 0, 'Warden Mellichar'), +(20904, 6, 0, 'One final cell remains. Yes, O great one, right away!', 14, 0, 100, 0, 0, 0, 'Warden Mellichar'), +(20904, 7, 0, 'Welcome, O great one. I am your humble servant.', 14, 0, 100, 0, 0, 0, 'Warden Mellichar'); + diff --git a/sql/updates/world/2012_01_13_06_world_creature_text.sql b/sql/updates/world/2012_01_13_06_world_creature_text.sql new file mode 100644 index 00000000000..99429cfad5f --- /dev/null +++ b/sql/updates/world/2012_01_13_06_world_creature_text.sql @@ -0,0 +1,11 @@ +-- Remove old script text for npc_torek +DELETE FROM `script_texts` WHERE `entry` IN (-1000106, -1000110); + +-- Add creature texts for Torek +DELETE FROM `creature_text` WHERE `entry`=12858; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(12858, 0, 0, 'Everyone ready?', 12, 0, 100, 0, 0, 0, 'Torek'), +(12858, 1, 0, 'Ok, Lets move out!', 12, 0, 100, 0, 0, 0, 'Torek'), +(12858, 2, 0, 'Prepare yourselves. Silverwing is just around the bend.', 12, 0, 100, 0, 0, 0, 'Torek'), +(12858, 3, 0, 'Silverwing is ours!', 12, 0, 100, 0, 0, 0, 'Torek'), +(12858, 4, 0, 'Go report that the outpost is taken. We will remain here.', 12, 0, 100, 0, 0, 0, 'Torek'); diff --git a/sql/updates/world/2012_01_14_00_world_gossip_menu.sql b/sql/updates/world/2012_01_14_00_world_gossip_menu.sql new file mode 100644 index 00000000000..f328d101c57 --- /dev/null +++ b/sql/updates/world/2012_01_14_00_world_gossip_menu.sql @@ -0,0 +1,56 @@ +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9500,9502,9503,9504,9505,9576) AND `id`=0; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(9576,0,0, 'I''d like to use the stables.',14,4194304,0,0,0,0, ''), +(9500,0,0, 'You''re free to go Orsonn, but first tell me what''s wrong with the furbolg.',1,1,9502,0,0,0, ''), +(9502,0,0, 'What happened then?',1,1,9503,0,0,0, ''), +(9503,0,0, 'Thank you, Son of Ursoc. I''ll see what can be done.',1,1,0,0,0,0, ''), +(9504,0,0, 'Who was this stranger?',1,1,9505,0,0,0, ''), +(9505,0,0, 'Thank you, Kodian. I''ll do what I can.',1,1,0,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9576 AND `text_id`=12912; +DELETE FROM `gossip_menu` WHERE `entry`=9502 AND `text_id`=12794; +DELETE FROM `gossip_menu` WHERE `entry`=9503 AND `text_id`=12796; +DELETE FROM `gossip_menu` WHERE `entry`=9770 AND `text_id`=13445; +DELETE FROM `gossip_menu` WHERE `entry`=9505 AND `text_id`=12798; +DELETE FROM `gossip_menu` WHERE `entry`=9627 AND `text_id`=13024; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(9576,12912), +(9502,12794), +(9503,12796), +(9505,12798), +(9770,13445), +(9627,13024); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9576 WHERE `entry`=26944; -- Soulok Stormfury +UPDATE `creature_template` SET `gossip_menu_id`=9770 WHERE `entry`=26935; -- Sasha + +-- Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (9500,9502,9503,9504,9505,9576) AND `SourceEntry`=0; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=9627 AND `SourceEntry`=13024; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,9627,13024,0,6,67,0,0,0,'','Emily has different gossip when player is Horde'), +(15,9500,0,0,9,12231,0,0,0,'','Orsonn - Show gossip option only if player has taken quest 12231'), +(15,9500,0,1,9,12247,0,0,0,'','Orsonn - Show gossip option only if player has taken quest 12247'), +(15,9502,0,0,9,12231,0,0,0,'','Orsonn - Show gossip option only if player has taken quest 12231'), +(15,9502,0,1,9,12247,0,0,0,'','Orsonn - Show gossip option only if player has taken quest 12247'), +(15,9503,0,0,9,12231,0,0,0,'','Orsonn - Show gossip option only if player has taken quest 12231'), +(15,9503,0,1,9,12247,0,0,0,'','Orsonn - Show gossip option only if player has taken quest 12247'), +(15,9504,0,0,9,12231,0,0,0,'','Kodian - Show gossip option only if player has taken quest 12231'), +(15,9504,0,1,9,12247,0,0,0,'','Kodian - Show gossip option only if player has taken quest 12247'), +(15,9505,0,0,9,12231,0,0,0,'','Kodian - Show gossip option only if player has taken quest 12231'), +(15,9505,0,1,9,12247,0,0,0,'','Kodian - Show gossip option only if player has taken quest 12247'), +(15,9576,0,0,15,3,0,0,0,'','Soulok Stormfury - Show gossip option only if player is a hunter'); + +-- SmartAIs +SET @NPC_ORSONN := 27274; +SET @NPC_KODIAN := 27275; +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry` IN (@NPC_ORSONN,@NPC_KODIAN); -- script npc_orsonn_and_kodian, the defines and enums in grizzly_hills.cpp have to be deleted +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_ORSONN,@NPC_KODIAN) 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 +(@NPC_ORSONN,0,0,1,62,0,100,0,9503,0,0,0,33,27322,0,0,0,0,0,7,0,0,0,0,0,0,0,'Orsonn - On gossip select - Quest credit'), +(@NPC_ORSONN,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Orsonn - On gossip select - Close gossip'), +(@NPC_KODIAN,0,0,1,62,0,100,0,9505,0,0,0,33,27321,0,0,0,0,0,7,0,0,0,0,0,0,0,'Kodian - On gossip select - Quest credit'), +(@NPC_KODIAN,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Kodian - On gossip select - Close gossip'); diff --git a/sql/updates/world/2012_01_14_01_world_npc_trainer.sql b/sql/updates/world/2012_01_14_01_world_npc_trainer.sql new file mode 100644 index 00000000000..0f3e598b5a3 --- /dev/null +++ b/sql/updates/world/2012_01_14_01_world_npc_trainer.sql @@ -0,0 +1,14 @@ +-- fix summon charger for horde +UPDATE `npc_trainer` SET `spell` = 34767 WHERE `spell` = 34766; +DELETE FROM `spell_required` WHERE `spell_id` = 34767 AND `req_spell` = 33391; +INSERT INTO `spell_required` (`spell_id`, `req_spell`) VALUES (34767, 33391); + +-- fix summon charger for alliance +UPDATE `npc_trainer` SET `spell` = 23214 WHERE `spell` = 23215; +DELETE FROM `spell_required` WHERE `spell_id` = 23214 AND `req_spell` = 33391; +INSERT INTO `spell_required` (`spell_id`, `req_spell`) VALUES (23214, 33391); + +-- fix dreadsteed for warlocks +UPDATE `npc_trainer` SET `spell` = 23161, `reqskill` = 0, `reqskillvalue` = 0 WHERE `spell` = 23160; +DELETE FROM `spell_required` WHERE `spell_id` = 23161 AND `req_spell` = 33391; +INSERT INTO `spell_required` (`spell_id`, `req_spell`) VALUES (23161, 33391); diff --git a/sql/updates/world/2012_01_14_02_world_spell_proc_event.sql b/sql/updates/world/2012_01_14_02_world_spell_proc_event.sql new file mode 100644 index 00000000000..846afdda6cc --- /dev/null +++ b/sql/updates/world/2012_01_14_02_world_spell_proc_event.sql @@ -0,0 +1,3 @@ +UPDATE `spell_proc_event` SET `SpellFamilyMask0`=736, `CustomChance`=5, `procEx`=16384, `procFlags`=69632 WHERE `entry`=44546; +UPDATE `spell_proc_event` SET `SpellFamilyMask0`=736, `CustomChance`=10, `procEx`=16384, `procFlags`=69632 WHERE `entry`=44548; +UPDATE `spell_proc_event` SET `SpellFamilyMask0`=736, `CustomChance`=15, `procEx`=16384, `procFlags`=69632 WHERE `entry`=44549; diff --git a/sql/updates/world/2012_01_14_03_world_trinity_string.sql b/sql/updates/world/2012_01_14_03_world_trinity_string.sql new file mode 100644 index 00000000000..7dab007f774 --- /dev/null +++ b/sql/updates/world/2012_01_14_03_world_trinity_string.sql @@ -0,0 +1,6 @@ +DELETE FROM `trinity_string` WHERE `entry` IN(1139,1140,1141,1142); +INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES +(1139,' Follow player %s (lowguid %u)'), +(1140,' Follow creature %s (lowguid %u)'), +(1141,' Follow <NULL>'), +(1142,' Effect movement'); diff --git a/sql/updates/world/2012_01_15_00_world_loot_template.sql b/sql/updates/world/2012_01_15_00_world_loot_template.sql new file mode 100644 index 00000000000..af61833536d --- /dev/null +++ b/sql/updates/world/2012_01_15_00_world_loot_template.sql @@ -0,0 +1,5 @@ +UPDATE `creature_loot_template` SET `mincountOrRef`=-10001 WHERE `mincountOrRef`=-24725; +UPDATE `gameobject_loot_template` SET `mincountOrRef`=-10001 WHERE `mincountOrRef`=-24725; +UPDATE `item_loot_template` SET `mincountOrRef`=-10001 WHERE `mincountOrRef`=-24725; + +DELETE FROM `reference_loot_template` WHERE `entry`=24725; diff --git a/sql/updates/world/2012_01_15_02_world_creature_template.sql b/sql/updates/world/2012_01_15_02_world_creature_template.sql new file mode 100644 index 00000000000..4b6dcad8a33 --- /dev/null +++ b/sql/updates/world/2012_01_15_02_world_creature_template.sql @@ -0,0 +1,2 @@ +-- Among the Champions and The Grand Melee updates +UPDATE `creature_template` SET `ScriptName`='npc_valiant', `dmg_multiplier`=2 WHERE `entry`IN (33285,33306,33384,33383,33382,33739,33749,33745,33744,33748,33740,33743,33747,33738,33746,33561,33558,33559,33562); diff --git a/sql/updates/world/2012_01_15_03_world_item_loot_template.sql b/sql/updates/world/2012_01_15_03_world_item_loot_template.sql new file mode 100644 index 00000000000..bbe9994e897 --- /dev/null +++ b/sql/updates/world/2012_01_15_03_world_item_loot_template.sql @@ -0,0 +1,45 @@ +SET @Bag := 20469; +SET @RefA := 10022; +SET @RefB := 10023; +SET @RefC := 10024; +SET @RefD := 10025; + +-- Add missing recipes to "Decoded True Believer Clippings" (i20469) +DELETE FROM `item_loot_template` WHERE `entry` = 20469; +INSERT INTO `item_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +(@Bag,1,100,1,0,-@RefD,2), -- Decoded Twilight Texts +-- scrolls via reference +(@Bag,2,100,1,0,-10001,1), -- one from level V scrolls +(@Bag,3,4,1,0,-@RefA,1), -- one from Crest of Beckoning +(@Bag,4,4,1,0,-@RefB,1), -- one from Sigil of Beckoning +(@Bag,5,4,1,0,-@RefC,1), -- one from Scepter of Beckoning +-- special pattern drops: +(@Bag,20546,3,1,0,1,1), -- Runed Stygian Leggings +(@Bag,20547,3,1,0,1,1), -- Runed Stygian Boots +(@Bag,20548,3,1,0,1,1), -- Runed Stygian Belt +(@Bag,20553,3,1,0,1,1), -- Darkrune Gauntlets +(@Bag,20554,3,1,0,1,1), -- Darkrune Breastplate +(@Bag,20555,3,1,0,1,1); -- Darkrune Helm +-- References: +DELETE FROM `reference_loot_template` WHERE `entry` IN (@RefA,@RefB,@RefC,@RefD); +INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +(@RefA,20518,0,1,1,1,1), -- Scroll: Crest of Beckoning +(@RefA,20526,0,1,1,1,1), -- Scroll: Crest of Beckoning +(@RefA,20527,0,1,1,1,1), -- Scroll: Crest of Beckoning +(@RefA,20528,0,1,1,1,1), -- Scroll: Crest of Beckoning +(@RefB,20531,0,1,1,1,1), -- Scroll: Sigil of Beckoning +(@RefB,20532,0,1,1,1,1), -- Scroll: Sigil of Beckoning +(@RefB,20533,0,1,1,1,1), -- Scroll: Sigil of Beckoning +(@RefB,20535,0,1,1,1,1), -- Scroll: Sigil of Beckoning +(@RefC,20540,0,1,1,1,1), -- Scroll: Scepter of Beckoning +(@RefC,20542,0,1,1,1,1), -- Scroll: Scepter of Beckoning +(@RefC,20543,0,1,1,1,1), -- Scroll: Scepter of Beckoning +(@RefC,20544,0,1,1,1,1), -- Scroll: Scepter of Beckoning +-- Decoded Twilight Texts: +(@RefD,20676,0,1,1,1,3), +(@RefD,20541,0,1,1,1,3), +(@RefD,20545,0,1,1,1,3), +(@RefD,20679,0,1,1,1,3), +(@RefD,20677,0,1,1,1,3), +(@RefD,20678,0,1,1,1,3), +(@RefD,20552,0,1,1,1,3);
\ No newline at end of file diff --git a/sql/updates/world/2012_01_16_00_world_stored_procedure.sql b/sql/updates/world/2012_01_16_00_world_stored_procedure.sql new file mode 100644 index 00000000000..4a5b66df7b2 --- /dev/null +++ b/sql/updates/world/2012_01_16_00_world_stored_procedure.sql @@ -0,0 +1,161 @@ +-- sp_dev_reguid procedure +/*!50003 DROP PROCEDURE IF EXISTS `sp_dev_reguid` */; +DELIMITER ;; +/*!50003 CREATE*/ +/*!50003 PROCEDURE `sp_dev_reguid`() +BEGIN + + DROP TABLE IF EXISTS `creature_temp`; + CREATE TABLE IF NOT EXISTS `creature_temp` ( + `guid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Global Unique Identifier', + `id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Creature Identifier', + `map` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier', + `spawnMask` tinyint(3) unsigned NOT NULL DEFAULT '1', + `phaseMask` smallint(5) unsigned NOT NULL DEFAULT '1', + `modelid` mediumint(8) unsigned NOT NULL DEFAULT '0', + `equipment_id` mediumint(9) NOT NULL DEFAULT '0', + `position_x` float NOT NULL DEFAULT '0', + `position_y` float NOT NULL DEFAULT '0', + `position_z` float NOT NULL DEFAULT '0', + `orientation` float NOT NULL DEFAULT '0', + `spawntimesecs` int(10) unsigned NOT NULL DEFAULT '120', + `spawndist` float NOT NULL DEFAULT '0', + `currentwaypoint` mediumint(8) unsigned NOT NULL DEFAULT '0', + `curhealth` int(10) unsigned NOT NULL DEFAULT '1', + `curmana` int(10) unsigned NOT NULL DEFAULT '0', + `MovementType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `npcflag` int(10) unsigned NOT NULL DEFAULT '0', + `unit_flags` int(10) unsigned NOT NULL DEFAULT '0', + `dynamicflags` int(10) unsigned NOT NULL DEFAULT '0', + `old_guid` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`guid`), + KEY `idx_map` (`map`), + KEY `idx_id` (`id`), + KEY `idx_oldguid_tmp` (`old_guid`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Creature System' AUTO_INCREMENT=250001; + + ALTER TABLE `creature_addon` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL; + ALTER TABLE `creature_formations` ADD COLUMN `new_guid_leader` INT(10) UNSIGNED NOT NULL; + ALTER TABLE `creature_formations` ADD COLUMN `new_guid_member` INT(10) UNSIGNED NOT NULL; + ALTER TABLE `game_event_creature` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL; + ALTER TABLE `pool_creature` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL; + ALTER TABLE `game_event_model_equip` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL; + ALTER TABLE `game_event_npc_vendor` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL; + ALTER TABLE `game_event_npcflag` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL; + ALTER TABLE `smart_scripts` ADD COLUMN `new_guid` INT(10) NOT NULL; + + INSERT INTO `creature_temp` + ( + `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, + `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, + `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, + `unit_flags`, `dynamicflags`, `old_guid` + ) SELECT + `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, + `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, + `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, + `unit_flags`, `dynamicflags`, `guid` + FROM `creature` WHERE `guid` < 250001 ORDER BY `id` ASC; + + INSERT INTO `creature_temp` + ( + `guid`,`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, + `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, + `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, + `unit_flags`, `dynamicflags`, `old_guid` + ) SELECT + `guid`,`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, + `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, + `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, + `unit_flags`, `dynamicflags`, `guid` + FROM `creature` WHERE `guid` >= 250001 ORDER BY `id` ASC; + + UPDATE game_event_npc_vendor p + INNER JOIN creature_temp pp + ON p.guid = pp.old_guid + SET p.new_guid = pp.guid; + UPDATE game_event_npcflag p + INNER JOIN creature_temp pp + ON p.guid = pp.old_guid + SET p.new_guid = pp.guid; + UPDATE game_event_model_equip p + INNER JOIN creature_temp pp + ON p.guid = pp.old_guid + SET p.new_guid = pp.guid; + UPDATE creature_addon p + INNER JOIN creature_temp pp + ON p.guid = pp.old_guid + SET p.new_guid = pp.guid; + UPDATE creature_formations p + INNER JOIN creature_temp pp + ON p.leaderGUID = pp.old_guid + SET p.new_guid_leader = pp.guid; + UPDATE creature_formations p + INNER JOIN creature_temp pp + ON p.memberGUID = pp.old_guid + SET p.new_guid_member = pp.guid; + UPDATE game_event_creature p + INNER JOIN creature_temp pp + ON p.guid = pp.old_guid + SET p.new_guid = pp.guid; + UPDATE pool_creature p + INNER JOIN creature_temp pp + ON p.guid = pp.old_guid + SET p.new_guid = pp.guid; + UPDATE smart_scripts p + INNER JOIN creature_temp pp + ON p.entryorguid = pp.old_guid + SET p.new_guid = -pp.guid + WHERE + entryorguid < 0 AND + source_type = 0; + + DROP TABLE `creature`; + ALTER TABLE `creature_temp` DROP COLUMN `old_guid`; + RENAME TABLE `creature_temp` TO `creature`; + + ALTER TABLE game_event_npc_vendor DISABLE KEYS; + UPDATE `game_event_npc_vendor` SET `guid`=`new_guid`; + ALTER TABLE `game_event_npc_vendor` DROP COLUMN `new_guid`; + ALTER TABLE game_event_npc_vendor ENABLE KEYS; + + ALTER TABLE game_event_npcflag DISABLE KEYS; + UPDATE `game_event_npcflag` SET `guid`=`new_guid`; + ALTER TABLE `game_event_npcflag` DROP COLUMN `new_guid`; + ALTER TABLE game_event_npcflag ENABLE KEYS; + + ALTER TABLE game_event_model_equip DISABLE KEYS; + UPDATE `game_event_model_equip` SET `guid`=`new_guid`; + ALTER TABLE `game_event_model_equip` DROP COLUMN `new_guid`; + ALTER TABLE game_event_model_equip ENABLE KEYS; + + ALTER TABLE `creature_addon` DROP PRIMARY KEY; + UPDATE `creature_addon` SET `guid`=`new_guid`; + ALTER TABLE `creature_addon` DROP COLUMN `new_guid`; + ALTER TABLE `creature_addon` ADD PRIMARY KEY(`guid`); + + ALTER TABLE creature_formations DISABLE KEYS; + UPDATE `creature_formations` SET leaderGUID = new_guid_leader; + ALTER TABLE `creature_formations` DROP COLUMN `new_guid_leader`; + UPDATE `creature_formations` SET memberGUID = new_guid_member; + ALTER TABLE `creature_formations` DROP COLUMN `new_guid_member`; + ALTER TABLE creature_formations ENABLE KEYS; + + ALTER TABLE `game_event_creature` DROP PRIMARY KEY; + UPDATE `game_event_creature` SET guid = new_guid; + ALTER TABLE `game_event_creature` DROP COLUMN `new_guid`; + ALTER TABLE `game_event_creature` ADD PRIMARY KEY(`guid`, `eventEntry`); + + ALTER TABLE `pool_creature` DROP PRIMARY KEY; + UPDATE `pool_creature` SET guid = new_guid; + ALTER TABLE `pool_creature` DROP COLUMN `new_guid`; + ALTER TABLE `pool_creature` ADD PRIMARY KEY(`guid`); + + ALTER TABLE `smart_scripts` DROP PRIMARY KEY; + UPDATE `smart_scripts` SET `entryorguid` = `new_guid` + WHERE entryorguid < 0 AND new_guid < 0 AND source_type = 0; + ALTER TABLE `smart_scripts` DROP COLUMN `new_guid`; + ALTER TABLE `smart_scripts` ADD PRIMARY KEY (`entryorguid`,`source_type`,`id`,`link`); + + END */;; +
\ No newline at end of file diff --git a/sql/updates/world/2012_01_16_01_world_sai.sql b/sql/updates/world/2012_01_16_01_world_sai.sql new file mode 100644 index 00000000000..881f6cb919c --- /dev/null +++ b/sql/updates/world/2012_01_16_01_world_sai.sql @@ -0,0 +1,17 @@ +-- [Q] [A] Report to Goldshire +-- Also moved the emote to creature_text +-- Doesn't work because it's auto-accept.. +-- Marshal McBride SAI +SET @ENTRY := 197; +SET @QUEST := 54; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,19,0,100,0,@QUEST,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Marshal McBride - On Quest Accept - Say Line 0"); +-- Text +DELETE FROM `db_script_string` WHERE `entry`=2000000059; +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"You are dismissed, $N.",12,0,100,113,0,0,"Marshal McBride"); diff --git a/sql/updates/world/2012_01_16_02_world_sai.sql b/sql/updates/world/2012_01_16_02_world_sai.sql new file mode 100644 index 00000000000..435675fd143 --- /dev/null +++ b/sql/updates/world/2012_01_16_02_world_sai.sql @@ -0,0 +1,12 @@ +-- [Q] [A/H] The Completed Orb of Noh'Orahil +-- Menara Voidrender SAI +SET @ENTRY := 6266; +SET @QUEST := 4975; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Menara Voidrender - On Quest Accept - Run Script"), +(@ENTRY*100,9,0,0,0,0,100,0,10000,10000,0,0,15,@QUEST,0,0,0,0,0,7,0,0,0,0,0,0,0,"Menara Voidrender - On Script - Quest Credit"); -- After ten seconds diff --git a/sql/updates/world/2012_01_16_03_world_sai.sql b/sql/updates/world/2012_01_16_03_world_sai.sql new file mode 100644 index 00000000000..f5e0d90983f --- /dev/null +++ b/sql/updates/world/2012_01_16_03_world_sai.sql @@ -0,0 +1,16 @@ +-- [Q] [A/H] Proving Allegiance +-- Also moved the emote to creature_text +-- Gunther Arcanus SAI +SET @ENTRY := 1497; +SET @QUEST := 409; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,19,0,100,0,@QUEST,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gunther Arcanus - On Quest Accept - Say Line 0"); +-- Text +DELETE FROM `db_script_string` WHERE `entry`=2000000085; +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Take a Candle of Beckoning from this crate, $N.",12,0,100,25,0,0,"Gunther Arcanus"); diff --git a/sql/updates/world/2012_01_16_04_world_sai.sql b/sql/updates/world/2012_01_16_04_world_sai.sql new file mode 100644 index 00000000000..85087a57dec --- /dev/null +++ b/sql/updates/world/2012_01_16_04_world_sai.sql @@ -0,0 +1,11 @@ +-- [Q] [A/H] Hope Within the Emerald Nightmare +-- This NPC already had SAI so we're only adding additional lines +-- Keeper Remulos SAI +SET @ENTRY := 11832; +SET @QUEST := 13074; +SET @SPELL_FITFUL_DREAM := 57413; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,4,0,19,0,100,0,@QUEST,0,0,0,11,@SPELL_FITFUL_DREAM,0,0,0,0,0,7,0,0,0,0,0,0,0,"Keeper Remulos - On Quest Accept - Cast Fitful Dream"); diff --git a/sql/updates/world/2012_01_16_05_world_sai.sql b/sql/updates/world/2012_01_16_05_world_sai.sql new file mode 100644 index 00000000000..d5966dfc3ec --- /dev/null +++ b/sql/updates/world/2012_01_16_05_world_sai.sql @@ -0,0 +1,15 @@ +-- [Q] [A] A Humble Task +-- Greatmother Hawkwind SAI +SET @ENTRY := 2991; +SET @QUEST := 753; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,19,0,100,0,@QUEST,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Greatmother Hawkwind - On Script - Emote Line 0"); +-- Texts +DELETE FROM `db_script_string` WHERE `entry`=2000000077; +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"%s gestures to the pitcher of water sitting on the edge of the well.",16,0,100,0,0,0,"Greatmother Hawkwind"); diff --git a/sql/updates/world/2012_01_16_06_world_sai.sql b/sql/updates/world/2012_01_16_06_world_sai.sql new file mode 100644 index 00000000000..62231b60fdc --- /dev/null +++ b/sql/updates/world/2012_01_16_06_world_sai.sql @@ -0,0 +1,14 @@ +-- [Q] [A/H] The Boon of A'dal +-- A'dal SAI +SET @ENTRY := 18481; +SET @QUEST := 13082; +SET @SPELL_BLESSING := 35076; +SET @SPELL_TP_DALARAN := 53141; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,0,0,0,0,0,11,@SPELL_BLESSING,0,0,0,0,0,1,0,0,0,0,0,0,0,"A'dal - Out of Combat - Cast Blessing of A'dal"), -- From EAI +(@ENTRY,0,1,0,19,0,100,0,@QUEST,0,0,0,11,@SPELL_TP_DALARAN,0,0,0,0,0,7,0,0,0,0,0,0,0,"A'dal - On Quest Accept - Cast Teleport Dalaran"); diff --git a/sql/updates/world/2012_01_16_07_world_sai.sql b/sql/updates/world/2012_01_16_07_world_sai.sql new file mode 100644 index 00000000000..79324bd2c0b --- /dev/null +++ b/sql/updates/world/2012_01_16_07_world_sai.sql @@ -0,0 +1,32 @@ +-- [Q] [A] The Missing Diplomat +-- Dashel Stonefist SAI +SET @ENTRY := 4961; +SET @QUEST := 1447; +SET @SPELL_PUMMEL := 12555; +UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0,`EmoteOnComplete`=11 WHERE `id`=@QUEST; -- ONESHOT_LAUGH +UPDATE `quest_template` SET `EmoteOnComplete`=14 WHERE `id`=1246; -- Previous version should make him rude against player +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY*100,@ENTRY*100+1) 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,13,0,100,0,6000,21000,0,0,11,@SPELL_PUMMEL,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - Player Casting - Cast Pummel"), +(@ENTRY,0,1,0,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Quest Accept - Run Script"), +(@ENTRY*100,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,"Dashel Stonefist - On Script - Say Line 0"), +(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,2,168,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Set Faction Hostile"), +(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,49,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Attack Player"), +(@ENTRY*100,9,3,0,0,0,100,0,2000,2000,0,0,12,4969,1,300000,0,0,0,8,0,0,0,-8678.246094,440.952606,99.620926,4.364815,"Dashel Stonefist - On Script - Summon Old Town Thug"), +(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,12,4969,1,300000,0,0,0,8,0,0,0,-8682.465820,441.471161,99.531319,4.871392,"Dashel Stonefist - On Script - Summon Old Town Thug"), +(@ENTRY,0,2,0,2,0,100,0,0,15,0,0,80,@ENTRY*100+1,0,2,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On 15% HP - Run Script"), +(@ENTRY*100+1,9,0,0,0,0,100,0,0,0,0,0,15,@QUEST,0,0,0,0,0,7,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Quest Credit"), -- We are putting this before evade else we lose our target +(@ENTRY*100+1,9,1,0,0,0,100,0,0,0,0,0,20,9,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Stop Attacking"), +(@ENTRY*100+1,9,2,0,0,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Evade"), +(@ENTRY*100+1,9,3,0,0,0,100,0,0,0,0,0,2,84,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Set Faction Back"), +(@ENTRY*100+1,9,4,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Say Line 1"), +(@ENTRY*100+1,9,5,0,0,0,100,0,6000,6000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Say Line 2"); +-- Texts +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Now you're going to get it good!",12,0,100,0,0,0,"Dashel Stonefist"), +(@ENTRY,1,0,"Okay, okay! Enough fighting. No one else needs to get hurt.",12,0,100,0,0,0,"Dashel Stonefist"), +(@ENTRY,2,0,"It's okay, boys. Back off. You've done enough. I'll meet up with you later.",12,0,100,0,0,0,"Dashel Stonefist"); diff --git a/sql/updates/world/2012_01_16_08_world_sai.sql b/sql/updates/world/2012_01_16_08_world_sai.sql new file mode 100644 index 00000000000..0857b8fd45b --- /dev/null +++ b/sql/updates/world/2012_01_16_08_world_sai.sql @@ -0,0 +1,12 @@ +-- [Q] [A/H] In Service Of The Lich King +-- The Lich King SAI +SET @ENTRY := 25462; +SET @QUEST := 12593; +SET @SPELL_EXLOSION := 58024; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"The Lich King - On Quest Accept - Run Script"), +(@ENTRY*100,9,0,0,0,0,100,0,3000,3000,0,0,11,@SPELL_EXLOSION,0,0,0,0,0,7,0,0,0,0,0,0,0,"The Lich King - On Script - Cast 'Icecrown Airship - A - Attack - 02b Cannon Explosion, Shield'"); -- After three seconds diff --git a/sql/updates/world/2012_01_16_09_world_sai.sql b/sql/updates/world/2012_01_16_09_world_sai.sql new file mode 100644 index 00000000000..d82fc341ff0 --- /dev/null +++ b/sql/updates/world/2012_01_16_09_world_sai.sql @@ -0,0 +1,10 @@ +-- [Q] [A] The Legend of Stalvan +-- Sealed Crate SAI +SET @ENTRY := 1561; +SET @QUEST := 74; +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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,1,0,0,19,0,100,0,@QUEST,0,0,0,12,2044,1,30000,0,0,0,8,0,0,0,-10953.3,988.509,98.984,5.349,"Sealed Crate - On Quest Accept - Summon Forlorn Spirit"); -- What's wrong with those stupid co-ords? .. diff --git a/sql/updates/world/2012_01_17_00_world_misc.sql b/sql/updates/world/2012_01_17_00_world_misc.sql new file mode 100644 index 00000000000..300d239bd43 --- /dev/null +++ b/sql/updates/world/2012_01_17_00_world_misc.sql @@ -0,0 +1,27 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` IN (69672,69673); +INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES +(69672,'spell_gen_sunreaver_disguise'), +(69673,'spell_gen_silver_covenant_disguise'); + +-- Update spells used on script. Now they are always casting the female spell, +-- since the spell script is fixed we should cast now the correct spell. +UPDATE `smart_scripts` SET `action_param1`=69672 WHERE `entryorguid`=36669 AND `action_type`=11 AND `action_param1`=70973; +UPDATE `smart_scripts` SET `action_param1`=69673 WHERE `entryorguid`=36670 AND `action_type`=11 AND `action_param1`=70971; +-- Set correct gossip menus ids for renewing the disguise +UPDATE `smart_scripts` SET `event_param1`=10858 WHERE `entryorguid`=36669 AND `event_param1`=10857; +UPDATE `smart_scripts` SET `event_param1`=10857 WHERE `entryorguid`=36670 AND `event_param1`=10858; + +-- Gossip options were crossed. They should offer to cast the oposing faction disguise,instead of his own faction disguise. +UPDATE `gossip_menu_option` SET `option_text`="Would you renew my Covenant disguise?" WHERE `menu_id`=10857 AND `id`=1; +UPDATE `gossip_menu_option` SET `option_text`="Would you renew my Sunreaver disguise?" WHERE `menu_id`=10858 AND `id`=1; + +-- Correct quest ids on conditios for showing the renew disguise option. +-- Also add a check for male disguise aura. +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (10857,10858) AND `SourceEntry`=1; +INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,10858,1,0,11,70973,0,0,0,'',NULL), +(15,10858,1,0,11,70974,0,0,0,'',NULL), +(15,10858,1,0,9,20439,0,0,0,'',NULL), +(15,10857,1,0,11,70971,0,0,0,'',NULL), +(15,10857,1,0,11,70972,0,0,0,'',NULL), +(15,10857,1,0,9,24451,0,0,0,'',NULL); diff --git a/sql/updates/world/2012_01_17_01_world_conditions.sql b/sql/updates/world/2012_01_17_01_world_conditions.sql new file mode 100644 index 00000000000..6c562ba4d45 --- /dev/null +++ b/sql/updates/world/2012_01_17_01_world_conditions.sql @@ -0,0 +1,12 @@ +-- Condition update to flags +DELETE FROM `conditions` WHERE `ConditionTypeOrReference`=5; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(19,0,13846,0,5,1106,127,0,0,'','Quest Contributin'' To The Cause - Requires Argent Crusade hated thru revered'), +(20,0,13846,0,5,1106,127,0,0,'','Quest Contributin'' To The Cause - Requires Argent Crusade hated thru revered'), +(14,21258,7594,0,5,270,120,0,0,'','Only show text_id 7594 if player is neutral thru revered with Zandalar Tribe (270)'), +(14,21258,7595,0,5,270,128,0,0,'','Only show text_id 7595 if player is exalted with Zandalar Tribe (270)'), +(15,21258,0,0,5,270,128,0,0,'','Only show gossip option if player is exalted with Zandalar Tribe (270)'), +(15,21259,0,0,5,270,128,0,0,'','Only show gossip option if player is exalted with Zandalar Tribe (270)'), +(15,21260,0,0,5,270,128,0,0,'','Only show gossip option if player is exalted with Zandalar Tribe (270)'), +(1,23342,32726,0,5,1015,240,0,0,'','Murkblood Escape Plans - when Netherwing friendly thru exalted'), +(1,23286,32726,0,5,1015,240,0,0,'','Murkblood Escape Plans - when Netherwing friendly thru exalted'); diff --git a/sql/updates/world/2012_01_19_00_world_quest_template.sql b/sql/updates/world/2012_01_19_00_world_quest_template.sql new file mode 100644 index 00000000000..f1af6e7eedd --- /dev/null +++ b/sql/updates/world/2012_01_19_00_world_quest_template.sql @@ -0,0 +1,17 @@ +-- Non sword wielders quests +UPDATE `quest_template` SET `RequiredClasses`=`RequiredClasses` +|16 -- Priest +|64 -- Shaman +|1024 -- Druid +WHERE `Id` IN (24795,24798,24798); + +-- Sword wielders quests +UPDATE `quest_template` SET `RequiredClasses`=`RequiredClasses` +|1 -- Warrior +|2 -- Paladin +|4 -- Hunter +|8 -- Rouge +|32 -- Death Kinght +|128 -- Mage +|256 -- Warlock +WHERE `Id` IN (24796,24800,24801); diff --git a/sql/updates/world/2012_01_19_01_world_sai.sql b/sql/updates/world/2012_01_19_01_world_sai.sql new file mode 100644 index 00000000000..969eea6c4dd --- /dev/null +++ b/sql/updates/world/2012_01_19_01_world_sai.sql @@ -0,0 +1,25 @@ +-- [Q] Mounting Hodir's Helm +-- Hodir's Helm KC Bunny SAI +SET @ENTRY := 30210; +SET @SPELL_READ_PRONOUNCEMENT := 56278; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,8,0,100,0,@SPELL_READ_PRONOUNCEMENT,0,0,0,33,@ENTRY,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hodir's Helm KC Bunny - On Spellhit - Quest Credit"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Hodir's Helm KC Bunny - On Spellhit - Say Line 0"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,50,192080,30000,0,0,0,0,8,0,0,0,7390.143066,-2725.382080,874.256104,2.973291,"Hodir's Helm KC Bunny - On Spellhit - Summon Hodir's Helm"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Sons of Hodir! I humbly present to you... The Helm of Hodir!",42,0,100,0,0,0,"Hodir's Helm KC Bunny"); +-- Update from sniff +UPDATE `gameobject_template` SET `flags`=`flags`|36 WHERE `entry`=192080; +-- Conditions for Read Pronouncement +DELETE FROM `conditions` WHERE `SourceEntry`=@SPELL_READ_PRONOUNCEMENT AND `ConditionValue2`=@ENTRY; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`Comment`) VALUES +(13,0,@SPELL_READ_PRONOUNCEMENT,18,1,@ENTRY,"Read Pronouncement targets Hodir's Helm KC Bunny"); +-- Spawn a helm bunny +SET @GUID := 40266; -- gap +DELETE FROM `creature` WHERE `id`=@ENTRY; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +(@GUID,@ENTRY,571,1,1,0,0,7390.14,-2725.38,874.256,2.90103,300,0,0,42,0,0,0,0,0); diff --git a/sql/updates/world/2012_01_19_02_world_quest_template.sql b/sql/updates/world/2012_01_19_02_world_quest_template.sql new file mode 100644 index 00000000000..7bff373242d --- /dev/null +++ b/sql/updates/world/2012_01_19_02_world_quest_template.sql @@ -0,0 +1 @@ +UPDATE `quest_template` SET `SpecialFlags`=0 WHERE `id`=9545; diff --git a/sql/updates/world/2012_01_19_03_world_sai.sql b/sql/updates/world/2012_01_19_03_world_sai.sql new file mode 100644 index 00000000000..6588e6a1ba8 --- /dev/null +++ b/sql/updates/world/2012_01_19_03_world_sai.sql @@ -0,0 +1,19 @@ +-- [Q] [A] The Escape +-- William Pestle SAI +SET @ENTRY := 253; +SET @QUEST := 114; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"William Pestle - On Quest Accept - Run Script"), +(@ENTRY*100,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,"William Pestle - On Script - Say Line 0"), +(@ENTRY*100,9,1,0,0,0,100,0,5000,5000,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"William Pestle - On Script - Say Line 1"); +-- Text +DELETE FROM `db_script_string` WHERE `entry` IN (2000000080,2000000081); +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"This shouldn't take long...",12,0,100,432,0,0,"William Pestle"), +(@ENTRY,1,0,"The invisibility liquer is ready for you, $N.",12,0,100,0,0,0,"William Pestle"); diff --git a/sql/updates/world/2012_01_19_04_world_sai.sql b/sql/updates/world/2012_01_19_04_world_sai.sql new file mode 100644 index 00000000000..6c1530ce4ee --- /dev/null +++ b/sql/updates/world/2012_01_19_04_world_sai.sql @@ -0,0 +1,14 @@ +-- [Q] [A/H] This Is Going to Be Hard +-- Lotwil Veriatus SAI +SET @ENTRY := 2921; +SET @QUEST := 778; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Lotwil Veriatus - On Quest Accept - Run Script"), +(@ENTRY*100,9,0,0,0,0,100,0,4000,4000,0,0,11,5001,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lotwil Veriatus - On Script - Cast Lotwil's Summoning"), +(@ENTRY*100,9,1,0,0,0,100,0,1000,1000,0,0,12,2919,1,240000,0,0,0,8,0,0,0,-6666.27,-2728.12,243.136,6.28,"Lotwil Veriatus - On Script - Summon Fam'retor Guardian"), +(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,11,5002,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lotwil Veriatus - On Script - Cast Lotwil's Summon Complete"); diff --git a/sql/updates/world/2012_01_19_05_world_sai.sql b/sql/updates/world/2012_01_19_05_world_sai.sql new file mode 100644 index 00000000000..2e6a743167e --- /dev/null +++ b/sql/updates/world/2012_01_19_05_world_sai.sql @@ -0,0 +1,10 @@ +-- [Q] [A] The Dormant Shade +-- Lillith's Dinner Table SAI +SET @ENTRY := 1557; +SET @QUEST := 410; +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_end_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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,1,0,0,20,0,100,0,@QUEST,0,0,0,12,1946,1,180000,0,0,0,8,0,0,0,2468.28,15.26,23.89,0.37,"Lillith's Dinner Table - On Quest Complete - Summon Lillith Nefara"); diff --git a/sql/updates/world/2012_01_19_06_world_sai.sql b/sql/updates/world/2012_01_19_06_world_sai.sql new file mode 100644 index 00000000000..817d6bd9aaa --- /dev/null +++ b/sql/updates/world/2012_01_19_06_world_sai.sql @@ -0,0 +1,10 @@ +-- [Q] [A/H] Ledger from Tanaris +-- Wooden Outhouse SAI +SET @ENTRY := 173265; +SET @QUEST := 4450; +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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,1,0,0,19,0,100,0,@QUEST,0,0,0,70,0,0,0,0,0,0,14,47578,173266,0,0,0,0,0,"Wooden Outhouse - On Quest Accept - Respawn Goodsteel Ledger (GO)"); diff --git a/sql/updates/world/2012_01_19_07_world_sai.sql b/sql/updates/world/2012_01_19_07_world_sai.sql new file mode 100644 index 00000000000..3b0e27667e6 --- /dev/null +++ b/sql/updates/world/2012_01_19_07_world_sai.sql @@ -0,0 +1,20 @@ +-- [Q] [A/H] Making Sense of It +-- J.D. Collie SAI +SET @ENTRY := 9117; +SET @QUEST := 4321; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"J.D. Collie - On Quest Accept - Run Script"), +(@ENTRY*100,9,0,0,0,0,100,0,6000,6000,0,0,5,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"J.D. Collie - On Script - Emote ONESHOT_QUESTION"), +(@ENTRY*100,9,1,0,0,0,100,0,4000,4000,0,0,5,22,0,0,0,0,0,1,0,0,0,0,0,0,0,"J.D. Collie - On Script - Emote ONESHOT_SHOUT"), +(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"J.D. Collie - On Script - Say Line 0"), +(@ENTRY*100,9,3,0,0,0,100,0,10000,10000,0,0,15,@QUEST,0,0,0,0,7,0,0,0,0,0,0,0,0,"J.D. Collie - On Script - Quest Credit"); +-- Text +DELETE FROM `db_script_string` WHERE `entry`=2000000030; +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"This makes sense!",12,0,100,0,0,0,"J.D. Collie"); diff --git a/sql/updates/world/2012_01_19_08_world_sai.sql b/sql/updates/world/2012_01_19_08_world_sai.sql new file mode 100644 index 00000000000..5b26998a607 --- /dev/null +++ b/sql/updates/world/2012_01_19_08_world_sai.sql @@ -0,0 +1,94 @@ +-- [QUEST] A Rough Ride (12536) +-- NPC entry 28298 (Captive Crocolisk) +SET @ENTRY := 28298; +SET @GOSSIP := 9674; +SET @TEXT_ID := 13120; +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP,`npcflag`=npcflag|1,`VehicleId`=0 WHERE `entry`=@ENTRY; +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP; +INSERT INTO `gossip_menu` (`entry`,`text_id`) +VALUES (@GOSSIP,@TEXT_ID); +-- Added condition so player can only select it once he has the quest +SET @GOSSIP_ENTRY := 9674; +SET @QUEST := 12536; +DELETE FROM `conditions` WHERE `SourceGroup`=@GOSSIP_ENTRY AND `SourceTypeOrReferenceId`=15; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,@GOSSIP_ENTRY,0,0,9,@QUEST,0,0,0,0, 'Only show gossip 9674 when quest 12536 is added'); +-- Add missing gossip +SET @GOSSIP := 9674; +DELETE FROM `gossip_menu_option` WHERE `menu_id`=9674 AND `id`=0; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(@GOSSIP,0,0,"You look safe enough... let's do this.",1,1,0,0,0,0, ''); +-- [SAI] On gossip select - mount and waypoint +SET @ENTRY := 28298; +SET @GOSSIP := 9674; +SET @SPELL := 51258; +SET @ENTRY_MOUNT := 28308; +SET @MODELID_MOUNT := 25107; +SET @QUEST := 12536; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@ENTRY,@ENTRY_MOUNT); +UPDATE `creature_template` SET `VehicleId`=115 WHERE `entry`=@ENTRY_MOUNT; +UPDATE `creature_template` SET `InhabitType`=3 WHERE `entry`=@ENTRY_MOUNT; +UPDATE `creature_template` SET `unit_flags`=`unit_flags`|512|256 WHERE `entry`=@ENTRY_MOUNT; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY_MOUNT) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY_MOUNT*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,62,0,100,0,@GOSSIP,0,0,0,11,@SPELL,0,0,0,0,0,7,0,0,0,0,0,0,0, 'On gossip select - cast spell 51258 - Captive Crocolisk'), +(@ENTRY_MOUNT,0,1,0,54,0,100,0,0,0,0,0,80,@ENTRY_MOUNT*100,0,2,0,0,0,1,0,0,0,0,0,0,0, 'On summon - run script - Captive Crocolisk'), +(@ENTRY_MOUNT*100,9,1,0,0,0,100,0,0,0,0,0,53,1,@ENTRY_MOUNT,0,@QUEST,0,1,1,0,0,0,0,0,0,0, 'Start wp - Captive Crocolisk'), +(@ENTRY_MOUNT,0,2,3,58,0,100,0,47,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'on wp end - despawn - Captive Crocolisk'), +(@ENTRY_MOUNT,0,3,0,61,0,100,0,@ENTRY_MOUNT,0,0,0,15,@QUEST,0,0,0,0,0,7,0,0,0,0,0,0,0, 'on despawn - call area explored of event happens'); +-- Waypoints +DELETE FROM `waypoints` WHERE `entry`=@ENTRY_MOUNT; +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(@ENTRY_MOUNT,1,5268.226,4425.439,-95.55899, 'Captive Crocolisk'), +(@ENTRY_MOUNT,2,5249.557,4405.892,-96.04365, 'Captive Crocolisk'), +(@ENTRY_MOUNT,3,5266.678,4365.464,-98.19455, 'Captive Crocolisk'), +(@ENTRY_MOUNT,4,5289.138,4366.553,-102.234, 'Captive Crocolisk'), +(@ENTRY_MOUNT,5,5330.018,4363.27,-121.0311, 'Captive Crocolisk'), +(@ENTRY_MOUNT,6,5349.229,4341.059,-134.0126, 'Captive Crocolisk'), +(@ENTRY_MOUNT,7,5268.226,4425.439,-95.55899, 'Captive Crocolisk'), +(@ENTRY_MOUNT,8,5249.557,4405.892,-96.04365, 'Captive Crocolisk'), +(@ENTRY_MOUNT,9,5266.678,4365.464,-98.19455, 'Captive Crocolisk'), +(@ENTRY_MOUNT,10,5289.138,4366.553,-102.234, 'Captive Crocolisk'), +(@ENTRY_MOUNT,11,5330.018,4363.27,-121.0311, 'Captive Crocolisk'), +(@ENTRY_MOUNT,12,5349.229,4341.059,-134.0126, 'Captive Crocolisk'), +(@ENTRY_MOUNT,13,5365.038,4333.716,-141.5817, 'Captive Crocolisk'), +(@ENTRY_MOUNT,14,5405.443,4307.841,-142.03, 'Captive Crocolisk'), +(@ENTRY_MOUNT,15,5434.999,4305.659,-136.4706, 'Captive Crocolisk'), +(@ENTRY_MOUNT,16,5464.708,4302.066,-133.1981, 'Captive Crocolisk'), +(@ENTRY_MOUNT,17,5490.555,4294.395,-127.5203, 'Captive Crocolisk'), +(@ENTRY_MOUNT,18,5503.808,4269.717,-110.3168, 'Captive Crocolisk'), +(@ENTRY_MOUNT,19,5518.324,4255.308,-103.0638, 'Captive Crocolisk'), +(@ENTRY_MOUNT,20,5540.53,4259.77,-102.3979, 'Captive Crocolisk'), +(@ENTRY_MOUNT,21,5564.194,4263.45,-102.7574, 'Captive Crocolisk'), +(@ENTRY_MOUNT,22,5585.45,4261.137,-99.54807, 'Captive Crocolisk'), +(@ENTRY_MOUNT,23,5609.614,4259.657,-98.87333, 'Captive Crocolisk'), +(@ENTRY_MOUNT,24,5633.434,4259.228,-98.53442, 'Captive Crocolisk'), +(@ENTRY_MOUNT,25,5681.639,4266.31,-99.26748, 'Captive Crocolisk'), +(@ENTRY_MOUNT,26,5708.126,4273.348,-102.9183, 'Captive Crocolisk'), +(@ENTRY_MOUNT,27,5748.732,4284.135,-112.0557, 'Captive Crocolisk'), +(@ENTRY_MOUNT,28,5839.82,4368.61,-112.0805, 'Captive Crocolisk'), +(@ENTRY_MOUNT,29,5865.922,4371.208,-105.5544, 'Captive Crocolisk'), +(@ENTRY_MOUNT,30,5897.276,4408.44,-95.25065, 'Captive Crocolisk'), +(@ENTRY_MOUNT,31,5925.311,4440.624,-94.77592, 'Captive Crocolisk'), +(@ENTRY_MOUNT,32,5953.005,4476.29,-94.3763, 'Captive Crocolisk'), +(@ENTRY_MOUNT,33,5964.229,4503.729,-92.81553, 'Captive Crocolisk'), +(@ENTRY_MOUNT,34,5960.583,4546.558,-95.65462, 'Captive Crocolisk'), +(@ENTRY_MOUNT,35,5965.167,4579.141,-97.39779, 'Captive Crocolisk'), +(@ENTRY_MOUNT,36,5969.295,4613.739,-98.05751, 'Captive Crocolisk'), +(@ENTRY_MOUNT,37,5975.809,4659.289,-99.27143, 'Captive Crocolisk'), +(@ENTRY_MOUNT,38,5992.961,4699.554,-99.30317, 'Captive Crocolisk'), +(@ENTRY_MOUNT,39,6015.139,4743.752,-97.52377, 'Captive Crocolisk'), +(@ENTRY_MOUNT,40,6035.183,4788.787,-94.66938, 'Captive Crocolisk'), +(@ENTRY_MOUNT,41,6064.951,4827.502,-94.54885, 'Captive Crocolisk'), +(@ENTRY_MOUNT,42,6065.57,4870.553,-94.47726, 'Captive Crocolisk'), +(@ENTRY_MOUNT,43,6096.612,4885.741,-94.44479, 'Captive Crocolisk'), +(@ENTRY_MOUNT,44,6120.387,4902.048,-95.06882, 'Captive Crocolisk'), +(@ENTRY_MOUNT,45,6139.616,4913.349,-94.8635, 'Captive Crocolisk'), +(@ENTRY_MOUNT,46,6139.616,4913.349,-94.93861, 'Captive Crocolisk'), +(@ENTRY_MOUNT,47,6139.616,4913.349,-94.93861, 'Captive Crocolisk'); +-- Spawn Zepik +SET @GUID := 40267; +DELETE FROM `creature` WHERE `id`=28216; +INSERT INTO `creature` VALUES +(@GUID,28216,571,1,1,0,0,6147.37,4917.29,-94.094,3.42155,300,0,0,42,0,0,0,0,0); diff --git a/sql/updates/world/2012_01_21_00_world_creature.sql b/sql/updates/world/2012_01_21_00_world_creature.sql new file mode 100644 index 00000000000..b4a015380c3 --- /dev/null +++ b/sql/updates/world/2012_01_21_00_world_creature.sql @@ -0,0 +1,8 @@ +-- Spawns from sniff +SET @GUID := 40279; -- set value +DELETE FROM `creature` WHERE `id`=27791; +INSERT IGNORE INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`MovementType`) VALUES +(@GUID+0,27791,571,1,1,0,0,3653.64233,-1204.21200,102.420319,4.04458666,120,0,0), +(@GUID+1,27791,571,1,1,0,0,3673.77515,-1213.68188,102.420319,4.08126450,120,0,0), +(@GUID+2,27791,571,1,1,0,0,3674.53735,-1175.28369,102.420288,1.78801400,120,0,0), +(@GUID+3,27791,571,1,1,0,0,3684.37158,-1180.27942,102.420288,1.22173047,120,0,0); diff --git a/sql/updates/world/2012_01_21_00_world_sai.sql b/sql/updates/world/2012_01_21_00_world_sai.sql new file mode 100644 index 00000000000..e275c521e74 --- /dev/null +++ b/sql/updates/world/2012_01_21_00_world_sai.sql @@ -0,0 +1,11 @@ +-- 7th Legion Rifleman SAI (replaces EAI) +SET @ENTRY := 27791; -- NPC entry +SET @SPELL1 := 62312; -- Cast Net +SET @SPELL2 := 50092; -- Cast Shoot +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +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,4,0,100,0,0,0,0,0,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0,"7th Legion Rifleman - On Aggro - Cast Net"), +(@ENTRY,0,1,0,0,0,100,0,500,3500,5000,6000,11,@SPELL2,0,0,0,0,0,2,0,0,0,0,0,0,0,"7th Legion Rifleman - In Combat - Cast Shoot"), +(@ENTRY,0,2,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"7th Legion Rifleman - At 15% HP - Flee"); diff --git a/sql/updates/world/2012_01_21_01_world_npc_vendor.sql b/sql/updates/world/2012_01_21_01_world_npc_vendor.sql new file mode 100644 index 00000000000..f8c7d0f4327 --- /dev/null +++ b/sql/updates/world/2012_01_21_01_world_npc_vendor.sql @@ -0,0 +1,6 @@ +-- Remove old one that still required reputation even after you bought it +DELETE FROM `npc_vendor` WHERE `entry`=32538 and`item`=50367 and`ExtendedCost`=0; + +-- Commit for new one +DELETE FROM `npc_vendor` WHERE `entry`=32538 and`item`=44149 and`ExtendedCost`=0; +INSERT INTO `npc_vendor` (`entry`,`slot`,`item`,`maxcount`,`incrtime`,`ExtendedCost`) VALUES (32538,0,44149,0,0,0); diff --git a/sql/updates/world/2012_01_21_02_world_achievement_criteria_data.sql b/sql/updates/world/2012_01_21_02_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..a9c2781d57f --- /dev/null +++ b/sql/updates/world/2012_01_21_02_world_achievement_criteria_data.sql @@ -0,0 +1,5 @@ +DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (1237,1240,1241); +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES +(1237, 0, 0, 0, ''), -- Achievement: Let's Get This Done +(1240, 0, 0, 0, ''), -- Achievement: Flurry +(1241, 0, 0, 0, ''); -- Achievement: The Alterac Blitz diff --git a/sql/updates/world/2012_01_22_00_world_command.sql b/sql/updates/world/2012_01_22_00_world_command.sql new file mode 100644 index 00000000000..c87b7b3f825 --- /dev/null +++ b/sql/updates/world/2012_01_22_00_world_command.sql @@ -0,0 +1 @@ +UPDATE `command` SET `name`='reload waypoint_data',`help`='Syntax: .reload waypoint_data will reload waypoint_data table.' WHERE `name`='reload wp_data'; diff --git a/sql/updates/world/2012_01_22_00_world_sai.sql b/sql/updates/world/2012_01_22_00_world_sai.sql new file mode 100644 index 00000000000..8df31981de1 --- /dev/null +++ b/sql/updates/world/2012_01_22_00_world_sai.sql @@ -0,0 +1,71 @@ +-- Munci SAI +SET @ENTRY := 18788; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Munci - On Aggro - Summon Enraged Hippogryphs"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Munci - On Aggro - Summon Enraged Hippogryphs"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Munci - On Aggro - Say Line 0"); +-- Text for Munci +DELETE FROM `creature_ai_texts` WHERE `entry`=-549; +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Munci"); + +-- Amish Wildhammer SAI +SET @ENTRY := 18931; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Amish Wildhammer - On Aggro - Summon Enraged Gryphons"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Amish Wildhammer - On Aggro - Summon Enraged Gryphons"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Amish Wildhammer - On Aggro - Say Line 0"); +-- Text for Amish Wildhammer +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Amish Wildhammer"); + +-- Lemla Hopewing SAI +SET @ENTRY := 19181; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9526,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Lemla Hopewing - On Aggro - Summon Enraged Gryphons"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9526,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Lemla Hopewing - On Aggro - Summon Enraged Gryphons"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lemla Hopewing - On Aggro - Say Line 0"); +-- Text for Lemla Hopewing +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Lemla Hopewing"); + +-- Auhula SAI +SET @ENTRY := 22936; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9527,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Auhula - On Aggro - Summon Enraged Hippogryphs"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9527,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Auhula - On Aggro - Summon Enraged Hippogryphs"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Auhula - On Aggro - Say Line 0"); +-- Text for Auhula +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,7,100,0,0,0,"Auhula"); + +-- Hyeyoung Parka SAI +SET @ENTRY := 29762; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,4,0,100,0,0,0,0,0,12,9297,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Hyeyoung Parka - On Aggro - Summon Enraged Wyverns"), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,12,9297,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Hyeyoung Parka - On Aggro - Summon Enraged Wyverns"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hyeyoung Parka - On Aggro - Say Line 0"); +-- Text for Hyeyoung Parka +DELETE FROM `creature_ai_texts` WHERE `entry`=-548; +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Guards!",14,1,100,0,0,0,"Hyeyoung Parka"); diff --git a/sql/updates/world/2012_01_22_01_world_conditions.sql b/sql/updates/world/2012_01_22_01_world_conditions.sql new file mode 100644 index 00000000000..9aaea4f8ac1 --- /dev/null +++ b/sql/updates/world/2012_01_22_01_world_conditions.sql @@ -0,0 +1 @@ +UPDATE `conditions` SET `SourceGroup`=23324 WHERE `SourceTypeOrReferenceId`=1 AND `SourceGroup`=23342; diff --git a/sql/updates/world/2012_01_22_02_world_creature_addon.sql b/sql/updates/world/2012_01_22_02_world_creature_addon.sql new file mode 100644 index 00000000000..808d728610e --- /dev/null +++ b/sql/updates/world/2012_01_22_02_world_creature_addon.sql @@ -0,0 +1,2 @@ +-- cleanups +DELETE FROM `creature_addon` WHERE `guid` in (133434,133435); diff --git a/sql/updates/world/2012_01_23_00_world_game_event_seasonal_questrelation.sql b/sql/updates/world/2012_01_23_00_world_game_event_seasonal_questrelation.sql new file mode 100644 index 00000000000..40bf28a1ead --- /dev/null +++ b/sql/updates/world/2012_01_23_00_world_game_event_seasonal_questrelation.sql @@ -0,0 +1,244 @@ +DELETE FROM `game_event_seasonal_questrelation` WHERE `questId` IN (9319,9322,9323,9324,9325,9326,9330,9331,9332,9339,9365,9367,9368,9386,9388,9389,11657,11691,11731,11882,11883,11886,11891,11915,11917,11921,11922,11923,11924,11925,11926,11933,11935,11947,11948,11952,11953,11954,11955,11964,11966,11970,11971,11972,12012) AND `eventEntry`=1; +DELETE FROM `game_event_seasonal_questrelation` WHERE `questId` IN (8619,8635,8636,8642,8643,8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8670,8671,8672,8673,8674,8675,8676,8677,8678,8679,8680,8681,8682,8683,8684,8685,8686,8688,8713,8714,8715,8716,8717,8718,8719,8720,8721,8722,8723,8724,8725,8726,8727,8862,8863,8864,8865,8866,8867,8870,8871,8872,8873,8874,8875,8876,8877,8878,8879,8880,8881,8882,8883,13012,13013,13014,13015,13016,13017,13018,13019,13020,13021,13022,13023,13024,13025,13026,13027,13028,13029,13030,13031,13032,13033,13065,13066,13067) AND `eventEntry`=7; +DELETE FROM `game_event_seasonal_questrelation` WHERE `questId` IN (14488,24597,24609,24656,24657,24745,24848,24849,24666,24792,24804,24611,24536,24612,24635,24636,24655,24610,24629,24614,24576,24613,24615,24638,24645,24647,24648,24649,24650,24651,24652,24658,24659,24660,24662,24663,24664,24665,24793,24805,24850,24851,24541,14483,24661) AND `eventEntry`=8; +DELETE FROM `game_event_seasonal_questrelation` WHERE `questId` IN (13479,13480,13483,13484,13502,13503) AND `eventEntry`=9; +DELETE FROM `game_event_seasonal_questrelation` WHERE `questId` IN (11120,11431,11442,11409,11318,11117,11400,11419,11118,11122,11293,11294,11321,11407,11408,11412,11413,11441,11446,11454,11486,11487,12020,12022,12318,12193,12062,12491,11447,12191,12492,12194,12192,12278,12306,12420,12421,13932,13649,13931,11127,11320,11347,11437,11438,11444,11445) AND `eventEntry`=24; + +INSERT INTO `game_event_seasonal_questrelation` (`questId`,`eventEntry`) VALUES +(8619,7), +(8635,7), +(8636,7), +(8642,7), +(8643,7), +(8644,7), +(8645,7), +(8646,7), +(8647,7), +(8648,7), +(8649,7), +(8650,7), +(8651,7), +(8652,7), +(8653,7), +(8654,7), +(8670,7), +(8671,7), +(8672,7), +(8673,7), +(8674,7), +(8675,7), +(8676,7), +(8677,7), +(8678,7), +(8679,7), +(8680,7), +(8681,7), +(8682,7), +(8683,7), +(8684,7), +(8685,7), +(8686,7), +(8688,7), +(8713,7), +(8714,7), +(8715,7), +(8716,7), +(8717,7), +(8718,7), +(8719,7), +(8720,7), +(8721,7), +(8722,7), +(8723,7), +(8724,7), +(8725,7), +(8726,7), +(8727,7), +(8862,7), +(8863,7), +(8864,7), +(8865,7), +(8866,7), +(8867,7), +(8870,7), +(8871,7), +(8872,7), +(8873,7), +(8874,7), +(8875,7), +(8876,7), +(8877,7), +(8878,7), +(8879,7), +(8880,7), +(8881,7), +(8882,7), +(8883,7), +(13012,7), +(13013,7), +(13014,7), +(13015,7), +(13016,7), +(13017,7), +(13018,7), +(13019,7), +(13020,7), +(13021,7), +(13022,7), +(13023,7), +(13024,7), +(13025,7), +(13026,7), +(13027,7), +(13028,7), +(13029,7), +(13030,7), +(13031,7), +(13032,7), +(13033,7), +(13065,7), +(13066,7), +(13067,7), +(11120,24), +(11431,24), +(11442,24), +(11409,24), +(11318,24), +(11117,24), +(11400,24), +(11419,24), +(11118,24), +(11122,24), +(11293,24), +(11294,24), +(11321,24), +(11407,24), +(11408,24), +(11412,24), +(11413,24), +(11441,24), +(11446,24), +(11454,24), +(11486,24), +(11487,24), +(12020,24), +(12022,24), +(12318,24), +(12193,24), +(12062,24), +(12491,24), +(11447,24), +(12191,24), +(12492,24), +(12194,24), +(12192,24), +(12278,24), +(12306,24), +(12420,24), +(12421,24), +(13932,24), +(13649,24), +(13931,24), +(11127,24), +(11320,24), +(11347,24), +(11437,24), +(11438,24), +(11444,24), +(11445,24), +(9319,1), +(9322,1), +(9323,1), +(9324,1), +(9325,1), +(9326,1), +(9330,1), +(9331,1), +(9332,1), +(9339,1), +(9365,1), +(9367,1), +(9368,1), +(9386,1), +(9388,1), +(9389,1), +(11657,1), +(11691,1), +(11731,1), +(11882,1), +(11883,1), +(11886,1), +(11891,1), +(11915,1), +(11917,1), +(11921,1), +(11922,1), +(11923,1), +(11924,1), +(11925,1), +(11926,1), +(11933,1), +(11935,1), +(11947,1), +(11948,1), +(11952,1), +(11953,1), +(11954,1), +(11955,1), +(11964,1), +(11966,1), +(11970,1), +(11971,1), +(11972,1), +(12012,1), +(13479,9), +(13480,9), +(13483,9), +(13484,9), +(13502,9), +(13503,9), +(14488,8), +(24597,8), +(24609,8), +(24656,8), +(24657,8), +(24745,8), +(24848,8), +(24849,8), +(24666,8), +(24792,8), +(24804,8), +(24611,8), +(24536,8), +(24612,8), +(24635,8), +(24636,8), +(24655,8), +(24610,8), +(24629,8), +(24614,8), +(24576,8), +(24613,8), +(24615,8), +(24638,8), +(24645,8), +(24647,8), +(24648,8), +(24649,8), +(24650,8), +(24651,8), +(24652,8), +(24658,8), +(24659,8), +(24660,8), +(24662,8), +(24663,8), +(24664,8), +(24665,8), +(24793,8), +(24805,8), +(24850,8), +(24851,8), +(24541,8), +(14483,8), +(24661,8); diff --git a/sql/updates/world/2012_01_23_00_world_sai.sql b/sql/updates/world/2012_01_23_00_world_sai.sql new file mode 100644 index 00000000000..d73561b6cd6 --- /dev/null +++ b/sql/updates/world/2012_01_23_00_world_sai.sql @@ -0,0 +1,110 @@ +-- Windle Sparkshine SAI +SET @ENTRY := 29261; +SET @SPELL_LIGHT_LAMP := 60535; +UPDATE `gameobject` SET `state`=1 WHERE `id` IN (191444,192086,192085,192084,192087,192089,192088,192067,191445,192850,192853,192854,192852,192083,191440,192070,192069,192117,192116,192119,191665); +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,68,0,100,0,25,0,0,0,53,0,@ENTRY,0,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - Game Event 25 Start - Start WP"), +(@ENTRY,0,1,0,40,0,100,0,1,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 1 - Run Script"), +(@ENTRY,0,2,0,40,0,100,0,5,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 5 - Run Script"), +(@ENTRY,0,3,0,40,0,100,0,8,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 8 - Run Script"), +(@ENTRY,0,4,0,40,0,100,0,12,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 12 - Run Script"), +(@ENTRY,0,5,0,40,0,100,0,16,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 16 - Run Script"), +(@ENTRY,0,6,0,40,0,100,0,20,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 20 - Run Script"), +(@ENTRY,0,7,0,40,0,100,0,24,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 24 - Run Script"), +(@ENTRY,0,8,0,40,0,100,0,29,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 29 - Run Script"), +(@ENTRY,0,9,0,40,0,100,0,33,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 33 - Run Script"), +(@ENTRY,0,10,0,40,0,100,0,36,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 36 - Run Script"), +(@ENTRY,0,11,0,40,0,100,0,38,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 38 - Run Script"), +(@ENTRY,0,12,0,40,0,100,0,45,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 45 - Run Script"), +(@ENTRY,0,13,0,40,0,100,0,48,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 48 - Run Script"), +(@ENTRY,0,14,0,40,0,100,0,53,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 53 - Run Script"), +(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,54,3500,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - On Script - Pause WP"), +(@ENTRY*100,9,1,0,0,0,100,0,1000,1000,0,0,11,@SPELL_LIGHT_LAMP,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - On Script - Cast Light Lamp"), +(@ENTRY,0,15,0,40,0,100,0,1,@ENTRY,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,5.654867,"Windle Sparkshine - At WP 56 - Set Orientation"); + +-- Waypoints +DELETE FROM `waypoints` WHERE `entry`=@ENTRY; +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(@ENTRY,1,5747.069,685.3748,643.8239,'Windle Sparkshine'), -- Lamp 1 +(@ENTRY,2,5749.971,682.7211,643.4057,'Windle Sparkshine'), +(@ENTRY,3,5760.647,698.313,642.3947,'Windle Sparkshine'), +(@ENTRY,4,5770.979,712.3667,641.5851,'Windle Sparkshine'), +(@ENTRY,5,5771.641,718.9518,641.9728,'Windle Sparkshine'), -- Lamp 2 +(@ENTRY,6,5793.795,719.567,640.5906,'Windle Sparkshine'), +(@ENTRY,7,5806.629,718.5358,640.7841,'Windle Sparkshine'), +(@ENTRY,8,5807.11,723.0623,641.0547,'Windle Sparkshine'), -- Lamp 3 +(@ENTRY,9,5812.014,718.6132,640.9974,'Windle Sparkshine'), +(@ENTRY,10,5825.027,714.0911,640.9233,'Windle Sparkshine'), +(@ENTRY,11,5836.411,706.2252,641.2604,'Windle Sparkshine'), +(@ENTRY,12,5838.926,710.4177,641.3674,'Windle Sparkshine'), -- Lamp 4 +(@ENTRY,13,5836.411,706.2252,641.2604,'Windle Sparkshine'), +(@ENTRY,14,5850.628,692.9323,642.3394,'Windle Sparkshine'), +(@ENTRY,15,5871.261,679.3507,643.1625,'Windle Sparkshine'), +(@ENTRY,16,5889.708,676.6304,643.6068,'Windle Sparkshine'), -- Lamp 5 +(@ENTRY,17,5885.975,668.9486,643.8263,'Windle Sparkshine'), +(@ENTRY,18,5894.604,656.5289,644.8455,'Windle Sparkshine'), +(@ENTRY,19,5893.215,644.1390,645.6358,'Windle Sparkshine'), +(@ENTRY,20,5891.531,635.5212,647.5772,'Windle Sparkshine'), -- Lamp 6 +(@ENTRY,21,5885.393,639.2025,646.5132,'Windle Sparkshine'), +(@ENTRY,22,5878.637,630.1852,647.6648,'Windle Sparkshine'), +(@ENTRY,23,5865.146,615.7023,650.0197,'Windle Sparkshine'), +(@ENTRY,24,5867.964,613.0705,650.4550,'Windle Sparkshine'), -- Lamp 7 +(@ENTRY,25,5865.146,615.7023,650.0197,'Windle Sparkshine'), +(@ENTRY,26,5854.076,607.8509,650.7210,'Windle Sparkshine'), +(@ENTRY,27,5840.764,590.5446,650.6240,'Windle Sparkshine'), +(@ENTRY,28,5837.371,583.0912,650.7756,'Windle Sparkshine'), +(@ENTRY,29,5840.763,580.3890,651.8137,'Windle Sparkshine'), -- Lamp 8 +(@ENTRY,30,5837.371,583.0912,650.7756,'Windle Sparkshine'), +(@ENTRY,31,5822.904,570.0418,650.1446,'Windle Sparkshine'), +(@ENTRY,32,5805.871,564.1931,650.1898,'Windle Sparkshine'), +(@ENTRY,33,5796.087,561.1876,650.6658,'Windle Sparkshine'), -- Lamp 9 +(@ENTRY,34,5796.753,566.2323,650.1285,'Windle Sparkshine'), +(@ENTRY,35,5772.444,583.8340,649.8836,'Windle Sparkshine'), +(@ENTRY,36,5767.615,579.1342,650.2487,'Windle Sparkshine'), -- Lamp 10 +(@ENTRY,37,5761.446,588.7081,649.6515,'Windle Sparkshine'), +(@ENTRY,38,5750.556,591.0724,649.8145,'Windle Sparkshine'), -- Lamp 11 +(@ENTRY,39,5749.783,599.296,649.0384,'Windle Sparkshine'), +(@ENTRY,40,5737.969,611.5457,647.9193,'Windle Sparkshine'), +(@ENTRY,41,5726.467,621.8894,646.9294,'Windle Sparkshine'), +(@ENTRY,42,5714.581,625.4625,646.4603,'Windle Sparkshine'), +(@ENTRY,43,5702.122,627.8116,646.3648,'Windle Sparkshine'), +(@ENTRY,44,5693.323,629.3795,646.5901,'Windle Sparkshine'), +(@ENTRY,45,5687.516,629.6511,647.1143,'Windle Sparkshine'), -- Lamp 12 +(@ENTRY,46,5692.803,651.879,646.5027,'Windle Sparkshine'), +(@ENTRY,47,5696.018,667.5477,645.7817,'Windle Sparkshine'), +(@ENTRY,48,5695.917,678.2612,646.0887,'Windle Sparkshine'), -- Lamp 13 +(@ENTRY,49,5700.438,674.0465,645.4587,'Windle Sparkshine'), +(@ENTRY,50,5714.589,662.3508,645.9952,'Windle Sparkshine'), +(@ENTRY,51,5723.479,658.3279,646.0461,'Windle Sparkshine'), +(@ENTRY,52,5728.87,666.1133,645.8447,'Windle Sparkshine'), +(@ENTRY,53,5726.601,666.7487,645.8505,'Windle Sparkshine'), -- Lamp 14 +(@ENTRY,54,5736.254,665.7919,644.9579,'Windle Sparkshine'), +(@ENTRY,55,5744.996,676.1825,644.0975,'Windle Sparkshine'), +(@ENTRY,56,5744.94,681.546,644.136,'Windle Sparkshine'); -- Homeposition + +-- Conditions for spell 'Light Lamp' +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_LIGHT_LAMP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,0,@SPELL_LIGHT_LAMP,0,18,0,191444,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192086,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192085,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192084,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192087,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192089,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192088,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192067,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,191445,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192850,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192853,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192854,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192852,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192083,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,191440,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192070,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192069,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192117,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192116,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,192119,0,0,'',NULL), +(13,0,@SPELL_LIGHT_LAMP,0,18,0,191665,0,0,'',NULL); diff --git a/sql/updates/world/2012_01_23_01_world_creature_script_names.sql b/sql/updates/world/2012_01_23_01_world_creature_script_names.sql new file mode 100644 index 00000000000..d7c2b22725e --- /dev/null +++ b/sql/updates/world/2012_01_23_01_world_creature_script_names.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='npc_frost_tomb' WHERE `entry`=23965; +UPDATE `creature_template` SET `ScriptName`='npc_vrykul_skeleton' WHERE `entry`=23970; diff --git a/sql/updates/world/2012_01_23_02_world_disables.sql b/sql/updates/world/2012_01_23_02_world_disables.sql new file mode 100644 index 00000000000..0a1be704dac --- /dev/null +++ b/sql/updates/world/2012_01_23_02_world_disables.sql @@ -0,0 +1 @@ +DELETE FROM `disables` WHERE `entry`=7231 AND `sourceType`=4; diff --git a/sql/updates/world/2012_01_23_03_world_achievement_criteria_data.sql b/sql/updates/world/2012_01_23_03_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..4d1f4536455 --- /dev/null +++ b/sql/updates/world/2012_01_23_03_world_achievement_criteria_data.sql @@ -0,0 +1,3 @@ +DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=7231; +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `ScriptName`) VALUES +(7231,11,'achievement_on_the_rocks'); diff --git a/sql/updates/world/2012_01_23_04_world_creature_text.sql b/sql/updates/world/2012_01_23_04_world_creature_text.sql new file mode 100644 index 00000000000..f505a86b16c --- /dev/null +++ b/sql/updates/world/2012_01_23_04_world_creature_text.sql @@ -0,0 +1,9 @@ +DELETE FROM `script_texts` WHERE `entry` IN (-1574000,-1574001,-1574002,-1574003,-1574004); + +DELETE FROM `creature_text` WHERE `entry`=23953; +INSERT INTO `creature_text` (`entry`, `groupid`, `text`, `sound`, `emote`, `type`) VALUES +(23953,1,'Your blood is mine!',13221,7,14), +(23953,2,'Aranal, ledel! Their fate shall be yours!',13224,0,14), +(23953,3,'Not so fast.',13222,0,14), +(23953,4,'%s casts Frost Tomb on $n.',0,0,41), +(23953,5,'I join... the night.',13225,0,14); diff --git a/sql/updates/world/2012_01_23_05_world_spell_script_names.sql b/sql/updates/world/2012_01_23_05_world_spell_script_names.sql new file mode 100644 index 00000000000..6f3b4907e5b --- /dev/null +++ b/sql/updates/world/2012_01_23_05_world_spell_script_names.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=48400; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(48400,'spell_frost_tomb'); diff --git a/sql/updates/world/2012_01_23_06_world_achievement_criteria_data.sql b/sql/updates/world/2012_01_23_06_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..33899c3f512 --- /dev/null +++ b/sql/updates/world/2012_01_23_06_world_achievement_criteria_data.sql @@ -0,0 +1,3 @@ +DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=7231 AND `type`=12; +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES +(7231,12,1,0,''); diff --git a/sql/updates/world/2012_01_23_07_world_creature_text.sql b/sql/updates/world/2012_01_23_07_world_creature_text.sql new file mode 100644 index 00000000000..90ac11e363c --- /dev/null +++ b/sql/updates/world/2012_01_23_07_world_creature_text.sql @@ -0,0 +1,5 @@ +UPDATE `creature_text` SET `comment`='Prince Keleseth - SAY_DEATH' WHERE `groupid`=5 AND `entry`=23953; +UPDATE `creature_text` SET `comment`='Prince Keleseth - SAY_FROST_TOMB_EMOTE' WHERE `groupid`=4 AND `entry`=23953; +UPDATE `creature_text` SET `comment`='Prince Keleseth - SAY_FROST_TOMB' WHERE `groupid`=3 AND `entry`=23953; +UPDATE `creature_text` SET `comment`='Prince Keleseth - SAY_SUMMON_SKELETONS' WHERE `groupid`=2 AND `entry`=23953; +UPDATE `creature_text` SET `comment`='Prince Keleseth - SAY_START_COMBAT' WHERE `groupid`=1 AND `entry`=23953; diff --git a/sql/updates/world/2012_01_24_00_world_misc.sql b/sql/updates/world/2012_01_24_00_world_misc.sql new file mode 100644 index 00000000000..8703cd7aa42 --- /dev/null +++ b/sql/updates/world/2012_01_24_00_world_misc.sql @@ -0,0 +1,18 @@ +-- Make Dame Evniki Kapsalis show vendor gossip option only to players with Crusader title +UPDATE `creature_template` SET `AIName` = 'SmartAI',`ScriptName` = '' WHERE `entry` = 34885; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10598; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`COMMENT`) VALUES +(15,10598,0,0,17,2816,0,0,0,'',"Evniki Kapsalis should only sell to Crusaders"), +(15,10598,0,1,17,2817,0,0,0,'',"Evniki Kapsalis should only sell to Crusaders"); + +SET @SPELL_CHAIN = 68341; +SET @NPC_FJOLA_LIGHTBANE = 36065; +SET @NPC_EYDIS_DARKBANE = 36066; +SET @NPC_PRIESTESS_ALORAH = 36101; +SET @NPC_PRIEST_GRIMMIN = 36102; + +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` IN(@NPC_PRIESTESS_ALORAH,@NPC_PRIEST_GRIMMIN); +DELETE FROM `smart_scripts` WHERE (`entryorguid` IN(@NPC_PRIESTESS_ALORAH,@NPC_PRIEST_GRIMMIN) 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 +(@NPC_PRIESTESS_ALORAH,0,0,0,1,0,100,1,100,100,0,0,11,@SPELL_CHAIN,0,0,0,0,0,19,@NPC_EYDIS_DARKBANE,0,0,0,0,0,0,'Priestess Alorah - Cast chain on Eydis Darkbane'), +(@NPC_PRIEST_GRIMMIN,0,0,0,1,0,100,1,100,100,0,0,11,@SPELL_CHAIN,0,0,0,0,0,19,@NPC_FJOLA_LIGHTBANE,0,0,0,0,0,0,'Priestess Grimmin - Cast chain on Fjola Lightbane'); diff --git a/sql/updates/world/2012_01_24_00_world_spell_script_names.sql b/sql/updates/world/2012_01_24_00_world_spell_script_names.sql new file mode 100644 index 00000000000..0e772c3c200 --- /dev/null +++ b/sql/updates/world/2012_01_24_00_world_spell_script_names.sql @@ -0,0 +1,4 @@ +-- Scriptname for Refocus spell +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_item_refocus'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(24531,'spell_item_refocus'); diff --git a/sql/updates/world/2012_01_26_00_world_sai.sql b/sql/updates/world/2012_01_26_00_world_sai.sql new file mode 100644 index 00000000000..ee69e263e2e --- /dev/null +++ b/sql/updates/world/2012_01_26_00_world_sai.sql @@ -0,0 +1,45 @@ +-- Quest Elven Legends (7481, 7482) +-- Skeletal Remains of Kariel Winthalus SAI +SET @ENTRY := 179544; -- GO entry +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI',`ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,1,0,0,62,0,100,0,5743,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Skeletal Remains of Kariel Winthalus - On Gossip option select - run script'), +(@ENTRY,1,1,0,62,0,100,0,5743,1,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Skeletal Remains of Kariel Winthalus - On Gossip option select - run script'), +(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Skeletal Remains of Kariel Winthalus - Script - Close Gossip'), +(@ENTRY*100,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, 'Skeletal Remains of Kariel Winthalus - Script - Store target'), +(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,100,1,0,0,0,0,0,11,14368,30,0,0,0,0,0, 'Skeletal Remains of Kariel Winthalus - Script - Send target'), +(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,45,0,1,0,0,0,0,11,14368,30,0,0,0,0,0,'Skeletal Remains of Kariel Winthalus - Script - Set data 0 1 for entry 14368'), +(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,9,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Skeletal Remains of Kariel Winthalus - Script - Deactivate self'), +(@ENTRY*100,9,5,0,0,0,100,0,28000,28000,28000,28000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Skeletal Remains of Kariel Winthalus - Script - Activate self'); +-- Lorekeeper Lydros SAI +SET @ENTRY := 14368; -- NPC entry +UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,38,0,100,0,0,1,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Lorekeeper Lydros - On dataset - run script'), +(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lorekeeper Lydros - Script - set data 0 0'), +(@ENTRY*100,9,1,0,0,0,100,0,1000,1000,1000,1000,66,0,0,0,0,0,0,12,1,0,0,0,0,0,0,'Lorekeeper Lydros - Script - turn to player'), +(@ENTRY*100,9,2,0,0,0,100,0,1000,1000,1000,1000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lorekeeper Lydros - Script - Say 0'), +(@ENTRY*100,9,3,0,0,0,100,0,4000,4000,4000,4000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lorekeeper Lydros - Script - Say 1'), +(@ENTRY*100,9,4,0,0,0,100,0,8000,8000,8000,8000,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lorekeeper Lydros - Script - Say 2'), +(@ENTRY*100,9,5,0,0,0,100,0,11000,11000,11000,11000,15,7481,0,0,0,0,0,12,1,0,0,0,0,0,0,'Lorekeeper Lydros - Script - quest credit'), +(@ENTRY*100,9,6,0,0,0,100,0,0,0,0,0,15,7482,0,0,0,0,0,12,1,0,0,0,0,0,0,'Lorekeeper Lydros - Script - quest credit'), +(@ENTRY*100,9,7,0,0,0,100,0,2000,2000,2000,2000,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lorekeeper Lydros - Script - reset orientation'); +-- NPC talk text insert +DELETE FROM `creature_text` WHERE `entry`=14368; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(14368,0,0, 'I very much doubt that he will have anything to say, stranger...',12,0,100,1,0,0, 'Lorekeeper Lydros'), +(14368,1,0, 'I personally did not mind him. It was the Prince who took exception to a high elf in his domain. Alas, I am not one to question the Prince. In his defense, he did not incinerate Master Winthalus immediately.',12,0,100,1,0,0, 'Lorekeeper Lydros'), +(14368,2,0, 'We most definitely do not need anymore attention drawn to us, stranger. Return to those that sent you in search of the lost master and tell them that nothing could be found. When this is done - and I will know when it is so - return and I shall reveal the secrets of the deceased.',12,0,100,1,0,0, 'Lorekeeper Lydros'); +-- Gossip Fix from nelegalno +DELETE FROM `gossip_menu_option` WHERE `menu_id`=5743; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(5743,0,0,"Mourn the great loss.",1,1,0,0,0,0,NULL), -- A gossip +(5743,1,0,"Mourn the great loss.",1,1,0,0,0,0,NULL); -- H gossip +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId`=15 AND `SourceGroup`=5743); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,5743,0,0,9,7482,0,0,0,'',"Display gossip option when on Elven Legends A quest"), +(15,5743,1,0,9,7481,0,0,0,'',"Display gossip option when on Elven Legends H quest"); diff --git a/sql/updates/world/2012_01_27_00_world_player_factionchange_items.sql b/sql/updates/world/2012_01_27_00_world_player_factionchange_items.sql new file mode 100644 index 00000000000..1dc2749807e --- /dev/null +++ b/sql/updates/world/2012_01_27_00_world_player_factionchange_items.sql @@ -0,0 +1,4 @@ +-- DB/Faction change: Add some missing items +DELETE FROM `player_factionchange_items` WHERE `alliance_id` IN (47711) AND horde_id IN (47870); +INSERT INTO `player_factionchange_items` (`race_A`,`alliance_id`,`commentA`,`race_H`,`horde_id`,`commentH`) VALUES +(0,47711, 'Girdle of the Nether Champion',0,47870, 'Belt of the Nether Championt'); diff --git a/sql/updates/world/2012_01_28_00_world_conditions.sql b/sql/updates/world/2012_01_28_00_world_conditions.sql new file mode 100644 index 00000000000..e66d893db35 --- /dev/null +++ b/sql/updates/world/2012_01_28_00_world_conditions.sql @@ -0,0 +1,16 @@ +-- Class Condition update to use flags +UPDATE `conditions` SET `ConditionValue1`=8 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=21194 AND `ConditionTypeOrReference`=15; +UPDATE `conditions` SET `ConditionValue1`=128 WHERE `SourceTypeOrReferenceId` IN (14,15) AND`SourceGroup`=4486 AND `ConditionTypeOrReference`=15; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=20 AND `SourceEntry` IN (13104,13105) AND `ConditionTypeOrReference`=15; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(20,0,13104,1,15,1503,0,0,0,'','Show quest 13104 if player is not a Death Knight'), +(20,0,13105,1,15,32,0,0,0,'','Show quest 13105 if player is a Death Knight'); +-- Race Condition update to use flags +UPDATE `conditions` SET `ConditionValue1`=128 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24101 AND `ConditionTypeOrReference`=16; +UPDATE `conditions` SET `ConditionValue1`=32 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24102 AND `ConditionTypeOrReference`=16; +UPDATE `conditions` SET `ConditionValue1`=16 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24103 AND `ConditionTypeOrReference`=16; +UPDATE `conditions` SET `ConditionValue1`=64 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24106 AND `ConditionTypeOrReference`=16; +UPDATE `conditions` SET `ConditionValue1`=4 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24107 AND `ConditionTypeOrReference`=16; +UPDATE `conditions` SET `ConditionValue1`=8 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24108 AND `ConditionTypeOrReference`=16; +UPDATE `conditions` SET `ConditionValue1`=512 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=69530 AND `ConditionTypeOrReference`=16; +UPDATE `conditions` SET `ConditionValue1`=1024 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=69533 AND `ConditionTypeOrReference`=16; diff --git a/sql/updates/world/2012_01_29_00_world_conditions.sql b/sql/updates/world/2012_01_29_00_world_conditions.sql new file mode 100644 index 00000000000..8a04993a03e --- /dev/null +++ b/sql/updates/world/2012_01_29_00_world_conditions.sql @@ -0,0 +1 @@ +ALTER TABLE `conditions` ADD COLUMN `SourceId` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER SourceEntry; diff --git a/sql/updates/world/2012_01_29_00_world_spell_dbc.sql b/sql/updates/world/2012_01_29_00_world_spell_dbc.sql new file mode 100644 index 00000000000..bbde43e3313 --- /dev/null +++ b/sql/updates/world/2012_01_29_00_world_spell_dbc.sql @@ -0,0 +1,4 @@ +-- Gushing Wound Removal spell +DELETE FROM `spell_dbc` WHERE `id`=30023; +INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`AttributesEx6`,`AttributesEx7`,`Stances`,`StancesNot`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES +(30023,0,0,256,0,0,0,0,0,0,0,0,0,0,1,0,0,101,0,0,0,0,26,1,0,-1,0,0,164,164,164,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35321,38363,39215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,"Gushing Wound Removal"); diff --git a/sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql b/sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql new file mode 100644 index 00000000000..d31489b8fce --- /dev/null +++ b/sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_bonus_data` WHERE `entry` = 63544; +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES +(63544, -1, -1, 0, 0, 'Priest - Empowered Renew'); diff --git a/sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql b/sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql new file mode 100644 index 00000000000..13f9380c950 --- /dev/null +++ b/sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 57908 AND `spell_effect` = 57915; +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(57908,57915,0,'q13129 - Give quest item'); diff --git a/sql/updates/world/2012_01_29_03_world_misc.sql b/sql/updates/world/2012_01_29_03_world_misc.sql new file mode 100644 index 00000000000..3253b5cd55b --- /dev/null +++ b/sql/updates/world/2012_01_29_03_world_misc.sql @@ -0,0 +1,102 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` IN (26374); +INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES +(26374,'spell_gen_elune_candle'); + +-- Set Gigant Spotlight as not selectable +UPDATE `creature_template` SET `unit_flags`=33554432 WHERE `entry`=15902; + +DELETE FROM `creature_template_addon` WHERE (`entry`IN(15902,15466)); +INSERT INTO `creature_template_addon`(`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(15466,0,0,0,0,0,17327), -- Add spirit particles to Omen minions +(15902,0,0,0,0,0,50236); -- Add Spotlight aura to Gigant Spotlight (ummoned by 26392 on Omen's death) + +UPDATE `creature_template` SET `ScriptName`='npc_giant_spotlight' WHERE `entry`=15902; +UPDATE `creature_template` SET `RegenHealth`=0,`ScriptName`='npc_omen' WHERE `entry`=15467; +UPDATE `creature_template` SET `ScriptName`='npc_firework',`AIName`='',`faction_A`=35,`faction_H`=35,`unit_flags`=33555200 WHERE `entry` IN (15879,15880,15881,15882,15883,15884,15885,15886,15887,15888,15889,15890,15872,15873,15874,15875,15876,15877,15911,15912,15913,15914,15915,15916,15918); +-- Cleanup EventAI and SmartAI +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (15879,15880,15881,15882,15883,15884,15885,15886,15887,15888,15889,15890,15872,15873,15874,15875,15876,15877,15911,15912,15913,15914,15915,15916,15918); +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (15879,15880,15881,15882,15883,15884,15885,15886,15887,15888,15889,15890,15872,15873,15874,15875,15876,15877,15911,15912,15913,15914,15915,15916,15918); + +-- Update al targeting stuff for Fireworks and Rocket clusters +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (26294,26295,26333,26334,26336,26337,26338,26488,26490,26517,26521,26344,26347,26345,26348,26349,26351,26352,26354,26355,26356); +INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +-- Targeting Firework Launcher +(13,0,26294,0,18,0,180771,0,0,'',"Small White Rocket target Firework Launcher"), +(13,0,26294,0,18,0,180850,0,0,'',"Small White Rocket target Firework Launcher"), +(13,0,26294,0,18,0,180868,0,0,'',"Small White Rocket target Firework Launcher"), +(13,0,26295,0,18,0,180771,0,0,'',"Small Yellow Rocket target Firework Launcher"), +(13,0,26295,0,18,0,180850,0,0,'',"Small Yellow Rocket target Firework Launcher"), +(13,0,26295,0,18,0,180868,0,0,'',"Small Yellow Rocket target Firework Launcher"), +(13,0,26333,0,18,0,180771,0,0,'',"Large Blue Rocket target Firework Launcher"), +(13,0,26333,0,18,0,180850,0,0,'',"Large Blue Rocket target Firework Launcher"), +(13,0,26333,0,18,0,180868,0,0,'',"Large Blue Rocket target Firework Launcher"), +(13,0,26334,0,18,0,180771,0,0,'',"Large Green Rocket target Firework Launcher"), +(13,0,26334,0,18,0,180850,0,0,'',"Large Green Rocket target Firework Launcher"), +(13,0,26334,0,18,0,180868,0,0,'',"Large Green Rocket target Firework Launcher"), +(13,0,26336,0,18,0,180771,0,0,'',"Large Red Rocket target Firework Launcher"), +(13,0,26336,0,18,0,180850,0,0,'',"Large Red Rocket target Firework Launcher"), +(13,0,26336,0,18,0,180868,0,0,'',"Large Red Rocket target Firework Launcher"), +(13,0,26337,0,18,0,180771,0,0,'',"Large White Rocket target Firework Launcher"), +(13,0,26337,0,18,0,180850,0,0,'',"Large White Rocket target Firework Launcher"), +(13,0,26337,0,18,0,180868,0,0,'',"Large White Rocket target Firework Launcher"), +(13,0,26338,0,18,0,180771,0,0,'',"Large Yellow Rocket target Firework Launcher"), +(13,0,26338,0,18,0,180850,0,0,'',"Large Yellow Rocket target Firework Launcher"), +(13,0,26338,0,18,0,180868,0,0,'',"Large Yellow Rocket target Firework Launcher"), +-- Targeting Cluster Launcher +(13,0,26488,0,18,0,180772,0,0,'',"Large Blue Rocket Cluster target Cluster Launcher"), +(13,0,26488,0,18,0,180859,0,0,'',"Large Blue Rocket Cluster target Cluster Launcher"), +(13,0,26488,0,18,0,180869,0,0,'',"Large Blue Rocket Cluster target Cluster Launcher"), +(13,0,26488,0,18,0,180874,0,0,'',"Large Blue Rocket Cluster target Cluster Launcher"), +(13,0,26490,0,18,0,180772,0,0,'',"Large Green Rocket Cluster target Cluster Launcher"), +(13,0,26490,0,18,0,180859,0,0,'',"Large Green Rocket Cluster target Cluster Launcher"), +(13,0,26490,0,18,0,180869,0,0,'',"Large Green Rocket Cluster target Cluster Launcher"), +(13,0,26490,0,18,0,180874,0,0,'',"Large Green Rocket Cluster target Cluster Launcher"), +(13,0,26517,0,18,0,180772,0,0,'',"Large Red Rocket Cluster target Cluster Launcher"), +(13,0,26517,0,18,0,180859,0,0,'',"Large Red Rocket Cluster target Cluster Launcher"), +(13,0,26517,0,18,0,180869,0,0,'',"Large Red Rocket Cluster target Cluster Launcher"), +(13,0,26517,0,18,0,180874,0,0,'',"Large Red Rocket Cluster target Cluster Launcher"), +(13,0,26521,0,18,0,180772,0,0,'',"Lucky Lunar rocket Cluster target Cluster Launcher"), +(13,0,26521,0,18,0,180859,0,0,'',"Lucky Lunar rocket Cluster target Cluster Launcher"), +(13,0,26521,0,18,0,180869,0,0,'',"Lucky Lunar rocket Cluster target Cluster Launcher"), +(13,0,26521,0,18,0,180874,0,0,'',"Lucky Lunar rocket Cluster target Cluster Launcher"), +-- Targeting Firework Launcher (Again) +(13,0,26347,0,18,0,180771,0,0,'',"Rocket, RED target Firework Launcher"), +(13,0,26347,0,18,0,180850,0,0,'',"Rocket, RED target Firework Launcher"), +(13,0,26347,0,18,0,180868,0,0,'',"Rocket, RED target Firework Launcher"), +(13,0,26344,0,18,0,180771,0,0,'',"Rocket, BLUE target Firework Launcher"), +(13,0,26344,0,18,0,180850,0,0,'',"Rocket, BLUE target Firework Launcher"), +(13,0,26344,0,18,0,180868,0,0,'',"Rocket, BLUE target Firework Launcher"), +(13,0,26345,0,18,0,180771,0,0,'',"Rocket, GREEEN target Firework Launcher"), +(13,0,26345,0,18,0,180850,0,0,'',"Rocket, GREEEN target Firework Launcher"), +(13,0,26345,0,18,0,180868,0,0,'',"Rocket, GREEEN target Firework Launcher"), +(13,0,26348,0,18,0,180771,0,0,'',"Rocket, WHITE target Firework Launcher"), +(13,0,26348,0,18,0,180850,0,0,'',"Rocket, WHITE target Firework Launcher"), +(13,0,26348,0,18,0,180868,0,0,'',"Rocket, WHITE target Firework Launcher"), +(13,0,26349,0,18,0,180771,0,0,'',"Rocket, YELLOW target Firework Launcher"), +(13,0,26349,0,18,0,180850,0,0,'',"Rocket, YELLOW target Firework Launcher"), +(13,0,26349,0,18,0,180868,0,0,'',"Rocket, YELLOW target Firework Launcher"), +(13,0,26351,0,18,0,180771,0,0,'',"Rocket, BLUE BIG target Firework Launcher"), +(13,0,26351,0,18,0,180850,0,0,'',"Rocket, BLUE BIG target Firework Launcher"), +(13,0,26351,0,18,0,180868,0,0,'',"Rocket, BLUE BIG target Firework Launcher"), +(13,0,26352,0,18,0,180771,0,0,'',"Rocket, GREEN BIG target Firework Launcher"), +(13,0,26352,0,18,0,180850,0,0,'',"Rocket, GREEN BIG target Firework Launcher"), +(13,0,26352,0,18,0,180868,0,0,'',"Rocket, GREEN BIG target Firework Launcher"), +(13,0,26354,0,18,0,180771,0,0,'',"Rocket, RED BIG target Firework Launcher"), +(13,0,26354,0,18,0,180850,0,0,'',"Rocket, RED BIG target Firework Launcher"), +(13,0,26354,0,18,0,180868,0,0,'',"Rocket, RED BIG target Firework Launcher"), +(13,0,26355,0,18,0,180771,0,0,'',"Rocket, WHITE BIG target Firework Launcher"), +(13,0,26355,0,18,0,180850,0,0,'',"Rocket, WHITE BIG target Firework Launcher"), +(13,0,26355,0,18,0,180868,0,0,'',"Rocket, WHITE BIG target Firework Launcher"), +(13,0,26356,0,18,0,180771,0,0,'',"Rocket, YELLOW BIG target Firework Launcher"), +(13,0,26356,0,18,0,180850,0,0,'',"Rocket, YELLOW BIG target Firework Launcher"), +(13,0,26356,0,18,0,180868,0,0,'',"Rocket, YELLOW BIG target Firework Launcher"); + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=15466; +DELETE FROM `smart_scripts` WHERE (`entryorguid`=15466 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 +(15466,0,0,0,8,0,100,0,26636,0,8000,9000,11,25495,0,0,0,0,0,1,0,0,0,0,0,0,0,"Minion of Omen - Cast Firework Dazzled when hitted by Elune's Candle firework"); + +-- Cast quest credit spell when getting Elune's Blessing buff +DELETE FROM `spell_scripts` WHERE `id`=26393; +INSERT INTO `spell_scripts`(`id`,`effIndex`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES +(26393,1,0,15,26394,2,0,0,0,0,0); diff --git a/sql/updates/world/2012_01_29_04_world_misc.sql b/sql/updates/world/2012_01_29_04_world_misc.sql new file mode 100644 index 00000000000..3686957e433 --- /dev/null +++ b/sql/updates/world/2012_01_29_04_world_misc.sql @@ -0,0 +1,116 @@ +-- remove aura_required for clickspells on tournament mounts and add more cases (Thanks to @Tassader) +DELETE FROM `npc_spellclick_spells` WHERE npc_entry IN (33842,33796,33798,33791,33792,33799,33843,33800,33795,33790,33793,33794); +INSERT INTO `npc_spellclick_spells`(`npc_entry`,`spell_id`,`quest_start`,`quest_start_active`,`quest_end`,`cast_flags`,`aura_required`,`aura_forbidden`,`user_type`) VALUES +(33842,63791,13668,0,13687,1,0,0,0),-- Aspirant +(33799,62783,13691,0,0,1,0,0,0),-- A Valiant Of Orgrimmar +(33799,62783,13707,0,0,1,0,0,0),-- Valiant Of Orgrimmar +(33796,62784,13693,0,0,1,0,0,0),-- A Valiant Of Sen'jin +(33796,62784,13708,0,0,1,0,0,0),-- Valiant Of Sen'jin +(33792,62785,13694,0,0,1,0,0,0),-- A Valiant Of Thunder Bluff +(33792,62785,13709,0,0,1,0,0,0),-- Valiant Of Thunder Bluff +(33791,62786,13696,0,0,1,0,0,0),-- A Valiant Of Silvermoon +(33791,62786,13711,0,0,1,0,0,0),-- Valiant Of Silvermoon +(33798,62787,13695,0,0,1,0,0,0),-- A Valiant Of Undercity +(33798,62787,13710,0,0,1,0,0,0), -- Valiant Of Undercity +(33843,63792,13667,0,13686,1,0,0,0),-- Aspirant +(33800,62774,13593,0,0,1,0,0,0),-- A Valiant Of Stormwind +(33800,62774,13684,0,0,1,0,0,0),-- Valiant Of Stormwind +(33795,62779,13685,0,0,1,0,0,0),-- A Valiant Of Ironforge +(33795,62779,13703,0,0,1,0,0,0),-- Valiant Of Ironforge +(33793,62780,13688,0,0,1,0,0,0),-- A Valiant Of Gnomregan +(33793,62780,13704,0,0,1,0,0,0),-- Valiant Of Gnomregan +(33790,62781,13690,0,0,1,0,0,0),-- A Valiant Of Exodar +(33790,62781,13705,0,0,1,0,0,0),-- Valiant Of Exodar +(33794,62782,13689,0,0,1,0,0,0),-- A Valiant Of Darnassus +(33794,62782,13706,0,0,1,0,0,0); -- Valiant Of Darnassus +UPDATE `npc_spellclick_spells` SET `aura_required`=0 WHERE `aura_required`=62853; + +-- Break-Shield spells +DELETE FROM `spell_script_names` WHERE `spell_id` IN (62575,62626,64342,64507,64590,64595,64686,65147,66480,68504); +-- Charge spells +DELETE FROM `spell_script_names` WHERE `spell_id` IN (62874,62960,63661,62563,63003,63010,64591,66481,68282,68284,68321,68498,68501); +-- Defend spells +DELETE FROM `spell_script_names` WHERE `spell_id` IN (62552,62719,66482); +-- Pennant and summon spells +DELETE FROM `spell_script_names` WHERE `spell_id` IN (62863,63034,62774,62779,62780,62781,62782,62783,62784,62785,62786,62787,63663,63791,63792,62595,62596,62594,63394,63395,63396,63397,63398,63401,63402,63403,63404,63405,63406,63421,63422,63423,63425,63426,63427,63428,63429,63430,63431,63432,63433,63434,63435,63436,63606,63500,63501,63607,63608,63609); +INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES +(62575,'spell_gen_break_shield'), +(62626,'spell_gen_break_shield'), +(64342,'spell_gen_break_shield'), +(64507,'spell_gen_break_shield'), +(64590,'spell_gen_break_shield'), +(64595,'spell_gen_break_shield'), +(64686,'spell_gen_break_shield'), +(65147,'spell_gen_break_shield'), +(66480,'spell_gen_break_shield'), +(68504,'spell_gen_break_shield'), +(62874,'spell_gen_mounted_charge'), +(62960,'spell_gen_mounted_charge'), +(63661,'spell_gen_mounted_charge'), +(62563,'spell_gen_mounted_charge'), +(63003,'spell_gen_mounted_charge'), +(63010,'spell_gen_mounted_charge'), +(64591,'spell_gen_mounted_charge'), +(66481,'spell_gen_mounted_charge'), +(68282,'spell_gen_mounted_charge'), +(68284,'spell_gen_mounted_charge'), +(68321,'spell_gen_mounted_charge'), +(68498,'spell_gen_mounted_charge'), +(68501,'spell_gen_mounted_charge'), +(62552,'spell_gen_defend'), +(62719,'spell_gen_defend'), +(66482,'spell_gen_defend'), +(62863 ,'spell_gen_tournament_duel'), +(63034,'spell_gen_on_tournament_mount'), +(62595,'spell_gen_tournament_pennant'), +(62596,'spell_gen_tournament_pennant'), +(62594,'spell_gen_tournament_pennant'), +(63394,'spell_gen_tournament_pennant'), +(63395,'spell_gen_tournament_pennant'), +(63396,'spell_gen_tournament_pennant'), +(63397,'spell_gen_tournament_pennant'), +(63398,'spell_gen_tournament_pennant'), +(63401,'spell_gen_tournament_pennant'), +(63402,'spell_gen_tournament_pennant'), +(63403,'spell_gen_tournament_pennant'), +(63404,'spell_gen_tournament_pennant'), +(63405,'spell_gen_tournament_pennant'), +(63406,'spell_gen_tournament_pennant'), +(63421,'spell_gen_tournament_pennant'), +(63422,'spell_gen_tournament_pennant'), +(63423,'spell_gen_tournament_pennant'), +(63425,'spell_gen_tournament_pennant'), +(63426,'spell_gen_tournament_pennant'), +(63427,'spell_gen_tournament_pennant'), +(63428,'spell_gen_tournament_pennant'), +(63429,'spell_gen_tournament_pennant'), +(63430,'spell_gen_tournament_pennant'), +(63431,'spell_gen_tournament_pennant'), +(63432,'spell_gen_tournament_pennant'), +(63433,'spell_gen_tournament_pennant'), +(63434,'spell_gen_tournament_pennant'), +(63435,'spell_gen_tournament_pennant'), +(63436,'spell_gen_tournament_pennant'), +(63606,'spell_gen_tournament_pennant'), +(63500,'spell_gen_tournament_pennant'), +(63501,'spell_gen_tournament_pennant'), +(63607,'spell_gen_tournament_pennant'), +(63608,'spell_gen_tournament_pennant'), +(63609,'spell_gen_tournament_pennant'), +(62774,'spell_gen_summon_tournament_mount'), +(62779,'spell_gen_summon_tournament_mount'), +(62780,'spell_gen_summon_tournament_mount'), +(62781,'spell_gen_summon_tournament_mount'), +(62782,'spell_gen_summon_tournament_mount'), +(62783,'spell_gen_summon_tournament_mount'), +(62784,'spell_gen_summon_tournament_mount'), +(62785,'spell_gen_summon_tournament_mount'), +(62786,'spell_gen_summon_tournament_mount'), +(62787,'spell_gen_summon_tournament_mount'), +(63663,'spell_gen_summon_tournament_mount'), +(63791,'spell_gen_summon_tournament_mount'), +(63792,'spell_gen_summon_tournament_mount'); + +DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=9798 AND `type`=11; +INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES +(9798,11,0,0, 'achievement_tilted'); diff --git a/sql/updates/world/2012_01_30_00_world_conditions.sql b/sql/updates/world/2012_01_30_00_world_conditions.sql new file mode 100644 index 00000000000..48b9c63b5cb --- /dev/null +++ b/sql/updates/world/2012_01_30_00_world_conditions.sql @@ -0,0 +1,3 @@ +ALTER TABLE `conditions` CHANGE `SourceId` `SourceId` INT(10) NOT NULL DEFAULT '0'; +ALTER TABLE `conditions` DROP PRIMARY KEY, + ADD PRIMARY KEY (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`); diff --git a/sql/updates/world/2012_01_30_01_world_conditions.sql b/sql/updates/world/2012_01_30_01_world_conditions.sql new file mode 100644 index 00000000000..bcaf0af435a --- /dev/null +++ b/sql/updates/world/2012_01_30_01_world_conditions.sql @@ -0,0 +1,3 @@ +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=72618; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,0,72618,0,0,18,1,0,0,0, '', 'Mutated Plague Clear - target players'); diff --git a/sql/updates/world/2012_01_30_01_world_spell_script_names.sql b/sql/updates/world/2012_01_30_01_world_spell_script_names.sql new file mode 100644 index 00000000000..6e4b10094e5 --- /dev/null +++ b/sql/updates/world/2012_01_30_01_world_spell_script_names.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_putricide_clear_mutated_plague'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(72618,'spell_putricide_clear_mutated_plague'); diff --git a/sql/updates/world/2012_01_30_02_world_creature_loot_template.sql b/sql/updates/world/2012_01_30_02_world_creature_loot_template.sql new file mode 100644 index 00000000000..429d470a77f --- /dev/null +++ b/sql/updates/world/2012_01_30_02_world_creature_loot_template.sql @@ -0,0 +1 @@ +UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=-100 WHERE `entry`=15571 AND `item`=21137; diff --git a/sql/updates/world/2012_01_30_03_world_creature_loot_template.sql b/sql/updates/world/2012_01_30_03_world_creature_loot_template.sql new file mode 100644 index 00000000000..531c472c263 --- /dev/null +++ b/sql/updates/world/2012_01_30_03_world_creature_loot_template.sql @@ -0,0 +1,2 @@ +-- Set 25 Heroic loot to 68% +UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=68 WHERE `entry`=38586 AND `item`= 50274; diff --git a/sql/updates/world/2012_01_30_04_world_gameobject_loot_template.sql b/sql/updates/world/2012_01_30_04_world_gameobject_loot_template.sql new file mode 100644 index 00000000000..3ef39fe43d2 --- /dev/null +++ b/sql/updates/world/2012_01_30_04_world_gameobject_loot_template.sql @@ -0,0 +1,14 @@ +SET @ITEM :=50274; +DELETE FROM `gameobject_loot_template` WHERE `entry` IN (28074,28088,28082,28096) AND `item`=@ITEM; +INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +(28074,@ITEM,-38,1,0,1,1), -- Deathbringer Cache 25 Normal +(28088,@ITEM,-68,1,0,1,1), -- Deathbringer Cache 25 Heroic +(28082,@ITEM,-38,1,0,1,1), -- Cache of the Dreamwalker 25 Normal +(28096,@ITEM,-68,1,0,1,1); -- Cache of the Dreamwalker 25 Heroic +-- only drop if someone is on the quest (negative ChanceOrQuestChance) +UPDATE `creature_loot_template` SET `ChanceOrQuestChance`= -(ABS(`ChanceOrQuestChance`)) WHERE `item`=50274; +UPDATE `gameobject_loot_template` SET `ChanceOrQuestChance`= -(ABS(`ChanceOrQuestChance`)) WHERE `item`=50274; + +-- Dreamwalker and Council should drop 3 items +UPDATE `gameobject_loot_template` SET `maxcount`=3 WHERE `entry`IN (28052,28082,28064,28096) AND `item`=1; +UPDATE `creature_loot_template` SET `maxcount`=3 WHERE `entry` IN (37970,38401,38784,38785) AND `item`=1; diff --git a/sql/updates/world/2012_01_30_05_world_gameobject_loot_template.sql b/sql/updates/world/2012_01_30_05_world_gameobject_loot_template.sql new file mode 100644 index 00000000000..8196663eebe --- /dev/null +++ b/sql/updates/world/2012_01_30_05_world_gameobject_loot_template.sql @@ -0,0 +1,94 @@ +SET @ThoriumGems = 12900; +DELETE FROM `reference_loot_template` WHERE `entry` IN (@ThoriumGems,12901,12902,12903,12904,12905,12906,12907,12908); +INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +-- ThoriumGems +(@ThoriumGems,12363,40,1,1,1,1), -- Arcane Crystal +(@ThoriumGems, 7910,12,1,1,1,1), -- Star Ruby +(@ThoriumGems,12800,12,1,1,1,1), -- Azerothian Diamond +(@ThoriumGems,12361,12,1,1,1,1), -- Blue Sapphire +(@ThoriumGems,12364,12,1,1,1,1), -- Huge Emerald +(@ThoriumGems,12799,12,1,1,1,1); -- Large Opal + +SET @Copper := 1502; +SET @Tin := 1503; +SET @Silver := 1504; +SET @Iron := 1505; +SET @Gold :=1506; +SET @Mithril :=1742; +SET @Truesilver := 5045; +SET @SmallThorium := 9597; +SET @RichThorium := 12883; + +DELETE FROM `gameobject_loot_template` WHERE `entry` IN (@Copper,@Tin,@Silver,@Iron,@Gold,@Mithril,@Truesilver,@SmallThorium,@RichThorium,17938,13960,17241); +INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +-- Copper Vein +(@Copper,2770,100,1,0,1,9), -- Copper Ore +(@Copper,2835, 25,1,0,1,11), -- Rough Stone +(@Copper,774 ,5,1,1,1,1), -- Malachite +(@Copper,1210,5,1,1,1,1), -- Shadowgem +(@Copper,818 ,5,1,1,1,1), -- Tigerseye +(@Copper,22634,-100,1,0,1,2), -- Underlight Ore (only on quest) +-- Tin Vein +(@Tin,2771,100,1,0,1,9), -- Tin Ore +(@Tin,2836,25,1,0,1,13), -- Coarse Stone +(@Tin,1206,5,1,1,1,1), -- Moss Agate +(@Tin,1705,5,1,1,1,1), -- Lesser Moonstone +(@Tin,1210,5,1,1,1,1), -- Shadowgem +(@Tin,1529,5,1,1,1,1), -- Jade +(@Tin,2798,-100,1,0,1,2), -- Rethban Ore (only on quest) +(@Tin,22634,-100,1,0,1,2), -- Underlight Ore (only on quest) +-- Silver Vein +(@Silver,2775,100,1,0,2,8), -- Silver Ore +(@Silver,1206,5,1,1,1,1), -- Moss Agate +(@Silver,1705,5,1,1,1,1), -- Lesser Moonstone +(@Silver,1210,5,1,1,1,1), -- Shadowgem +-- Iron Deposit +(@Iron,2772,100,1,0,2,9), -- Iron Ore +(@Iron,2838,100,1,0,2,10), -- Heavy Stone +(@Iron,1529,5,1,1,1,1), -- Jade +(@Iron,3864,5,1,1,1,1), -- Citrine +(@Iron,1705,5,1,1,1,1), -- Lesser Moonstone +(@Iron,7909,5,1,1,1,1), -- Aquamarine +-- Gold Vein +(@Gold,2776,100,1,0,2,8), -- Gold Ore +(@Gold,3864,5,1,1,1,1), -- Citrine +(@Gold,1705,5,1,1,1,1), -- Lesser Moonstone +(@Gold,7909,5,1,1,1,1), -- Aquamarine +-- Mithril Deposit +(@Mithril,3858,100,1,0,1,9), -- Mithril Ore +(@Mithril,7912,80,1,0,1,13), -- Solid Stone +(@Mithril,7909,5,1,1,1,1), -- Aquamarine +(@Mithril,3864,5,1,1,1,1), -- Citrine +(@Mithril,7910,5,1,1,1,1), -- Star Ruby +(@Mithril,9262,5,1,1,1,1), -- Black Vitriol +-- Truesilver Deposit +(@Truesilver,7911,100,1,0,2,8), -- Truesilver Ore +(@Truesilver,7909,5,1,1,1,1), -- Aquamarine +(@Truesilver,3864,5,1,1,1,1), -- Citrine +(@Truesilver,7910,5,1,1,1,1), -- Star Ruby +-- Small Thorium Vein +(@SmallThorium,10620,100,1,0,1,8), -- Thorium Ore +(@SmallThorium,12365,100,1,0,1,10), -- Dense Stone +(@SmallThorium,1,15,1,0,-@ThoriumGems,1), -- One From Gems +-- Rich Thorium Vein +(@RichThorium,10620,100,1,0,3,10), -- Thorium Ore +(@RichThorium,12365,100,1,0,4,12), -- Dense Stone +(@RichThorium,1,25,1,0,-@ThoriumGems,1), -- One From Gems +-- Special Cases: +-- Truesilver Vein+Tainted Vitriol +(17938,7911,100,1,0,2,8), -- Truesilver Ore +(17938,7909,5,1,1,1,1), -- Aquamarine +(17938,3864,5,1,1,1,1), -- Citrine +(17938,7910,5,1,1,1,1), -- Star Ruby +(17938,11513,50,1,0,1,1), -- Tainted Vitriol +-- Small Thorium Vein+Tainted Vitriol +(13960,10620,100,1,0,1,8), -- Thorium Ore +(13960,12365,100,1,0,1,10), -- Dense Stone +(13960,1,15,1,0,-@ThoriumGems,1), -- One From Gems +(13960,11513,50,1,0,1,1), -- Tainted Vitriol +-- Hakkari Thorium Vein +(17241,10620,100,1,0,1,8), -- Thorium Ore +(17241,12365,100,1,0,1,10), -- Dense Stone +(17241,1,15,1,0,-@ThoriumGems,1), -- One From Gems +(17241,19774,40,1,0,5,10); -- Souldarite + diff --git a/sql/updates/world/2012_01_31_00_world_gameobject_loot_template.sql b/sql/updates/world/2012_01_31_00_world_gameobject_loot_template.sql new file mode 100644 index 00000000000..91f26990488 --- /dev/null +++ b/sql/updates/world/2012_01_31_00_world_gameobject_loot_template.sql @@ -0,0 +1,136 @@ +-- Change all Copper Ore Nodes in the Underlight Mines to be other id +UPDATE `gameobject` SET `id`=181248 WHERE `guid` IN (75024,75051,75090,75099,75105) AND `id`=1731; +-- Same for the Tin Nodes in the Underlight Mines +UPDATE `gameobject` SET `id`=181249 WHERE `guid` IN (75025,75052,75091,75100,75106) AND `id`=1732; + +-- Change all Copper Ore Nodes in Beal Modan to match the other id +UPDATE `gameobject` SET `id`=103713 WHERE `guid` IN (5096,13067,120336) AND `id` IN (1731,3763); + +-- fix wrongly increased counts (aka cata guildperk changed data) +-- Copper +UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=1502 AND `item`=2770; +UPDATE `gameobject_loot_template` SET `maxcount`=6 WHERE `entry`=1502 AND `item`=2835; +-- Tin +UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=1503 AND `item`=2771; +UPDATE `gameobject_loot_template` SET `maxcount`=7 WHERE `entry`=1503 AND `item`=2836; +-- Silver +UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=1504 AND `item`=2775; +UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=1504 AND `item`=2775; +-- Iron +UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=1505 AND `item`=2772; +UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=1505 AND `item`=2772; +UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=1505 AND `item`=2838; +UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=1505 AND `item`=2838; +-- Gold +UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=1506 AND `item`=2776; +UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=1506 AND `item`=2776; +-- Mithril +UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=1742 AND `item`=3858; +UPDATE `gameobject_loot_template` SET `maxcount`=7 WHERE `entry`=1742 AND `item`=7912; +-- Truesilver +UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=5045 AND `item`=7911; +UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=5045 AND `item`=7911; +-- Small Thorium +UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=9597 AND `item`=10620; +UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=9597 AND `item`=10620; +UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=9597 AND `item`=12365; +-- Rich Thorium +UPDATE `gameobject_loot_template` SET `mincountOrRef`=2 WHERE `entry`=12883 AND `item`=10620; +UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=12883 AND `item`=10620; +UPDATE `gameobject_loot_template` SET `mincountOrRef`=2 WHERE `entry`=12883 AND `item`=12365; +UPDATE `gameobject_loot_template` SET `maxcount`=6 WHERE `entry`=12883 AND `item`=12365; + +-- Remove Underlight Ore from all other copper ore nodes: +DELETE FROM `gameobject_loot_template` WHERE `item`=22634; -- Underlight Ore +DELETE FROM `gameobject_loot_template` WHERE `item`=2798; -- Rethban Ore +DELETE FROM `gameobject_loot_template` WHERE `item`=11513; -- Tainted Vitriol + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=4 AND `SourceGroup`=17939 AND `SourceEntry`=11513; + +-- Set LootIDvariables for Special Nodes +SET @CopperUM := 18092; +SET @TinUM := 18093; +SET @CopperRR := 1735; +SET @TinRR := 1736; +SET @CopperB := 2626; +SET @TinB := 2627; +SET @GoldOoze := 17939; +SET @MithrilFW := 13961; +SET @TruesilverFW := 17938; +SET @ThoriumFW := 13960; +SET @ThoriumGems = 12900; + +DELETE FROM `gameobject_loot_template` WHERE `entry` IN (@CopperUM,@CopperRR,@TinUM,@TinRR,@CopperB,@TinB,@GoldOoze,@MithrilFW,@TruesilverFW,@ThoriumFW); +INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +-- Underlight Mine Special Nodes +(@CopperUM,2770,100,1,0,1,5), -- Copper Ore +(@CopperUM,2835, 25,1,0,1,6), -- Rough Stone +(@CopperUM,774 ,5,1,1,1,1), -- Malachite +(@CopperUM,1210,5,1,1,1,1), -- Shadowgem +(@CopperUM,818 ,5,1,1,1,1), -- Tigerseye +(@CopperUM,22634,-100,1,0,1,2), -- Underlight Ore (only if on quest) +-- Chanced Tin also have to drop it +(@TinUM,2771,100,1,0,1,5), -- Tin Ore +(@TinUM,2836,25,1,0,1,7), -- Coarse Stone +(@TinUM,1206,5,1,1,1,1), -- Moss Agate +(@TinUM,1705,5,1,1,1,1), -- Lesser Moonstone +(@TinUM,1210,5,1,1,1,1), -- Shadowgem +(@TinUM,1529,5,1,1,1,1), -- Jade +(@TinUM,22634,-100,1,0,1,2), -- Underlight Ore (only on quest) +-- Redridge Special Nodes +(@CopperRR,2770,100,1,0,1,5), -- Copper Ore +(@CopperRR,2835, 25,1,0,1,6), -- Rough Stone +(@CopperRR,774 ,5,1,1,1,1), -- Malachite +(@CopperRR,1210,5,1,1,1,1), -- Shadowgem +(@CopperRR,818 ,5,1,1,1,1), -- Tigerseye +(@CopperRR,2798,-100,1,0,1,4), -- Rethban Ore +-- Chanced Tin also have to drop it +(@TinRR,2771,100,1,0,1,5), -- Tin Ore +(@TinRR,2836,25,1,0,1,7), -- Coarse Stone +(@TinRR,1206,5,1,1,1,1), -- Moss Agate +(@TinRR,1705,5,1,1,1,1), -- Lesser Moonstone +(@TinRR,1210,5,1,1,1,1), -- Shadowgem +(@TinRR,1529,5,1,1,1,1), -- Jade +(@TinRR,2798,-100,1,0,1,2), -- Rethban Ore (only on quest) +-- The Barrens Copper Vein contain Blood Shards +(@CopperB,2770,100,1,0,1,5), -- Copper Ore +(@CopperB,2835, 25,1,0,1,6), -- Rough Stone +(@CopperB,774 ,5,1,1,1,1), -- Malachite +(@CopperB,1210,5,1,1,1,1), -- Shadowgem +(@CopperB,818 ,5,1,1,1,1), -- Tigerseye +(@CopperB,5075,5,1,1,1,3), -- Blood Shard (only in barrens) +-- Chanced Tin also have to drop it +(@TinB,2771,100,1,0,1,5), -- Tin Ore +(@TinB,2836,25,1,0,1,7), -- Coarse Stone +(@TinB,1206,5,1,1,1,1), -- Moss Agate +(@TinB,1705,5,1,1,1,1), -- Lesser Moonstone +(@TinB,1210,5,1,1,1,1), -- Shadowgem +(@TinB,1529,5,1,1,1,1), -- Jade +(@TinB,5075,5,1,1,1,4), -- Blood Shard (only in barrens ?) +-- Ooze Covered Gold Vein +(@GoldOoze,2776,100,1,0,2,4), -- Gold Ore +(@GoldOoze,3864,5,1,1,1,1), -- Citrine +(@GoldOoze,1705,5,1,1,1,1), -- Lesser Moonstone +(@GoldOoze,7909,5,1,1,1,1), -- Aquamarine +-- Felwood Mithril Vein +(@MithrilFW,3858,100,1,0,1,5), -- Mithril Ore +(@MithrilFW,7912,80,1,0,1,7), -- Solid Stone +(@MithrilFW,7909,5,1,1,1,1), -- Aquamarine +(@MithrilFW,3864,5,1,1,1,1), -- Citrine +(@MithrilFW,7910,5,1,1,1,1), -- Star Ruby +(@MithrilFW,9262,5,1,1,1,1), -- Black Vitriol +(@MithrilFW,11513,25,1,0,1,4), -- Tainted Vitriol +-- Chanced Truesilver also needs it +(@TruesilverFW,7911,100,1,0,1,4), -- Truesilver Ore +(@TruesilverFW,7909,5,1,1,1,1), -- Aquamarine +(@TruesilverFW,3864,5,1,1,1,1), -- Citrine +(@TruesilverFW,7910,5,1,1,1,1), -- Star Ruby +(@TruesilverFW,11513,25,1,0,1,4), -- Tainted Vitriol +-- Chance Thoriuym also needs it +-- Small Thorium Vein+Tainted Vitriol +(@ThoriumFW,10620,100,1,0,1,8), -- Thorium Ore +(@ThoriumFW,12365,100,1,0,1,10), -- Dense Stone +(@ThoriumFW,1,15,1,0,-@ThoriumGems,1), -- One From Gems +(@ThoriumFW,11513,50,1,0,1,1); -- Tainted Vitriol + + diff --git a/sql/updates/world/2012_01_31_01_world_misc.sql b/sql/updates/world/2012_01_31_01_world_misc.sql new file mode 100644 index 00000000000..c359f186431 --- /dev/null +++ b/sql/updates/world/2012_01_31_01_world_misc.sql @@ -0,0 +1,8 @@ +-- Delete the criteria from the disables table +DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=3880; + +-- criteria data for achievement Not So Fast +DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=3880; +INSERT INTO `achievement_criteria_data` (`criteria_id`, `TYPE`, `value1`, `value2`, `ScriptName`) VALUES +(3880,6,3277,0, ''), +(3880,7,23451,0, ''); diff --git a/sql/updates/world/2012_02_01_00_world_misc.sql b/sql/updates/world/2012_02_01_00_world_misc.sql new file mode 100644 index 00000000000..e137f7a8238 --- /dev/null +++ b/sql/updates/world/2012_02_01_00_world_misc.sql @@ -0,0 +1,5 @@ +DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=9798 AND `type`=6; + +DELETE FROM `spell_script_names` WHERE `spell_id`=63399; +INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES +(63399, 'spell_gen_tournament_pennant'); diff --git a/sql/updates/world/2012_02_02_00_world_item_loot_template.sql b/sql/updates/world/2012_02_02_00_world_item_loot_template.sql new file mode 100644 index 00000000000..4223835bee3 --- /dev/null +++ b/sql/updates/world/2012_02_02_00_world_item_loot_template.sql @@ -0,0 +1,60 @@ +-- Update reference for hallowed end +SET @Ref := 10020; +DELETE FROM `reference_loot_template` WHERE `entry` IN (@Ref,10021); +INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +-- Masks +(@Ref,20391,2,1,0,1,1), -- Flimsy Male Gnome Mask +(@Ref,20392,2,1,0,1,1), -- Flimsy Female Gnome Mask +(@Ref,20561,2,1,0,1,1), -- Flimsy Male Dwarf Mask +(@Ref,20562,2,1,0,1,1), -- Flimsy Female Dwarf Mask +(@Ref,20563,2,1,0,1,1), -- Flimsy Female Night Elf Mask +(@Ref,20564,2,1,0,1,1), -- Flimsy Male Night Elf Mask +(@Ref,20565,2,1,0,1,1), -- Flimsy Female Human Mask +(@Ref,20566,2,1,0,1,1), -- Flimsy Male Human Mask +(@Ref,20567,2,1,0,1,1), -- Flimsy Female Troll Mask +(@Ref,20568,2,1,0,1,1), -- Flimsy Male Troll Mask +(@Ref,20569,2,1,0,1,1), -- Flimsy Female Orc Mask +(@Ref,20570,2,1,0,1,1), -- Flimsy Male Orc Mask +(@Ref,20571,2,1,0,1,1), -- Flimsy Female Tauren Mask +(@Ref,20572,2,1,0,1,1), -- Flimsy Male Tauren Mask +(@Ref,20573,2,1,0,1,1), -- Flimsy Male Undead Mask +(@Ref,20574,2,1,0,1,1), -- Flimsy Female Undead Mask +(@Ref,34000,2,1,0,1,1), -- Flimsy Female Blood Elf Mask +(@Ref,34001,2,1,0,1,1), -- Flimsy Female Draenei Mask +(@Ref,34002,2,1,0,1,1), -- Flimsy Male Blood Elf Mask +(@Ref,34003,2,1,0,1,1), -- Flimsy Male Draenei Mask +-- Wands +(@Ref,20397,2,1,0,1,1), -- Hallowed Wand - Pirate +(@Ref,20398,2,1,0,1,1), -- Hallowed Wand - Ninja +(@Ref,20399,2,1,0,1,1), -- Hallowed Wand - Leper Gnome +(@Ref,20409,2,1,0,1,1), -- Hallowed Wand - Ghost +(@Ref,20410,2,1,0,1,1), -- Hallowed Wand - Bat +(@Ref,20411,2,1,0,1,1), -- Hallowed Wand - Skeleton +(@Ref,20413,2,1,0,1,1), -- Hallowed Wand - Random +(@Ref,20414,2,1,0,1,1), -- Hallowed Wand - Wisp +-- Pets +(@Ref,33154,5,1,0,1,1), -- Sinister Squashling +(@Ref,33292,5,1,0,1,1), -- Hallowed Helm +-- Candies +(@Ref,20388,15,1,0,4,6), -- Lollipop +(@Ref,20389,15,1,0,4,6), -- Candy Corn +(@Ref,20390,15,1,0,4,6), -- Candy Bar +(@Ref,37604,30,1,0,10,10), -- Tooth Pick +(@Ref,37582,30,1,0,1,2), -- Pyroblast Cinnamon Ball +(@Ref,37583,30,1,0,1,2), -- G.N.E.R.D.S. +(@Ref,37584,30,1,0,1,2), -- Soothing Spearmint Candy +(@Ref,37585,30,1,0,1,2), -- Chewy Fel Taffy +(@Ref,37606,15,1,0,1,1); -- Penny Pouch + +-- Assign loot to the special bags +DELETE FROM `item_loot_template` WHERE `entry` IN (54516,37586); +INSERT INTO `item_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +-- Loot Filled Pumpkin: +(54516,33226,100,1,0,2,3), -- Tricky Treat +(54516,1,100,1,0,-@Ref,1), -- Referenced Specials +(54516,33808,2,1,0,1,1), -- The Horseman's Helm +(54516,38175,2,1,0,1,1), -- The Horseman's Blade +(54516,37012,0.1,1,0,1,1), -- The Horseman's Reins +-- Handfull of Treats: +(37586,33226,100,1,0,2,3), -- Tricky Treat +(37586,1,100,1,0,-@Ref,1); -- Referenced Specials diff --git a/sql/updates/world/2012_02_03_00_world_gossip_menu.sql b/sql/updates/world/2012_02_03_00_world_gossip_menu.sql new file mode 100644 index 00000000000..e56662f2e9d --- /dev/null +++ b/sql/updates/world/2012_02_03_00_world_gossip_menu.sql @@ -0,0 +1,2196 @@ +-- XXXXXXXXXXXXXXXXXXXXX +-- X Mage Trainers X +-- XXXXXXXXXXXXXXXXXXXXX + +-- Gossip Condition for Mage Trainers +SET @GOSSIP := 63; -- http://www.wowhead.com/npc=2128 "Tirisfal Glades" http://www.wowhead.com/npc=23103 "Undercity" +SET @TEXTYES := 562; +SET @TEXTNO := 563; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=23103; + +SET @GOSSIP := 64; -- http://www.wowhead.com/npc=5880 "Durotar" +SET @TEXTYES := 564; +SET @TEXTNO := 565; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4484; -- http://www.wowhead.com/npc=5498 "Stormwind City" +SET @TEXTYES := 538; +SET @TEXTNO := 539; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4485; -- http://www.wowhead.com/npc=5497 "Stormwind City" +SET @TEXTYES := 538; +SET @TEXTNO := 539; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4486; -- http://www.wowhead.com/npc=331 "Stormwind City" +SET @TEXTYES := 538; +SET @TEXTNO := 539; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4517; -- http://www.wowhead.com/npc=7311 "Orgrimmar" +SET @TEXTYES := 564; +SET @TEXTNO := 565; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4518; -- http://old.wowhead.com/npc=5883 "Orgrimmar" +SET @TEXTYES := 564; +SET @TEXTNO := 565; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4519; -- http://old.wowhead.com/npc=5885 "Orgrimmar" +SET @TEXTYES := 564; +SET @TEXTNO := 565; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4520; -- http://old.wowhead.com/npc=5882 "Orgrimmar" +SET @TEXTYES := 564; +SET @TEXTNO := 565; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4537; -- http://www.wowhead.com/npc=4568 "Undercity" +SET @TEXTYES := 562; +SET @TEXTNO := 563; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4538; -- http://www.wowhead.com/npc=4567 "Undercity" +SET @TEXTYES := 562; +SET @TEXTNO := 563; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4539; -- http://www.wowhead.com/npc=4566 "Undercity" +SET @TEXTYES := 562; +SET @TEXTNO := 563; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4552; -- http://www.wowhead.com/npc=5144 5145,5146,7312 "Ironforge" +SET @TEXTYES := 560; +SET @TEXTNO := 561; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4651; -- http://old.wowhead.com/npc=5884 "Durotar" +SET @TEXTYES := 564; +SET @TEXTNO := 565; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4654; -- http://www.wowhead.com/npc=2124 "Tirisfal Glades" +SET @TEXTYES := 562; +SET @TEXTNO := 563; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4660; -- http://www.wowhead.com/npc=198 "Elwynn Forest" +SET @TEXTYES := 538; +SET @TEXTNO := 539; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4661; -- http://www.wowhead.com/npc=328 "Elwynn Forest" +SET @TEXTYES := 538; +SET @TEXTNO := 539; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4685; -- http://www.wowhead.com/npc=1228 "Dun Morogh" +SET @TEXTYES := 558; +SET @TEXTNO := 559; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 4686; -- http://old.wowhead.com/npc=944 "Dun Morogh" +SET @TEXTYES := 560; +SET @TEXTNO := 561; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 6648; -- 15279,16269,16651,16652,16653 "Blood elf Mage trainers" +SET @TEXTYES := 9190; +SET @TEXTNO := 9191; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 7264; -- 16500,16749,17481,17513,17514 "Draenei Mage Trainers" +SET @TEXTYES := 8589; +SET @TEXTNO := 8590; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 9990; -- http://www.wowhead.com/npc=28956 28958 "Dalaran Mage Trainers" +SET @TEXTYES := 13845; +SET @TEXTNO := 13846; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +SET @GOSSIP := 9580; -- http://www.wowhead.com/npc=27704 "Dustwallow Marsh" +SET @TEXTYES := 12929; +SET @TEXTNO := 12930; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=27704; + +-- Gossip Condition for Mage Trainers +SET @GOSSIP := 7366; -- http://www.wowhead.com/npc=17105 "Darnassus" +SET @TEXTYES := 8799; +SET @TEXTNO := 8800; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=17105; + +-- Gossip Condition for Mage Trainers +SET @GOSSIP := 4535; -- http://www.wowhead.com/npc=3049 "Thunder Bluff" +SET @TEXTYES := 562; +SET @TEXTNO := 663; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=3049; + +-- XXXXXXXXXXXXXXXXXXXXXX +-- X Warlock Trainers X +-- XXXXXXXXXXXXXXXXXXXXXX + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 1503; +SET @TEXTYES := 2175; +SET @TEXTNO := 5722; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 1522; +SET @TEXTYES := 2193; +SET @TEXTNO := 5722; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 2381; +SET @TEXTYES := 2193; +SET @TEXTNO := 5723; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 2383; +SET @TEXTYES := 5714; +SET @TEXTNO := 5715; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 2384; +SET @TEXTYES := 2193; +SET @TEXTNO := 5722; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4503; +SET @TEXTYES := 5693; +SET @TEXTNO := 5722; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4504; +SET @TEXTYES := 5693; +SET @TEXTNO := 5722; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4505; +SET @TEXTYES := 5693; +SET @TEXTNO := 5722; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4566; +SET @TEXTYES := 2193; +SET @TEXTNO := 5722; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4567; +SET @TEXTYES := 2193; +SET @TEXTNO := 5723; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4603; +SET @TEXTYES := 2193; +SET @TEXTNO := 5723; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4604; +SET @TEXTYES := 2193; +SET @TEXTNO := 5723; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4609; +SET @TEXTYES := 5719; +SET @TEXTNO := 5720; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I submit myself for further training my master.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4610; +SET @TEXTYES := 5719; +SET @TEXTNO := 5720; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I submit myself for further training, my master.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=4565; + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4641; +SET @TEXTYES := 5714; +SET @TEXTNO := 5715; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4643; +SET @TEXTYES := 5714; +SET @TEXTNO := 5715; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4655; +SET @TEXTYES := 5719; +SET @TEXTNO := 5720; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I submit myself for further training my master.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4656; +SET @TEXTYES := 5719; +SET @TEXTNO := 5720; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I submit myself for further training my master.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4667; +SET @TEXTYES := 2193; +SET @TEXTNO := 5722; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4681; +SET @TEXTYES := 2193; +SET @TEXTNO := 5723; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4682; +SET @TEXTYES := 2193; +SET @TEXTNO := 5722; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 6628; +SET @TEXTYES := 7882; +SET @TEXTNO := 7903; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 7437; +SET @TEXTYES := 9006; +SET @TEXTNO := 7903; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 7566; +SET @TEXTYES := 9184; +SET @TEXTNO := 9185; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"It is a greater knowledge of the ways of the warlock that I crave.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warlock Trainers +SET @GOSSIP := 4642; +SET @TEXTYES := 5714; +SET @TEXTNO := 5715; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'), +(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"It is a greater knowledge of the ways of the warlock that I crave.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=988; + +-- XXXXXXXXXXXXXXXXXXXXXX +-- X Paladin Trainers X +-- XXXXXXXXXXXXXXXXXXXXXX + +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 2304; +SET @TEXTYES := 2999; +SET @TEXTNO := 3975; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=5149; + +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 4556; +SET @TEXTYES := 3974; +SET @TEXTNO := 3975; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=5148; + +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 4557; +SET @TEXTYES := 3974; +SET @TEXTNO := 3975; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=5147; + +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 4469; +SET @TEXTYES := 3976; +SET @TEXTNO := 3977; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 4470; +SET @TEXTYES := 3976; +SET @TEXTNO := 3977; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 4471; +SET @TEXTYES := 3976; +SET @TEXTNO := 3977; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 4662; +SET @TEXTYES := 3976; +SET @TEXTNO := 3977; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=8140; + +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 4463; +SET @TEXTYES := 3976; +SET @TEXTNO := 3977; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 4464; +SET @TEXTYES := 3976; +SET @TEXTNO := 3977; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 4477; +SET @TEXTYES := 3974; +SET @TEXTNO := 3975; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 4478; +SET @TEXTYES := 3974; +SET @TEXTNO := 3975; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 7260; +SET @TEXTYES := 8582; +SET @TEXTNO := 8584; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 8111; +SET @TEXTYES := 10040; +SET @TEXTNO := 10041; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- XXXXXXXXXXXXXXXXXXXXXX +-- X Warrior Trainers X +-- XXXXXXXXXXXXXXXXXXXXXX + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 523; +SET @TEXTYES := 1040; +SET @TEXTNO := 4985; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=985; + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 655; +SET @TEXTYES := 1218; +SET @TEXTNO := 4973; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=3408; + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 656; +SET @TEXTYES := 1219; +SET @TEXTNO := 4984; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4091; +SET @TEXTYES := 4992; +SET @TEXTNO := 4993; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"Yes. I have.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4475; +SET @TEXTYES := 1216; +SET @TEXTNO := 5721; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4481; +SET @TEXTYES := 1216; +SET @TEXTNO := 5721; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4482; +SET @TEXTYES := 1216; +SET @TEXTNO := 5721; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4509; +SET @TEXTYES := 1040; +SET @TEXTNO := 4985; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4511; +SET @TEXTYES := 1040; +SET @TEXTNO := 4985; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4525; +SET @TEXTYES := 1218; +SET @TEXTNO := 4973; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4526; +SET @TEXTYES := 1218; +SET @TEXTNO := 4973; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4527; +SET @TEXTYES := 1218; +SET @TEXTNO := 4973; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4546; +SET @TEXTYES := 1219; +SET @TEXTNO := 4984; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4547; +SET @TEXTYES := 1219; +SET @TEXTNO := 4984; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4548; +SET @TEXTYES := 1219; +SET @TEXTNO := 4984; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4568; +SET @TEXTYES := 4989; +SET @TEXTNO := 4988; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4569; +SET @TEXTYES := 1215; +SET @TEXTNO := 5724; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4570; +SET @TEXTYES := 1215; +SET @TEXTNO := 5724; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4578; +SET @TEXTYES := 1217; +SET @TEXTNO := 5725; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=4089; + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4579; +SET @TEXTYES := 1217; +SET @TEXTNO := 5725; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4581; +SET @TEXTYES := 1217; +SET @TEXTNO := 5725; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4645; +SET @TEXTYES := 1218; +SET @TEXTNO := 4973; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4649; +SET @TEXTYES := 1216; +SET @TEXTNO := 5721; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4650; +SET @TEXTYES := 1216; +SET @TEXTNO := 5721; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4653; +SET @TEXTYES := 1219; +SET @TEXTNO := 4984; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=2119; + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4683; +SET @TEXTYES := 1215; +SET @TEXTNO := 5724; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4684; +SET @TEXTYES := 1215; +SET @TEXTNO := 5724; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4696; +SET @TEXTYES := 1217; +SET @TEXTNO := 5725; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 4697; +SET @TEXTYES := 1217; +SET @TEXTNO := 5725; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Warrior Trainers +SET @GOSSIP := 7263; +SET @TEXTYES := 8587; +SET @TEXTNO := 8588; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'), +(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- XXXXXXXXXXXXXXXXXXXXXX +-- X Druid Trainers X +-- XXXXXXXXXXXXXXXXXXXXXX + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 1403; +SET @TEXTYES := 4786; +SET @TEXTNO := 2037; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 3921; +SET @TEXTYES := 4774; +SET @TEXTNO := 4775; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 3924; +SET @TEXTYES := 4782; +SET @TEXTNO := 4781; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 3925; +SET @TEXTYES := 4784; +SET @TEXTNO := 4783; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=9465; + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 3926; +SET @TEXTYES := 4786; +SET @TEXTNO := 4785; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 4507; +SET @TEXTYES := 4784; +SET @TEXTNO := 4783; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=5506; + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 4508; +SET @TEXTYES := 4784; +SET @TEXTNO := 4783; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 4571; +SET @TEXTYES := 4782; +SET @TEXTNO := 4781; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 4605; +SET @TEXTYES := 5716; +SET @TEXTNO := 5717; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 4606; +SET @TEXTYES := 5716; +SET @TEXTNO := 5717; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 4607; +SET @TEXTYES := 5716; +SET @TEXTNO := 5717; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 4687; +SET @TEXTYES := 4784; +SET @TEXTNO := 4783; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 4688; +SET @TEXTYES := 4784; +SET @TEXTNO := 4783; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=3597; + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 7567; +SET @TEXTYES := 9195; +SET @TEXTNO := 9194; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 4646; +SET @TEXTYES := 5716; +SET @TEXTNO := 5717; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=8142; + +-- Gossip Condition for Druid Trainers +SET @GOSSIP := 7567; +SET @TEXTYES := 9195; +SET @TEXTNO := 9194; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'), +(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + diff --git a/sql/updates/world/2012_02_03_01_world_quest_template.sql b/sql/updates/world/2012_02_03_01_world_quest_template.sql new file mode 100644 index 00000000000..9871fbf979e --- /dev/null +++ b/sql/updates/world/2012_02_03_01_world_quest_template.sql @@ -0,0 +1,2 @@ +-- Set quest "Feedin' Da Goolz" available to all races +UPDATE `quest_template` SET `RequiredRaces`=1791 WHERE `id`=12652; diff --git a/sql/updates/world/2012_02_04_00_world_creature.sql b/sql/updates/world/2012_02_04_00_world_creature.sql new file mode 100644 index 00000000000..ffc5dfe773b --- /dev/null +++ b/sql/updates/world/2012_02_04_00_world_creature.sql @@ -0,0 +1,5 @@ +-- Adds missing spirit healer in Desolace +SET @GUID := 40269; +DELETE FROM `creature` WHERE `guid`=@GUID AND `id`=6491; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(@GUID, 6491, 1, 1, 1, 0, 0, -452.182, 2513.69, 92.8852, 6.1809, 300, 0, 0, 4120, 0, 0, 0, 0, 0); diff --git a/sql/updates/world/2012_02_04_00_world_gameobject_template.sql b/sql/updates/world/2012_02_04_00_world_gameobject_template.sql new file mode 100644 index 00000000000..d824c35da51 --- /dev/null +++ b/sql/updates/world/2012_02_04_00_world_gameobject_template.sql @@ -0,0 +1,2 @@ +-- set correct type from sniff +UPDATE `gameobject_template` SET `type`=33 WHERE `entry`=166872; diff --git a/sql/updates/world/2012_02_04_00_world_gossip_menu.sql b/sql/updates/world/2012_02_04_00_world_gossip_menu.sql new file mode 100644 index 00000000000..9cae36ec0a9 --- /dev/null +++ b/sql/updates/world/2012_02_04_00_world_gossip_menu.sql @@ -0,0 +1,7 @@ +UPDATE `creature_template` SET `gossip_menu_id`=4677 WHERE `entry`=1232; +UPDATE `creature_template` SET `gossip_menu_id`=4678 WHERE `entry`=629; + +-- Insert npc_text from sniff +DELETE FROM `npc_text` WHERE `ID` IN (9195); +INSERT INTO `npc_text` (`ID`,`prob0`,`text0_0`,`text0_1`,`lang0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`prob1`,`text1_0`,`text1_1`,`lang1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`prob2`,`text2_0`,`text2_1`,`lang2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`prob3`,`text3_0`,`text3_1`,`lang3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`prob4`,`text4_0`,`text4_1`,`lang4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`prob5`,`text5_0`,`text5_1`,`lang5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`prob6`,`text6_0`,`text6_1`,`lang6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`prob7`,`text7_0`,`text7_1`,`lang7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`,`WDBVerified`) VALUES +(9195,1,'Greetings, my $g brother : sister;. How can I guide you today?','Greetings, my $g brother : sister;. How can I guide you today?',7,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,1); diff --git a/sql/updates/world/2012_02_04_01_world_creature.sql b/sql/updates/world/2012_02_04_01_world_creature.sql new file mode 100644 index 00000000000..09f135c2715 --- /dev/null +++ b/sql/updates/world/2012_02_04_01_world_creature.sql @@ -0,0 +1,12 @@ +-- Spawn Petrov +SET @GUID :=40268; +DELETE FROM `creature` WHERE `id`=26932; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +(@GUID,26932,571,1,1,0,0,4698.392,-4004.781,212.3551,0.5061455,300,0,0,1,0,0,0,0,0); + +-- Template updates for creature 26932 (Petrov) +UPDATE `creature_template` SET `baseattacktime`=1500,`unit_flags`=`unit_flags`|512 WHERE `entry`=26932; -- Petrov +-- Addon data for creature 26932 (Petrov) +DELETE FROM `creature_template_addon` WHERE `entry`=26932; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(26932,0,0,257,333, NULL); -- Petrov diff --git a/sql/updates/world/2012_02_05_00_world_creature_template.sql b/sql/updates/world/2012_02_05_00_world_creature_template.sql new file mode 100644 index 00000000000..31751f9f324 --- /dev/null +++ b/sql/updates/world/2012_02_05_00_world_creature_template.sql @@ -0,0 +1,2 @@ +-- Set correct faction from sniff +UPDATE `creature_template` SET `faction_A`= 16,`faction_H`=16 WHERE `entry`=26231; diff --git a/sql/updates/world/2012_02_05_00_world_misc.sql b/sql/updates/world/2012_02_05_00_world_misc.sql new file mode 100644 index 00000000000..c5c4cfc43a6 --- /dev/null +++ b/sql/updates/world/2012_02_05_00_world_misc.sql @@ -0,0 +1,126 @@ +-- Argent Tournament Trainers part +SET @SPELL_ON_ARGENT_MOUNT := 63034; + +SET @NPC_JAERAN_LOCKWOOD := 33973; +SET @QUEST_MASTERY_OF_MELEE_A := 13828; +SET @QUEST_MASTERY_OF_MELEE_H := 13829; + +SET @GOSSIP_MENU_JERAN_MOUNTED := 10398; +SET @GOSSIP_MENU_JERAN_EXPLANATION := 10397; -- From Aokromes Sniffs + +SET @GOSSIP_TEXT_JERAN_MOUNTED := 14431; +SET @GOSSIP_TEXT_JERAN_EXPLANATION := 14434; +SET @SPELL_CREDIT_JERAN := 64113; + +SET @NPC_RUGAN_STEELBELLY := 33972; +SET @QUEST_MASTERY_OF_CHARGE_A := 13837; +SET @QUEST_MASTERY_OF_CHARGE_H := 13839; + +SET @GOSSIP_MENU_RUGAN_MOUNTED := 10400; +SET @GOSSIP_MENU_RUGAN_EXPLANATION := 10399; -- From Aokromes Sniffs + +SET @GOSSIP_TEXT_RUGAN_MOUNTED := 14436; +SET @GOSSIP_TEXT_RUGAN_EXPLANATION := 14437; +SET @SPELL_CREDIT_RUGAN := 64114; + +SET @NPC_VALIS_WINDCHASER := 33974; +SET @QUEST_MASTERY_OF_SH_BREAKER_A := 13835; +SET @QUEST_MASTERY_OF_SH_BREAKER_H := 13838; + +SET @GOSSIP_MENU_VALIS_MOUNTED := 10402; +SET @GOSSIP_MENU_VALIS_EXPLANATION := 10401; -- From Aokromes Sniffs + +SET @GOSSIP_TEXT_VALIS_MOUNTED := 14438; +SET @GOSSIP_TEXT_VALIS_EXPLANATION := 14439; +SET @SPELL_CREDIT_VALIS := 64115; + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC_JAERAN_LOCKWOOD,@NPC_RUGAN_STEELBELLY,@NPC_VALIS_WINDCHASER); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_JAERAN_LOCKWOOD,@NPC_RUGAN_STEELBELLY,@NPC_VALIS_WINDCHASER) 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 +(@NPC_JAERAN_LOCKWOOD,0,0,0,64,0,100,0,0,0,0,0,98,@GOSSIP_MENU_JERAN_MOUNTED,@GOSSIP_TEXT_JERAN_MOUNTED,0,0,0,0,7,0,0,0,0,0,0,0,'Jeran Lockwood - Send different gossip when mounted (Requires conditions)'), +(@NPC_JAERAN_LOCKWOOD,0,1,3,62,0,100,0,@GOSSIP_MENU_JERAN_MOUNTED,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Jeran Lockwood - Send text when option clicked'), +(@NPC_JAERAN_LOCKWOOD,0,2,3,62,0,100,0,@GOSSIP_MENU_JERAN_EXPLANATION,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Jeran Lockwood - Send text when option clicked'), +(@NPC_JAERAN_LOCKWOOD,0,3,4,61,0,100,0,0,0,0,0,11,@SPELL_CREDIT_JERAN,0,0,0,0,0,7,0,0,0,0,0,0,0,'Jeran Lockwood - Give Credit'), +(@NPC_JAERAN_LOCKWOOD,0,4,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Jeran Lockwood - Close Gossip'), + +(@NPC_RUGAN_STEELBELLY,0,0,0,64,0,100,0,0,0,0,0,98,@GOSSIP_MENU_RUGAN_MOUNTED,@GOSSIP_TEXT_RUGAN_MOUNTED,0,0,0,0,7,0,0,0,0,0,0,0,'Rugan Steelbelly - Send different gossip when mounted (Requires conditions)'), +(@NPC_RUGAN_STEELBELLY,0,1,3,62,0,100,0,@GOSSIP_MENU_RUGAN_MOUNTED,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rugan Steelbelly - Send text when option clicked'), +(@NPC_RUGAN_STEELBELLY,0,2,3,62,0,100,0,@GOSSIP_MENU_RUGAN_EXPLANATION,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rugan Steelbelly - Send text when option clicked'), +(@NPC_RUGAN_STEELBELLY,0,3,4,61,0,100,0,0,0,0,0,11,@SPELL_CREDIT_RUGAN,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rugan Steelbelly - Give Credit'), +(@NPC_RUGAN_STEELBELLY,0,4,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rugan Steelbelly - Close Gossip'), + +(@NPC_VALIS_WINDCHASER,0,0,0,64,0,100,0,0,0,0,0,98,@GOSSIP_MENU_VALIS_MOUNTED,@GOSSIP_TEXT_VALIS_MOUNTED,0,0,0,0,7,0,0,0,0,0,0,0,'Valis Windchaser - Send different gossip when mounted (Requires conditions)'), +(@NPC_VALIS_WINDCHASER,0,1,3,62,0,100,0,@GOSSIP_MENU_VALIS_MOUNTED,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Valis Windchaser - Send text when option clicked'), +(@NPC_VALIS_WINDCHASER,0,2,3,62,0,100,0,@GOSSIP_TEXT_VALIS_EXPLANATION,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Valis Windchaser - Send text when option clicked'), +(@NPC_VALIS_WINDCHASER,0,3,4,61,0,100,0,0,0,0,0,11,@SPELL_CREDIT_VALIS,0,0,0,0,0,7,0,0,0,0,0,0,0,'Valis Windchaser - Give Credit'), +(@NPC_VALIS_WINDCHASER,0,4,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Valis Windchaser - Close Gossip'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN (@NPC_JAERAN_LOCKWOOD,@NPC_RUGAN_STEELBELLY,@NPC_VALIS_WINDCHASER); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (@GOSSIP_MENU_JERAN_MOUNTED,@GOSSIP_MENU_RUGAN_MOUNTED,@GOSSIP_MENU_VALIS_MOUNTED); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(22,1,@NPC_JAERAN_LOCKWOOD,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'','SAI - Jeran Lockwood show different menu if player mounted'), +(15,@GOSSIP_MENU_JERAN_MOUNTED,0,0,0,9,@QUEST_MASTERY_OF_MELEE_A,0,0,0,'',"Jeran Lockwood - Show gossip if player has quest"), +(15,@GOSSIP_MENU_JERAN_MOUNTED,0,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Jeran Lockwood - Show gossip if player has aura"), +(15,@GOSSIP_MENU_JERAN_MOUNTED,0,0,1,9,@QUEST_MASTERY_OF_MELEE_H,0,0,0,'',"Jeran Lockwood - Show gossip if player has quest"), +(15,@GOSSIP_MENU_JERAN_MOUNTED,0,0,1,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Jeran Lockwood - Show gossip if player has aura"), +(15,@GOSSIP_MENU_JERAN_MOUNTED,1,0,0,9,@QUEST_MASTERY_OF_MELEE_A,0,0,0,'',"Jeran Lockwood - Show gossip if player has quest"), +(15,@GOSSIP_MENU_JERAN_MOUNTED,1,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Jeran Lockwood - Show gossip if player has aura"), +(15,@GOSSIP_MENU_JERAN_MOUNTED,1,0,1,9,@QUEST_MASTERY_OF_MELEE_H,0,0,0,'',"Jeran Lockwood - Show gossip if player has quest"), +(15,@GOSSIP_MENU_JERAN_MOUNTED,1,0,1,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Jeran Lockwood - Show gossip if player has aura"), + +(22,1,@NPC_RUGAN_STEELBELLY,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'','SAI - Rugan Steelbelly show different menu if player mounted'), +(15,@GOSSIP_MENU_RUGAN_MOUNTED,0,0,0,9,@QUEST_MASTERY_OF_CHARGE_A,0,0,0,'',"Rugan Steelbelly - Show gossip if player has quest"), +(15,@GOSSIP_MENU_RUGAN_MOUNTED,0,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Rugan Steelbelly - Show gossip if player has aura"), +(15,@GOSSIP_MENU_RUGAN_MOUNTED,0,0,1,9,@QUEST_MASTERY_OF_CHARGE_H,0,0,0,'',"Rugan Steelbelly - Show gossip if player has quest"), +(15,@GOSSIP_MENU_RUGAN_MOUNTED,0,0,1,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Rugan Steelbelly - Show gossip if player has aura"), +(15,@GOSSIP_MENU_RUGAN_MOUNTED,1,0,0,9,@QUEST_MASTERY_OF_CHARGE_A,0,0,0,'',"Rugan Steelbelly - Show gossip if player has quest"), +(15,@GOSSIP_MENU_RUGAN_MOUNTED,1,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Rugan Steelbelly - Show gossip if player has aura"), +(15,@GOSSIP_MENU_RUGAN_MOUNTED,1,0,1,9,@QUEST_MASTERY_OF_CHARGE_H,0,0,0,'',"Rugan Steelbelly - Show gossip if player has quest"), +(15,@GOSSIP_MENU_RUGAN_MOUNTED,1,0,1,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Rugan Steelbelly - Show gossip if player has aura"), + +(22,1,@NPC_VALIS_WINDCHASER,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'','SAI - Valis Windchaser show different menu if player mounted'), +(15,@GOSSIP_MENU_VALIS_MOUNTED,0,0,0,9,@QUEST_MASTERY_OF_SH_BREAKER_A,0,0,0,'',"Valis Windchaser - Show gossip if player has quest"), +(15,@GOSSIP_MENU_VALIS_MOUNTED,0,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Valis Windchaser - Show gossip if player has aura"), +(15,@GOSSIP_MENU_VALIS_MOUNTED,0,0,1,9,@QUEST_MASTERY_OF_SH_BREAKER_H,0,0,0,'',"Valis Windchaser - Show gossip if player has quest"), +(15,@GOSSIP_MENU_VALIS_MOUNTED,0,0,1,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Valis Windchaser - Show gossip if player has aura"), +(15,@GOSSIP_MENU_VALIS_MOUNTED,1,0,0,9,@QUEST_MASTERY_OF_SH_BREAKER_A,0,0,0,'',"Valis Windchaser - Show gossip if player has quest"), +(15,@GOSSIP_MENU_VALIS_MOUNTED,1,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Valis Windchaser - Show gossip if player has aura"), +(15,@GOSSIP_MENU_VALIS_MOUNTED,1,0,1,9,@QUEST_MASTERY_OF_SH_BREAKER_H,0,0,0,'',"Valis Windchaser - Show gossip if player has quest"), +(15,@GOSSIP_MENU_VALIS_MOUNTED,1,0,1,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Valis Windchaser - Show gossip if player has aura"); + +DELETE FROM `gossip_menu` WHERE `entry` IN (@GOSSIP_MENU_JERAN_EXPLANATION,@GOSSIP_MENU_RUGAN_EXPLANATION,@GOSSIP_MENU_VALIS_EXPLANATION); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(@GOSSIP_MENU_JERAN_EXPLANATION,@GOSSIP_TEXT_JERAN_EXPLANATION), +(@GOSSIP_MENU_RUGAN_EXPLANATION,@GOSSIP_TEXT_RUGAN_EXPLANATION), +(@GOSSIP_MENU_VALIS_EXPLANATION,@GOSSIP_TEXT_VALIS_EXPLANATION); + +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (@GOSSIP_MENU_JERAN_MOUNTED,@GOSSIP_MENU_JERAN_EXPLANATION,@GOSSIP_MENU_RUGAN_MOUNTED,@GOSSIP_MENU_RUGAN_EXPLANATION,@GOSSIP_MENU_VALIS_MOUNTED,@GOSSIP_MENU_VALIS_EXPLANATION); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(@GOSSIP_MENU_JERAN_MOUNTED,0,0,'Show me how to train with a Melee Target.',1,1,0,0,0,0,''), +(@GOSSIP_MENU_JERAN_MOUNTED,1,0,'Tell me more about Defend and Thrust!',1,1,@GOSSIP_MENU_JERAN_EXPLANATION,0,0,0,''), +(@GOSSIP_MENU_JERAN_EXPLANATION,0,0,'Show me how to train with a Melee Target.',1,1,0,0,0,0,''), + +(@GOSSIP_MENU_RUGAN_MOUNTED,0,0,'Show me how to train with a Charge Target.',1,1,0,0,0,0,''), +(@GOSSIP_MENU_RUGAN_MOUNTED,1,0,'Tell me more about the Charge!',1,1,@GOSSIP_MENU_RUGAN_EXPLANATION,0,0,0,''), +(@GOSSIP_MENU_RUGAN_EXPLANATION,0,0,'Show me how to train with a Charge Target.',1,1,0,0,0,0,''), + +(@GOSSIP_MENU_VALIS_MOUNTED,0,0,'Show me how to train with a Ranged Target.',1,1,0,0,0,0,''), +(@GOSSIP_MENU_VALIS_MOUNTED,1,0,'Tell me more about the Shield-Breaker!',1,1,@GOSSIP_MENU_VALIS_EXPLANATION,0,0,0,''), +(@GOSSIP_MENU_VALIS_EXPLANATION,0,0,'Show me how to train with a Ranged Target.',1,1,0,0,0,0,''); + +DELETE FROM `creature_text` WHERE `entry` IN (@NPC_JAERAN_LOCKWOOD,@NPC_RUGAN_STEELBELLY,@NPC_VALIS_WINDCHASER); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@NPC_JAERAN_LOCKWOOD,0,0,'Put up defend$B|TInterface\\Icons\\ability_warrior_shieldmastery.blp:32|t$BThen use Thrust on a Melee Target$B|TInterface\\Icons\\inv_sword_65.blp:32|t',42,0,0,0,0,0,'Argent Tournament - Melee Tutorial'), +(@NPC_RUGAN_STEELBELLY,0,0,'Use Shield-Breaker on a Charge Target$B|TInterface\\Icons\\ability_warrior_shieldbreak.blp:32|t$BFollow up with Charge while the target is vulnerable$B|TInterface\\Icons\\ability_mount_charger.blp:32|t',42,0,0,0,0,0,'Argent Tournament - Charge Tutorial'), +(@NPC_VALIS_WINDCHASER,0,0,'Use Shield-Breaker on a Ranged Target$B|TInterface\\Icons\\ability_warrior_shieldbreak.blp:32|t$BThen use Shield-Breaker while the target is defenseless$B|TInterface\\Icons\\ability_warrior_shieldbreak.blp:32|t',42,0,0,0,0,0,'Argent Tournament - Ranged Tutorial'); + +-- Training Dummies Part +UPDATE `creature_template` SET `ScriptName` = 'npc_tournament_training_dummy' WHERE `entry` IN (33272,33229,33243); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=62709; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,0,62709,0,0,18,1,33845,0,0, '','Counterattack! (Argent Tournament) - Target near aspirant mounts'), +(13,0,62709,0,0,18,1,33323,0,0, '','Counterattack! (Argent Tournament) - Target near aspirant mounts'); + +DELETE FROM `spell_script_names` WHERE `spell_id`=62709; +INSERT INTO `spell_script_names` VALUES (62709, 'spell_gen_tournament_counterattack'); diff --git a/sql/updates/world/2012_02_05_01_world_game_event.sql b/sql/updates/world/2012_02_05_01_world_game_event.sql new file mode 100644 index 00000000000..61c7e7db5ab --- /dev/null +++ b/sql/updates/world/2012_02_05_01_world_game_event.sql @@ -0,0 +1 @@ +UPDATE `game_event` SET `start_time`= '2012-02-05 00:01:00', `holiday`=423 WHERE `eventEntry`=8; -- Love is in the Air diff --git a/sql/updates/world/2012_02_05_02_world_creature.sql b/sql/updates/world/2012_02_05_02_world_creature.sql new file mode 100644 index 00000000000..7426b7ef8b0 --- /dev/null +++ b/sql/updates/world/2012_02_05_02_world_creature.sql @@ -0,0 +1,22 @@ +-- add spawn for Saragosa +SET @GUID := 40270; +DELETE FROM `creature` WHERE `id`=26231; +INSERT INTO creature (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +(@GUID,26231,571,1,1,0,0,3981.03687,7148.006,666.1618,1.037019,120,0,0,1,0,0,0,0,0); +-- Pathing for Saragosa Entry: 26231 + +SET @PATH = @GUID*10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2 WHERE `guid`=@GUID; +DELETE FROM `creature_addon` WHERE `guid`=@GUID; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@GUID,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,3972.692,7139.177,666.609,0,0,0,0,100,0), +(@PATH,2,3973.208,7140.034,666.609,0,0,0,0,100,0), +(@PATH,3,3981.671,7149.173,666.2463,0,0,0,0,100,0), +(@PATH,4,3989.375,7172.479,669.3846,0,0,0,0,100,0), +(@PATH,5,3998.89,7199.31,674.7188,0,0,0,0,100,0), +(@PATH,6,4012.167,7242.467,666.8287,0,0,0,0,100,0), +(@PATH,7,4020.924,7276.525,652.9682,0,0,0,0,100,0), +(@PATH,8,4026.488,7297.103,640.2736,0,0,0,0,100,0), +(@PATH,9,4026.488,7297.103,640.2736,0,0,0,0,100,0); diff --git a/sql/updates/world/2012_02_05_03_world_game_event.sql b/sql/updates/world/2012_02_05_03_world_game_event.sql new file mode 100644 index 00000000000..157a2e9194c --- /dev/null +++ b/sql/updates/world/2012_02_05_03_world_game_event.sql @@ -0,0 +1 @@ +UPDATE `game_event` SET `length`=20160 WHERE `eventEntry`=8; -- Love is in the Air diff --git a/sql/updates/world/2012_02_05_04_world_misc.sql b/sql/updates/world/2012_02_05_04_world_misc.sql new file mode 100644 index 00000000000..0d72b08167e --- /dev/null +++ b/sql/updates/world/2012_02_05_04_world_misc.sql @@ -0,0 +1,11 @@ +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=56278; + +DELETE FROM `db_script_string` WHERE `entry`=2000000077; +INSERT INTO `db_script_string` (`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`)VALUES +(2000000077,'%s gestures to the pitcher of water sitting on the edge of the well.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + +SET @GOSSIP := 4535; +SET @OLD := 663; +SET @NEW := 563; +UPDATE `conditions` SET `SourceEntry`=@NEW WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=@GOSSIP AND `SourceEntry`=@OLD; +UPDATE `gossip_menu` SET `text_id`=@NEW WHERE `entry`=@GOSSIP AND `text_id`=@OLD; diff --git a/sql/updates/world/2012_02_05_04_world_quest_template.sql b/sql/updates/world/2012_02_05_04_world_quest_template.sql new file mode 100644 index 00000000000..093ca8aa8bf --- /dev/null +++ b/sql/updates/world/2012_02_05_04_world_quest_template.sql @@ -0,0 +1 @@ +UPDATE `quest_template` SET `OfferRewardText`= 'Alright, $n. You want to earn your keep with the Horde? Well there''s plenty to do here, so listen close and do what you''re told.$b$b$gI see that look in your eyes, do not think I will tolerate any insolence. Thrall himself has declared the Hordes females to be on equal footing with you men. Disrespect me in the slightest, and you will know true pain.:I''m happy to have met you. Thrall will be glad to know that more females like you and I are taking the initiative to push forward in the Barrens.;' WHERE `Id`=842; diff --git a/sql/updates/world/2012_02_06_00_world_misc.sql b/sql/updates/world/2012_02_06_00_world_misc.sql new file mode 100644 index 00000000000..984c618775d --- /dev/null +++ b/sql/updates/world/2012_02_06_00_world_misc.sql @@ -0,0 +1,731 @@ +-- change incorrect Paladin Trainers gossips +-- 4477 -> 4677 +-- 4478 -> 4678 +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 4677; +SET @TEXTYES := 3974; +SET @TEXTNO := 3975; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Paladin Trainers +SET @GOSSIP := 4678; +SET @TEXTYES := 3974; +SET @TEXTNO := 3975; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'), +(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Delete conditions and menu_id for old typo gossips +DELETE FROM `conditions` WHERE `SourceGroup`=4477 AND `SourceEntry`=3974; +DELETE FROM `conditions` WHERE `SourceGroup`=4477 AND `SourceEntry`=3975; +DELETE FROM `conditions` WHERE `SourceGroup`=4478 AND `SourceEntry`=3974; +DELETE FROM `conditions` WHERE `SourceGroup`=4478 AND `SourceEntry`=3975; +DELETE FROM `gossip_menu_option` WHERE menu_id=4477; +DELETE FROM `gossip_menu_option` WHERE menu_id=4478; + +-- Gossip Condition for Mage Trainers +SET @GOSSIP := 4535; -- http://www.wowhead.com/npc=3049 "Thunder Bluff" +SET @TEXTYES := 562; +SET @TEXTNO := 563; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'), +(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=3049; + +-- XXXXXXXXXXXXXXXXXXXXX +-- X Priest Trainers X +-- XXXXXXXXXXXXXXXXXXXXX + +UPDATE `creature_template` SET `gossip_menu_id`=3643 WHERE `entry`=11397; -- 3643 +UPDATE `creature_template` SET `gossip_menu_id`=4533 WHERE `entry`=3044; -- 4533 +UPDATE `creature_template` SET `gossip_menu_id`=4531 WHERE `entry`=3045; -- 4531 +UPDATE `creature_template` SET `gossip_menu_id`=4532 WHERE `entry`=3046; -- 4532 +UPDATE `creature_template` SET `gossip_menu_id`=4544 WHERE `entry`=4606; -- 4544 +UPDATE `creature_template` SET `gossip_menu_id`=7265 WHERE `entry`=16756; -- 7265 +UPDATE `creature_template` SET `gossip_menu_id`=7265 WHERE `entry` IN (17510,17511); -- 7265 +UPDATE `creature_template` SET `gossip_menu_id`=4558 WHERE `entry`=5142; -- 4558 +UPDATE `creature_template` SET `gossip_menu_id`=4559 WHERE `entry`=5141; -- 4559 +UPDATE `creature_template` SET `gossip_menu_id`=4572 WHERE `entry`=4092; -- 4572 +UPDATE `creature_template` SET `gossip_menu_id`=4574 WHERE `entry`=4090; -- 4574 +UPDATE `creature_template` SET `gossip_menu_id`=4692 WHERE `entry`=3595; -- 4692 +UPDATE `creature_template` SET `gossip_menu_id`=7349 WHERE `entry`=16502; -- 7349 +UPDATE `creature_template` SET `gossip_menu_id`=4801 WHERE `entry`=11401; -- 4801 +UPDATE `creature_template` SET `gossip_menu_id`=3642 WHERE `entry`=11406; -- 3642 + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 3642; +SET @TEXTYES := 4436; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 3643; +SET @TEXTYES := 4438; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I would like to train.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 3644; +SET @TEXTYES := 4441; +SET @TEXTNO := 4440; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 3645; +SET @TEXTYES := 4442; +SET @TEXTNO := 4439; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4466; +SET @TEXTYES := 4433; +SET @TEXTNO := 4434; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4467; +SET @TEXTYES := 4433; +SET @TEXTNO := 4434; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4468; +SET @TEXTYES := 4433; +SET @TEXTNO := 4434; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4521; +SET @TEXTYES := 4441; +SET @TEXTNO := 4440; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4522; +SET @TEXTYES := 4441; +SET @TEXTNO := 4440; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4523; +SET @TEXTYES := 4441; +SET @TEXTNO := 4440; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4531; +SET @TEXTYES := 4442; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4532; +SET @TEXTYES := 4442; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4533; +SET @TEXTYES := 4442; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4543; +SET @TEXTYES := 4442; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4544; +SET @TEXTYES := 4442; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4545; +SET @TEXTYES := 4442; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4558; +SET @TEXTYES := 4436; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4559; +SET @TEXTYES := 4436; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4572; +SET @TEXTYES := 4438; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4573; +SET @TEXTYES := 4438; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4574; +SET @TEXTYES := 4438; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4665; +SET @TEXTYES := 4433; +SET @TEXTNO := 4434; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4666; +SET @TEXTYES := 4433; +SET @TEXTNO := 4434; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4679; +SET @TEXTYES := 4436; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4680; +SET @TEXTYES := 4436; +SET @TEXTNO := 4435; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4691; +SET @TEXTYES := 4438; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4692; +SET @TEXTYES := 4438; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 4801; +SET @TEXTYES := 4438; +SET @TEXTNO := 4437; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 6649; +SET @TEXTYES := 9007; +SET @TEXTNO := 9186; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I require priest training.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 7265; +SET @TEXTYES := 8591; +SET @TEXTNO := 8592; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 7349; +SET @TEXTYES := 8591; +SET @TEXTNO := 8768; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); + +-- Gossip Condition for Priest Trainers +SET @GOSSIP := 7438; +SET @TEXTYES := 9007; +SET @TEXTNO := 9186; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'), +(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest'); +-- Add Any Missing Gossip Menu item +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES); +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO); +-- Add Any Missing Gossip Option +DELETE FROM `gossip_menu_option` WHERE menu_id=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''), +(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''), +(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
\ No newline at end of file diff --git a/sql/updates/world/2012_02_07_00_world_misc.sql b/sql/updates/world/2012_02_07_00_world_misc.sql new file mode 100644 index 00000000000..ef34c56ed00 --- /dev/null +++ b/sql/updates/world/2012_02_07_00_world_misc.sql @@ -0,0 +1,60 @@ +DELETE FROM `creature` WHERE `id` IN (28538,29056,28563); +DELETE FROM `creature` WHERE `id`=28320 AND `guid` BETWEEN 40451 AND 40462 OR `guid` IN (40466,40467); +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +-- Cultist Saboteur +(40271,28538,571,1,1,0,0,6197.03,4772.67,221.593,4.62512,120,0,0,1,0,0,0,0,0), +(40272,28538,571,1,1,0,0,6207.94,4791.03,224.951,0.504098,120,0,0,1,0,0,0,0,0), +(40273,28538,571,1,1,0,0,6209.31,4766.71,224.144,3.22886,120,0,0,1,0,0,0,0,0), +(40274,28538,571,1,1,0,0,6177.88,4737.93,224.747,2.24767,120,0,0,1,0,0,0,0,0), +(40275,28538,571,1,1,0,0,6185.42,4760.61,224.796,1.62316,120,0,0,1,0,0,0,0,0), +(40276,28538,571,1,1,0,0,6195.94,4761.25,220.873,1.53589,120,0,0,1,0,0,0,0,0), +(40277,28538,571,1,1,0,0,6231.93,4739.39,224.738,5.95606,120,0,0,1,0,0,0,0,0), +(40278,28538,571,1,1,0,0,6208.1,4762.39,222.758,2.87979,120,0,0,1,0,0,0,0,0), +-- Servant of Freya +(40451,28320,571,1,1,0,0,6177.58,4762.69,225.418,1.78024,120,0,0,1,0,0,0,0,0), +(40452,28320,571,1,1,0,0,6236,4785.33,224.865,1.90241,120,0,0,1,0,0,0,0,0), +(40453,28320,571,1,1,0,0,6218.78,4772.22,224.84,5.41052,120,0,0,1,0,0,0,0,0), +(40454,28320,571,1,1,0,0,6191.46,4728.85,224.807,5.86431,120,0,0,1,0,0,0,0,0), +(40455,28320,571,1,1,0,0,6206.62,4787.49,224.797,4.64258,120,0,0,1,0,0,0,0,0), +(40456,28320,571,1,1,0,0,6185.58,4761.77,224.796,4.39823,120,0,0,1,0,0,0,0,0), +(40457,28320,571,1,1,0,0,6226.41,4738,224.796,5.61996,120,0,0,1,0,0,0,0,0), +(40458,28320,571,1,1,0,0,6206.94,4750.79,224.796,3.78736,120,0,0,1,0,0,0,0,0), +(40459,28320,571,1,1,0,0,6238.17,4731.89,224.783,3.92699,120,0,0,1,0,0,0,0,0), +(40460,28320,571,1,1,0,0,6177.83,4730.03,224.693,0.244346,120,0,0,1,0,0,0,0,0), +(40461,28320,571,1,1,0,0,6168.2,4749.64,224.577,5.0091,120,0,0,1,0,0,0,0,0), +(40462,28320,571,1,1,0,0,6242.58,4769.51,224.443,2.98451,120,0,0,1,0,0,0,0,0), +(40466,28320,571,1,1,0,0,6217.79,4796.46,224.431,1.39626,120,0,0,1,0,0,0,0,0), +(40467,28320,571,1,1,0,0,6254.19,4757.5,217.856,0.837758,120,0,0,1,0,0,0,0,0), +-- Glimmering Pillar Credit +(40468,29056,571,1,1,0,0,6201.76,4764.45,225.84,3.19395,120,0,0,1,0,0,0,0,0), +-- Freya's Presence +(40469,28563,571,1,1,0,0,6203.26,4765.47,248.057,1.95477,120,0,0,1,0,0,0,0,0); + +-- by Valcorb +DELETE FROM `gameobject` WHERE `id`=300223; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(227,300223,571,1,1,6204.758301,4766.002930,221.531799,0,0,0,0,0,300,0,1); + +UPDATE `creature_template` SET `unit_flags`=0,`MovementType`=1 WHERE `entry`=28320; -- Servant of Freya +UPDATE `creature_template` SET `MovementType`=1 WHERE `entry`=28538; -- Cultist Saboteur +UPDATE `creature_template` SET `exp`=0,`InhabitType`=7,`flags_extra`=`flags_extra`|128 WHERE `entry`=28563; -- Freya's Presence + +DELETE FROM `creature_template_addon` WHERE `entry` IN (28538,29036,28320,28563); +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(28538,0,0,1,69, NULL), -- Cultist Saboteur (EMOTE_STATE_USE_STANDING) +(29036,0,0,1,0, '52948 61750 61751'), -- Servant of Freya (All Wild Growth, visual effects) +(28320,0,0,1,429, NULL), -- Servant of Freya +(28563,0,0,1,0, NULL); -- Freya's Presence + +DELETE FROM `creature_text` WHERE `entry`=28563; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(28563,0,0, 'The structure above begins to hum with energy.',42,0,0,0,0,0, 'Freya''s Presence - On Call of the Lifewarden cast'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (51318,51395); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,0,51318,0,0,18,1,28320,0,0, '', 'Freya Dummy - Target Servant of Freya'), +(13,0,51395,0,0,18,1,28538,0,0, '', 'Lifeforce - Target Cultist Saboteur'); + +DELETE FROM `spell_script_names` WHERE `spell_id`=51957; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(51957,'spell_q12620_the_lifewarden_wrath'); diff --git a/sql/updates/world/2012_02_08_00_world_misc.sql b/sql/updates/world/2012_02_08_00_world_misc.sql new file mode 100644 index 00000000000..40ce5629214 --- /dev/null +++ b/sql/updates/world/2012_02_08_00_world_misc.sql @@ -0,0 +1,20 @@ +UPDATE `gameobject_template` SET `flags` = `flags` | 32, `AIName` = 'SmartGameObjectAI' WHERE `entry` = 187267; + +DELETE FROM `spell_script_names` WHERE `spell_id` = 45102; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(45102, 'spell_love_is_in_the_air_romantic_picnic'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` IN (45119, 45103, 45114); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 0, 45119, 0, 0, 18, 0, 187267, 0, 0, '', 'Holiday - Valentine - Romantic Picnic Near Basket Check - Target Romantic Basket'), +(13, 0, 45103, 0, 0, 18, 1, 0, 0, 0, '', 'Holiday - Valentine - Romantic Picnic Meal Periodic - Target Players'), +(13, 0, 45114, 0, 0, 18, 1, 0, 0, 0, '', 'Holiday - Valentine - Romantic Picnic Meal Particle - Target Players'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=187267 AND `source_type`=1; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `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 +(187267, 1, 0, 0, 60, 0, 100, 0, 3*60*1000, 3*60*1000, 0, 0, 99, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Picnic Basket - Despawn after 3 minutes'); + +DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (1291,5787,4071); +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES +(5787, 6, 4395, 0, ''), -- Lonely? - Dalaran +(4071, 6, 4395, 0, ''); -- Lonely? - Dalaran diff --git a/sql/updates/world/2012_02_08_01_world_misc.sql b/sql/updates/world/2012_02_08_01_world_misc.sql new file mode 100644 index 00000000000..f6f6f9a6b94 --- /dev/null +++ b/sql/updates/world/2012_02_08_01_world_misc.sql @@ -0,0 +1 @@ +UPDATE `achievement_criteria_data` SET `value1`=423 WHERE `value1`=335 AND `type`=16; diff --git a/sql/updates/world/2012_02_08_02_world_misc.sql b/sql/updates/world/2012_02_08_02_world_misc.sql new file mode 100644 index 00000000000..64b6ba82cc9 --- /dev/null +++ b/sql/updates/world/2012_02_08_02_world_misc.sql @@ -0,0 +1,27 @@ +-- Missing Love is in the Air NPCs +SET @GUID := 40481; -- need 8 + +DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+7 AND `id` IN (37887,38039,38040,38066,38325,38293); +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +(@GUID+0,37887,0,1,1,0,0,-8864.01,635.646,96.0818,1.97249,300,0,0,42,0,0,2,0,8), -- Kwee Q. Peddlefeet <Crown Chemical Co.> +(@GUID+1,38039,1,1,1,0,0,9871.16,2488.28,1315.88,0.547356,300,0,0,42,0,0,2,0,8), -- Kwee Q. Peddlefeet <Crown Chemical Co.> +(@GUID+2,38040,530,1,1,0,0,-4010.12,-11846.9,0.1352,5.42082,300,0,0,42,0,0,2,0,8), -- Kwee Q. Peddlefeet <Crown Chemical Co.> +(@GUID+3,38040,0,1,1,0,0,-4915.43,-979.532,501.448,2.31443,300,0,0,42,0,0,2,0,8), -- Kwee Q. Peddlefeet <Crown Chemical Co.> +(@GUID+4,38066,0,1,1,0,0,-8867.86,652.647,97.0113,4.84704,300,0,0,42,0,0,2,0,8), -- Inspector Snip Snagglebolt +(@GUID+5,38325,0,1,1,0,0,-8881.19,669.006,105.834,0.696214,300,0,0,42,0,0,2,0,8), -- Marion Sutton +(@GUID+6,38293,0,1,1,0,0,-4932.9,-995.348,501.441,0.7201,300,0,0,42,0,0,2,0,8), -- Junior Inspector +(@GUID+7,38293,1,1,1,0,0,9885.37,2494.31,1315.92,3.01351,300,0,0,42,0,0,2,0,8); -- Junior Inspector + +DELETE FROM `game_event_creature` WHERE `eventEntry`=8 AND `guid` BETWEEN @GUID AND @GUID+7; +INSERT INTO `game_event_creature` (`guid`,`eventEntry`) VALUES +(@GUID+0,8), +(@GUID+1,8), +(@GUID+2,8), +(@GUID+3,8), +(@GUID+4,8), +(@GUID+5,8), +(@GUID+6,8), +(@GUID+7,8); + +-- Fixing an old SAI, by Aokromes, not related with above code + UPDATE `smart_scripts` SET `event_param1`=56033 WHERE `entryorguid`=30146 and `event_param1` = 42837; diff --git a/sql/updates/world/2012_02_08_03_world_misc.sql b/sql/updates/world/2012_02_08_03_world_misc.sql new file mode 100644 index 00000000000..80d2fd901fc --- /dev/null +++ b/sql/updates/world/2012_02_08_03_world_misc.sql @@ -0,0 +1,24 @@ +-- Template updates +UPDATE `creature_template` SET `npcflag`=`npcflag`|3,`unit_flags`=`unit_flags`|32768,`speed_run`=1 WHERE `name`='Kwee Q. Peddlefeet' AND `IconName`!=NULL; -- Kwee Q. Peddlefeet +UPDATE `creature_template` SET `npcflag`=`npcflag`|3,`unit_flags`=`unit_flags`|512 WHERE `entry`=38066; -- Inspector Snip Snagglebolt +UPDATE `creature_template` SET `npcflag`=`npcflag`|2 WHERE `entry`=38325; -- Marion Sutton +UPDATE `creature_template` SET `npcflag`=`npcflag`|2 WHERE `entry`=38293; -- Junior Inspector (NS) + +-- Model data +UPDATE `creature_model_info` SET `bounding_radius`=0.29,`combat_reach`=2.5,`gender`=0 WHERE `modelid`=15990; -- Kwee Q. Peddlefeet +UPDATE `creature_model_info` SET `bounding_radius`=0.306,`combat_reach`=1.5,`gender`=0 WHERE `modelid`=30728; -- Inspector Snip Snagglebolt +UPDATE `creature_model_info` SET `bounding_radius`=0.208,`combat_reach`=1.5,`gender`=0 WHERE `modelid`=31040; -- Marion Sutton + +-- Addon data +DELETE FROM `creature_template_addon` WHERE `entry` IN (37887,38039,38040,38066,38325); +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(37887,0,0,1,0, NULL), -- Kwee Q. Peddlefeet +(38039,0,0,1,0, NULL), -- Kwee Q. Peddlefeet +(38040,0,0,1,0, NULL), -- Kwee Q. Peddlefeet +(38066,0,0,257,0, NULL), -- Inspector Snip Snagglebolt +(38325,0,1,1,0, NULL); -- Marion Sutton + +-- Gossip, unfinished +DELETE FROM `gossip_menu_option` WHERE `menu_id`=10948 AND `id`=0; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `box_coded`, `box_money`, `box_text`) VALUES +(10948, 0, 0, 'I''d like a Lovely Charm Collector''s Kit.', 0, 0, ''); diff --git a/sql/updates/world/2012_02_08_04_world_misc.sql b/sql/updates/world/2012_02_08_04_world_misc.sql new file mode 100644 index 00000000000..1de2adc45f3 --- /dev/null +++ b/sql/updates/world/2012_02_08_04_world_misc.sql @@ -0,0 +1,4 @@ +UPDATE `achievement_criteria_data` SET `value1`=423 WHERE `value1` IN (335,355) AND `type`=16; + +-- Trigger extra flag for [DND] Holiday - Love - Bank/AH/Barber Bunny +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry` IN (38340,38341,38342); diff --git a/sql/updates/world/2012_02_08_05_world_gameobject.sql b/sql/updates/world/2012_02_08_05_world_gameobject.sql new file mode 100644 index 00000000000..a9388d189a9 --- /dev/null +++ b/sql/updates/world/2012_02_08_05_world_gameobject.sql @@ -0,0 +1,23 @@ +SET @GUID = 5259; +DELETE FROM `gameobject` WHERE `id` IN (192536,192538); +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +-- phasemask 4 +(@GUID+00,192536,571,1,4,7033.894,-1391.528,983.4609,0.05235888,0,0,0.02617645,0.9996573,120,255,1), -- Small Proto-Drake Egg +(@GUID+01,192536,571,1,4,6985.812,-1278.627,1101.344,1.308995,0,0,0.6087608,0.7933538,120,255,1), -- Small Proto-Drake Egg +(@GUID+02,192536,571,1,4,7006.557,-1260.263,1099.344,1.588249,0,0,0.7132502,0.7009096,120,255,1), -- Small Proto-Drake Egg +(@GUID+03,192536,571,1,4,7029.698,-1372.383,983.2609,-2.705255,0,0,-0.9762955,0.2164421,120,255,1), -- Small Proto-Drake Egg +(@GUID+04,192536,571,1,4,7011.055,-1270.609,1099.002,3.124123,0,0,0.9999619,0.008734641,120,255,1), -- Small Proto-Drake Egg +(@GUID+05,192536,571,1,4,7013.271,-1395.635,985.5262,-1.326448,0,0,-0.6156607,0.7880114,120,255,1), -- Small Proto-Drake Egg +-- phasemask 128 and 1 +(@GUID+06,192536,571,1,129,7013.271,-1395.635,985.5262,-1.326448,0,0,-0.6156607,0.7880114,120,255,1), -- Small Proto-Drake Egg +(@GUID+07,192536,571,1,129,6985.812,-1278.627,1101.344,1.308995,0,0,0.6087608,0.7933538,120,255,1), -- Small Proto-Drake Egg +(@GUID+08,192536,571,1,129,7006.557,-1260.263,1099.344,1.588249,0,0,0.7132502,0.7009096,120,255,1), -- Small Proto-Drake Egg +(@GUID+09,192536,571,1,129,7029.698,-1372.383,983.2609,-2.705255,0,0,-0.9762955,0.2164421,120,255,1), -- Small Proto-Drake Egg +(@GUID+10,192536,571,1,129,7011.055,-1270.609,1099.002,3.124123,0,0,0.9999619,0.008734641,120,255,1), -- Small Proto-Drake Egg +(@GUID+11,192536,571,1,129,7033.894,-1391.528,983.4609,0.05235888,0,0,0.02617645,0.9996573,120,255,1), -- Small Proto-Drake Egg +-- phasemask 4 +(@GUID+12,192538,571,1,4,7081.91,-906.408,1065.914,0.95993,0,0,0.4617481,0.8870111,120,255,1), -- Small Proto-Drake Egg +(@GUID+13,192538,571,1,4,7080.195,-912.1233,1066.743,-0.5410506,0,0,-0.2672377,0.9636307,120,255,1), -- Small Proto-Drake Egg +(@GUID+14,192538,571,1,4,7085.535,-912.6684,1066.484,1.815142,0,0,0.7880106,0.6156617,120,255,1), -- Small Proto-Drake Egg +(@GUID+15,192538,571,1,4,7090.95,-908.6667,1065.036,-0.9948372,0,0,-0.4771585,0.8788173,120,255,1), -- Small Proto-Drake Egg +(@GUID+16,192538,571,1,4,7082.188,-916.6476,1068.389,2.234018,0,0,0.8987932,0.4383728,120,255,1); -- Small Proto-Drake Egg diff --git a/sql/updates/world/2012_02_08_06_world_achievement_criteria_data.sql b/sql/updates/world/2012_02_08_06_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..199c9df86f4 --- /dev/null +++ b/sql/updates/world/2012_02_08_06_world_achievement_criteria_data.sql @@ -0,0 +1,12 @@ +DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (6343, 6344, 6345, 6346, 6347); +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES +(6343,6,4197,0,''), -- Wintergrasp +(6343,1,16111,0,''), -- target Love Fool +(6344,6,2177,0,''), -- Battle Ring +(6344,1,16111,0,''), -- target Love Fool +(6345,6,3421,0,''), -- Blacksmith +(6345,1,16111,0,''), -- target Love Fool +(6346,6,4100,0,''), -- The Culling of Stratholme +(6346,1,16111,0,''), -- target Love Fool +(6347,6,3456,0,''), -- Naxxramas +(6347,1,16111,0,''); -- target Love Fool diff --git a/sql/updates/world/2012_02_08_07_world_pool.sql b/sql/updates/world/2012_02_08_07_world_pool.sql new file mode 100644 index 00000000000..8f43e1b3b03 --- /dev/null +++ b/sql/updates/world/2012_02_08_07_world_pool.sql @@ -0,0 +1,11 @@ +SET @pool_id := 348; + +DELETE FROM `pool_template` WHERE `entry` = @pool_id; +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@pool_id, 1, 'Public Relations Agent <Crown Chemical Co.> - Daily Quests'); + +DELETE FROM `pool_quest` WHERE `entry` IN (24635, 24636, 24629) AND `pool_entry` = @pool_id; +INSERT INTO `pool_quest` (`entry`, `pool_entry`, `description`) VALUES +(24629, @pool_id, 'A Perfect Puff of Perfume'), +(24635, @pool_id, 'A Cloudlet of Classy Cologne'), +(24636, @pool_id, 'Bonbon Blitz'); diff --git a/sql/updates/world/2012_02_08_08_world_pool.sql b/sql/updates/world/2012_02_08_08_world_pool.sql new file mode 100644 index 00000000000..96124ec2540 --- /dev/null +++ b/sql/updates/world/2012_02_08_08_world_pool.sql @@ -0,0 +1,16 @@ +-- Pool quests from High Crusader Adelard +-- Source: http://www.wowwiki.com/High_Crusader_Adelard +SET @pool_id := 349; + +-- create new pool, allowing only 1 out of 4 dailys per day +DELETE FROM `pool_template` WHERE `entry` = @pool_id; +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@pool_id, 1, 'High Crusader Adelard - Daily Quests'); + +-- fill pools with the daily quests +DELETE FROM `pool_quest` WHERE `entry` IN (14101, 14102, 14104, 14105) AND `pool_entry` = @pool_id; +INSERT INTO `pool_quest` (`entry`, `pool_entry`, `description`) VALUES +(14101, @pool_id, 'Drottinn Hrothgar'), +(14102, @pool_id, 'Mistcaller Yngvar'), +(14104, @pool_id, 'Ornolf The Scarred'), +(14105, @pool_id, 'Deathspeaker Kharos'); diff --git a/sql/updates/world/2012_02_08_09_world_quest_template.sql b/sql/updates/world/2012_02_08_09_world_quest_template.sql new file mode 100644 index 00000000000..1b53bd34811 --- /dev/null +++ b/sql/updates/world/2012_02_08_09_world_quest_template.sql @@ -0,0 +1 @@ +UPDATE `quest_template` SET `RequestItemsText` = 'Jen''shan see a mighty $C before her and da spirits approve.$b$bDa path of da $C is one of our oldest walks of life. Da Horde turned to us when they be just strugglin'' to survive on Azeroth, and they ask us to teach them, to show them the secrets of many tings. They were strong already: strong in shaman ways; strong in warrior ways. But the $C path not be their path... then.' WHERE id = 3082; diff --git a/sql/updates/world/2012_02_08_10_world_gossip.sql b/sql/updates/world/2012_02_08_10_world_gossip.sql new file mode 100644 index 00000000000..009b56c7018 --- /dev/null +++ b/sql/updates/world/2012_02_08_10_world_gossip.sql @@ -0,0 +1,110 @@ +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9130,9495,9879,9893,9988,10115) AND `id`=0; +DELETE FROM `gossip_menu_option` WHERE `menu_id`=9879 AND `id`=1; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(9130,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''), +(9495,0,1, 'Let me browse your goods.',3,128,0,0,0,0, ''), +(9879,0,3, 'Train me',5,16,0,0,0,0, ''), +(9879,1,1, 'Let me browse your goods.',3,128,0,0,0,0, ''), +(9893,0,3, 'Train me',5,16,0,0,0,0, ''), +(9988,0,3, 'Train me',5,16,0,0,0,0, ''), +(10115,0,3, 'Train me',5,16,0,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9130 AND `text_id`=12343; +DELETE FROM `gossip_menu` WHERE `entry`=9130 AND `text_id`=12344; +DELETE FROM `gossip_menu` WHERE `entry`=9133 AND `text_id`=12349; +DELETE FROM `gossip_menu` WHERE `entry`=9133 AND `text_id`=12350; +DELETE FROM `gossip_menu` WHERE `entry`=9134 AND `text_id`=12354; +DELETE FROM `gossip_menu` WHERE `entry`=9134 AND `text_id`=12352; +DELETE FROM `gossip_menu` WHERE `entry`=9137 AND `text_id`=12360; +DELETE FROM `gossip_menu` WHERE `entry`=9137 AND `text_id`=12361; +DELETE FROM `gossip_menu` WHERE `entry`=9138 AND `text_id`=12362; +DELETE FROM `gossip_menu` WHERE `entry`=9138 AND `text_id`=12363; +DELETE FROM `gossip_menu` WHERE `entry`=9153 AND `text_id`=12384; +DELETE FROM `gossip_menu` WHERE `entry`=9154 AND `text_id`=12387; +DELETE FROM `gossip_menu` WHERE `entry`=9158 AND `text_id`=12394; +DELETE FROM `gossip_menu` WHERE `entry`=9159 AND `text_id`=12395; +DELETE FROM `gossip_menu` WHERE `entry`=9160 AND `text_id`=12403; +DELETE FROM `gossip_menu` WHERE `entry`=9170 AND `text_id`=12433; +DELETE FROM `gossip_menu` WHERE `entry`=9172 AND `text_id`=12440; +DELETE FROM `gossip_menu` WHERE `entry`=9173 AND `text_id`=12441; +DELETE FROM `gossip_menu` WHERE `entry`=9210 AND `text_id`=12521; +DELETE FROM `gossip_menu` WHERE `entry`=9214 AND `text_id`=12525; +DELETE FROM `gossip_menu` WHERE `entry`=9216 AND `text_id`=12527; +DELETE FROM `gossip_menu` WHERE `entry`=9219 AND `text_id`=12530; +DELETE FROM `gossip_menu` WHERE `entry`=9223 AND `text_id`=13481; +DELETE FROM `gossip_menu` WHERE `entry`=9224 AND `text_id`=12538; +DELETE FROM `gossip_menu` WHERE `entry`=9247 AND `text_id`=12555; +DELETE FROM `gossip_menu` WHERE `entry`=9280 AND `text_id`=12585; +DELETE FROM `gossip_menu` WHERE `entry`=9417 AND `text_id`=12663; +DELETE FROM `gossip_menu` WHERE `entry`=9495 AND `text_id`=12781; +DELETE FROM `gossip_menu` WHERE `entry`=9685 AND `text_id`=13134; +DELETE FROM `gossip_menu` WHERE `entry`=9685 AND `text_id`=13135; +DELETE FROM `gossip_menu` WHERE `entry`=9893 AND `text_id`=13735; +DELETE FROM `gossip_menu` WHERE `entry`=9988 AND `text_id`=13842; +DELETE FROM `gossip_menu` WHERE `entry`=10115 AND `text_id`=14041; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(9130,12343),(9130,12344), +(9133,12349),(9133,12350), +(9134,12354),(9134,12352), +(9137,12360),(9137,12361), +(9138,12362),(9138,12363), +(9153,12384),(9154,12387), +(9158,12394),(9159,12395), +(9160,12403),(9170,12433), +(9172,12440),(9173,12441), +(9210,12521),(9214,12525), +(9216,12527),(9219,12530), +(9223,13481),(9224,12538), +(9247,12555),(9280,12585), +(9417,12663),(9495,12781), +(9685,13134),(9685,13135), +(9893,13735),(9988,13842), +(10115,14041); + +-- Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup` IN (9130,9133,9134,9137,9138,9685); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,9130,12344,0,8,11571,0,0,0,'','Ahlurglgr - Show different gossip if player has rewarded quest 11571'), +(14,9133,12350,0,8,11571,0,0,0,'','Brglmurgl - Show different gossip if player has rewarded quest 11571'), +(14,9134,12354,0,14,11571,0,0,0,'','Mrmrglmr - Show different gossip if player has not rewarded quest 11571'), +(14,9137,12361,0,8,11571,0,0,0,'','Lurgglbr - Show different gossip if player has rewarded quest 11571'), +(14,9138,12363,0,8,11571,0,0,0,'','Winterfin Gatherer - Show different gossip if player has rewarded quest 11571'), +(14,9685,13135,0,8,11571,0,0,0,'','Glrglrglr - Show different gossip if player has rewarded quest 11571'); + +-- Insert npc_text from sniff +DELETE FROM `npc_text` WHERE `ID`=13481; +INSERT INTO `npc_text` (`ID`,`text0_0`,`text0_1`,`lang0`,`prob0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`text1_0`,`text1_1`,`lang1`,`prob1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`text2_0`,`text2_1`,`lang2`,`prob2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`text3_0`,`text3_1`,`lang3`,`prob3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`text4_0`,`text4_1`,`lang4`,`prob4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`text5_0`,`text5_1`,`lang5`,`prob5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`text6_0`,`text6_1`,`lang6`,`prob6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`text7_0`,`text7_1`,`lang7`,`prob7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`,`WDBVerified`) VALUES +(13481,'','I''ll never forget what you did for Thassarian. I will always be in your debt.',0,1,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,12340); + +-- Creature Gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9130 WHERE `entry`=25206; -- Ahlurglgr +UPDATE `creature_template` SET `gossip_menu_id`=9133 WHERE `entry`=25199; -- Brglmurgl +UPDATE `creature_template` SET `gossip_menu_id`=9134 WHERE `entry`=25205; -- Mrmrglmr +UPDATE `creature_template` SET `gossip_menu_id`=9137 WHERE `entry`=25208; -- Lurgglbr +UPDATE `creature_template` SET `gossip_menu_id`=9138 WHERE `entry`=25198; -- Winterfin Gatherer +UPDATE `creature_template` SET `gossip_menu_id`=9153 WHERE `entry`=25336; -- Grunt Ragefist +UPDATE `creature_template` SET `gossip_menu_id`=9154 WHERE `entry`=25339; -- Spirit Talker Snarlfang +UPDATE `creature_template` SET `gossip_menu_id`=9158 WHERE `entry`=25374; -- Ortrosh +UPDATE `creature_template` SET `gossip_menu_id`=9159 WHERE `entry`=25376; -- Imperean +UPDATE `creature_template` SET `gossip_menu_id`=9160 WHERE `entry`=25335; -- Longrunner Proudhoof +UPDATE `creature_template` SET `gossip_menu_id`=9170 WHERE `entry`=25589; -- Bonker Togglevolt +UPDATE `creature_template` SET `gossip_menu_id`=9172 WHERE `entry`=25602; -- Greatmother Taiga +UPDATE `creature_template` SET `gossip_menu_id`=9173 WHERE `entry`=25604; -- Sage Highmesa +UPDATE `creature_template` SET `gossip_menu_id`=9210 WHERE `entry`=26085; -- Wendy Darren +UPDATE `creature_template` SET `gossip_menu_id`=9214 WHERE `entry`=26084; -- Jeremiah Hawning +UPDATE `creature_template` SET `gossip_menu_id`=9216 WHERE `entry`=25285; -- Harbinger Vurenn +UPDATE `creature_template` SET `gossip_menu_id`=9219 WHERE `entry`=25828; -- Guard Mitchells +UPDATE `creature_template` SET `gossip_menu_id`=9223 WHERE `entry`=25251; -- Leryssa +UPDATE `creature_template` SET `gossip_menu_id`=9224 WHERE `entry`=26083; -- Gerald Green +UPDATE `creature_template` SET `gossip_menu_id`=9247 WHERE `entry`=25395; -- Private Brau +UPDATE `creature_template` SET `gossip_menu_id`=9280 WHERE `entry`=26219; -- Iruk +UPDATE `creature_template` SET `gossip_menu_id`=9417 WHERE `entry`=26170; -- Thassarian +UPDATE `creature_template` SET `gossip_menu_id`=9495 WHERE `entry`=26110; -- Librarian Serrah +UPDATE `creature_template` SET `gossip_menu_id`=9685 WHERE `entry`=28375; -- Glrglrglr +UPDATE `creature_template` SET `gossip_menu_id`=9821 WHERE `entry`=27065; -- Breka Wolfsister +UPDATE `creature_template` SET `gossip_menu_id`=9879 WHERE `entry`=26977; -- Adelene Sunlance +UPDATE `creature_template` SET `gossip_menu_id`=9893 WHERE `entry`=26982; -- Geba'li +UPDATE `creature_template` SET `gossip_menu_id`=9988 WHERE `entry`=26972; -- Orn Tenderhoof +UPDATE `creature_template` SET `gossip_menu_id`=10115 WHERE `entry`=26969; -- Raenah diff --git a/sql/updates/world/2012_02_08_11_world_pool.sql b/sql/updates/world/2012_02_08_11_world_pool.sql new file mode 100644 index 00000000000..f49f5afec6a --- /dev/null +++ b/sql/updates/world/2012_02_08_11_world_pool.sql @@ -0,0 +1,24 @@ +-- Toxic Tolerance questchain for a horde specific mount requires doing +-- daily quests. However currently all of those are acceptable daily, though +-- only one (random) should be. +-- Source: http://www.wowhead.com/quest=13917/gorishi-grub#comments:id=829822 +SET @pool1_id := 350; -- Orcs, Bloodelves +SET @pool2_id := 351; -- Undead, Tauren, Troll + +-- create new pools, each allowing only 1 out of 4 dailys per day +DELETE FROM `pool_template` WHERE `entry` IN (@pool1_id, @pool2_id); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@pool1_id, 1, 'Toxic Tolerance Daily-Quests'), +(@pool2_id, 1, 'Toxic Tolerance Daily-Quests'); + +-- fill pools with the daily quests, starting from Venomhide Hatchling (c34320) +DELETE FROM `pool_quest` WHERE `entry` IN (13889, 13915, 13903, 13904, 13905, 13917, 13916, 13914) AND `pool_entry` IN (@pool1_id, @pool2_id); +INSERT INTO `pool_quest` (`entry`, `pool_entry`, `description`) VALUES +(13889, @pool1_id, 'Hungry, Hungry Hatchling'), +(13903, @pool1_id, 'Gorishi Grub'), +(13904, @pool1_id, 'Poached, Scrambled, Or Raw?'), +(13905, @pool1_id, 'Searing Roc Feathers'), +(13915, @pool2_id, 'Hungry, Hungry Hatchling'), +(13917, @pool2_id, 'Gorishi Grub'), +(13916, @pool2_id, 'Poached, Scrambled, Or Raw?'), +(13914, @pool2_id, 'Searing Roc Feathers'); diff --git a/sql/updates/world/2012_02_08_12_world_sai.sql b/sql/updates/world/2012_02_08_12_world_sai.sql new file mode 100644 index 00000000000..81ea39c8ecf --- /dev/null +++ b/sql/updates/world/2012_02_08_12_world_sai.sql @@ -0,0 +1,7 @@ +-- Remove Mistwhisper Refuge Zepik spawn +DELETE FROM `creature` WHERE `id` = 28216; + +-- Add SAI to High-Shaman Rakjak to give horn when accepting A rough ride +DELETE FROM `smart_scripts` WHERE `entryorguid`=28082 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 +(28082, 0, 0, 0, 19, 0, 100, 0, 12536, 0, 0, 0, 56, 38512, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'High-Shaman Rakjak - On acccept quest A rough ride - give Zepik''s Hunting Horn'); diff --git a/sql/updates/world/2012_02_08_13_world_gameobject.sql b/sql/updates/world/2012_02_08_13_world_gameobject.sql new file mode 100644 index 00000000000..0a43dda67d4 --- /dev/null +++ b/sql/updates/world/2012_02_08_13_world_gameobject.sql @@ -0,0 +1,13 @@ +-- Lunar festival: Rocket Clusters placed near Omen's summon place (Moonglade) +SET @CLUSTER := 180874; +SET @LUNARFESTIVAL := 7; + +DELETE FROM `gameobject` WHERE `id`=@CLUSTER AND `guid` IN (230,231); +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`) VALUES +(230,@CLUSTER,1,1,1,7531.662,-2851.228,458.9172), +(231,@CLUSTER,1,1,1,7561.145,-2872.45,461.0998); + +DELETE FROM `game_event_gameobject` WHERE `guid` IN (230,231) AND `eventEntry`=@LUNARFESTIVAL; +INSERT INTO `game_event_gameobject` (`eventEntry`,`guid`) VALUES +(@LUNARFESTIVAL,230), +(@LUNARFESTIVAL,231); diff --git a/sql/updates/world/2012_02_08_14_world_sai.sql b/sql/updates/world/2012_02_08_14_world_sai.sql new file mode 100644 index 00000000000..60e96a52663 --- /dev/null +++ b/sql/updates/world/2012_02_08_14_world_sai.sql @@ -0,0 +1,13 @@ +SET @ENTRY := 38035; -- Chemical Wagon +SET @SPELL1 := 71599; -- Cosmetic - Explosion (Chemical Wagon) +SET @SPELL2 := 71597; -- Cosmetic - Low Poly Fire (with Sound) + +DELETE FROM `conditions` WHERE `SourceEntry`=@SPELL1 AND `SourceTypeOrReferenceId`=13 AND `ConditionTypeOrReference`=18; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`Comment`) VALUES +(13,@SPELL1,18,1,@ENTRY, 'Chemical Wagon - Cosmetic - Explosion (Chemical Wagon)'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +UPDATE creature_template SET AIName='SmartAI' WHERE entry=@ENTRY; +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,@SPELL1,0,0,0,33,@ENTRY,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,"Chemical Wagon - Spell Hit - Credit"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,11,@SPELL2,2,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Chemical Wagon - Spell Hit - Cast Cosmetic - Low Poly Fire (with Sound)"); diff --git a/sql/updates/world/2012_02_08_15_world_misc.sql b/sql/updates/world/2012_02_08_15_world_misc.sql new file mode 100644 index 00000000000..f6ea64249cf --- /dev/null +++ b/sql/updates/world/2012_02_08_15_world_misc.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='npc_spring_rabbit' WHERE `entry`=32791; +UPDATE `achievement_criteria_data` SET `value1`=186 WHERE `criteria_id`=9199 AND `type`=6; -- Dolanaar, not Dalaran diff --git a/sql/updates/world/2012_02_08_16_world_sai.sql b/sql/updates/world/2012_02_08_16_world_sai.sql new file mode 100644 index 00000000000..06fbb233aeb --- /dev/null +++ b/sql/updates/world/2012_02_08_16_world_sai.sql @@ -0,0 +1,22 @@ +-- Chillmaw +SET @ENTRY := 33687; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +UPDATE creature_template SET AIName="SmartAI" WHERE entry=@ENTRY LIMIT 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 +(@ENTRY,0,0,0,0,0,100,0,10000,11000,20000,23000,11,65248,0,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Chillmaw - Combat - Cast Frost Breath"), +(@ENTRY,0,1,0,2,0,100,1,0,35,0,0,11,65260,0,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Chillmaw - @35% health - Cast Wing Buffet"), +(@ENTRY,0,2,0,2,0,100,1,0,25,0,0,11,60603,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Chillmaw - @25% health - Cast Eject Passenger 1"), +(@ENTRY,0,3,0,2,0,100,1,0,50,0,0,11,62539,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Chillmaw - @50% health - Cast Eject Passenger 2"), +(@ENTRY,0,4,0,2,0,100,1,0,75,0,0,11,52205,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Chillmaw - @75% health - Cast Eject Passenger 3"); +-- Cultist Bombardier SAI +SET @ENTRY := 33695; -- NPC entry +SET @SPELL1 := 65128; -- Throw Dynamite +SET @SPELL2 := 65130; -- Time Bomb +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +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,0,0,100,0,5000,6000,7000,8000,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Cultist Bombardier - Combat - Cast Throw Dynamite'), +(@ENTRY,0,1,0,0,0,100,0,18000,20000,6000,7000,11,@SPELL2,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Cultist Bombardier - Combat - Cast Time Bomb'), +(@ENTRY,0,2,0,4,0,100,1,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Cultist Bombardier - On Aggro - Set Phase 1'), +(@ENTRY,0,3,0,1,1,100,1,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Cultist Bombardier - OOC - Despawn (Phase 1)'); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c372d12418b..7c2ebe9906c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/genrev/CMakeLists.txt b/src/genrev/CMakeLists.txt index 26ea738ee25..022ff5b2f6f 100644 --- a/src/genrev/CMakeLists.txt +++ b/src/genrev/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index 561ee50f439..2b6c553e10b 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/authserver/Authentication/AuthCodes.cpp b/src/server/authserver/Authentication/AuthCodes.cpp index cd8401565ba..ace18e7b45c 100644 --- a/src/server/authserver/Authentication/AuthCodes.cpp +++ b/src/server/authserver/Authentication/AuthCodes.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/authserver/Authentication/AuthCodes.h b/src/server/authserver/Authentication/AuthCodes.h index 11b1b9fb33d..f940d459d40 100755 --- a/src/server/authserver/Authentication/AuthCodes.h +++ b/src/server/authserver/Authentication/AuthCodes.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/authserver/CMakeLists.txt b/src/server/authserver/CMakeLists.txt index 3abfe380297..0d94dc47407 100644 --- a/src/server/authserver/CMakeLists.txt +++ b/src/server/authserver/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp index 8226868fa7a..01a33d836d6 100755 --- a/src/server/authserver/Main.cpp +++ b/src/server/authserver/Main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/authserver/Realms/RealmList.cpp b/src/server/authserver/Realms/RealmList.cpp index c81af80d31d..245b9c7cc8c 100755 --- a/src/server/authserver/Realms/RealmList.cpp +++ b/src/server/authserver/Realms/RealmList.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -70,7 +70,7 @@ void RealmList::UpdateRealms(bool init) { sLog->outDetail("Updating Realm List..."); - PreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_REALMLIST); + PreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_REALMLIST); PreparedQueryResult result = LoginDatabase.Query(stmt); // Circle through results and add them to the realm map diff --git a/src/server/authserver/Realms/RealmList.h b/src/server/authserver/Realms/RealmList.h index 3fe04b0031e..698026876fb 100755 --- a/src/server/authserver/Realms/RealmList.h +++ b/src/server/authserver/Realms/RealmList.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp index c24012efcef..6d295a0bbee 100755 --- a/src/server/authserver/Server/AuthSocket.cpp +++ b/src/server/authserver/Server/AuthSocket.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -209,7 +209,7 @@ AuthSocket::~AuthSocket(void) {} // Accept the connection and set the s random value for SRP6 void AuthSocket::OnAccept(void) { - sLog->outBasic("Accepting connection from '%s'", socket().get_remote_address().c_str()); + sLog->outBasic("'%s:%d' Accepting connection", socket().getRemoteAddress().c_str(), socket().getRemotePort()); } void AuthSocket::OnClose(void) @@ -247,7 +247,7 @@ void AuthSocket::OnRead() // Report unknown packets in the error log if (i == AUTH_TOTAL_COMMANDS) { - sLog->outError("[Auth] got unknown packet from '%s'", socket().get_remote_address().c_str()); + sLog->outError("[Auth] got unknown packet from '%s'", socket().getRemoteAddress().c_str()); socket().shutdown(); return; } @@ -283,7 +283,7 @@ void AuthSocket::_SetVSFields(const std::string& rI) v_hex = v.AsHexStr(); s_hex = s.AsHexStr(); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SET_VS); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_VS); stmt->setString(0, v_hex); stmt->setString(1, s_hex); stmt->setString(2, _login); @@ -348,22 +348,22 @@ bool AuthSocket::_HandleLogonChallenge() pkt << (uint8)0x00; // Verify that this IP is not in the ip_banned table - LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_SET_EXPIREDIPBANS)); + LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_DEL_EXPIRED_IP_BANS)); - const std::string& ip_address = socket().get_remote_address(); - PreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_IPBANNED); + const std::string& ip_address = socket().getRemoteAddress(); + PreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_IP_BANNED); stmt->setString(0, ip_address); PreparedQueryResult result = LoginDatabase.Query(stmt); if (result) { pkt << (uint8)WOW_FAIL_BANNED; - sLog->outBasic("[AuthChallenge] Banned ip %s tried to login!", ip_address.c_str()); + sLog->outBasic("'%s:%d' [AuthChallenge] Banned ip tries to login!",socket().getRemoteAddress().c_str(), socket().getRemotePort()); } else { // Get the account details from the account table // No SQL injection (prepared statement) - stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_LOGONCHALLENGE); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_LOGONCHALLENGE); stmt->setString(0, _login); PreparedQueryResult res2 = LoginDatabase.Query(stmt); @@ -393,10 +393,10 @@ bool AuthSocket::_HandleLogonChallenge() if (!locked) { //set expired bans to inactive - LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_SET_EXPIREDACCBANS)); + LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_UPD_EXPIRED_ACCOUNT_BANS)); // If the account is banned, reject the logon attempt - stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_ACCBANNED); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_BANNED); stmt->setUInt32(0, fields[1].GetUInt32()); PreparedQueryResult banresult = LoginDatabase.Query(stmt); if (banresult) @@ -404,12 +404,12 @@ bool AuthSocket::_HandleLogonChallenge() if ((*banresult)[0].GetUInt64() == (*banresult)[1].GetUInt64()) { pkt << (uint8)WOW_FAIL_BANNED; - sLog->outBasic("[AuthChallenge] Banned account %s tried to login!", _login.c_str()); + sLog->outBasic("'%s:%d' [AuthChallenge] Banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ()); } else { pkt << (uint8)WOW_FAIL_SUSPENDED; - sLog->outBasic("[AuthChallenge] Temporarily banned account %s tried to login!", _login.c_str()); + sLog->outBasic("'%s:%d' [AuthChallenge] Temporarily banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ()); } } else @@ -480,7 +480,9 @@ bool AuthSocket::_HandleLogonChallenge() for (int i = 0; i < 4; ++i) _localizationName[i] = ch->country[4-i-1]; - sLog->outBasic("[AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", _login.c_str (), ch->country[3], ch->country[2], ch->country[1], ch->country[0], GetLocaleByName(_localizationName)); + sLog->outBasic("'%s:%d' [AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", socket().getRemoteAddress().c_str(), socket().getRemotePort(), + _login.c_str (), ch->country[3], ch->country[2], ch->country[1], ch->country[0], GetLocaleByName(_localizationName) + ); } } } @@ -590,15 +592,15 @@ bool AuthSocket::_HandleLogonProof() // Check if SRP6 results match (password is correct), else send an error if (!memcmp(M.AsByteArray(), lp.M1, 20)) { - sLog->outBasic("User '%s' successfully authenticated", _login.c_str()); + sLog->outBasic("'%s:%d' User '%s' successfully authenticated", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str()); // Update the sessionkey, last_ip, last login time and reset number of failed logins in the account table for this account // No SQL injection (escaped user name) and IP address as received by socket const char *K_hex = K.AsHexStr(); - PreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_SET_LOGONPROOF); + PreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_LOGONPROOF); stmt->setString(0, K_hex); - stmt->setString(1, socket().get_remote_address().c_str()); + stmt->setString(1, socket().getRemoteAddress().c_str()); stmt->setUInt32(2, GetLocaleByName(_localizationName)); stmt->setString(3, _login); LoginDatabase.Execute(stmt); @@ -638,17 +640,17 @@ bool AuthSocket::_HandleLogonProof() char data[4] = { AUTH_LOGON_PROOF, WOW_FAIL_UNKNOWN_ACCOUNT, 3, 0 }; socket().send(data, sizeof(data)); - sLog->outBasic("[AuthChallenge] account %s tried to login with wrong password!", _login.c_str()); + sLog->outBasic("'%s:%d' [AuthChallenge] account %s tried to login with invalid password!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ()); uint32 MaxWrongPassCount = ConfigMgr::GetIntDefault("WrongPass.MaxCount", 0); if (MaxWrongPassCount > 0) { //Increment number of failed logins by one and if it reaches the limit temporarily ban that account or IP - PreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_SET_FAILEDLOGINS); + PreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_FAILEDLOGINS); stmt->setString(0, _login); LoginDatabase.Execute(stmt); - stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_FAILEDLOGINS); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_FAILEDLOGINS); stmt->setString(0, _login); if (PreparedQueryResult loginfail = LoginDatabase.Query(stmt)) @@ -663,22 +665,23 @@ bool AuthSocket::_HandleLogonProof() if (WrongPassBanType) { uint32 acc_id = (*loginfail)[0].GetUInt32(); - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SET_ACCAUTOBANNED); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ACCOUNT_AUTO_BANNED); stmt->setUInt32(0, acc_id); stmt->setUInt32(1, WrongPassBanTime); LoginDatabase.Execute(stmt); - sLog->outBasic("[AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times", - _login.c_str(), WrongPassBanTime, failed_logins); + sLog->outBasic("'%s:%d' [AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times", + socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str(), WrongPassBanTime, failed_logins); } else { - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SET_IPAUTOBANNED); - stmt->setString(0, socket().get_remote_address()); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_IP_AUTO_BANNED); + stmt->setString(0, socket().getRemoteAddress()); stmt->setUInt32(1, WrongPassBanTime); LoginDatabase.Execute(stmt); - sLog->outBasic("[AuthChallenge] IP %s got banned for '%u' seconds because account %s failed to authenticate '%u' times", socket().get_remote_address().c_str(), WrongPassBanTime, _login.c_str(), failed_logins); + sLog->outBasic("'%s:%d' [AuthChallenge] IP %s got banned for '%u' seconds because account %s failed to authenticate '%u' times", + socket().getRemoteAddress().c_str(), socket().getRemotePort(), socket().getRemoteAddress().c_str(), WrongPassBanTime, _login.c_str(), failed_logins); } } } @@ -723,14 +726,14 @@ bool AuthSocket::_HandleReconnectChallenge() _login = (const char*)ch->I; - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_SESSIONKEY); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_SESSIONKEY); stmt->setString(0, _login); PreparedQueryResult result = LoginDatabase.Query(stmt); // Stop if the account is not found if (!result) { - sLog->outError("[ERROR] user %s tried to login and we cannot find his session key in the database.", _login.c_str()); + sLog->outError("'%s:%d' [ERROR] user %s tried to login and we cannot find his session key in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str()); socket().shutdown(); return false; } @@ -790,7 +793,7 @@ bool AuthSocket::_HandleReconnectProof() } else { - sLog->outError("[ERROR] user %s tried to login, but session invalid.", _login.c_str()); + sLog->outError("'%s:%d' [ERROR] user %s tried to login, but session is invalid.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str()); socket().shutdown(); return false; } @@ -807,12 +810,12 @@ bool AuthSocket::_HandleRealmList() // Get the user id (else close the connection) // No SQL injection (prepared statement) - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_ACCIDBYNAME); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_ID_BY_NAME); stmt->setString(0, _login); PreparedQueryResult result = LoginDatabase.Query(stmt); if (!result) { - sLog->outError("[ERROR] user %s tried to login and we cannot find him in the database.", _login.c_str()); + sLog->outError("'%s:%d' [ERROR] user %s tried to login but we cannot find him in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str()); socket().shutdown(); return false; } @@ -838,7 +841,7 @@ bool AuthSocket::_HandleRealmList() uint8 AmountOfCharacters; // No SQL injection. id of realm is controlled by the database. - stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_NUMCHARSONREALM); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_NUM_CHARS_ON_REALM); stmt->setUInt32(0, i->second.m_ID); stmt->setUInt32(1, id); result = LoginDatabase.Query(stmt); diff --git a/src/server/authserver/Server/AuthSocket.h b/src/server/authserver/Server/AuthSocket.h index 75df3d69a05..490b0db2149 100755 --- a/src/server/authserver/Server/AuthSocket.h +++ b/src/server/authserver/Server/AuthSocket.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/authserver/Server/RealmAcceptor.h b/src/server/authserver/Server/RealmAcceptor.h index fc302adfccb..32f4f3e4122 100755 --- a/src/server/authserver/Server/RealmAcceptor.h +++ b/src/server/authserver/Server/RealmAcceptor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/authserver/Server/RealmSocket.cpp b/src/server/authserver/Server/RealmSocket.cpp index 4d92747d262..72c36fc6646 100755 --- a/src/server/authserver/Server/RealmSocket.cpp +++ b/src/server/authserver/Server/RealmSocket.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -31,7 +31,7 @@ RealmSocket::Session::Session(void) {} RealmSocket::Session::~Session(void) { } -RealmSocket::RealmSocket(void) : input_buffer_(4096), session_(NULL), remote_address_() +RealmSocket::RealmSocket(void) : input_buffer_(4096), session_(NULL), _remoteAddress() { reference_counting_policy().value(ACE_Event_Handler::Reference_Counting_Policy::ENABLED); @@ -63,7 +63,8 @@ int RealmSocket::open(void * arg) return -1; } - remote_address_ = addr.get_host_addr(); + _remoteAddress = addr.get_host_addr(); + _remotePort = addr.get_port_number(); // Register with ACE Reactor if (Base::open(arg) == -1) @@ -89,9 +90,14 @@ int RealmSocket::close(int) return 0; } -const std::string& RealmSocket::get_remote_address(void) const +const std::string& RealmSocket::getRemoteAddress(void) const { - return remote_address_; + return _remoteAddress; +} + +const uint16 RealmSocket::getRemotePort(void) const +{ + return _remotePort; } size_t RealmSocket::recv_len(void) const diff --git a/src/server/authserver/Server/RealmSocket.h b/src/server/authserver/Server/RealmSocket.h index 12769c07185..9682b5e4559 100755 --- a/src/server/authserver/Server/RealmSocket.h +++ b/src/server/authserver/Server/RealmSocket.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -52,7 +52,9 @@ public: bool send(const char *buf, size_t len); - const std::string& get_remote_address(void) const; + const std::string& getRemoteAddress(void) const; + + const uint16 getRemotePort(void) const; virtual int open(void *); @@ -70,7 +72,8 @@ private: ACE_Message_Block input_buffer_; Session* session_; - std::string remote_address_; + std::string _remoteAddress; + uint16 _remotePort; }; #endif /* __REALMSOCKET_H__ */ diff --git a/src/server/authserver/authserver.rc b/src/server/authserver/authserver.rc index 850fa6041b8..97de89432bf 100755 --- a/src/server/authserver/authserver.rc +++ b/src/server/authserver/authserver.rc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/BoundingIntervalHierarchy.cpp b/src/server/collision/BoundingIntervalHierarchy.cpp index 1540d1af667..8e90cac92f5 100755 --- a/src/server/collision/BoundingIntervalHierarchy.cpp +++ b/src/server/collision/BoundingIntervalHierarchy.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/BoundingIntervalHierarchy.h b/src/server/collision/BoundingIntervalHierarchy.h index cb6158e94eb..b0c35237a9d 100755 --- a/src/server/collision/BoundingIntervalHierarchy.h +++ b/src/server/collision/BoundingIntervalHierarchy.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/CMakeLists.txt b/src/server/collision/CMakeLists.txt index 0ea62fb1ed0..e2e182626c7 100644 --- a/src/server/collision/CMakeLists.txt +++ b/src/server/collision/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/collision/Management/IVMapManager.h b/src/server/collision/Management/IVMapManager.h index a600dcb4895..a645e88ef05 100755 --- a/src/server/collision/Management/IVMapManager.h +++ b/src/server/collision/Management/IVMapManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Management/VMapFactory.cpp b/src/server/collision/Management/VMapFactory.cpp index 438b854de16..657f989a0c0 100755 --- a/src/server/collision/Management/VMapFactory.cpp +++ b/src/server/collision/Management/VMapFactory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Management/VMapFactory.h b/src/server/collision/Management/VMapFactory.h index 45ab1309049..27bce523c43 100755 --- a/src/server/collision/Management/VMapFactory.h +++ b/src/server/collision/Management/VMapFactory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Management/VMapManager2.cpp b/src/server/collision/Management/VMapManager2.cpp index 0632542f82e..62abc31831a 100644 --- a/src/server/collision/Management/VMapManager2.cpp +++ b/src/server/collision/Management/VMapManager2.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Management/VMapManager2.h b/src/server/collision/Management/VMapManager2.h index 83fec0f0d11..1fba108388a 100755 --- a/src/server/collision/Management/VMapManager2.h +++ b/src/server/collision/Management/VMapManager2.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp index 6b5c9b5a2c6..fda0535e8a7 100644 --- a/src/server/collision/Maps/MapTree.cpp +++ b/src/server/collision/Maps/MapTree.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Maps/MapTree.h b/src/server/collision/Maps/MapTree.h index 47716a925b5..1732209c6bc 100755 --- a/src/server/collision/Maps/MapTree.h +++ b/src/server/collision/Maps/MapTree.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Maps/TileAssembler.cpp b/src/server/collision/Maps/TileAssembler.cpp index 55051fda4bb..355ef6b1944 100644 --- a/src/server/collision/Maps/TileAssembler.cpp +++ b/src/server/collision/Maps/TileAssembler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Maps/TileAssembler.h b/src/server/collision/Maps/TileAssembler.h index fcb9a8db1c8..6128a0d2a53 100755 --- a/src/server/collision/Maps/TileAssembler.h +++ b/src/server/collision/Maps/TileAssembler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Models/ModelInstance.cpp b/src/server/collision/Models/ModelInstance.cpp index f0bff0cef73..dd6b16be777 100644 --- a/src/server/collision/Models/ModelInstance.cpp +++ b/src/server/collision/Models/ModelInstance.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Models/ModelInstance.h b/src/server/collision/Models/ModelInstance.h index c29f6756654..1118b654578 100755 --- a/src/server/collision/Models/ModelInstance.h +++ b/src/server/collision/Models/ModelInstance.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Models/WorldModel.cpp b/src/server/collision/Models/WorldModel.cpp index 118ae098c25..a7de37d41e6 100644 --- a/src/server/collision/Models/WorldModel.cpp +++ b/src/server/collision/Models/WorldModel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Models/WorldModel.h b/src/server/collision/Models/WorldModel.h index 7acd3c80376..52ecf498700 100755 --- a/src/server/collision/Models/WorldModel.h +++ b/src/server/collision/Models/WorldModel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/VMapDefinitions.h b/src/server/collision/VMapDefinitions.h index 74e5a9f1dbb..f7d6f0ddaa1 100644 --- a/src/server/collision/VMapDefinitions.h +++ b/src/server/collision/VMapDefinitions.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/VMapTools.h b/src/server/collision/VMapTools.h index 09f931dbad2..72d9e8988c1 100755 --- a/src/server/collision/VMapTools.h +++ b/src/server/collision/VMapTools.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp index 67e75633b05..6ce8ce330cf 100755 --- a/src/server/game/AI/CoreAI/CombatAI.cpp +++ b/src/server/game/AI/CoreAI/CombatAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -99,7 +99,7 @@ void CombatAI::UpdateAI(const uint32 diff) events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; if (uint32 spellId = events.ExecuteEvent()) @@ -158,7 +158,13 @@ void CasterAI::UpdateAI(const uint32 diff) events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->getVictim()->HasBreakableByDamageCrowdControlAura(me)) + { + me->InterruptNonMeleeSpells(false); + return; + } + + if (me->HasUnitState(UNIT_STATE_CASTING)) return; if (uint32 spellId = events.ExecuteEvent()) diff --git a/src/server/game/AI/CoreAI/CombatAI.h b/src/server/game/AI/CoreAI/CombatAI.h index fca964826d3..ad98cec0779 100755 --- a/src/server/game/AI/CoreAI/CombatAI.h +++ b/src/server/game/AI/CoreAI/CombatAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/GameObjectAI.cpp b/src/server/game/AI/CoreAI/GameObjectAI.cpp index e47d75fc514..1a08ac1afbe 100644 --- a/src/server/game/AI/CoreAI/GameObjectAI.cpp +++ b/src/server/game/AI/CoreAI/GameObjectAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h index 93cd3a6d237..b9d385ba675 100644 --- a/src/server/game/AI/CoreAI/GameObjectAI.h +++ b/src/server/game/AI/CoreAI/GameObjectAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -50,6 +50,7 @@ class GameObjectAI virtual void Destroyed(Player* /*player*/, uint32 /*eventId*/) {} virtual void SetData(uint32 /*id*/, uint32 /*value*/) {} virtual void OnGameEvent(bool /*start*/, uint16 /*eventId*/) {} + virtual void OnStateChanged(uint32 /*state*/, Unit* /*unit*/) { } }; class NullGameObjectAI : public GameObjectAI diff --git a/src/server/game/AI/CoreAI/GuardAI.cpp b/src/server/game/AI/CoreAI/GuardAI.cpp index 2efe0eebee0..b78fec7c142 100755 --- a/src/server/game/AI/CoreAI/GuardAI.cpp +++ b/src/server/game/AI/CoreAI/GuardAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -115,8 +115,8 @@ void GuardAI::EnterEvadeMode() me->CombatStop(true); i_state = STATE_NORMAL; - // Remove TargetedMovementGenerator from MotionMaster stack list, and add HomeMovementGenerator instead - if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + // Remove ChaseMovementGenerator from MotionMaster stack list, and add HomeMovementGenerator instead + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) me->GetMotionMaster()->MoveTargetedHome(); } diff --git a/src/server/game/AI/CoreAI/GuardAI.h b/src/server/game/AI/CoreAI/GuardAI.h index c0b80ac5174..c80c5a6c343 100755 --- a/src/server/game/AI/CoreAI/GuardAI.h +++ b/src/server/game/AI/CoreAI/GuardAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/PassiveAI.cpp b/src/server/game/AI/CoreAI/PassiveAI.cpp index 1656e3cf181..3738d5bab6c 100755 --- a/src/server/game/AI/CoreAI/PassiveAI.cpp +++ b/src/server/game/AI/CoreAI/PassiveAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -61,14 +61,14 @@ void PossessedAI::KilledUnit(Unit* victim) void CritterAI::DamageTaken(Unit* /*done_by*/, uint32&) { - if (!me->HasUnitState(UNIT_STAT_FLEEING)) - me->SetControlled(true, UNIT_STAT_FLEEING); + if (!me->HasUnitState(UNIT_STATE_FLEEING)) + me->SetControlled(true, UNIT_STATE_FLEEING); } void CritterAI::EnterEvadeMode() { - if (me->HasUnitState(UNIT_STAT_FLEEING)) - me->SetControlled(false, UNIT_STAT_FLEEING); + if (me->HasUnitState(UNIT_STATE_FLEEING)) + me->SetControlled(false, UNIT_STATE_FLEEING); CreatureAI::EnterEvadeMode(); } diff --git a/src/server/game/AI/CoreAI/PassiveAI.h b/src/server/game/AI/CoreAI/PassiveAI.h index e23fb41d608..d7bf8656f23 100755 --- a/src/server/game/AI/CoreAI/PassiveAI.h +++ b/src/server/game/AI/CoreAI/PassiveAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp index e009bf9d12a..30ebd06745f 100755 --- a/src/server/game/AI/CoreAI/PetAI.cpp +++ b/src/server/game/AI/CoreAI/PetAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -42,7 +42,6 @@ PetAI::PetAI(Creature* c) : CreatureAI(c), i_tracker(TIME_INTERVAL_LOOK) { m_AllySet.clear(); UpdateAllies(); - targetHasCC = false; } void PetAI::EnterEvadeMode() @@ -55,9 +54,6 @@ bool PetAI::_needToStop() if (me->isCharmed() && me->getVictim() == me->GetCharmer()) return true; - if (_CheckTargetCC(me->getVictim()) && !targetHasCC) - return true; - return !me->IsValidAttackTarget(me->getVictim()); } @@ -95,13 +91,19 @@ void PetAI::UpdateAI(const uint32 diff) // me->getVictim() can't be used for check in case stop fighting, me->getVictim() clear at Unit death etc. if (me->getVictim()) { + // is only necessary to stop casting, the pet must not exit combat + if (me->getVictim()->HasBreakableByDamageCrowdControlAura(me)) + { + me->InterruptNonMeleeSpells(false); + return; + } + if (_needToStop()) { sLog->outStaticDebug("Pet AI stopped attacking [guid=%u]", me->GetGUIDLow()); _stopAttack(); return; } - targetHasCC = _CheckTargetCC(me->getVictim()); DoMeleeAttackIfReady(); } @@ -116,14 +118,14 @@ void PetAI::UpdateAI(const uint32 diff) else HandleReturnMovement(); } - else if (owner && !me->HasUnitState(UNIT_STAT_FOLLOW)) // no charm info and no victim + else if (owner && !me->HasUnitState(UNIT_STATE_FOLLOW)) // no charm info and no victim me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle()); if (!me->GetCharmInfo()) return; // Autocast (casted only in combat or persistent spells in any state) - if (!me->HasUnitState(UNIT_STAT_CASTING)) + if (!me->HasUnitState(UNIT_STATE_CASTING)) { typedef std::vector<std::pair<Unit*, Spell*> > TargetSpellList; TargetSpellList targetSpellStore; @@ -293,8 +295,6 @@ void PetAI::AttackStart(Unit* target) if (!CanAttack(target)) return; - targetHasCC = _CheckTargetCC(target); - if (Unit* owner = me->GetOwner()) owner->SetInCombatWith(target); @@ -310,22 +310,21 @@ Unit* PetAI::SelectNextTarget() return NULL; Unit* target = me->getAttackerForHelper(); - targetHasCC = false; // Check pet's attackers first to prevent dragging mobs back to owner - if (target && !_CheckTargetCC(target)) + if (target && !target->HasBreakableByDamageCrowdControlAura()) return target; if (me->GetCharmerOrOwner()) { // Check owner's attackers if pet didn't have any target = me->GetCharmerOrOwner()->getAttackerForHelper(); - if (target && !_CheckTargetCC(target)) + if (target && !target->HasBreakableByDamageCrowdControlAura()) return target; // 3.0.2 - Pets now start attacking their owners target in defensive mode as soon as the hunter does target = me->GetCharmerOrOwner()->getVictim(); - if (target && !_CheckTargetCC(target)) + if (target && !target->HasBreakableByDamageCrowdControlAura()) return target; } @@ -417,10 +416,9 @@ void PetAI::MovementInform(uint32 moveType, uint32 data) me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveIdle(); } + break; } - break; - - case TARGETED_MOTION_TYPE: + case FOLLOW_MOTION_TYPE: { // If data is owner's GUIDLow then we've reached follow point, // otherwise we're probably chasing a creature @@ -430,11 +428,9 @@ void PetAI::MovementInform(uint32 moveType, uint32 data) me->GetCharmInfo()->SetIsReturning(false); me->GetCharmInfo()->SetIsFollowing(true); me->GetCharmInfo()->SetIsCommandAttack(false); - me->AddUnitState(UNIT_STAT_FOLLOW); } + break; } - break; - default: break; } @@ -470,11 +466,3 @@ bool PetAI::CanAttack(Unit* target) // default, though we shouldn't ever get here return false; } - -bool PetAI::_CheckTargetCC(Unit* target) -{ - if (me->GetCharmerOrOwnerGUID() && target->HasNegativeAuraWithAttribute(SPELL_ATTR0_BREAKABLE_BY_DAMAGE, me->GetCharmerOrOwnerGUID())) - return true; - - return false; -} diff --git a/src/server/game/AI/CoreAI/PetAI.h b/src/server/game/AI/CoreAI/PetAI.h index 8d72b34cf8f..730ab12a3ca 100755 --- a/src/server/game/AI/CoreAI/PetAI.h +++ b/src/server/game/AI/CoreAI/PetAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -50,7 +50,6 @@ class PetAI : public CreatureAI TimeTracker i_tracker; bool inCombat; - bool targetHasCC; std::set<uint64> m_AllySet; uint32 m_updateAlliesTimer; @@ -58,7 +57,6 @@ class PetAI : public CreatureAI void HandleReturnMovement(); void DoAttack(Unit* target, bool chase); bool CanAttack(Unit* target); - bool _CheckTargetCC(Unit* target); }; #endif diff --git a/src/server/game/AI/CoreAI/ReactorAI.cpp b/src/server/game/AI/CoreAI/ReactorAI.cpp index df914fbf500..4683a75a44e 100755 --- a/src/server/game/AI/CoreAI/ReactorAI.cpp +++ b/src/server/game/AI/CoreAI/ReactorAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/ReactorAI.h b/src/server/game/AI/CoreAI/ReactorAI.h index e66b382ef68..4a95dcf04e8 100755 --- a/src/server/game/AI/CoreAI/ReactorAI.h +++ b/src/server/game/AI/CoreAI/ReactorAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/TotemAI.cpp b/src/server/game/AI/CoreAI/TotemAI.cpp index 96da4c4f4e2..0739b62b605 100755 --- a/src/server/game/AI/CoreAI/TotemAI.cpp +++ b/src/server/game/AI/CoreAI/TotemAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/TotemAI.h b/src/server/game/AI/CoreAI/TotemAI.h index 4791c3af92a..0fa2920888f 100755 --- a/src/server/game/AI/CoreAI/TotemAI.h +++ b/src/server/game/AI/CoreAI/TotemAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp index 8397ad7954e..bf50909eeee 100755 --- a/src/server/game/AI/CoreAI/UnitAI.cpp +++ b/src/server/game/AI/CoreAI/UnitAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -40,7 +40,7 @@ void UnitAI::AttackStartCaster(Unit* victim, float dist) void UnitAI::DoMeleeAttackIfReady() { - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; Unit* victim = me->getVictim(); @@ -60,7 +60,7 @@ void UnitAI::DoMeleeAttackIfReady() bool UnitAI::DoSpellAttackIfReady(uint32 spell) { - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return true; if (me->isAttackReady()) diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h index 444dce0339e..b871a25835b 100755 --- a/src/server/game/AI/CoreAI/UnitAI.h +++ b/src/server/game/AI/CoreAI/UnitAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index 5752fcede7b..c8818f84e5b 100755 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h index 662ed3ab3dd..dafd3e4e137 100755 --- a/src/server/game/AI/CreatureAI.h +++ b/src/server/game/AI/CreatureAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CreatureAIFactory.h b/src/server/game/AI/CreatureAIFactory.h index 4cedb3d9545..f4147826811 100755 --- a/src/server/game/AI/CreatureAIFactory.h +++ b/src/server/game/AI/CreatureAIFactory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CreatureAIImpl.h b/src/server/game/AI/CreatureAIImpl.h index 848c2561f3f..f568da80b49 100755 --- a/src/server/game/AI/CreatureAIImpl.h +++ b/src/server/game/AI/CreatureAIImpl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -596,7 +596,7 @@ inline bool CreatureAI::_EnterEvadeMode() inline void UnitAI::DoCast(Unit* victim, uint32 spellId, bool triggered) { - if (!victim || (me->HasUnitState(UNIT_STAT_CASTING) && !triggered)) + if (!victim || (me->HasUnitState(UNIT_STATE_CASTING) && !triggered)) return; me->CastSpell(victim, spellId, triggered); @@ -609,7 +609,7 @@ inline void UnitAI::DoCastVictim(uint32 spellId, bool triggered) inline void UnitAI::DoCastAOE(uint32 spellId, bool triggered) { - if (!triggered && me->HasUnitState(UNIT_STAT_CASTING)) + if (!triggered && me->HasUnitState(UNIT_STATE_CASTING)) return; me->CastSpell((Unit*)NULL, spellId, triggered); diff --git a/src/server/game/AI/CreatureAIRegistry.cpp b/src/server/game/AI/CreatureAIRegistry.cpp index 6fb04746111..e4cb62c56de 100755 --- a/src/server/game/AI/CreatureAIRegistry.cpp +++ b/src/server/game/AI/CreatureAIRegistry.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CreatureAIRegistry.h b/src/server/game/AI/CreatureAIRegistry.h index 4b054e3de29..39d792a0d77 100755 --- a/src/server/game/AI/CreatureAIRegistry.h +++ b/src/server/game/AI/CreatureAIRegistry.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp index 5b7ee7750bc..ab616d78a8c 100755 --- a/src/server/game/AI/CreatureAISelector.cpp +++ b/src/server/game/AI/CreatureAISelector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CreatureAISelector.h b/src/server/game/AI/CreatureAISelector.h index 64bf96c01af..933ec16f75c 100755 --- a/src/server/game/AI/CreatureAISelector.h +++ b/src/server/game/AI/CreatureAISelector.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp index 1db6bbd550e..5db9d0b1cdb 100755 --- a/src/server/game/AI/EventAI/CreatureEventAI.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -475,7 +475,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 //Melee current victim if flag not set if (!(action.cast.castFlags & CAST_NO_MELEE_IF_OOM)) { - if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) { m_AttackDistance = 0.0f; m_AttackAngle = 0.0f; @@ -483,7 +483,6 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 me->GetMotionMaster()->MoveChase(me->getVictim(), m_AttackDistance, m_AttackAngle); } } - } else { @@ -578,7 +577,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 { if (action.combat_movement.melee) { - me->AddUnitState(UNIT_STAT_MELEE_ATTACKING); + me->AddUnitState(UNIT_STATE_MELEE_ATTACKING); me->SendMeleeAttackStart(victim); } if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE) @@ -592,10 +591,10 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 Unit* victim = me->getVictim(); if (action.combat_movement.melee && victim) { - me->ClearUnitState(UNIT_STAT_MELEE_ATTACKING); + me->ClearUnitState(UNIT_STATE_MELEE_ATTACKING); me->SendMeleeAttackStop(victim); } - if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) me->GetMotionMaster()->MoveIdle(); } } diff --git a/src/server/game/AI/EventAI/CreatureEventAI.h b/src/server/game/AI/EventAI/CreatureEventAI.h index 9cc8c8f9c4a..c4daf2563e0 100755 --- a/src/server/game/AI/EventAI/CreatureEventAI.h +++ b/src/server/game/AI/EventAI/CreatureEventAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp index c27613f320f..8f2cf6b471f 100755 --- a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.h b/src/server/game/AI/EventAI/CreatureEventAIMgr.h index 50af460541f..93e953681b6 100755 --- a/src/server/game/AI/EventAI/CreatureEventAIMgr.h +++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index 953bbf7521a..bd6c901f99c 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/> +/* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * @@ -298,7 +298,8 @@ void ScriptedAI::DoModifyThreatPercent(Unit* unit, int32 pct) void ScriptedAI::DoTeleportTo(float x, float y, float z, uint32 time) { me->Relocate(x, y, z); - me->SendMonsterMove(x, y, z, time); + float speed = me->GetDistance(x, y, z) / ((float)time * 0.001f); + me->MonsterMoveWithSpeed(x, y, z, speed); } void ScriptedAI::DoTeleportTo(const float position[4]) @@ -594,7 +595,7 @@ void BossAI::UpdateAI(uint32 const diff) events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -653,7 +654,7 @@ void WorldBossAI::UpdateAI(uint32 const diff) events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h index 92c6565be9f..a01c993cab6 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index c5f04d4ff5f..048cc8b3d68 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -90,7 +90,7 @@ bool npc_escortAI::AssistPlayerInCombat(Unit* who) void npc_escortAI::MoveInLineOfSight(Unit* who) { - if (!me->HasUnitState(UNIT_STAT_STUNNED) && who->isTargetableForAttack() && who->isInAccessiblePlaceFor(me)) + if (!me->HasUnitState(UNIT_STATE_STUNNED) && who->isTargetableForAttack() && who->isInAccessiblePlaceFor(me)) { if (HasEscortState(STATE_ESCORT_ESCORTING) && AssistPlayerInCombat(who)) return; diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp index 1e0b212dd45..d83ad9b756c 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp @@ -38,8 +38,8 @@ void FollowerAI::AttackStart(Unit* who) me->SetInCombatWith(who); who->SetInCombatWith(me); - if (me->HasUnitState(UNIT_STAT_FOLLOW)) - me->ClearUnitState(UNIT_STAT_FOLLOW); + if (me->HasUnitState(UNIT_STATE_FOLLOW)) + me->ClearUnitState(UNIT_STATE_FOLLOW); if (IsCombatMovementAllowed()) me->GetMotionMaster()->MoveChase(who); @@ -88,7 +88,7 @@ bool FollowerAI::AssistPlayerInCombat(Unit* who) void FollowerAI::MoveInLineOfSight(Unit* who) { - if (!me->HasUnitState(UNIT_STAT_STUNNED) && who->isTargetableForAttack() && who->isInAccessiblePlaceFor(me)) + if (!me->HasUnitState(UNIT_STATE_STUNNED) && who->isTargetableForAttack() && who->isInAccessiblePlaceFor(me)) { if (HasFollowState(STATE_FOLLOW_INPROGRESS) && AssistPlayerInCombat(who)) return; @@ -167,7 +167,7 @@ void FollowerAI::EnterEvadeMode() { sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI left combat, returning to CombatStartPosition."); - if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) { float fPosX, fPosY, fPosZ; me->GetPosition(fPosX, fPosY, fPosZ); @@ -176,7 +176,7 @@ void FollowerAI::EnterEvadeMode() } else { - if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) me->GetMotionMaster()->MoveTargetedHome(); } @@ -340,9 +340,9 @@ Player* FollowerAI::GetLeaderForFollower() void FollowerAI::SetFollowComplete(bool bWithEndEvent) { - if (me->HasUnitState(UNIT_STAT_FOLLOW)) + if (me->HasUnitState(UNIT_STATE_FOLLOW)) { - me->ClearUnitState(UNIT_STAT_FOLLOW); + me->ClearUnitState(UNIT_STATE_FOLLOW); me->StopMoving(); me->GetMotionMaster()->Clear(); @@ -369,9 +369,9 @@ void FollowerAI::SetFollowPaused(bool paused) { AddFollowState(STATE_FOLLOW_PAUSED); - if (me->HasUnitState(UNIT_STAT_FOLLOW)) + if (me->HasUnitState(UNIT_STATE_FOLLOW)) { - me->ClearUnitState(UNIT_STAT_FOLLOW); + me->ClearUnitState(UNIT_STATE_FOLLOW); me->StopMoving(); me->GetMotionMaster()->Clear(); diff --git a/src/server/game/AI/ScriptedAI/ScriptedGossip.h b/src/server/game/AI/ScriptedAI/ScriptedGossip.h index 5d376be888e..34300ff406c 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedGossip.h +++ b/src/server/game/AI/ScriptedAI/ScriptedGossip.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/> +/* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * diff --git a/src/server/game/AI/ScriptedAI/ScriptedSimpleAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedSimpleAI.cpp index c4142ba2b1b..25c7f6f44b7 100755 --- a/src/server/game/AI/ScriptedAI/ScriptedSimpleAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedSimpleAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 7dd793a302b..07a8e3fdca7 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -46,7 +46,7 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c) // spawn in run mode me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING); - mRun = true; + mRun = false; me->GetPosition(&mLastOOCPos); @@ -68,6 +68,7 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c) mFollowCredit = 0; mFollowArrivedEntry = 0; mFollowCreditType = 0; + mInvinceabilityHpLevel = 0; } void SmartAI::UpdateDespawn(const uint32 diff) @@ -89,7 +90,7 @@ void SmartAI::UpdateDespawn(const uint32 diff) void SmartAI::Reset() { if (!HasEscortState(SMART_ESCORT_ESCORTING))//dont mess up escort movement after combat - SetRun(true); + SetRun(mRun); GetScript()->OnReset(); } @@ -431,12 +432,25 @@ void SmartAI::MovementInform(uint32 MovementType, uint32 Data) MovepointReached(Data); } +void SmartAI::RemoveAuras() +{ + // Only loop throught the applied auras, because here is where all auras on the current unit are stored + Unit::AuraApplicationMap appliedAuras = me->GetAppliedAuras(); + for (Unit::AuraApplicationMap::iterator iter = appliedAuras.begin(); iter != appliedAuras.end(); ++iter) + { + Aura const* aura = iter->second->GetBase(); + if (!aura->GetSpellInfo()->IsPassive() && !aura->GetSpellInfo()->HasAura(SPELL_AURA_CONTROL_VEHICLE) && aura->GetCaster() != me) + me->RemoveAurasDueToSpell(aura->GetId()); + } +} + void SmartAI::EnterEvadeMode() { if (!me->isAlive()) return; - me->RemoveAllAuras(); + RemoveAuras(); + me->DeleteThreatList(); me->CombatStop(true); me->LoadCreaturesAddon(); @@ -624,6 +638,8 @@ void SmartAI::SpellHitTarget(Unit* target, const SpellInfo* spellInfo) void SmartAI::DamageTaken(Unit* doneBy, uint32& damage) { GetScript()->ProcessEventsFor(SMART_EVENT_DAMAGED, doneBy, damage); + if ((me->GetHealth() - damage) <= mInvinceabilityHpLevel) + damage -= mInvinceabilityHpLevel; } void SmartAI::HealReceived(Unit* doneBy, uint32& addhealth) @@ -924,6 +940,11 @@ void SmartGameObjectAI::OnGameEvent(bool start, uint16 eventId) GetScript()->ProcessEventsFor(start ? SMART_EVENT_GAME_EVENT_START : SMART_EVENT_GAME_EVENT_END, NULL, eventId); } +void SmartGameObjectAI::OnStateChanged(uint32 state, Unit* unit) +{ + GetScript()->ProcessEventsFor(SMART_EVENT_GO_STATE_CHANGED, unit, state); +} + class SmartTrigger : public AreaTriggerScript { public: diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index dc1f901d477..a40254fe384 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -175,6 +175,8 @@ class SmartAI : public CreatureAI void SetSwim(bool swim = true); + void SetInvinceabilityHpLevel(uint32 level) { mInvinceabilityHpLevel = level; } + void sGossipHello(Player* player); void sGossipSelect(Player* player, uint32 sender, uint32 action); void sGossipSelectCode(Player* player, uint32 sender, uint32 action, const char* code); @@ -193,6 +195,8 @@ class SmartAI : public CreatureAI mDespawnState = t ? 1 : 0; } void StartDespawn() { mDespawnState = 2; } + + void RemoveAuras(); private: uint32 mFollowCreditType; @@ -220,6 +224,7 @@ class SmartAI : public CreatureAI bool mCanAutoAttack; bool mCanCombatMove; bool mForcedPaused; + uint32 mInvinceabilityHpLevel; bool AssistPlayerInCombat(Unit* who); @@ -251,6 +256,7 @@ public: void SetData(uint32 id, uint32 value); void SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker); void OnGameEvent(bool start, uint16 eventId); + void OnStateChanged(uint32 state, Unit* unit); protected: GameObject* const go; diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 34d465a5e7e..a6923ea19e0 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -39,7 +39,6 @@ SmartScript::SmartScript() go = NULL; me = NULL; mEventPhase = 0; - mInvinceabilityHpLevel = 0; mPathId = 0; mTargetStorage = new ObjectListMap(); mStoredEvents.clear(); @@ -51,7 +50,6 @@ SmartScript::SmartScript() mTemplate = SMARTAI_TEMPLATE_BASIC; meOrigGUID = 0; goOrigGUID = 0; - mResumeActionList = true; mLastInvoker = 0; } @@ -78,22 +76,6 @@ void SmartScript::OnReset() void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint32 var1, bool bvar, const SpellInfo* spell, GameObject* gob) { - if (e == SMART_EVENT_AGGRO) - { - if (!mResumeActionList) - mTimedActionList.clear();//clear action list if it is not resumable - else - { - for (SmartAIEventList::iterator itr = mTimedActionList.begin(); itr != mTimedActionList.end(); ++itr) - { - if (itr->enableTimed) - { - InitTimer((*itr));//re-init the currently enabled timer, so it restarts the timer when resumed - break; - } - } - } - } for (SmartAIEventList::iterator i = mEvents.begin(); i != mEvents.end(); ++i) { SMART_EVENT eventType = SMART_EVENT((*i).GetEventType()); @@ -101,7 +83,20 @@ void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint3 continue; if (eventType == e/* && (!(*i).event.event_phase_mask || IsInPhase((*i).event.event_phase_mask)) && !((*i).event.event_flags & SMART_EVENT_FLAG_NOT_REPEATABLE && (*i).runOnce)*/) - ProcessEvent(*i, unit, var0, var1, bvar, spell, gob); + { + bool meets = true; + if (unit) + { + if (Player* player = unit->ToPlayer()) + { + ConditionList conds = sConditionMgr->GetConditionsForSmartEvent((*i).entryOrGuid, (*i).event_id, (*i).source_type); + meets = sConditionMgr->IsPlayerMeetToConditions(player, conds); + } + } + + if (meets) + ProcessEvent(*i, unit, var0, var1, bvar, spell, gob); + } } } @@ -119,15 +114,6 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (unit) mLastInvoker = unit->GetGUID(); - if (e.link && e.link != e.event_id) - { - SmartScriptHolder linked = FindLinkedEvent(e.link); - if (linked.GetActionType() && linked.GetEventType() == SMART_EVENT_LINK) - ProcessEvent(linked, unit, var0, var1, bvar, spell, gob); - else - sLog->outErrorDb("SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link); - } - if (Unit* tempInvoker = GetLastInvoker()) sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: Invoker: %s (guidlow: %u)", tempInvoker->GetName(), tempInvoker->GetGUIDLow()); @@ -136,7 +122,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_TALK: { if (!me) - return; + break; ObjectList* targets = GetTargets(e, unit); Creature* talker = me; @@ -274,7 +260,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -317,7 +303,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -336,7 +322,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -357,7 +343,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_SET_REACT_STATE: { if (!me) - return; + break; me->SetReactState(ReactStates(e.action.react.state)); sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SET_REACT_STATE: Creature guidLow %u set reactstate %u", @@ -368,7 +354,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; uint32 emotes[SMART_ACTION_PARAM_COUNT]; emotes[0] = e.action.randomEmote.emote1; @@ -405,7 +391,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_THREAT_ALL_PCT: { if (!me) - return; + break; std::list<HostileReference*> const& threatList = me->getThreatManager().getThreatList(); for (std::list<HostileReference*>::const_iterator i = threatList.begin(); i != threatList.end(); ++i) @@ -422,11 +408,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_THREAT_SINGLE_PCT: { if (!me) - return; + break; ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -445,7 +431,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -463,11 +449,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_SEND_CASTCREATUREORGO: { if (!GetBaseObject()) - return; + break; ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -485,11 +471,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_CAST: { if (!me) - return; + break; ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -511,11 +497,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { Unit* tempLastInvoker = GetLastInvoker(); if (!tempLastInvoker) - return; + break; ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -537,7 +523,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -556,7 +542,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -564,7 +550,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { // Activate (*itr)->ToGameObject()->SetLootState(GO_READY); - (*itr)->ToGameObject()->UseDoorOrButton(); + (*itr)->ToGameObject()->UseDoorOrButton(0, false, unit); sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_ACTIVATE_GOBJECT. Gameobject %u (entry: %u) activated", (*itr)->GetGUIDLow(), (*itr)->GetEntry()); } @@ -577,7 +563,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -596,7 +582,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -615,7 +601,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -634,7 +620,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -652,7 +638,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_AUTO_ATTACK: { if (!IsSmart()) - return; + break; CAST_AI(SmartAI, me->AI())->SetAutoAttack(e.action.autoAttack.attack ? true : false); sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_AUTO_ATTACK: Creature: %u bool on = %u", @@ -662,7 +648,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_ALLOW_COMBAT_MOVEMENT: { if (!IsSmart()) - return; + break; bool move = e.action.combatMove.move ? true : false; CAST_AI(SmartAI, me->AI())->SetCombatMove(move); @@ -673,7 +659,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_SET_EVENT_PHASE: { if (!GetBaseObject()) - return; + break; SetPhase(e.action.setEventPhase.phase); sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SET_EVENT_PHASE: Creature %u set event phase %u", @@ -683,7 +669,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_INC_EVENT_PHASE: { if (!GetBaseObject()) - return; + break; IncPhase(e.action.incEventPhase.inc); DecPhase(e.action.incEventPhase.dec); @@ -694,7 +680,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_EVADE: { if (!me) - return; + break; me->AI()->EnterEvadeMode(); sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_EVADE: Creature %u EnterEvadeMode", me->GetGUIDLow()); @@ -703,7 +689,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_FLEE_FOR_ASSIST: { if (!me) - return; + break; me->DoFleeToGetAssistance(); if (e.action.flee.withEmote) @@ -724,11 +710,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_CALL_CASTEDCREATUREORGO: { if (!GetBaseObject()) - return; + break; ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -747,7 +733,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -765,11 +751,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_FOLLOW: { if (!IsSmart()) - return; + break; ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -788,7 +774,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_RANDOM_PHASE: { if (!GetBaseObject()) - return; + break; uint32 phases[SMART_ACTION_PARAM_COUNT]; phases[0] = e.action.randomPhase.phase1; @@ -817,7 +803,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_RANDOM_PHASE_RANGE: { if (!GetBaseObject()) - return; + break; uint32 phase = urand(e.action.randomPhaseRange.phaseMin, e.action.randomPhaseRange.phaseMax); SetPhase(phase); @@ -837,7 +823,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -866,13 +852,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u obj = unit; if (!obj) - return; + break; InstanceScript* instance = obj->GetInstanceScript(); if (!instance) { sLog->outErrorDb("SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid); - return; + break; } instance->SetData(e.action.setInstanceData.field, e.action.setInstanceData.data); @@ -887,18 +873,18 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u obj = unit; if (!obj) - return; + break; InstanceScript* instance = obj->GetInstanceScript(); if (!instance) { sLog->outErrorDb("SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid); - return; + break; } ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; instance->SetData64(e.action.setInstanceData64.field, targets->front()->GetGUID()); sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA64: Field: %u, data: "UI64FMTD, @@ -910,7 +896,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_UPDATE_TEMPLATE: { if (!me || me->GetEntry() == e.action.updateTemplate.creature) - return; + break; me->UpdateEntry(e.action.updateTemplate.creature, e.action.updateTemplate.team ? HORDE : ALLIANCE); sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_UPDATE_TEMPLATE: Creature %u, Template: %u, Team: %u", @@ -957,7 +943,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_FORCE_DESPAWN: { if (!IsSmart()) - return; + break; CAST_AI(SmartAI, me->AI())->SetDespawnTime(e.action.forceDespawn.delay + 1);//next tick CAST_AI(SmartAI, me->AI())->StartDespawn(); @@ -973,7 +959,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -1003,19 +989,24 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL: { if (!me) - return; + break; + + SmartAI* ai = CAST_AI(SmartAI, me->AI()); + + if (!ai) + break; if (e.action.invincHP.percent) - mInvinceabilityHpLevel = me->CountPctFromMaxHealth(e.action.invincHP.percent); + ai->SetInvinceabilityHpLevel(me->CountPctFromMaxHealth(e.action.invincHP.percent)); else - mInvinceabilityHpLevel = e.action.invincHP.minHP; + ai->SetInvinceabilityHpLevel(e.action.invincHP.minHP); break; } case SMART_ACTION_SET_DATA: { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -1031,7 +1022,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_MOVE_FORWARD: { if (!me) - return; + break; float x, y, z; me->GetClosePoint(x, y, z, me->GetObjectSize() / 3, (float)e.action.moveRandom.distance); @@ -1053,11 +1044,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_ATTACK_START: { if (!me) - return; + break; ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -1092,7 +1083,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u } if (e.GetTargetType() != SMART_TARGET_POSITION) - return; + break; if (Creature* summon = GetBaseObject()->SummonCreature(e.action.summonCreature.creature, e.target.x, e.target.y, e.target.z, e.target.o, (TempSummonType)e.action.summonCreature.type, e.action.summonCreature.duration)) if (unit && e.action.summonCreature.attackInvoker) @@ -1102,7 +1093,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_SUMMON_GO: { if (!GetBaseObject()) - return; + break; float x, y, z, o; ObjectList* targets = GetTargets(e, unit); @@ -1121,7 +1112,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u } if (e.GetTargetType() != SMART_TARGET_POSITION) - return; + break; GetBaseObject()->SummonGameObject(e.action.summonGO.entry, e.target.x, e.target.y, e.target.z, e.target.o, 0, 0, 0, 0, e.action.summonGO.despawnTime); break; @@ -1130,7 +1121,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -1152,7 +1143,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -1169,7 +1160,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -1199,7 +1190,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -1215,7 +1206,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_SET_FLY: { if (!IsSmart()) - return; + break; CAST_AI(SmartAI, me->AI())->SetFly(e.action.setFly.fly ? true : false); break; @@ -1223,7 +1214,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_SET_RUN: { if (!IsSmart()) - return; + break; CAST_AI(SmartAI, me->AI())->SetRun(e.action.setRun.run ? true : false); break; @@ -1231,7 +1222,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_SET_SWIM: { if (!IsSmart()) - return; + break; CAST_AI(SmartAI, me->AI())->SetSwim(e.action.setSwim.swim ? true : false); break; @@ -1239,7 +1230,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_WP_START: { if (!IsSmart()) - return; + break; bool run = e.action.wpStart.run ? true : false; uint32 entry = e.action.wpStart.pathID; @@ -1258,7 +1249,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_WP_PAUSE: { if (!IsSmart()) - return; + break; uint32 delay = e.action.wpPause.delay; CAST_AI(SmartAI, me->AI())->PausePath(delay, e.GetEventType() == SMART_EVENT_WAYPOINT_REACHED ? false : true); @@ -1267,7 +1258,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_WP_STOP: { if (!IsSmart()) - return; + break; uint32 DespawnTime = e.action.wpStop.despawnTime; uint32 quest = e.action.wpStop.quest; @@ -1278,7 +1269,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_WP_RESUME: { if (!IsSmart()) - return; + break; CAST_AI(SmartAI, me->AI())->ResumePath(); break; @@ -1286,15 +1277,15 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_SET_ORIENTATION: { if (!me) - return; + break; ObjectList* targets = GetTargets(e, unit); if (e.GetTargetType() == SMART_TARGET_SELF) - me->SetFacing(me->GetHomePosition().GetOrientation(), NULL); + me->SetFacingTo(me->GetHomePosition().GetOrientation()); else if (e.GetTargetType() == SMART_TARGET_POSITION) - me->SetFacing(e.target.o, NULL); + me->SetFacingTo(e.target.o); else if (targets && !targets->empty()) - me->SetFacing(0, (*targets->begin())); + me->SetFacingToObject(*targets->begin()); delete targets; break; @@ -1303,7 +1294,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -1319,18 +1310,34 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_MOVE_TO_POS: { if (!IsSmart()) - return; + break; + + WorldObject* target = NULL; + + if (e.GetTargetType() == SMART_TARGET_CREATURE_RANGE || e.GetTargetType() == SMART_TARGET_CREATURE_GUID || + e.GetTargetType() == SMART_TARGET_CREATURE_DISTANCE || e.GetTargetType() == SMART_TARGET_GAMEOBJECT_RANGE || + e.GetTargetType() == SMART_TARGET_GAMEOBJECT_GUID || e.GetTargetType() == SMART_TARGET_GAMEOBJECT_DISTANCE || + e.GetTargetType() == SMART_TARGET_CLOSEST_CREATURE || e.GetTargetType() == SMART_TARGET_CLOSEST_GAMEOBJECT || + e.GetTargetType() == SMART_TARGET_OWNER_OR_SUMMONER) + { + ObjectList* targets = GetTargets(e, unit); + if (!targets) + break; + + target = targets->front(); + } - bool run = e.action.setRun.run ? true : false; - CAST_AI(SmartAI, me->AI())->SetRun(run); - me->GetMotionMaster()->MovePoint(0, e.target.x, e.target.y, e.target.z); + if(!target) + me->GetMotionMaster()->MovePoint(0, e.target.x, e.target.y, e.target.z); + else + me->GetMotionMaster()->MovePoint(0, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()); break; } case SMART_ACTION_RESPAWN_TARGET: { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -1347,7 +1354,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsPlayer(*itr)) @@ -1360,7 +1367,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -1437,7 +1444,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -1477,7 +1484,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (e.GetTargetType() == SMART_TARGET_NONE) { sLog->outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType()); - return; + break; } ObjectList* targets = GetTargets(e, unit); @@ -1505,7 +1512,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsUnit(*itr)) @@ -1518,7 +1525,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsUnit(*itr)) @@ -1531,7 +1538,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsUnit(*itr)) @@ -1544,13 +1551,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* casters = GetTargets(CreateEvent(SMART_EVENT_UPDATE_IC, 0, 0, 0, 0, 0, SMART_ACTION_NONE, 0, 0, 0, 0, 0, 0, (SMARTAI_TARGETS)e.action.cast.targetType, e.action.cast.targetParam1, e.action.cast.targetParam2, e.action.cast.targetParam3, 0), unit); if (!casters) - return; + break; ObjectList* targets = GetTargets(e, unit); if (!targets) { delete casters; // casters already validated, delete now - return; + break; } for (ObjectList::const_iterator itr = casters->begin(); itr != casters->end(); ++itr) @@ -1594,7 +1601,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (e.GetTargetType() == SMART_TARGET_NONE) { sLog->outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType()); - return; + break; } ObjectList* targets = GetTargets(e, unit); @@ -1624,7 +1631,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (e.GetTargetType() == SMART_TARGET_NONE) { sLog->outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType()); - return; + break; } ObjectList* targets = GetTargets(e, unit); @@ -1652,7 +1659,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsPlayer(*itr)) @@ -1665,7 +1672,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { @@ -1685,7 +1692,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsUnit(*itr)) (*itr)->ToUnit()->SetByteFlag(UNIT_FIELD_BYTES_1, 0, e.action.setunitByte.byte1); @@ -1697,7 +1704,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsUnit(*itr)) @@ -1710,7 +1717,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsUnit(*itr)) @@ -1723,7 +1730,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsGameObject(*itr)) @@ -1736,7 +1743,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsUnit(*itr)) @@ -1749,7 +1756,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsUnit(*itr)) @@ -1762,7 +1769,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsUnit(*itr)) @@ -1774,24 +1781,65 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u case SMART_ACTION_JUMP_TO_POS: { if (!me) - return; + break; me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveJump(e.target.x, e.target.y, e.target.z, (float)e.action.jump.speedxy, (float)e.action.jump.speedz); // TODO: Resume path when reached jump location break; } + case SMART_ACTION_GO_SET_LOOT_STATE: + { + ObjectList* targets = GetTargets(e, unit); + + if (!targets) + break; + + for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) + if (IsGameObject(*itr)) + (*itr)->ToGameObject()->SetLootState((LootState)e.action.setGoLootState.state); + + delete targets; + break; + } + case SMART_ACTION_SEND_TARGET_TO_TARGET: + { + ObjectList* targets = GetTargets(e, unit); + if (!targets) + break; + + for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) + { + if (IsCreature(*itr)) + { + if (SmartAI* ai = CAST_AI(SmartAI, (*itr)->ToCreature()->AI())) + ai->GetScript()->StoreTargetList(GetTargetList(e.action.sendTargetToTarget.id), e.action.sendTargetToTarget.id); + else + sLog->outErrorDb("SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartAI, skipping"); + } + else if (IsGameObject(*itr)) + { + if (SmartGameObjectAI* ai = CAST_AI(SmartGameObjectAI, (*itr)->ToGameObject()->AI())) + ai->GetScript()->StoreTargetList(GetTargetList(e.action.sendTargetToTarget.id), e.action.sendTargetToTarget.id); + else + sLog->outErrorDb("SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartGameObjectAI, skipping"); + } + } + + delete targets; + break; + } case SMART_ACTION_SEND_GOSSIP_MENU: { if (!GetBaseObject()) - return; + break; sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SEND_GOSSIP_MENU: gossipMenuId %d, gossipNpcTextId %d", e.action.sendGossipMenu.gossipMenuId, e.action.sendGossipMenu.gossipNpcTextId); ObjectList* targets = GetTargets(e, unit); if (!targets) - return; + break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (Player* player = (*itr)->ToPlayer()) @@ -1811,6 +1859,15 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u sLog->outErrorDb("SmartScript::ProcessAction: Unhandled Action type %u", e.GetActionType()); break; } + + if (e.link && e.link != e.event_id) + { + SmartScriptHolder linked = FindLinkedEvent(e.link); + if (linked.GetActionType() && linked.GetEventType() == SMART_EVENT_LINK) + ProcessEvent(linked, unit, var0, var1, bvar, spell, gob); + else + sLog->outErrorDb("SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link); + } } void SmartScript::InstallTemplate(SmartScriptHolder const& e) @@ -2603,6 +2660,13 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui ProcessAction(e, NULL, var0); break; } + case SMART_EVENT_GO_STATE_CHANGED: + { + if (e.event.goStateChanged.state != var0) + return; + ProcessAction(e, unit, var0, var1); + break; + } default: sLog->outErrorDb("SmartScript::ProcessEvent: Unhandled Event type %u", e.GetEventType()); break; @@ -2654,7 +2718,7 @@ void SmartScript::UpdateTimer(SmartScriptHolder& e, uint32 const diff) { if (!(e.action.cast.flags & SMARTCAST_INTERRUPT_PREVIOUS)) { - if (me && me->HasUnitState(UNIT_STAT_CASTING)) + if (me && me->HasUnitState(UNIT_STATE_CASTING)) { e.timer = 1; return; @@ -3001,7 +3065,6 @@ void SmartScript::SetScript9(SmartScriptHolder& e, uint32 entry) i->event.type = SMART_EVENT_UPDATE_IC; else if (e.action.timedActionList.timerType > 1) i->event.type = SMART_EVENT_UPDATE; - mResumeActionList = e.action.timedActionList.dontResume ? false : true; InitTimer((*i)); } } diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h index 7ebe8ca500f..fec38a690ed 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.h +++ b/src/server/game/AI/SmartScripts/SmartScript.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -228,7 +228,6 @@ class SmartScript SmartAIEventList mEvents; SmartAIEventList mInstallEvents; SmartAIEventList mTimedActionList; - bool mResumeActionList; Creature* me; uint64 meOrigGUID; GameObject* go; @@ -237,7 +236,6 @@ class SmartScript SmartScriptType mScriptType; uint32 mEventPhase; - uint32 mInvinceabilityHpLevel; UNORDERED_MAP<int32, int32> mStoredDecimals; uint32 mPathId; SmartAIEventList mStoredEvents; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 1df5849ca75..9a23d9e1390 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -36,7 +36,7 @@ void SmartWaypointMgr::LoadFromDB() waypoint_map.clear(); - PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_LOAD_SMARTAI_WP); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_SMARTAI_WP); PreparedQueryResult result = WorldDatabase.Query(stmt); if (!result) @@ -99,7 +99,7 @@ void SmartAIMgr::LoadSmartAIFromDB() for (uint8 i = 0; i < SMART_SCRIPT_TYPE_MAX; i++) mEventMap[i].clear(); //Drop Existing SmartAI List - PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_LOAD_SMART_SCRIPTS); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_SMART_SCRIPTS); PreparedQueryResult result = WorldDatabase.Query(stmt); if (!result) @@ -254,12 +254,14 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) } case SMART_TARGET_CREATURE_GUID: { - if (e.target.unitGUID.entry && !IsCreatureValid(e, e.target.unitGUID.entry)) return false; + if (e.target.unitGUID.entry && !IsCreatureValid(e, e.target.unitGUID.entry)) + return false; break; } case SMART_TARGET_GAMEOBJECT_GUID: { - if (e.target.goGUID.entry && !IsGameObjectValid(e, e.target.goGUID.entry)) return false; + if (e.target.goGUID.entry && !IsGameObjectValid(e, e.target.goGUID.entry)) + return false; break; } case SMART_TARGET_PLAYER_DISTANCE: @@ -280,6 +282,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) case SMART_TARGET_HOSTILE_RANDOM: case SMART_TARGET_HOSTILE_RANDOM_NOT_TOP: case SMART_TARGET_ACTION_INVOKER: + case SMART_TARGET_INVOKER_PARTY: case SMART_TARGET_POSITION: case SMART_TARGET_NONE: case SMART_TARGET_ACTION_INVOKER_VEHICLE: @@ -287,6 +290,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) case SMART_TARGET_THREAT_LIST: case SMART_TARGET_CLOSEST_GAMEOBJECT: case SMART_TARGET_CLOSEST_CREATURE: + case SMART_TARGET_STORED: break; default: sLog->outErrorDb("SmartAIMgr: Not handled target_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetTargetType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); @@ -475,6 +479,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) return false; break; } + case SMART_EVENT_GO_STATE_CHANGED: case SMART_EVENT_TIMED_EVENT_TRIGGERED: case SMART_EVENT_INSTANCE_PLAYER_ENTER: case SMART_EVENT_TRANSPORT_RELOCATE: @@ -797,6 +802,8 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_REMOVE_DYNAMIC_FLAG: case SMART_ACTION_JUMP_TO_POS: case SMART_ACTION_SEND_GOSSIP_MENU: + case SMART_ACTION_GO_SET_LOOT_STATE: + case SMART_ACTION_SEND_TARGET_TO_TARGET: break; default: sLog->outErrorDb("SmartAIMgr: Not handled action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id); diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index e8ec80672fc..e08fe331d3d 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -154,8 +154,9 @@ enum SMART_EVENT SMART_EVENT_IS_BEHIND_TARGET = 67, //1 // cooldownMin, CooldownMax SMART_EVENT_GAME_EVENT_START = 68, //1 // game_event.Entry SMART_EVENT_GAME_EVENT_END = 69, //1 // game_event.Entry + SMART_EVENT_GO_STATE_CHANGED = 70, // go state - SMART_EVENT_END = 70, + SMART_EVENT_END = 71, }; struct SmartEvent @@ -347,6 +348,11 @@ struct SmartEvent struct { + uint32 state; + } goStateChanged; + + struct + { uint32 param1; uint32 param2; uint32 param3; @@ -466,8 +472,10 @@ enum SMART_ACTION SMART_ACTION_REMOVE_DYNAMIC_FLAG = 96, // Flags SMART_ACTION_JUMP_TO_POS = 97, // speedXY, speedZ, targetX, targetY, targetZ SMART_ACTION_SEND_GOSSIP_MENU = 98, // menuId, optionId + SMART_ACTION_GO_SET_LOOT_STATE = 99, // state + SMART_ACTION_SEND_TARGET_TO_TARGET = 100, // id - SMART_ACTION_END = 99, + SMART_ACTION_END = 101, }; struct SmartAction @@ -824,7 +832,6 @@ struct SmartAction struct { uint32 id; - uint32 dontResume; uint32 timerType; } timedActionList; @@ -874,6 +881,16 @@ struct SmartAction struct { + uint32 state; + } setGoLootState; + + struct + { + uint32 id; + } sendTargetToTarget; + + struct + { uint32 param1; uint32 param2; uint32 param3; @@ -1138,6 +1155,7 @@ const uint32 SmartAIEventMask[SMART_EVENT_END][2] = {SMART_EVENT_IS_BEHIND_TARGET, SMART_SCRIPT_TYPE_MASK_CREATURE }, {SMART_EVENT_GAME_EVENT_START, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT }, {SMART_EVENT_GAME_EVENT_END, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT }, + {SMART_EVENT_GO_STATE_CHANGED, SMART_SCRIPT_TYPE_MASK_GAMEOBJECT }, }; diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp index 6c3dd69c0da..a6ae300e25d 100755 --- a/src/server/game/Accounts/AccountMgr.cpp +++ b/src/server/game/Accounts/AccountMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -37,14 +37,14 @@ AccountOpResult CreateAccount(std::string username, std::string password) if (GetId(username)) return AOR_NAME_ALREDY_EXIST; // username does already exist - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_ADD_ACCOUNT); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ACCOUNT); stmt->setString(0, username); stmt->setString(1, CalculateShaPassHash(username, password)); LoginDatabase.Execute(stmt); - stmt = LoginDatabase.GetPreparedStatement(LOGIN_ADD_REALM_CHARS); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_REALM_CHARACTERS_INIT); LoginDatabase.Execute(stmt); @@ -112,7 +112,7 @@ AccountOpResult ChangeUsername(uint32 accountId, std::string newUsername, std::s normalizeString(newUsername); normalizeString(newPassword); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPDATE_USERNAME); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_USERNAME); stmt->setString(0, newUsername); stmt->setString(1, CalculateShaPassHash(newUsername, newPassword)); @@ -136,7 +136,7 @@ AccountOpResult ChangePassword(uint32 accountId, std::string newPassword) normalizeString(username); normalizeString(newPassword); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPDATE_PASSWORD); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_PASSWORD); stmt->setString(0, CalculateShaPassHash(username, newPassword)); stmt->setUInt32(1, accountId); diff --git a/src/server/game/Accounts/AccountMgr.h b/src/server/game/Accounts/AccountMgr.h index aca24e9522f..1b1ecfa994a 100755 --- a/src/server/game/Accounts/AccountMgr.h +++ b/src/server/game/Accounts/AccountMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 030837b2649..271e78abf67 100755 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -130,19 +130,19 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE: if (!classRace.class_id && !classRace.race_id) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.", + sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.", criteria->ID, criteria->requiredType, dataType); return false; } if (classRace.class_id && ((1 << (classRace.class_id-1)) & CLASSMASK_ALL_PLAYABLE) == 0) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.", + sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, classRace.class_id); return false; } if (classRace.race_id && ((1 << (classRace.race_id-1)) & RACEMASK_ALL_PLAYABLE) == 0) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.", + sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, classRace.race_id); return false; } @@ -277,6 +277,26 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) return false; } return true; + case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE: + if (!classRace.class_id && !classRace.race_id) + { + sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.", + criteria->ID, criteria->requiredType, dataType); + return false; + } + if (classRace.class_id && ((1 << (classRace.class_id-1)) & CLASSMASK_ALL_PLAYABLE) == 0) + { + sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.", + criteria->ID, criteria->requiredType, dataType, classRace.class_id); + return false; + } + if (classRace.race_id && ((1 << (classRace.race_id-1)) & RACEMASK_ALL_PLAYABLE) == 0) + { + sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.", + criteria->ID, criteria->requiredType, dataType, classRace.race_id); + return false; + } + return true; default: sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) has data for non-supported data type (%u), ignored.", criteria->ID, criteria->requiredType, dataType); return false; @@ -301,6 +321,14 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un if (classRace.race_id && classRace.race_id != target->ToPlayer()->getRace()) return false; return true; + case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE: + if (!source || source->GetTypeId() != TYPEID_PLAYER) + return false; + if (classRace.class_id && classRace.class_id != source->ToPlayer()->getClass()) + return false; + if (classRace.race_id && classRace.race_id != source->ToPlayer()->getRace()) + return false; + return true; case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_LESS_HEALTH: if (!target || target->GetTypeId() != TYPEID_PLAYER) return false; @@ -1148,10 +1176,9 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui // speedup for non-login case if (miscValue1 && achievementCriteria->own_item.itemID != miscValue1) continue; - SetCriteriaProgress(achievementCriteria, GetPlayer()->GetItemCount(achievementCriteria->own_item.itemID, true)); + SetCriteriaProgress(achievementCriteria, miscValue2, PROGRESS_ACCUMULATE); break; case ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA: - // miscvalue1 contains the personal rating if (!miscValue1) // no update at login continue; diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h index f88be974c9d..c7d838fcb44 100755 --- a/src/server/game/Achievements/AchievementMgr.h +++ b/src/server/game/Achievements/AchievementMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -63,9 +63,10 @@ enum AchievementCriteriaDataType ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT = 18, // 0 0 maker instance script call for check current criteria requirements fit ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPED_ITEM = 19, // item_level item_quality for equipped item in slot to check item level and quality ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_ID = 20, // map_id 0 player must be on map with id in map_id + ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE = 21, // class_id race_id }; -#define MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE 21 // maximum value in AchievementCriteriaDataType enum +#define MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE 22 // maximum value in AchievementCriteriaDataType enum class Player; class Unit; @@ -82,6 +83,7 @@ struct AchievementCriteriaData uint32 id; } creature; // ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE = 2 + // ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE = 21 struct { uint32 class_id; diff --git a/src/server/game/Addons/AddonMgr.cpp b/src/server/game/Addons/AddonMgr.cpp index ff6d16bef4d..528e682e8d4 100755 --- a/src/server/game/Addons/AddonMgr.cpp +++ b/src/server/game/Addons/AddonMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ void SaveAddon(AddonInfo const& addon) { std::string name = addon.Name; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_ADDON); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_ADDON); stmt->setString(0, name); stmt->setUInt32(1, addon.CRC); diff --git a/src/server/game/Addons/AddonMgr.h b/src/server/game/Addons/AddonMgr.h index 72edc3d1f6f..38338b3980f 100755 --- a/src/server/game/Addons/AddonMgr.h +++ b/src/server/game/Addons/AddonMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 0a2ff750a1b..e7504b4ddd2 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -145,7 +145,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry* auction, SQLTransaction& // set owner to bidder (to prevent delete item with sender char deleting) // owner in `data` will set at mail receive and item extracting - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_ITEM_OWNER); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ITEM_OWNER); stmt->setUInt32(0, auction->bidder); stmt->setUInt32(1, pItem->GetGUIDLow()); trans->Append(stmt); @@ -308,7 +308,7 @@ void AuctionHouseMgr::LoadAuctionItems() uint32 oldMSTime = getMSTime(); // data needs to be at first place for Item::LoadFromDB - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_AUCTION_ITEMS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_AUCTION_ITEMS); PreparedQueryResult result = CharacterDatabase.Query(stmt); if (!result) @@ -355,7 +355,7 @@ void AuctionHouseMgr::LoadAuctions() { uint32 oldMSTime = getMSTime(); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_AUCTIONS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_AUCTIONS); PreparedQueryResult result = CharacterDatabase.Query(stmt); if (!result) @@ -704,7 +704,7 @@ void AuctionEntry::DeleteFromDB(SQLTransaction& trans) const void AuctionEntry::SaveToDB(SQLTransaction& trans) const { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_AUCTION); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_AUCTION); stmt->setUInt32(0, Id); stmt->setUInt32(1, auctioneer); stmt->setUInt32(2, item_guidlow); @@ -776,7 +776,7 @@ void AuctionHouseMgr::DeleteExpiredAuctionsAtStartup() time_t curTime = sWorld->GetGameTime(); // Query the DB to see if there are any expired auctions - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_EXPIRED_AUCTIONS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_EXPIRED_AUCTIONS); stmt->setUInt32(0, (uint32)curTime+60); PreparedQueryResult expAuctions = CharacterDatabase.Query(stmt); diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h index d1fb26cbc80..f81393be761 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.h +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp index b9fb5a13980..02707261d13 100755 --- a/src/server/game/Battlegrounds/ArenaTeam.cpp +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ bool ArenaTeam::Create(uint64 captainGuid, uint8 type, std::string teamName, uin uint32 captainLowGuid = GUID_LOPART(captainGuid); // Save arena team to db - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_ARENA_TEAM); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_ARENA_TEAM); stmt->setUInt32(0, TeamId); stmt->setString(1, TeamName); stmt->setUInt32(2, captainLowGuid); @@ -111,7 +111,7 @@ bool ArenaTeam::AddMember(uint64 playerGuid) { // 0 1 // SELECT name, class FROM characters WHERE guid = ? - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_NAME_CLASS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_NAME_CLASS); stmt->setUInt32(0, GUID_LOPART(playerGuid)); PreparedQueryResult result = CharacterDatabase.Query(stmt); @@ -138,7 +138,7 @@ bool ArenaTeam::AddMember(uint64 playerGuid) personalRating = 1000; // Try to get player's match maker rating from db and fall back to config setting if not found - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_MATCH_MAKER_RATING); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MATCH_MAKER_RATING); stmt->setUInt32(0, GUID_LOPART(playerGuid)); stmt->setUInt8(1, GetSlot()); PreparedQueryResult result = CharacterDatabase.Query(stmt); @@ -168,7 +168,7 @@ bool ArenaTeam::AddMember(uint64 playerGuid) Members.push_back(newmember); // Save player's arena team membership to db - stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_ARENA_TEAM_MEMBER); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_ARENA_TEAM_MEMBER); stmt->setUInt32(0, TeamId); stmt->setUInt32(1, GUID_LOPART(playerGuid)); CharacterDatabase.Execute(stmt); @@ -285,7 +285,7 @@ void ArenaTeam::SetCaptain(uint64 guid) CaptainGuid = guid; // Update database - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_ARENA_TEAM_CAPTAIN); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ARENA_TEAM_CAPTAIN); stmt->setUInt32(0, GUID_LOPART(guid)); stmt->setUInt32(1, GetId()); CharacterDatabase.Execute(stmt); @@ -455,7 +455,7 @@ void ArenaTeam::Inspect(WorldSession* session, uint64 guid) session->SendPacket(&data); } -void ArenaTeamMember::ModifyPersonalRating(Player* player, int32 mod, uint32 slot) +void ArenaTeamMember::ModifyPersonalRating(Player* player, int32 mod, uint32 type) { if (int32(PersonalRating) + mod < 0) PersonalRating = 0; @@ -464,8 +464,8 @@ void ArenaTeamMember::ModifyPersonalRating(Player* player, int32 mod, uint32 slo if (player) { - player->SetArenaTeamInfoField(slot, ARENA_TEAM_PERSONAL_RATING, PersonalRating); - player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING, PersonalRating, slot); + player->SetArenaTeamInfoField(ArenaTeam::GetSlotByType(type), ARENA_TEAM_PERSONAL_RATING, PersonalRating); + player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING, PersonalRating, type); } } @@ -725,7 +725,7 @@ void ArenaTeam::MemberLost(Player* player, uint32 againstMatchmakerRating, int32 { // Update personal rating int32 mod = GetRatingMod(itr->PersonalRating, againstMatchmakerRating, false); - itr->ModifyPersonalRating(player, mod, GetSlot()); + itr->ModifyPersonalRating(player, mod, GetType()); // Update matchmaker rating itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot()); @@ -751,7 +751,7 @@ void ArenaTeam::OfflineMemberLost(uint64 guid, uint32 againstMatchmakerRating, i { // update personal rating int32 mod = GetRatingMod(itr->PersonalRating, againstMatchmakerRating, false); - itr->ModifyPersonalRating(NULL, mod, GetSlot()); + itr->ModifyPersonalRating(NULL, mod, GetType()); // update matchmaker rating itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot()); @@ -773,7 +773,7 @@ void ArenaTeam::MemberWon(Player* player, uint32 againstMatchmakerRating, int32 { // update personal rating int32 mod = GetRatingMod(itr->PersonalRating, againstMatchmakerRating, true); - itr->ModifyPersonalRating(player, mod, GetSlot()); + itr->ModifyPersonalRating(player, mod, GetType()); // update matchmaker rating itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot()); @@ -828,7 +828,7 @@ void ArenaTeam::SaveToDB() SQLTransaction trans = CharacterDatabase.BeginTransaction(); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_ARENA_TEAM_STATS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ARENA_TEAM_STATS); stmt->setUInt16(0, Stats.Rating); stmt->setUInt16(1, Stats.WeekGames); stmt->setUInt16(2, Stats.WeekWins); @@ -840,7 +840,7 @@ void ArenaTeam::SaveToDB() for (MemberList::const_iterator itr = Members.begin(); itr != Members.end(); ++itr) { - stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_ARENA_TEAM_MEMBER); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ARENA_TEAM_MEMBER); stmt->setUInt16(0, itr->PersonalRating); stmt->setUInt16(1, itr->WeekGames); stmt->setUInt16(2, itr->WeekWins); @@ -850,7 +850,7 @@ void ArenaTeam::SaveToDB() stmt->setUInt32(6, GUID_LOPART(itr->Guid)); trans->Append(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_CHARACTER_ARENA_STATS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_CHARACTER_ARENA_STATS); stmt->setUInt32(0, GUID_LOPART(itr->Guid)); stmt->setUInt8(1, GetSlot()); stmt->setUInt16(2, itr->MatchMakerRating); diff --git a/src/server/game/Battlegrounds/ArenaTeam.h b/src/server/game/Battlegrounds/ArenaTeam.h index dce8c5776b7..d8ad2c09e59 100755 --- a/src/server/game/Battlegrounds/ArenaTeam.h +++ b/src/server/game/Battlegrounds/ArenaTeam.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -97,7 +97,7 @@ struct ArenaTeamMember uint16 PersonalRating; uint16 MatchMakerRating; - void ModifyPersonalRating(Player* player, int32 mod, uint32 slot); + void ModifyPersonalRating(Player* player, int32 mod, uint32 type); void ModifyMatchmakerRating(int32 mod, uint32 slot); }; diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp index cf335ec1971..719206ac625 100644 --- a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp +++ b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.h b/src/server/game/Battlegrounds/ArenaTeamMgr.h index 31f0a1773da..bf06418145d 100644 --- a/src/server/game/Battlegrounds/ArenaTeamMgr.h +++ b/src/server/game/Battlegrounds/ArenaTeamMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 4ad00f5d7aa..08ca406e373 100755 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -771,6 +771,7 @@ void Battleground::EndBattleground(uint32 winner) } } + uint8 aliveWinners = GetAlivePlayersCountByTeam(winner); for (BattlegroundPlayerMap::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr) { uint32 team = itr->second.Team; @@ -796,6 +797,10 @@ void Battleground::EndBattleground(uint32 winner) if (player->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION)) player->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT); + // Last standing - Rated 5v5 arena & be solely alive player + if (team == winner && isArena() && isRated() && GetArenaType() == ARENA_TYPE_5v5 && aliveWinners == 1 && player->isAlive()) + player->CastSpell(player, SPELL_THE_LAST_STANDING, true); + if (!player->isAlive()) { player->ResurrectPlayer(1.0f); @@ -819,7 +824,7 @@ void Battleground::EndBattleground(uint32 winner) // update achievement BEFORE personal rating update ArenaTeamMember* member = winner_arena_team->GetMember(player->GetGUID()); if (member) - player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, member->PersonalRating); + player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, 1); winner_arena_team->MemberWon(player, loser_matchmaker_rating, winner_matchmaker_change); } @@ -895,19 +900,6 @@ uint32 Battleground::GetBonusHonorFromKill(uint32 kills) const return Trinity::Honor::hk_honor_at_level(maxLevel, float(kills)); } -uint32 Battleground::GetBattlemasterEntry() const -{ - switch (GetTypeID(true)) - { - case BATTLEGROUND_AV: return 15972; - case BATTLEGROUND_WS: return 14623; - case BATTLEGROUND_AB: return 14879; - case BATTLEGROUND_EY: return 22516; - case BATTLEGROUND_NA: return 20200; - default: return 0; - } -} - void Battleground::BlockMovement(Player* player) { player->SetClientControl(player, 0); // movement disabled NOTE: the effect will be automatically removed by client when the player is teleported from the battleground, so no need to send with uint8(1) in RemovePlayerAtLeave() @@ -1245,8 +1237,6 @@ void Battleground::EventPlayerLoggedOut(Player* player) if (GetAlivePlayersCountByTeam(player->GetTeam()) <= 1 && GetPlayersCountByTeam(GetOtherTeam(player->GetTeam()))) EndBattleground(GetOtherTeam(player->GetTeam())); } - - player->LeaveBattleground(); } // This method should be called only once ... it adds pointer to queue diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 9856312c337..6eb64a2caba 100755 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -98,7 +98,8 @@ enum BattlegroundSpells SPELL_RECENTLY_DROPPED_FLAG = 42792, // Recently Dropped Flag SPELL_AURA_PLAYER_INACTIVE = 43681, // Inactive SPELL_HONORABLE_DEFENDER_25Y = 68652, // +50% honor when standing at a capture point that you control, 25yards radius (added in 3.2) - SPELL_HONORABLE_DEFENDER_60Y = 66157 // +50% honor when standing at a capture point that you control, 60yards radius (added in 3.2), probably for 40+ player battlegrounds + SPELL_HONORABLE_DEFENDER_60Y = 66157, // +50% honor when standing at a capture point that you control, 60yards radius (added in 3.2), probably for 40+ player battlegrounds + SPELL_THE_LAST_STANDING = 26549, // Arena achievement related }; enum BattlegroundTimeIntervals @@ -360,7 +361,6 @@ class Battleground uint8 GetArenaType() const { return m_ArenaType; } uint8 GetWinner() const { return m_Winner; } uint32 GetScriptId() const { return ScriptId; } - uint32 GetBattlemasterEntry() const; uint32 GetBonusHonorFromKill(uint32 kills) const; bool IsRandom() const { return m_IsRandom; } diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index b1a708b3d7f..77b985b205f 100755 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h index 989509111bb..88559d07993 100755 --- a/src/server/game/Battlegrounds/BattlegroundMgr.h +++ b/src/server/game/Battlegrounds/BattlegroundMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index 963a41435c7..a5b00ed9db1 100755 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -731,7 +731,7 @@ this method is called when group is inserted, or player / group is removed from it must be called after fully adding the members of a group to ensure group joining should be called from Battleground::RemovePlayer function in some cases */ -void BattlegroundQueue::BattlegroundQueueUpdate(uint32 diff, BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id, uint8 arenaType, bool isRated, uint32 arenaRating) +void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id, uint8 arenaType, bool isRated, uint32 arenaRating) { //if no players in queue - do nothing if (m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].empty() && diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.h b/src/server/game/Battlegrounds/BattlegroundQueue.h index 38c1d93bd7c..5cf5afc50ca 100755 --- a/src/server/game/Battlegrounds/BattlegroundQueue.h +++ b/src/server/game/Battlegrounds/BattlegroundQueue.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp index 1e8973edf10..61180ae88ea 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAA.h b/src/server/game/Battlegrounds/Zones/BattlegroundAA.h index bdf1ad7eedd..79af4269fbf 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAA.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAA.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index 028773c5229..1e128429533 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -28,17 +28,6 @@ #include "Player.h" #include "Util.h" -// these variables aren't used outside of this file, so declare them only here -uint32 BG_AB_HonorScoreTicks[BG_HONOR_MODE_NUM] = { - 330, // normal honor - 200 // holiday -}; - -uint32 BG_AB_ReputationScoreTicks[BG_HONOR_MODE_NUM] = { - 200, // normal honor - 150 // holiday -}; - BattlegroundAB::BattlegroundAB() { m_BuffChange = true; @@ -202,6 +191,9 @@ void BattlegroundAB::StartingEventOpenDoors() } DoorOpen(BG_AB_OBJECT_GATE_A); DoorOpen(BG_AB_OBJECT_GATE_H); + + // Achievement: Let's Get This Done + StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, AB_EVENT_START_BATTLE); } void BattlegroundAB::AddPlayer(Player* player) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h index 39f3727d68e..50020a580b1 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -176,10 +176,12 @@ enum BG_AB_Objectives AB_OBJECTIVE_DEFEND_BASE = 123 }; -#define BG_AB_NotABBGWeekendHonorTicks 330 -#define BG_AB_ABBGWeekendHonorTicks 200 -#define BG_AB_NotABBGWeekendReputationTicks 200 -#define BG_AB_ABBGWeekendReputationTicks 150 +#define BG_AB_NotABBGWeekendHonorTicks 260 +#define BG_AB_ABBGWeekendHonorTicks 160 +#define BG_AB_NotABBGWeekendReputationTicks 160 +#define BG_AB_ABBGWeekendReputationTicks 120 + +#define AB_EVENT_START_BATTLE 9158 // Achievement: Let's Get This Done // x, y, z, o const float BG_AB_NodePositions[BG_AB_DYNAMIC_NODES_COUNT][4] = { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index fe570930870..f2e8c2bf0af 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -420,6 +420,9 @@ void BattlegroundAV::StartingEventOpenDoors() DoorOpen(BG_AV_OBJECT_DOOR_H); DoorOpen(BG_AV_OBJECT_DOOR_A); + + // Achievement: The Alterac Blitz + StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, AV_EVENT_START_BATTLE); } void BattlegroundAV::AddPlayer(Player* player) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h index 2c8ffc0cf72..82e231c63fa 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -50,6 +50,8 @@ class Battleground; #define BG_AV_KILL_SURVIVING_CAPTAIN 2 #define BG_AV_REP_SURVIVING_CAPTAIN 125 +#define AV_EVENT_START_BATTLE 9166 // Achievement: The Alterac Blitz + enum BG_AV_Sounds { //TODO: get out if there comes a sound when neutral team captures mine diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp index 88b9aa6184e..0e79296b6f4 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h index 1b4fa8ebd64..8c0df2bc329 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp index 754005f3f33..87f4ca48378 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h index 625eb1c7533..f2ba2cea1e7 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp index c790d64e986..b7994d0052c 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -30,8 +30,8 @@ // these variables aren't used outside of this file, so declare them only here uint32 BG_EY_HonorScoreTicks[BG_HONOR_MODE_NUM] = { - 330, // normal honor - 200 // holiday + 260, // normal honor + 160 // holiday }; BattlegroundEY::BattlegroundEY() @@ -120,6 +120,9 @@ void BattlegroundEY::StartingEventOpenDoors() uint8 buff = urand(0, 2); SpawnBGObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + buff + i * 3, RESPAWN_IMMEDIATELY); } + + // Achievement: Flurry + StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EY_EVENT_START_BATTLE); } void BattlegroundEY::AddPoints(uint32 Team, uint32 Points) @@ -193,7 +196,6 @@ void BattlegroundEY::CheckSomeoneLeftPoint() //move not existed player to "free space" - this will cause many error showing in log, but it is a very important bug m_PlayersNearPoint[EY_POINTS_MAX].push_back(m_PlayersNearPoint[i][j]); m_PlayersNearPoint[i].erase(m_PlayersNearPoint[i].begin() + j); - ++j; continue; } if (!player->CanCaptureTowerPoint() || !player->IsWithinDistInMap(obj, BG_EY_POINT_RADIUS)) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h index aba5754752a..026fbccc320 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -217,8 +217,10 @@ enum EYBattlegroundObjectTypes BG_EY_OBJECT_MAX = 59 }; -#define BG_EY_NotEYWeekendHonorTicks 330 -#define BG_EY_EYWeekendHonorTicks 200 +#define BG_EY_NotEYWeekendHonorTicks 260 +#define BG_EY_EYWeekendHonorTicks 160 + +#define EY_EVENT_START_BATTLE 13180 // Achievement: Flurry enum BG_EY_Score { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index f17df3aaf67..40f31cef394 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -175,9 +175,9 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff) { if (siege->isAlive()) { - if (siege->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_UNK_14|UNIT_FLAG_OOC_NOT_ATTACKABLE)) + if (siege->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_UNK_14|UNIT_FLAG_IMMUNE_TO_PC)) // following sniffs the vehicle always has UNIT_FLAG_UNK_14 - siege->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE); + siege->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_IMMUNE_TO_PC); else siege->SetHealth(siege->GetMaxHealth()); } @@ -793,7 +793,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture) if (Creature* siegeEngine = GetBGCreature(siegeType)) { - siegeEngine->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_UNK_14|UNIT_FLAG_OOC_NOT_ATTACKABLE); + siegeEngine->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_UNK_14|UNIT_FLAG_IMMUNE_TO_PC); siegeEngine->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]); } } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h index 552b79ce608..90f39a61e12 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp index 37fdd2559c4..cee8cb2b4da 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h index e7fe08063a4..53c0faf1c6f 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp index ba4d787b215..c304c194a71 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRB.h b/src/server/game/Battlegrounds/Zones/BattlegroundRB.h index ef6283ed96a..cda1351ca12 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRB.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRB.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp index 3d1ebe8fec9..f1602507cc1 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h index 5528d0ccf9e..dc041a18a1c 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp index 0c44c5d3d96..539419d6c50 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h index 70417c1dfce..4f99af268db 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index aaa29e1ca20..5ee1a7bcc58 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -783,7 +783,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source) void BattlegroundSA::EventPlayerUsedGO(Player* Source, GameObject* object) { - if (object->GetEntry() == BG_SA_ObjEntries[BG_SA_TITAN_RELIC] && GateStatus[BG_SA_ANCIENT_GATE] == BG_SA_GATE_DESTROYED) + if (object->GetEntry() == BG_SA_ObjEntries[BG_SA_TITAN_RELIC] && GateStatus[BG_SA_ANCIENT_GATE] == BG_SA_GATE_DESTROYED && GateStatus[BG_SA_YELLOW_GATE] == BG_SA_GATE_DESTROYED && (GateStatus[BG_SA_PURPLE_GATE] == BG_SA_GATE_DESTROYED || GateStatus[BG_SA_RED_GATE] == BG_SA_GATE_DESTROYED) && (GateStatus[BG_SA_GREEN_GATE] == BG_SA_GATE_DESTROYED || GateStatus[BG_SA_BLUE_GATE] == BG_SA_GATE_DESTROYED)) { if (Source->GetTeamId() == Attackers) { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h index 8b446fccb9e..76a772ff978 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp index a6aa6f41db2..226bf172a09 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h index b3c2c88c306..063d04253a5 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/CMakeLists.txt b/src/server/game/CMakeLists.txt index 65ba16007d4..ac1bb9e5cac 100644 --- a/src/server/game/CMakeLists.txt +++ b/src/server/game/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -30,6 +30,7 @@ file(GLOB_RECURSE sources_Globals Globals/*.cpp Globals/*.h) file(GLOB_RECURSE sources_Grids Grids/*.cpp Grids/*.h) file(GLOB_RECURSE sources_Groups Groups/*.cpp Groups/*.h) file(GLOB_RECURSE sources_Guilds Guilds/*.cpp Guilds/*.h) +file(GLOB_RECURSE sources_Handlers Handlers/*.cpp Handlers/*.h) file(GLOB_RECURSE sources_Instances Instances/*.cpp Instances/*.h) file(GLOB_RECURSE sources_Loot Loot/*.cpp Loot/*.h) file(GLOB_RECURSE sources_Mails Mails/*.cpp Mails/*.h) @@ -79,6 +80,7 @@ set(game_STAT_SRCS ${sources_Grids} ${sources_Groups} ${sources_Guilds} + ${sources_Handlers} ${sources_Instances} ${sources_Loot} ${sources_Mails} @@ -102,6 +104,7 @@ set(game_STAT_SRCS include_directories( ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/dep/g3dlite/include ${CMAKE_SOURCE_DIR}/dep/mersennetwister ${CMAKE_SOURCE_DIR}/dep/SFMT ${CMAKE_SOURCE_DIR}/dep/zlib @@ -114,12 +117,10 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/server/shared/Database ${CMAKE_SOURCE_DIR}/src/server/shared/DataStores ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging - ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/CountedReference ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/LinkedReference ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic ${CMAKE_SOURCE_DIR}/src/server/shared/Logging ${CMAKE_SOURCE_DIR}/src/server/shared/Packets - ${CMAKE_SOURCE_DIR}/src/server/shared/Policies ${CMAKE_SOURCE_DIR}/src/server/shared/Threading ${CMAKE_SOURCE_DIR}/src/server/shared/Utilities ${CMAKE_CURRENT_SOURCE_DIR} @@ -164,12 +165,14 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Grids ${CMAKE_CURRENT_SOURCE_DIR}/Groups ${CMAKE_CURRENT_SOURCE_DIR}/Guilds + ${CMAKE_CURRENT_SOURCE_DIR}/Handlers ${CMAKE_CURRENT_SOURCE_DIR}/Instances ${CMAKE_CURRENT_SOURCE_DIR}/Loot ${CMAKE_CURRENT_SOURCE_DIR}/Mails ${CMAKE_CURRENT_SOURCE_DIR}/Maps ${CMAKE_CURRENT_SOURCE_DIR}/Miscellaneous ${CMAKE_CURRENT_SOURCE_DIR}/Movement + ${CMAKE_CURRENT_SOURCE_DIR}/Movement/Spline ${CMAKE_CURRENT_SOURCE_DIR}/Movement/MovementGenerators ${CMAKE_CURRENT_SOURCE_DIR}/Movement/Waypoints ${CMAKE_CURRENT_SOURCE_DIR}/OutdoorPvP @@ -179,7 +182,6 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Reputation ${CMAKE_CURRENT_SOURCE_DIR}/Scripting ${CMAKE_CURRENT_SOURCE_DIR}/Server/Protocol - ${CMAKE_CURRENT_SOURCE_DIR}/Server/Protocol/Handlers ${CMAKE_CURRENT_SOURCE_DIR}/Server ${CMAKE_CURRENT_SOURCE_DIR}/Skills ${CMAKE_CURRENT_SOURCE_DIR}/Spells diff --git a/src/server/game/Calendar/Calendar.cpp b/src/server/game/Calendar/Calendar.cpp index e31f2763d23..2c4ad943dd6 100755 --- a/src/server/game/Calendar/Calendar.cpp +++ b/src/server/game/Calendar/Calendar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Calendar/Calendar.h b/src/server/game/Calendar/Calendar.h index 2aa0ad65640..dfc88e477f9 100755 --- a/src/server/game/Calendar/Calendar.h +++ b/src/server/game/Calendar/Calendar.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp index 244c05ec0ad..b6e9dd30d28 100755 --- a/src/server/game/Chat/Channels/Channel.cpp +++ b/src/server/game/Chat/Channels/Channel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -55,7 +55,7 @@ Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team) // If storing custom channels in the db is enabled either load or save the channel if (sWorld->getBoolConfig(CONFIG_PRESERVE_CUSTOM_CHANNELS)) { - PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_CHANNEL); + PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHANNEL); stmt->setString(0, name); stmt->setUInt32(1, m_Team); PreparedQueryResult result = CharacterDatabase.Query(stmt); @@ -85,7 +85,7 @@ Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team) } else // save { - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_CHANNEL); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHANNEL); stmt->setString(0, name); stmt->setUInt32(1, m_Team); CharacterDatabase.Execute(stmt); @@ -108,7 +108,7 @@ void Channel::UpdateChannelInDB() const std::string banListStr = banlist.str(); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_CHANNEL); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHANNEL); stmt->setBool(0, m_announce); stmt->setBool(1, m_ownership); stmt->setString(2, m_password); @@ -124,7 +124,7 @@ void Channel::UpdateChannelInDB() const void Channel::UpdateChannelUseageInDB() const { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_CHANNEL_USAGE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHANNEL_USAGE); stmt->setString(0, m_name); stmt->setUInt32(1, m_Team); CharacterDatabase.Execute(stmt); diff --git a/src/server/game/Chat/Channels/Channel.h b/src/server/game/Chat/Channels/Channel.h index 8ce13a6afa1..9564dbb381e 100755 --- a/src/server/game/Chat/Channels/Channel.h +++ b/src/server/game/Chat/Channels/Channel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp index 651e5d15647..75436e1eb5f 100755 --- a/src/server/game/Chat/Channels/ChannelMgr.cpp +++ b/src/server/game/Chat/Channels/ChannelMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Chat/Channels/ChannelMgr.h b/src/server/game/Chat/Channels/ChannelMgr.h index f46f8d360c1..ac030ffb73f 100755 --- a/src/server/game/Chat/Channels/ChannelMgr.h +++ b/src/server/game/Chat/Channels/ChannelMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 185ac487481..035fbaf5b78 100755 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -885,11 +885,11 @@ bool ChatHandler::ShowHelpForSubCommands(ChatCommand* table, char const* cmd, ch std::string list; for (uint32 i = 0; table[i].Name != NULL; ++i) { - // must be available (ignore handler existence for show command with possibe avalable subcomands + // must be available (ignore handler existence for show command with possible available subcommands) if (!isAvailable(table[i])) continue; - /// for empty subcmd show all available + // for empty subcmd show all available if (*subcmd && !hasStringAbbr(table[i].Name, subcmd)) continue; @@ -924,7 +924,7 @@ bool ChatHandler::ShowHelpForCommand(ChatCommand* table, const char* cmd) { for (uint32 i = 0; table[i].Name != NULL; ++i) { - // must be available (ignore handler existence for show command with possibe avalable subcomands + // must be available (ignore handler existence for show command with possible available subcommands) if (!isAvailable(table[i])) continue; @@ -954,7 +954,7 @@ bool ChatHandler::ShowHelpForCommand(ChatCommand* table, const char* cmd) { for (uint32 i = 0; table[i].Name != NULL; ++i) { - // must be available (ignore handler existence for show command with possibe avalable subcomands + // must be available (ignore handler existence for show command with possible available subcommands) if (!isAvailable(table[i])) continue; diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h index d9190265bbb..2311f4b8e5e 100755 --- a/src/server/game/Chat/Chat.h +++ b/src/server/game/Chat/Chat.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index 26f63aa77ee..d26f937c43d 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Chat/ChatLink.h b/src/server/game/Chat/ChatLink.h index 4b27cab29d3..392d28aca54 100644 --- a/src/server/game/Chat/ChatLink.h +++ b/src/server/game/Chat/ChatLink.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Chat/Commands/Level0.cpp b/src/server/game/Chat/Commands/Level0.cpp index 7ff7a82bf58..6d33a5761f4 100755 --- a/src/server/game/Chat/Commands/Level0.cpp +++ b/src/server/game/Chat/Commands/Level0.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Chat/Commands/Level1.cpp b/src/server/game/Chat/Commands/Level1.cpp index f06f8a7e89c..57d5e8cfa94 100755 --- a/src/server/game/Chat/Commands/Level1.cpp +++ b/src/server/game/Chat/Commands/Level1.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Chat/Commands/Level2.cpp b/src/server/game/Chat/Commands/Level2.cpp index 5411b1364c0..68961b9de61 100755 --- a/src/server/game/Chat/Commands/Level2.cpp +++ b/src/server/game/Chat/Commands/Level2.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -76,7 +76,7 @@ bool ChatHandler::HandleMuteCommand(const char* args) if (HasLowerSecurity (target, target_guid, true)) return false; - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPDATE_MUTE_TIME); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_MUTE_TIME); if (target) { @@ -139,7 +139,7 @@ bool ChatHandler::HandleUnmuteCommand(const char* args) target->GetSession()->m_muteTime = 0; } - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPDATE_MUTE_TIME); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_MUTE_TIME); stmt->setInt64(0, 0); stmt->setUInt32(1, accountId); @@ -332,8 +332,8 @@ bool ChatHandler::HandlePInfoCommand(const char* args) QueryResult result = LoginDatabase.PQuery("SELECT a.username, aa.gmlevel, a.email, a.last_ip, a.last_login, a.mutetime " "FROM account a " "LEFT JOIN account_access aa " - "ON (a.id = aa.id) " - "WHERE a.id = '%u'", accId); + "ON (a.id = aa.id AND (aa.RealmID = -1 OR aa.RealmID = %u)) " + "WHERE a.id = '%u'", realmID, accId); if (result) { Field* fields = result->Fetch(); @@ -479,7 +479,7 @@ bool ChatHandler::HandleCharacterRenameCommand(const char* args) PSendSysMessage(LANG_RENAME_PLAYER_GUID, oldNameLink.c_str(), GUID_LOPART(targetGuid)); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_AT_LOGIN_FLAG); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->setUInt16(0, uint16(AT_LOGIN_RENAME)); stmt->setUInt32(1, GUID_LOPART(targetGuid)); @@ -499,7 +499,7 @@ bool ChatHandler::HandleCharacterCustomizeCommand(const char* args) if (!extractPlayerTarget((char*)args, &target, &targetGuid, &targetName)) return false; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_AT_LOGIN_FLAG); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->setUInt16(0, uint16(AT_LOGIN_CUSTOMIZE)); @@ -533,7 +533,7 @@ bool ChatHandler::HandleCharacterChangeFactionCommand(const char* args) if (!extractPlayerTarget((char*)args, &target, &targetGuid, &targetName)) return false; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_AT_LOGIN_FLAG); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->setUInt16(0, uint16(AT_LOGIN_CHANGE_FACTION)); @@ -566,9 +566,9 @@ bool ChatHandler::HandleCharacterChangeRaceCommand(const char * args) if (!extractPlayerTarget((char*)args, &target, &targetGuid, &targetName)) return false; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_AT_LOGIN_FLAG); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); - stmt->setUInt16(0, uint16(AT_LOGIN_CHANGE_FACTION)); + stmt->setUInt16(0, uint16(AT_LOGIN_CHANGE_RACE)); if (target) { @@ -707,19 +707,32 @@ bool ChatHandler::HandleCombatStopCommand(const char* args) bool ChatHandler::HandleLookupPlayerIpCommand(const char* args) { + std::string ip; + int32 limit; + char* limit_str; + Player *chr = getSelectedPlayer(); if (!*args) - return false; + { + // NULL only if used from console + if (!chr || chr == GetSession()->GetPlayer()) + return false; - std::string ip = strtok ((char*)args, " "); - char* limit_str = strtok (NULL, " "); - int32 limit = limit_str ? atoi (limit_str) : -1; + ip = chr->GetSession()->GetRemoteAddress(); + limit = -1; + } + else + { + ip = strtok ((char*)args, " "); + limit_str = strtok (NULL, " "); + limit = limit_str ? atoi (limit_str) : -1; + } - LoginDatabase.EscapeString (ip); + LoginDatabase.EscapeString(ip); - QueryResult result = LoginDatabase.PQuery ("SELECT id, username FROM account WHERE last_ip = '%s'", ip.c_str ()); + QueryResult result = LoginDatabase.PQuery("SELECT id, username FROM account WHERE last_ip = '%s'", ip.c_str()); - return LookupPlayerSearchCommand (result, limit); + return LookupPlayerSearchCommand(result, limit); } bool ChatHandler::HandleLookupPlayerAccountCommand(const char* args) diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp index 9b29483bcb4..cb3eb825354 100755 --- a/src/server/game/Chat/Commands/Level3.cpp +++ b/src/server/game/Chat/Commands/Level3.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -2198,7 +2198,7 @@ void ChatHandler::HandleCharacterLevel(Player* player, uint64 playerGuid, uint32 else { // Update level and reset XP, everything else will be updated at login - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_LEVEL); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_LEVEL); stmt->setUInt8(0, uint8(newLevel)); stmt->setUInt32(1, GUID_LOPART(playerGuid)); @@ -2585,7 +2585,7 @@ bool ChatHandler::HandleResetSpellsCommand(const char* args) } else { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_AT_LOGIN_FLAG); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->setUInt16(0, uint16(AT_LOGIN_RESET_SPELLS)); stmt->setUInt32(1, GUID_LOPART(targetGuid)); @@ -2643,7 +2643,7 @@ bool ChatHandler::HandleResetTalentsCommand(const char* args) } else if (targetGuid) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_AT_LOGIN_FLAG); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->setUInt16(0, uint16(AT_LOGIN_NONE | AT_LOGIN_RESET_PET_TALENTS)); stmt->setUInt32(1, GUID_LOPART(targetGuid)); @@ -2691,7 +2691,7 @@ bool ChatHandler::HandleResetAllCommand(const char * args) return false; } - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_ALL_AT_LOGIN_FLAGS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ALL_AT_LOGIN_FLAGS); stmt->setUInt16(0, uint16(atLogin)); @@ -3112,7 +3112,7 @@ bool ChatHandler::HandleBanInfoCharacterCommand(const char *args) if (!target) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_GUID_BY_NAME); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUID_BY_NAME); stmt->setString(0, name); PreparedQueryResult resultCharacter = CharacterDatabase.Query(stmt); @@ -3127,7 +3127,7 @@ bool ChatHandler::HandleBanInfoCharacterCommand(const char *args) else target_guid = target->GetGUIDLow(); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_BANINFO); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_BANINFO); stmt->setUInt32(0, target_guid); PreparedQueryResult result = CharacterDatabase.Query(stmt); if (!result) @@ -3222,7 +3222,7 @@ bool ChatHandler::HandleBanListCharacterCommand(const char *args) return false; std::string filter(cFilter); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_GUID_BY_NAME_FILTER); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUID_BY_NAME_FILTER); stmt->setString(0, filter.c_str()); PreparedQueryResult result = CharacterDatabase.Query(stmt); if (!result) @@ -3239,7 +3239,7 @@ bool ChatHandler::HandleBanListCharacterCommand(const char *args) do { Field* fields = result->Fetch(); - PreparedStatement* stmt2 = CharacterDatabase.GetPreparedStatement(CHAR_GET_BANNED_NAME); + PreparedStatement* stmt2 = CharacterDatabase.GetPreparedStatement(CHAR_SEL_BANNED_NAME); stmt2->setUInt32(0, fields[0].GetUInt32()); PreparedQueryResult banresult = CharacterDatabase.Query(stmt2); if (banresult) @@ -3261,7 +3261,7 @@ bool ChatHandler::HandleBanListCharacterCommand(const char *args) std::string char_name = fields[1].GetString(); - PreparedStatement* stmt2 = CharacterDatabase.GetPreparedStatement(CHAR_GET_BANINFO_LIST); + PreparedStatement* stmt2 = CharacterDatabase.GetPreparedStatement(CHAR_SEL_BANINFO_LIST); stmt2->setUInt32(0, fields[0].GetUInt32()); PreparedQueryResult banInfo = CharacterDatabase.Query(stmt2); if (banInfo) @@ -3692,6 +3692,9 @@ bool ChatHandler::HandleMovegensCommand(const char* /*args*/) PSendSysMessage(LANG_MOVEGENS_LIST, (unit->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), unit->GetGUIDLow()); MotionMaster* mm = unit->GetMotionMaster(); + float x,y,z; + mm->GetDestination(x,y,z); + for (uint8 i = 0; i < MAX_MOTION_SLOT; ++i) { MovementGenerator* mg = mm->GetMotionSlot(i); @@ -3707,48 +3710,55 @@ bool ChatHandler::HandleMovegensCommand(const char* /*args*/) case WAYPOINT_MOTION_TYPE: SendSysMessage(LANG_MOVEGENS_WAYPOINT); break; case ANIMAL_RANDOM_MOTION_TYPE: SendSysMessage(LANG_MOVEGENS_ANIMAL_RANDOM); break; case CONFUSED_MOTION_TYPE: SendSysMessage(LANG_MOVEGENS_CONFUSED); break; - case TARGETED_MOTION_TYPE: + case CHASE_MOTION_TYPE: { + Unit* target = NULL; if (unit->GetTypeId() == TYPEID_PLAYER) - { - TargetedMovementGenerator<Player> const* mgen = static_cast<TargetedMovementGenerator<Player> const*>(mg); - Unit* target = mgen->GetTarget(); - if (target) - PSendSysMessage(LANG_MOVEGENS_TARGETED_PLAYER, target->GetName(), target->GetGUIDLow()); - else - SendSysMessage(LANG_MOVEGENS_TARGETED_NULL); - } + target = static_cast<ChaseMovementGenerator<Player> const*>(mg)->GetTarget(); else - { - TargetedMovementGenerator<Creature> const* mgen = static_cast<TargetedMovementGenerator<Creature> const*>(mg); - Unit* target = mgen->GetTarget(); - if (target) - PSendSysMessage(LANG_MOVEGENS_TARGETED_CREATURE, target->GetName(), target->GetGUIDLow()); - else - SendSysMessage(LANG_MOVEGENS_TARGETED_NULL); - } + target = static_cast<ChaseMovementGenerator<Creature> const*>(mg)->GetTarget(); + + if (!target) + SendSysMessage(LANG_MOVEGENS_CHASE_NULL); + else if (target->GetTypeId() == TYPEID_PLAYER) + PSendSysMessage(LANG_MOVEGENS_CHASE_PLAYER, target->GetName(), target->GetGUIDLow()); + else + PSendSysMessage(LANG_MOVEGENS_CHASE_CREATURE, target->GetName(), target->GetGUIDLow()); break; } + case FOLLOW_MOTION_TYPE: + { + Unit* target = NULL; + if (unit->GetTypeId() == TYPEID_PLAYER) + target = static_cast<FollowMovementGenerator<Player> const*>(mg)->GetTarget(); + else + target = static_cast<FollowMovementGenerator<Creature> const*>(mg)->GetTarget(); + + if (!target) + SendSysMessage(LANG_MOVEGENS_FOLLOW_NULL); + else if (target->GetTypeId() == TYPEID_PLAYER) + PSendSysMessage(LANG_MOVEGENS_FOLLOW_PLAYER, target->GetName(), target->GetGUIDLow()); + else + PSendSysMessage(LANG_MOVEGENS_FOLLOW_CREATURE, target->GetName(), target->GetGUIDLow()); + break; + } case HOME_MOTION_TYPE: + { if (unit->GetTypeId() == TYPEID_UNIT) - { - float x, y, z; - mg->GetDestination(x, y, z); PSendSysMessage(LANG_MOVEGENS_HOME_CREATURE, x, y, z); - } else SendSysMessage(LANG_MOVEGENS_HOME_PLAYER); break; + } case FLIGHT_MOTION_TYPE: SendSysMessage(LANG_MOVEGENS_FLIGHT); break; case POINT_MOTION_TYPE: { - float x, y, z; - mg->GetDestination(x, y, z); PSendSysMessage(LANG_MOVEGENS_POINT, x, y, z); break; } case FLEEING_MOTION_TYPE: SendSysMessage(LANG_MOVEGENS_FEAR); break; case DISTRACT_MOTION_TYPE: SendSysMessage(LANG_MOVEGENS_DISTRACT); break; + case EFFECT_MOTION_TYPE: SendSysMessage(LANG_MOVEGENS_EFFECT); break; default: PSendSysMessage(LANG_MOVEGENS_UNKNOWN, mg->GetMovementGeneratorType()); break; @@ -4040,19 +4050,14 @@ bool ChatHandler::HandleComeToMeCommand(const char *args) if (!newFlagStr) return false; - uint32 newFlags = (uint32)strtoul(newFlagStr, NULL, 0); - Creature* caster = getSelectedCreature(); if (!caster) { - m_session->GetPlayer()->SetUnitMovementFlags(newFlags); SendSysMessage(LANG_SELECT_CREATURE); SetSentErrorMessage(true); return false; } - caster->SetUnitMovementFlags(newFlags); - Player* player = m_session->GetPlayer(); caster->GetMotionMaster()->MovePoint(0, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()); @@ -4467,7 +4472,7 @@ bool ChatHandler::HandleChannelSetOwnership(const char *args) { if (chn) chn->SetOwnership(true); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_CHANNEL_OWNERSHIP); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHANNEL_OWNERSHIP); stmt->setUInt8 (0, 1); stmt->setString(1, channel); CharacterDatabase.Execute(stmt); @@ -4477,7 +4482,7 @@ bool ChatHandler::HandleChannelSetOwnership(const char *args) { if (chn) chn->SetOwnership(false); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_CHANNEL_OWNERSHIP); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHANNEL_OWNERSHIP); stmt->setUInt8 (0, 0); stmt->setString(1, channel); CharacterDatabase.Execute(stmt); diff --git a/src/server/game/Chat/Commands/TicketCommands.cpp b/src/server/game/Chat/Commands/TicketCommands.cpp index d38da9eb97c..138466f9623 100755 --- a/src/server/game/Chat/Commands/TicketCommands.cpp +++ b/src/server/game/Chat/Commands/TicketCommands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Combat/HostileRefManager.cpp b/src/server/game/Combat/HostileRefManager.cpp index 95ecac414cc..05b4fa171c7 100755 --- a/src/server/game/Combat/HostileRefManager.cpp +++ b/src/server/game/Combat/HostileRefManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Combat/HostileRefManager.h b/src/server/game/Combat/HostileRefManager.h index 36fe6f7a6b7..8a49d230161 100755 --- a/src/server/game/Combat/HostileRefManager.h +++ b/src/server/game/Combat/HostileRefManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index 6303181a44d..d82e43ba83b 100755 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -180,7 +180,7 @@ void HostileReference::updateOnlineStatus() // target is not in flight if (isValid() && (getTarget()->GetTypeId() != TYPEID_PLAYER || !getTarget()->ToPlayer()->isGameMaster()) - && !getTarget()->HasUnitState(UNIT_STAT_IN_FLIGHT) + && !getTarget()->HasUnitState(UNIT_STATE_IN_FLIGHT) && getTarget()->IsInMap(getSourceUnit()) ) { diff --git a/src/server/game/Combat/ThreatManager.h b/src/server/game/Combat/ThreatManager.h index 261f9cd93ab..ce1f6de2ab0 100755 --- a/src/server/game/Combat/ThreatManager.h +++ b/src/server/game/Combat/ThreatManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Combat/UnitEvents.h b/src/server/game/Combat/UnitEvents.h index d55fd4773f6..39c79b8273a 100755 --- a/src/server/game/Combat/UnitEvents.h +++ b/src/server/game/Combat/UnitEvents.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index cf349044042..8562c66c29f 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -63,7 +63,7 @@ bool Condition::Meets(Player* player, Unit* invoker) case CONDITION_REPUTATION_RANK: { if (FactionEntry const* faction = sFactionStore.LookupEntry(mConditionValue1)) - condMeets = uint32(player->GetReputationMgr().GetRank(faction)) == mConditionValue2; + condMeets = (mConditionValue2 & (1 << player->GetReputationMgr().GetRank(faction))); break; } case CONDITION_ACHIEVEMENT: @@ -73,10 +73,10 @@ bool Condition::Meets(Player* player, Unit* invoker) condMeets = player->GetTeam() == mConditionValue1; break; case CONDITION_CLASS: - condMeets = player->getClass() == mConditionValue1; + condMeets = player->getClassMask() & mConditionValue1; break; case CONDITION_RACE: - condMeets = player->getRace() == mConditionValue1; + condMeets = player->getRaceMask() & mConditionValue1; break; case CONDITION_SKILL: condMeets = player->HasSkill(mConditionValue1) && player->GetBaseSkillValue(mConditionValue1) >= mConditionValue2; @@ -243,33 +243,33 @@ ConditionMgr::~ConditionMgr() ConditionList ConditionMgr::GetConditionReferences(uint32 refId) { ConditionList conditions; - ConditionReferenceMap::const_iterator ref = m_ConditionReferenceMap.find(refId); - if (ref != m_ConditionReferenceMap.end()) + ConditionReferenceContainer::const_iterator ref = ConditionReferenceStore.find(refId); + if (ref != ConditionReferenceStore.end()) conditions = (*ref).second; return conditions; } bool ConditionMgr::IsPlayerMeetToConditionList(Player* player, ConditionList const& conditions, Unit* invoker /*= NULL*/) { - std::map<uint32, bool> ElseGroupMap; + std::map<uint32, bool> ElseGroupStore; for (ConditionList::const_iterator i = conditions.begin(); i != conditions.end(); ++i) { sLog->outDebug(LOG_FILTER_CONDITIONSYS, "ConditionMgr::IsPlayerMeetToConditionList condType: %u val1: %u", (*i)->mConditionType, (*i)->mConditionValue1); if ((*i)->isLoaded()) { - std::map<uint32, bool>::const_iterator itr = ElseGroupMap.find((*i)->mElseGroup); - if (itr == ElseGroupMap.end()) - ElseGroupMap[(*i)->mElseGroup] = true; + std::map<uint32, bool>::const_iterator itr = ElseGroupStore.find((*i)->mElseGroup); + if (itr == ElseGroupStore.end()) + ElseGroupStore[(*i)->mElseGroup] = true; else if (!(*itr).second) continue; if ((*i)->mReferenceId)//handle reference { - ConditionReferenceMap::const_iterator ref = m_ConditionReferenceMap.find((*i)->mReferenceId); - if (ref != m_ConditionReferenceMap.end()) + ConditionReferenceContainer::const_iterator ref = ConditionReferenceStore.find((*i)->mReferenceId); + if (ref != ConditionReferenceStore.end()) { if (!IsPlayerMeetToConditionList(player, (*ref).second, invoker)) - ElseGroupMap[(*i)->mElseGroup] = false; + ElseGroupStore[(*i)->mElseGroup] = false; } else { @@ -281,11 +281,11 @@ bool ConditionMgr::IsPlayerMeetToConditionList(Player* player, ConditionList con else //handle normal condition { if (!(*i)->Meets(player, invoker)) - ElseGroupMap[(*i)->mElseGroup] = false; + ElseGroupStore[(*i)->mElseGroup] = false; } } } - for (std::map<uint32, bool>::const_iterator i = ElseGroupMap.begin(); i != ElseGroupMap.end(); ++i) + for (std::map<uint32, bool>::const_iterator i = ElseGroupStore.begin(); i != ElseGroupStore.end(); ++i) if (i->second) return true; @@ -309,19 +309,19 @@ bool ConditionMgr::IsPlayerMeetToConditions(Player* player, ConditionList const& return result; } -ConditionList ConditionMgr::GetConditionsForNotGroupedEntry(ConditionSourceType sType, uint32 uEntry) +ConditionList ConditionMgr::GetConditionsForNotGroupedEntry(ConditionSourceType sourceType, uint32 entry) { ConditionList spellCond; - if (sType > CONDITION_SOURCE_TYPE_NONE && sType < CONDITION_SOURCE_TYPE_MAX) + if (sourceType > CONDITION_SOURCE_TYPE_NONE && sourceType < CONDITION_SOURCE_TYPE_MAX) { - ConditionMap::const_iterator itr = m_ConditionMap.find(sType); - if (itr != m_ConditionMap.end()) + ConditionContainer::const_iterator itr = ConditionStore.find(sourceType); + if (itr != ConditionStore.end()) { - ConditionTypeMap::const_iterator i = (*itr).second.find(uEntry); + ConditionTypeContainer::const_iterator i = (*itr).second.find(entry); if (i != (*itr).second.end()) { spellCond = (*i).second; - sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForNotGroupedEntry: found conditions for type %u and entry %u", uint32(sType), uEntry); + sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForNotGroupedEntry: found conditions for type %u and entry %u", uint32(sourceType), entry); } } } @@ -331,10 +331,10 @@ ConditionList ConditionMgr::GetConditionsForNotGroupedEntry(ConditionSourceType ConditionList ConditionMgr::GetConditionsForVehicleSpell(uint32 creatureID, uint32 spellID) { ConditionList cond; - VehicleSpellConditionMap::const_iterator itr = m_VehicleSpellConditions.find(creatureID); - if (itr != m_VehicleSpellConditions.end()) + VehicleSpellConditionContainer::const_iterator itr = VehicleSpellConditionStore.find(creatureID); + if (itr != VehicleSpellConditionStore.end()) { - ConditionTypeMap::const_iterator i = (*itr).second.find(spellID); + ConditionTypeContainer::const_iterator i = (*itr).second.find(spellID); if (i != (*itr).second.end()) { cond = (*i).second; @@ -344,6 +344,22 @@ ConditionList ConditionMgr::GetConditionsForVehicleSpell(uint32 creatureID, uint return cond; } +ConditionList ConditionMgr::GetConditionsForSmartEvent(int32 entryOrGuid, uint32 eventId, uint32 sourceType) +{ + ConditionList cond; + SmartEventConditionContainer::const_iterator itr = SmartEventConditionStore.find(std::make_pair(entryOrGuid, sourceType)); + if (itr != SmartEventConditionStore.end()) + { + ConditionTypeContainer::const_iterator i = (*itr).second.find(eventId + 1); + if (i != (*itr).second.end()) + { + cond = (*i).second; + sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForSmartEvent: found conditions for Smart Event entry or guid %d event_id %u", entryOrGuid, eventId); + } + } + return cond; +} + void ConditionMgr::LoadConditions(bool isReload) { uint32 oldMSTime = getMSTime(); @@ -374,7 +390,7 @@ void ConditionMgr::LoadConditions(bool isReload) sObjectMgr->LoadGossipMenuItems(); } - QueryResult result = WorldDatabase.Query("SELECT SourceTypeOrReferenceId, SourceGroup, SourceEntry, ElseGroup, ConditionTypeOrReference, " + QueryResult result = WorldDatabase.Query("SELECT SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, " " ConditionValue1, ConditionValue2, ConditionValue3, ErrorTextId, ScriptName FROM conditions"); if (!result) @@ -394,14 +410,15 @@ void ConditionMgr::LoadConditions(bool isReload) Condition* cond = new Condition(); int32 iSourceTypeOrReferenceId = fields[0].GetInt32(); cond->mSourceGroup = fields[1].GetUInt32(); - cond->mSourceEntry = fields[2].GetUInt32(); - cond->mElseGroup = fields[3].GetUInt32(); - int32 iConditionTypeOrReference = fields[4].GetInt32(); - cond->mConditionValue1 = fields[5].GetUInt32(); - cond->mConditionValue2 = fields[6].GetUInt32(); - cond->mConditionValue3 = fields[7].GetUInt32(); - cond->ErrorTextd = fields[8].GetUInt32(); - cond->mScriptId = sObjectMgr->GetScriptId(fields[9].GetCString()); + cond->mSourceEntry = fields[2].GetInt32(); + cond->mSourceId = fields[3].GetUInt32(); + cond->mElseGroup = fields[4].GetUInt32(); + int32 iConditionTypeOrReference = fields[5].GetInt32(); + cond->mConditionValue1 = fields[6].GetUInt32(); + cond->mConditionValue2 = fields[7].GetUInt32(); + cond->mConditionValue3 = fields[8].GetUInt32(); + cond->ErrorTextd = fields[9].GetUInt32(); + cond->mScriptId = sObjectMgr->GetScriptId(fields[10].GetCString()); if (iConditionTypeOrReference >= 0) cond->mConditionType = ConditionType(iConditionTypeOrReference); @@ -440,12 +457,12 @@ void ConditionMgr::LoadConditions(bool isReload) if (iSourceTypeOrReferenceId < 0)//it is a reference template { uint32 uRefId = abs(iSourceTypeOrReferenceId); - if (m_ConditionReferenceMap.find(uRefId) == m_ConditionReferenceMap.end())//make sure we have a list for our conditions, based on reference id + if (ConditionReferenceStore.find(uRefId) == ConditionReferenceStore.end())//make sure we have a list for our conditions, based on reference id { ConditionList mCondList; - m_ConditionReferenceMap[uRefId] = mCondList; + ConditionReferenceStore[uRefId] = mCondList; } - m_ConditionReferenceMap[uRefId].push_back(cond);//add to reference storage + ConditionReferenceStore[uRefId].push_back(cond);//add to reference storage count++; continue; }//end of reference templates @@ -468,83 +485,102 @@ void ConditionMgr::LoadConditions(bool isReload) } else if (cond->mSourceGroup) { - bool bIsDone = false; + bool valid = false; //handle grouped conditions switch (cond->mSourceType) { case CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE: - bIsDone = addToLootTemplate(cond, LootTemplates_Creature.GetLootForConditionFill(cond->mSourceGroup)); + valid = addToLootTemplate(cond, LootTemplates_Creature.GetLootForConditionFill(cond->mSourceGroup)); break; case CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE: - bIsDone = addToLootTemplate(cond, LootTemplates_Disenchant.GetLootForConditionFill(cond->mSourceGroup)); + valid = addToLootTemplate(cond, LootTemplates_Disenchant.GetLootForConditionFill(cond->mSourceGroup)); break; case CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE: - bIsDone = addToLootTemplate(cond, LootTemplates_Fishing.GetLootForConditionFill(cond->mSourceGroup)); + valid = addToLootTemplate(cond, LootTemplates_Fishing.GetLootForConditionFill(cond->mSourceGroup)); break; case CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE: - bIsDone = addToLootTemplate(cond, LootTemplates_Gameobject.GetLootForConditionFill(cond->mSourceGroup)); + valid = addToLootTemplate(cond, LootTemplates_Gameobject.GetLootForConditionFill(cond->mSourceGroup)); break; case CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE: - bIsDone = addToLootTemplate(cond, LootTemplates_Item.GetLootForConditionFill(cond->mSourceGroup)); + valid = addToLootTemplate(cond, LootTemplates_Item.GetLootForConditionFill(cond->mSourceGroup)); break; case CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE: - bIsDone = addToLootTemplate(cond, LootTemplates_Mail.GetLootForConditionFill(cond->mSourceGroup)); + valid = addToLootTemplate(cond, LootTemplates_Mail.GetLootForConditionFill(cond->mSourceGroup)); break; case CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE: - bIsDone = addToLootTemplate(cond, LootTemplates_Milling.GetLootForConditionFill(cond->mSourceGroup)); + valid = addToLootTemplate(cond, LootTemplates_Milling.GetLootForConditionFill(cond->mSourceGroup)); break; case CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE: - bIsDone = addToLootTemplate(cond, LootTemplates_Pickpocketing.GetLootForConditionFill(cond->mSourceGroup)); + valid = addToLootTemplate(cond, LootTemplates_Pickpocketing.GetLootForConditionFill(cond->mSourceGroup)); break; case CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE: - bIsDone = addToLootTemplate(cond, LootTemplates_Prospecting.GetLootForConditionFill(cond->mSourceGroup)); + valid = addToLootTemplate(cond, LootTemplates_Prospecting.GetLootForConditionFill(cond->mSourceGroup)); break; case CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE: - bIsDone = addToLootTemplate(cond, LootTemplates_Reference.GetLootForConditionFill(cond->mSourceGroup)); + valid = addToLootTemplate(cond, LootTemplates_Reference.GetLootForConditionFill(cond->mSourceGroup)); break; case CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE: - bIsDone = addToLootTemplate(cond, LootTemplates_Skinning.GetLootForConditionFill(cond->mSourceGroup)); + valid = addToLootTemplate(cond, LootTemplates_Skinning.GetLootForConditionFill(cond->mSourceGroup)); break; case CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE: - bIsDone = addToLootTemplate(cond, LootTemplates_Spell.GetLootForConditionFill(cond->mSourceGroup)); + valid = addToLootTemplate(cond, LootTemplates_Spell.GetLootForConditionFill(cond->mSourceGroup)); break; case CONDITION_SOURCE_TYPE_GOSSIP_MENU: - bIsDone = addToGossipMenus(cond); + valid = addToGossipMenus(cond); break; case CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION: - bIsDone = addToGossipMenuItems(cond); + valid = addToGossipMenuItems(cond); break; case CONDITION_SOURCE_TYPE_VEHICLE_SPELL: { //if no list for vehicle create one - if (m_VehicleSpellConditions.find(cond->mSourceGroup) == m_VehicleSpellConditions.end()) + if (VehicleSpellConditionStore.find(cond->mSourceGroup) == VehicleSpellConditionStore.end()) { - ConditionTypeMap cmap; - m_VehicleSpellConditions[cond->mSourceGroup] = cmap; + ConditionTypeContainer cmap; + VehicleSpellConditionStore[cond->mSourceGroup] = cmap; } //if no list for vehicle's spell create one - if (m_VehicleSpellConditions[cond->mSourceGroup].find(cond->mSourceEntry) == m_VehicleSpellConditions[cond->mSourceGroup].end()) + if (VehicleSpellConditionStore[cond->mSourceGroup].find(cond->mSourceEntry) == VehicleSpellConditionStore[cond->mSourceGroup].end()) { ConditionList clist; - m_VehicleSpellConditions[cond->mSourceGroup][cond->mSourceEntry] = clist; + VehicleSpellConditionStore[cond->mSourceGroup][cond->mSourceEntry] = clist; } - m_VehicleSpellConditions[cond->mSourceGroup][cond->mSourceEntry].push_back(cond); - bIsDone = true; + VehicleSpellConditionStore[cond->mSourceGroup][cond->mSourceEntry].push_back(cond); + valid = true; ++count; continue; // do not add to m_AllocatedMemory to avoid double deleting } + case CONDITION_SOURCE_TYPE_SMART_EVENT: + { + // If the entry does not exist, create a new list + std::pair<int32, uint32> key = std::make_pair(cond->mSourceEntry, cond->mSourceId); + if (SmartEventConditionStore.find(key) == SmartEventConditionStore.end()) + { + ConditionTypeContainer cmap; + SmartEventConditionStore[key] = cmap; + } + if (SmartEventConditionStore[key].find(cond->mSourceGroup) == SmartEventConditionStore[key].end()) + { + ConditionList clist; + SmartEventConditionStore[key][cond->mSourceGroup] = clist; + } + SmartEventConditionStore[key][cond->mSourceGroup].push_back(cond); + valid = true; + ++count; + continue; + } default: break; } - if (!bIsDone) + if (!valid) { sLog->outErrorDb("Not handled grouped condition, SourceGroup %u", cond->mSourceGroup); delete cond; } else { - m_AllocatedMemory.push_back(cond); + AllocatedMemoryStore.push_back(cond); ++count; } continue; @@ -552,21 +588,21 @@ void ConditionMgr::LoadConditions(bool isReload) //handle not grouped conditions //make sure we have a storage list for our SourceType - if (m_ConditionMap.find(cond->mSourceType) == m_ConditionMap.end()) + if (ConditionStore.find(cond->mSourceType) == ConditionStore.end()) { - ConditionTypeMap mTypeMap; - m_ConditionMap[cond->mSourceType] = mTypeMap;//add new empty list for SourceType + ConditionTypeContainer mTypeMap; + ConditionStore[cond->mSourceType] = mTypeMap;//add new empty list for SourceType } //make sure we have a condition list for our SourceType's entry - if (m_ConditionMap[cond->mSourceType].find(cond->mSourceEntry) == m_ConditionMap[cond->mSourceType].end()) + if (ConditionStore[cond->mSourceType].find(cond->mSourceEntry) == ConditionStore[cond->mSourceType].end()) { ConditionList mCondList; - m_ConditionMap[cond->mSourceType][cond->mSourceEntry] = mCondList; + ConditionStore[cond->mSourceType][cond->mSourceEntry] = mCondList; } //add new Condition to storage based on Type/Entry - m_ConditionMap[cond->mSourceType][cond->mSourceEntry].push_back(cond); + ConditionStore[cond->mSourceType][cond->mSourceEntry].push_back(cond); ++count; } while (result->NextRow()); @@ -949,28 +985,19 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) if (!conditions.empty()) break; - for (int j = 0; j < MAX_SPELL_EFFECTS; ++j) + if (pSpellInfo->NeedsExplicitUnitTarget()) { - if (pSpellInfo->Effects[j].TargetA.GetTarget() == TARGET_UNIT_TARGET_ENEMY || - pSpellInfo->Effects[j].TargetB.GetTarget() == TARGET_UNIT_TARGET_ENEMY || - pSpellInfo->Effects[j].TargetA.GetTarget() == TARGET_UNIT_TARGET_ANY || - pSpellInfo->Effects[j].TargetB.GetTarget() == TARGET_UNIT_TARGET_ANY) - { - bIsItemSpellValid = true; - break; - } - } - - if (bIsItemSpellValid) + bIsItemSpellValid = true; break; + } } } } if (!bIsItemSpellValid) { - sLog->outErrorDb("Conditions: CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET for item %u, which either doesn't have item spelltrigger or its spells don't have implicit target " - "TARGET_UNIT_TARGET_ENEMY(6), TARGET_UNIT_TARGET_ANY(25), or the spells are already listed in CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET conditions.", cond->mSourceEntry); + sLog->outErrorDb("Conditions: CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET for item %u, which either doesn't have item spelltrigger or its spells don't allow caster to select a unit target" + ", or the spells are already listed in CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET conditions.", cond->mSourceEntry); break; } break; @@ -1004,6 +1031,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) break; case CONDITION_SOURCE_TYPE_GOSSIP_MENU: case CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION: + case CONDITION_SOURCE_TYPE_SMART_EVENT: case CONDITION_SOURCE_TYPE_NONE: default: break; @@ -1180,9 +1208,9 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } case CONDITION_CLASS: { - if (cond->mConditionValue1 >= MAX_CLASSES) + if (!(cond->mConditionValue1 & CLASSMASK_ALL_PLAYABLE)) { - sLog->outErrorDb("Class condition has non existing class (%u), skipped", cond->mConditionValue1); + sLog->outErrorDb("Class condition has non existing classmask (%u), skipped", cond->mConditionValue1 & ~CLASSMASK_ALL_PLAYABLE); return false; } @@ -1192,9 +1220,9 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } case CONDITION_RACE: { - if (cond->mConditionValue1 >= MAX_RACES) + if (!(cond->mConditionValue1 & RACEMASK_ALL_PLAYABLE)) { - sLog->outErrorDb("Race condition has non existing race (%u), skipped", cond->mConditionValue1); + sLog->outErrorDb("Race condition has non existing racemask (%u), skipped", cond->mConditionValue1 & ~RACEMASK_ALL_PLAYABLE); return false; } @@ -1375,18 +1403,31 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) void ConditionMgr::Clean() { - for (ConditionReferenceMap::iterator itr = m_ConditionReferenceMap.begin(); itr != m_ConditionReferenceMap.end(); ++itr) + for (ConditionReferenceContainer::iterator itr = ConditionReferenceStore.begin(); itr != ConditionReferenceStore.end(); ++itr) { for (ConditionList::const_iterator it = itr->second.begin(); it != itr->second.end(); ++it) delete *it; itr->second.clear(); } - m_ConditionReferenceMap.clear(); + ConditionReferenceStore.clear(); + + for (ConditionContainer::iterator itr = ConditionStore.begin(); itr != ConditionStore.end(); ++itr) + { + for (ConditionTypeContainer::iterator it = itr->second.begin(); it != itr->second.end(); ++it) + { + for (ConditionList::const_iterator i = it->second.begin(); i != it->second.end(); ++i) + delete *i; + it->second.clear(); + } + itr->second.clear(); + } + + ConditionStore.clear(); - for (ConditionMap::iterator itr = m_ConditionMap.begin(); itr != m_ConditionMap.end(); ++itr) + for (VehicleSpellConditionContainer::iterator itr = VehicleSpellConditionStore.begin(); itr != VehicleSpellConditionStore.end(); ++itr) { - for (ConditionTypeMap::iterator it = itr->second.begin(); it != itr->second.end(); ++it) + for (ConditionTypeContainer::iterator it = itr->second.begin(); it != itr->second.end(); ++it) { for (ConditionList::const_iterator i = it->second.begin(); i != it->second.end(); ++i) delete *i; @@ -1395,11 +1436,11 @@ void ConditionMgr::Clean() itr->second.clear(); } - m_ConditionMap.clear(); + VehicleSpellConditionStore.clear(); - for (VehicleSpellConditionMap::iterator itr = m_VehicleSpellConditions.begin(); itr != m_VehicleSpellConditions.end(); ++itr) + for (SmartEventConditionContainer::iterator itr = SmartEventConditionStore.begin(); itr != SmartEventConditionStore.end(); ++itr) { - for (ConditionTypeMap::iterator it = itr->second.begin(); it != itr->second.end(); ++it) + for (ConditionTypeContainer::iterator it = itr->second.begin(); it != itr->second.end(); ++it) { for (ConditionList::const_iterator i = it->second.begin(); i != it->second.end(); ++i) delete *i; @@ -1408,11 +1449,11 @@ void ConditionMgr::Clean() itr->second.clear(); } - m_VehicleSpellConditions.clear(); + SmartEventConditionStore.clear(); // this is a BIG hack, feel free to fix it if you can figure out the ConditionMgr ;) - for (std::list<Condition*>::const_iterator itr = m_AllocatedMemory.begin(); itr != m_AllocatedMemory.end(); ++itr) + for (std::list<Condition*>::const_iterator itr = AllocatedMemoryStore.begin(); itr != AllocatedMemoryStore.end(); ++itr) delete *itr; - m_AllocatedMemory.clear(); + AllocatedMemoryStore.clear(); } diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index 2aec58db48c..1641642dd86 100755 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -96,14 +96,16 @@ enum ConditionSourceType CONDITION_SOURCE_TYPE_QUEST_ACCEPT = 19, //DONE CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK = 20, //DONE CONDITION_SOURCE_TYPE_VEHICLE_SPELL = 21, //DONE - CONDITION_SOURCE_TYPE_MAX = 22//MAX + CONDITION_SOURCE_TYPE_SMART_EVENT = 22, //DONE + CONDITION_SOURCE_TYPE_MAX = 23 //MAX }; struct Condition { ConditionSourceType mSourceType; //SourceTypeOrReferenceId uint32 mSourceGroup; - uint32 mSourceEntry; + int32 mSourceEntry; + uint32 mSourceId; // So far, only used in CONDITION_SOURCE_TYPE_SMART_EVENT uint32 mElseGroup; ConditionType mConditionType; //ConditionTypeOrReference uint32 mConditionValue1; @@ -133,11 +135,12 @@ struct Condition }; typedef std::list<Condition*> ConditionList; -typedef std::map<uint32, ConditionList> ConditionTypeMap; -typedef std::map<ConditionSourceType, ConditionTypeMap> ConditionMap; -typedef std::map<uint32, ConditionTypeMap> VehicleSpellConditionMap; +typedef std::map<uint32, ConditionList> ConditionTypeContainer; +typedef std::map<ConditionSourceType, ConditionTypeContainer> ConditionContainer; +typedef std::map<uint32, ConditionTypeContainer> VehicleSpellConditionContainer; +typedef std::map<std::pair<int32, uint32 /*SAI source_type*/>, ConditionTypeContainer> SmartEventConditionContainer; -typedef std::map<uint32, ConditionList> ConditionReferenceMap;//only used for references +typedef std::map<uint32, ConditionList> ConditionReferenceContainer;//only used for references class ConditionMgr { @@ -153,7 +156,8 @@ class ConditionMgr ConditionList GetConditionReferences(uint32 refId); bool IsPlayerMeetToConditions(Player* player, ConditionList const& conditions, Unit* invoker = NULL); - ConditionList GetConditionsForNotGroupedEntry(ConditionSourceType sType, uint32 uEntry); + ConditionList GetConditionsForNotGroupedEntry(ConditionSourceType sourceType, uint32 entry); + ConditionList GetConditionsForSmartEvent(int32 entryOrGuid, uint32 eventId, uint32 sourceType); ConditionList GetConditionsForVehicleSpell(uint32 creatureID, uint32 spellID); private: @@ -179,15 +183,17 @@ class ConditionMgr sourceType == CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE || sourceType == CONDITION_SOURCE_TYPE_GOSSIP_MENU || sourceType == CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION || - sourceType == CONDITION_SOURCE_TYPE_VEHICLE_SPELL); + sourceType == CONDITION_SOURCE_TYPE_VEHICLE_SPELL || + sourceType == CONDITION_SOURCE_TYPE_SMART_EVENT); } void Clean(); // free up resources - std::list<Condition*> m_AllocatedMemory; // some garbage collection :) + std::list<Condition*> AllocatedMemoryStore; // some garbage collection :) - ConditionMap m_ConditionMap; - ConditionReferenceMap m_ConditionReferenceMap; - VehicleSpellConditionMap m_VehicleSpellConditions; + ConditionContainer ConditionStore; + ConditionReferenceContainer ConditionReferenceStore; + VehicleSpellConditionContainer VehicleSpellConditionStore; + SmartEventConditionContainer SmartEventConditionStore; }; #define sConditionMgr ACE_Singleton<ConditionMgr, ACE_Null_Mutex>::instance() diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp index 07febf889d0..d7a769d3f5c 100755 --- a/src/server/game/Conditions/DisableMgr.cpp +++ b/src/server/game/Conditions/DisableMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Conditions/DisableMgr.h b/src/server/game/Conditions/DisableMgr.h index 2931c5ea4ad..0f9310ace3b 100755 --- a/src/server/game/Conditions/DisableMgr.h +++ b/src/server/game/Conditions/DisableMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index 78324f8fae2..80949effa0c 100755 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 6815d73d1b3..b6c18103f1e 100755 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -584,10 +584,9 @@ void LoadDBCStores(const std::string& dataPath) if (node->map_id < 2 || i == 82 || i == 83 || i == 93 || i == 94) sOldContinentsNodesMask[field] |= submask; - // fix DK node at Ebon Hold - if (i == 315) { + // fix DK node at Ebon Hold and Shadow Vault flight master + if (i == 315 || i == 333) ((TaxiNodesEntry*)node)->MountCreatureID[1] = 32981; - } } } diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index 7edfaad03f1..58c85adc11b 100755 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 5a4dea3a020..15408ad03a9 100755 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index ac0b60d7f80..c55fb79d461 100755 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/DungeonFinding/LFG.h b/src/server/game/DungeonFinding/LFG.h index be564ef410f..28498749af8 100755 --- a/src/server/game/DungeonFinding/LFG.h +++ b/src/server/game/DungeonFinding/LFG.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/DungeonFinding/LFGGroupData.cpp b/src/server/game/DungeonFinding/LFGGroupData.cpp index e81b8bd1774..607389c5dbf 100644 --- a/src/server/game/DungeonFinding/LFGGroupData.cpp +++ b/src/server/game/DungeonFinding/LFGGroupData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/DungeonFinding/LFGGroupData.h b/src/server/game/DungeonFinding/LFGGroupData.h index 2a494c73052..74570817698 100644 --- a/src/server/game/DungeonFinding/LFGGroupData.h +++ b/src/server/game/DungeonFinding/LFGGroupData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 21ff3c6e4e8..cccb780e412 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -72,6 +72,54 @@ LFGMgr::~LFGMgr() delete it->second; } +void LFGMgr::_LoadFromDB(Field* fields, uint64 guid) +{ + if (!fields) + return; + + if (!IS_GROUP(guid)) + return; + + uint32 dungeon = fields[16].GetUInt32(); + + uint8 state = fields[17].GetUInt8(); + + if (!dungeon || !state) + return; + + SetDungeon(guid, dungeon); + + switch (state) + { + case LFG_STATE_DUNGEON: + case LFG_STATE_FINISHED_DUNGEON: + SetState(guid, (LfgState)state); + break; + default: + break; + } +} + +void LFGMgr::_SaveToDB(uint64 guid, uint32 db_guid) +{ + if (!IS_GROUP(guid)) + return; + + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_LFG_DATA); + + stmt->setUInt32(0, db_guid); + + CharacterDatabase.Execute(stmt); + + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_LFG_DATA); + stmt->setUInt32(0, db_guid); + + stmt->setUInt32(1, GetDungeon(guid)); + stmt->setUInt32(2, GetState(guid)); + + CharacterDatabase.Execute(stmt); +} + /// Load rewards for completing dungeons void LFGMgr::LoadRewards() { @@ -245,7 +293,8 @@ void LFGMgr::Update(uint32 diff) UpdateProposal(m_lfgProposalId, guid, true); } else - currentQueue.push_back(frontguid); // Lfg group not found, add this group to the queue. + if (std::find(currentQueue.begin(), currentQueue.end(), frontguid) == currentQueue.end()) //already in queue? + currentQueue.push_back(frontguid); // Lfg group not found, add this group to the queue. firstNew.clear(); } } @@ -382,7 +431,10 @@ void LFGMgr::InitializeLockedDungeons(Player* player) else if (DisableMgr::IsDisabledFor(DISABLE_TYPE_MAP, dungeon->map, player)) locktype = LFG_LOCKSTATUS_RAID_LOCKED; else if (dungeon->difficulty > DUNGEON_DIFFICULTY_NORMAL && player->GetBoundInstance(dungeon->map, Difficulty(dungeon->difficulty))) - locktype = LFG_LOCKSTATUS_RAID_LOCKED; + { + if (!player->GetGroup() || !player->GetGroup()->isLFGGroup() || GetDungeon(player->GetGroup()->GetGUID(), true) != dungeon->ID || GetState(player->GetGroup()->GetGUID()) != LFG_STATE_DUNGEON) + locktype = LFG_LOCKSTATUS_RAID_LOCKED; + } else if (dungeon->minlevel > level) locktype = LFG_LOCKSTATUS_TOO_LOW_LEVEL; else if (dungeon->maxlevel < level) @@ -431,7 +483,7 @@ void LFGMgr::InitializeLockedDungeons(Player* player) void LFGMgr::Join(Player* player, uint8 roles, const LfgDungeonSet& selectedDungeons, const std::string& comment) { if (!player || !player->GetSession() || selectedDungeons.empty()) - return; + return; Group* grp = player->GetGroup(); uint64 guid = player->GetGUID(); @@ -808,7 +860,7 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal) { uint64 guid = (*it); LfgQueueInfoMap::iterator itQueue = m_QueueInfoMap.find(guid); - if (itQueue == m_QueueInfoMap.end()) + if (itQueue == m_QueueInfoMap.end() || GetState(guid) != LFG_STATE_QUEUED) { sLog->outError("LFGMgr::CheckCompatibility: [" UI64FMTD "] is not queued but listed as queued!", (*it)); RemoveFromQueue(guid); @@ -923,6 +975,42 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal) if (numPlayers != MAXGROUPSIZE) { sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s) Compatibles but not match. Players(%u)", strGuids.c_str(), numPlayers); + uint8 Tanks_Needed = LFG_TANKS_NEEDED; + uint8 Healers_Needed = LFG_HEALERS_NEEDED; + uint8 Dps_Needed = LFG_DPS_NEEDED; + for (LfgQueueInfoMap::const_iterator itQueue = pqInfoMap.begin(); itQueue != pqInfoMap.end(); ++itQueue) + { + LfgQueueInfo* queue = itQueue->second; + for (LfgRolesMap::const_iterator itPlayer = queue->roles.begin(); itPlayer != queue->roles.end(); ++itPlayer) + { + uint8 roles = itPlayer->second; + if ((roles & ROLE_TANK) && Tanks_Needed > 0) + --Tanks_Needed; + else if ((roles & ROLE_HEALER) && Healers_Needed > 0) + --Healers_Needed; + else if ((roles & ROLE_DAMAGE) && Dps_Needed > 0) + --Dps_Needed; + } + } + for (PlayerSet::const_iterator itPlayers = players.begin(); itPlayers != players.end(); ++itPlayers) + { + for (LfgQueueInfoMap::const_iterator itQueue = pqInfoMap.begin(); itQueue != pqInfoMap.end(); ++itQueue) + { + LfgQueueInfo* queue = itQueue->second; + if (!queue) + continue; + + for (LfgRolesMap::const_iterator itPlayer = queue->roles.begin(); itPlayer != queue->roles.end(); ++itPlayer) + { + if (*itPlayers == ObjectAccessor::FindPlayer(itPlayer->first)) + { + queue->tanks = Tanks_Needed; + queue->healers = Healers_Needed; + queue->dps = Dps_Needed; + } + } + } + } return true; } sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s) MATCH! Group formed", strGuids.c_str()); @@ -1078,6 +1166,11 @@ void LFGMgr::UpdateRoleCheck(uint64 gguid, uint64 guid /* = 0 */, uint8 roles /* } m_QueueInfoMap[gguid] = pqInfo; + if(GetState(gguid) != LFG_STATE_NONE) + { + LfgGuidList& currentQueue = m_currentQueue[team]; + currentQueue.push_front(gguid); + } AddToQueue(gguid, team); } @@ -1384,6 +1477,7 @@ void LFGMgr::UpdateProposal(uint32 proposalId, uint64 guid, bool accept) break; } } + m_teleport.push_back(pguid); grp->SetLfgRoles(pguid, pProposal->players[pguid]->role); SetState(pguid, LFG_STATE_DUNGEON); } @@ -1395,6 +1489,7 @@ void LFGMgr::UpdateProposal(uint32 proposalId, uint64 guid, bool accept) uint64 gguid = grp->GetGUID(); SetDungeon(gguid, dungeon->Entry()); SetState(gguid, LFG_STATE_DUNGEON); + _SaveToDB(gguid, grp->GetDbStoreId()); // Remove players/groups from Queue for (LfgGuidList::const_iterator it = pProposal->queues.begin(); it != pProposal->queues.end(); ++it) @@ -1509,7 +1604,9 @@ void LFGMgr::RemoveProposal(LfgProposalMap::iterator itProposal, LfgUpdateType t for (LfgGuidList::const_iterator it = pProposal->queues.begin(); it != pProposal->queues.end(); ++it) { uint64 guid = *it; - AddToQueue(guid, team); + LfgGuidList& currentQueue = m_currentQueue[team]; + currentQueue.push_front(guid); //Add GUID for high priority + AddToQueue(guid, team); //We have to add each GUID in newQueue to check for a new groups } delete pProposal; @@ -1665,7 +1762,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false* error = LFG_TELEPORTERROR_INVALID_LOCATION; else if (!player->isAlive()) error = LFG_TELEPORTERROR_PLAYER_DEAD; - else if (player->IsFalling() || player->HasUnitState(UNIT_STAT_JUMPING)) + else if (player->IsFalling() || player->HasUnitState(UNIT_STATE_JUMPING)) error = LFG_TELEPORTERROR_FALLING; else { @@ -1921,6 +2018,16 @@ const std::string& LFGMgr::GetComment(uint64 guid) return m_Players[guid].GetComment(); } +bool LFGMgr::IsTeleported(uint64 pguid) +{ + if (std::find(m_teleport.begin(), m_teleport.end(), pguid) != m_teleport.end()) + { + m_teleport.remove(pguid); + return true; + } + return false; +} + const LfgDungeonSet& LFGMgr::GetSelectedDungeons(uint64 guid) { sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetSelectedDungeons: [" UI64FMTD "]", guid); diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h index 95cb2e81869..d10902b9553 100755 --- a/src/server/game/DungeonFinding/LFGMgr.h +++ b/src/server/game/DungeonFinding/LFGMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -287,6 +287,9 @@ class LFGMgr void InitializeLockedDungeons(Player* player); + void _LoadFromDB(Field* fields, uint64 guid); + void _SaveToDB(uint64 guid, uint32 db_guid); + void SetComment(uint64 guid, const std::string& comment); const LfgLockMap& GetLockedDungeons(uint64 guid); LfgState GetState(uint64 guid); @@ -298,7 +301,9 @@ class LFGMgr void RemoveGroupData(uint64 guid); uint8 GetKicksLeft(uint64 gguid); uint8 GetVotesNeeded(uint64 gguid); + bool IsTeleported(uint64 pguid); void SetRoles(uint64 guid, uint8 roles); + void SetSelectedDungeons(uint64 guid, const LfgDungeonSet& dungeons); private: @@ -306,10 +311,8 @@ class LFGMgr const std::string& GetComment(uint64 gguid); void RestoreState(uint64 guid); void SetDungeon(uint64 guid, uint32 dungeon); - void SetSelectedDungeons(uint64 guid, const LfgDungeonSet& dungeons); void SetLockedDungeons(uint64 guid, const LfgLockMap& lock); void DecreaseKicksLeft(uint64 guid); - void NoExiste(uint8 lala); // Queue void AddToQueue(uint64 guid, uint8 queueId); @@ -352,6 +355,7 @@ class LFGMgr LfgGuidListMap m_currentQueue; ///< Ordered list. Used to find groups LfgGuidListMap m_newToQueue; ///< New groups to add to queue LfgCompatibleMap m_CompatibleMap; ///< Compatible dungeons + LfgGuidList m_teleport; ///< Players being teleported // Rolecheck - Proposal - Vote Kicks LfgRoleCheckMap m_RoleChecks; ///< Current Role checks LfgProposalMap m_Proposals; ///< Current Proposals diff --git a/src/server/game/DungeonFinding/LFGPlayerData.cpp b/src/server/game/DungeonFinding/LFGPlayerData.cpp index e9400f85d3b..4a6e86ab966 100644 --- a/src/server/game/DungeonFinding/LFGPlayerData.cpp +++ b/src/server/game/DungeonFinding/LFGPlayerData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/DungeonFinding/LFGPlayerData.h b/src/server/game/DungeonFinding/LFGPlayerData.h index b576980ab79..e8bae1c5a0f 100644 --- a/src/server/game/DungeonFinding/LFGPlayerData.h +++ b/src/server/game/DungeonFinding/LFGPlayerData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp index 42119a02ef8..2966e799c58 100644 --- a/src/server/game/DungeonFinding/LFGScripts.cpp +++ b/src/server/game/DungeonFinding/LFGScripts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/DungeonFinding/LFGScripts.h b/src/server/game/DungeonFinding/LFGScripts.h index 9a2d358188f..f17f7b16af1 100644 --- a/src/server/game/DungeonFinding/LFGScripts.h +++ b/src/server/game/DungeonFinding/LFGScripts.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp index cd05cba7475..da5975aafbe 100755 --- a/src/server/game/Entities/Corpse/Corpse.cpp +++ b/src/server/game/Entities/Corpse/Corpse.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -103,7 +103,7 @@ void Corpse::SaveToDB() SQLTransaction trans = CharacterDatabase.BeginTransaction(); DeleteFromDB(trans); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_CORPSE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CORPSE); stmt->setUInt32(0, GetGUIDLow()); // corpseGuid stmt->setUInt32(1, GUID_LOPART(GetOwnerGUID())); // guid stmt->setFloat (2, GetPositionX()); // posX diff --git a/src/server/game/Entities/Corpse/Corpse.h b/src/server/game/Entities/Corpse/Corpse.h index a704e2243eb..1aaf56eaf27 100755 --- a/src/server/game/Entities/Corpse/Corpse.h +++ b/src/server/game/Entities/Corpse/Corpse.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index f97d01a42a4..eb29e681016 100755 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -48,6 +48,8 @@ #include "Vehicle.h" #include "SpellAuraEffects.h" #include "Group.h" +#include "MoveSplineInit.h" +#include "MoveSpline.h" // apply implementation of the singletons TrainerSpell const* TrainerSpellData::Find(uint32 spell_id) const @@ -143,7 +145,7 @@ m_PlayerDamageReq(0), m_lootMoney(0), m_lootRecipient(0), m_lootRecipientGroup(0 m_respawnDelay(300), m_corpseDelay(60), m_respawnradius(0.0f), m_reactState(REACT_AGGRESSIVE), m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0), m_AlreadyCallAssistance(false), m_AlreadySearchedAssistance(false), m_regenHealth(true), m_AI_locked(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL), -m_creatureInfo(NULL), m_creatureData(NULL), m_formation(NULL) +m_creatureInfo(NULL), m_creatureData(NULL), m_formation(NULL), m_path_id(0) { m_regenTimer = CREATURE_REGEN_INTERVAL; m_valuesCount = UNIT_END; @@ -332,6 +334,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData* data SetSpeed(MOVE_FLIGHT, 1.0f); // using 1.0 rate SetFloatValue(OBJECT_FIELD_SCALE_X, cinfo->scale); + SetLevitate(canFly()); // checked at loading m_defaultMovementType = MovementGeneratorType(cinfo->MovementType); @@ -435,6 +438,17 @@ void Creature::Update(uint32 diff) m_vehicleKit->Reset(); } + if (IsInWater()) + { + if (canSwim()) + AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING); + } + else + { + if (canWalk()) + RemoveUnitMovementFlag(MOVEMENTFLAG_SWIMMING); + } + switch (m_deathState) { case JUST_ALIVED: @@ -472,9 +486,7 @@ void Creature::Update(uint32 diff) } case CORPSE: { - m_Events.Update(diff); - _UpdateSpells(diff); - + Unit::Update(diff); // deathstate changed on spells update, prevent problems if (m_deathState != CORPSE) break; @@ -565,9 +577,6 @@ void Creature::Update(uint32 diff) m_regenTimer = CREATURE_REGEN_INTERVAL; break; } - case DEAD_FALLING: - GetMotionMaster()->UpdateMotion(diff); - break; default: break; } @@ -676,7 +685,7 @@ void Creature::DoFleeToGetAssistance() if (!creature) //SetFeared(true, getVictim()->GetGUID(), 0, sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY)); //TODO: use 31365 - SetControlled(true, UNIT_STAT_FLEEING); + SetControlled(true, UNIT_STATE_FLEEING); else GetMotionMaster()->MoveSeekAssistance(creature->GetPositionX(), creature->GetPositionY(), creature->GetPositionZ()); } @@ -715,7 +724,7 @@ void Creature::Motion_Initialize() i_motionMaster.Initialize(); } else if (m_formation->isFormed()) - i_motionMaster.MoveIdle(MOTION_SLOT_IDLE); //wait the order of leader + i_motionMaster.MoveIdle(); //wait the order of leader else i_motionMaster.Initialize(); } @@ -945,7 +954,8 @@ void Creature::AI_SendMoveToPacket(float x, float y, float z, uint32 time, uint3 m_startMove = getMSTime(); m_moveTime = time;*/ - SendMonsterMove(x, y, z, time); + float speed = GetDistance(x, y, z) / ((float)time * 0.001f); + MonsterMoveWithSpeed(x, y, z, speed); } Player* Creature::GetLootRecipient() const @@ -1403,7 +1413,7 @@ bool Creature::canStartAttack(Unit const* who, bool force) const if (isCivilian()) return false; - if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE)) + if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC)) return false; // Do not attack non-combat pets @@ -1507,11 +1517,8 @@ void Creature::setDeathState(DeathState s) if (m_formation && m_formation->getLeader() == this) m_formation->FormationReset(true); - if (ZoneScript* zoneScript = GetZoneScript()) - zoneScript->OnCreatureDeath(this); - - if ((canFly() || IsFlying()) && FallGround()) - return; + if ((canFly() || IsFlying())) + i_motionMaster.MoveFall(); Unit::setDeathState(CORPSE); } @@ -1523,13 +1530,13 @@ void Creature::setDeathState(DeathState s) SetLootRecipient(NULL); ResetPlayerDamageReq(); CreatureTemplate const* cinfo = GetCreatureInfo(); - AddUnitMovementFlag(MOVEMENTFLAG_WALKING); + SetWalk(true); if (GetCreatureInfo()->InhabitType & INHABIT_AIR) AddUnitMovementFlag(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_FLYING); if (GetCreatureInfo()->InhabitType & INHABIT_WATER) AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING); SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag); - ClearUnitState(uint32(UNIT_STAT_ALL_STATE)); + ClearUnitState(uint32(UNIT_STATE_ALL_STATE)); SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool)); LoadCreaturesAddon(true); Motion_Initialize(); @@ -1539,24 +1546,6 @@ void Creature::setDeathState(DeathState s) } } -bool Creature::FallGround() -{ - // Let's abort after we called this function one time - if (getDeathState() == DEAD_FALLING) - return false; - - float x, y, z; - GetPosition(x, y, z); - // use larger distance for vmap height search than in most other cases - float ground_Z = GetMap()->GetHeight(x, y, z, true, MAX_FALL_DISTANCE); - if (fabs(ground_Z - z) < 0.1f) - return false; - - GetMotionMaster()->MoveFall(ground_Z, EVENT_FALL_GROUND); - Unit::setDeathState(DEAD_FALLING); - return true; -} - void Creature::Respawn(bool force) { DestroyForNearbyPlayers(); @@ -1576,7 +1565,7 @@ void Creature::Respawn(bool force) if (m_DBTableGuid) sObjectMgr->RemoveCreatureRespawnTime(m_DBTableGuid, GetInstanceId()); - sLog->outStaticDebug("Respawning..."); + sLog->outStaticDebug("Respawning creature %s (GuidLow: %u, Full GUID: " UI64FMTD " Entry: %u)", GetName(), GetGUIDLow(), GetGUID(), GetEntry()); m_respawnTime = 0; lootForPickPocketed = false; lootForBody = false; @@ -1644,7 +1633,20 @@ bool Creature::IsImmunedToSpell(SpellInfo const* spellInfo) if (!spellInfo) return false; - if (GetCreatureInfo()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1))) + // Spells that don't have effectMechanics. + if (!spellInfo->HasAnyEffectMechanic() && GetCreatureInfo()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1))) + return true; + + // This check must be done instead of 'if (GetCreatureInfo()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1)))' for not break + // the check of mechanic immunity on DB (tested) because GetCreatureInfo()->MechanicImmuneMask and m_spellImmune[IMMUNITY_MECHANIC] don't have same data. + bool immunedToAllEffects = true; + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + if (!IsImmunedToSpellEffect(spellInfo, i)) + { + immunedToAllEffects = false; + break; + } + if (immunedToAllEffects) return true; return Unit::IsImmunedToSpell(spellInfo); @@ -1903,7 +1905,7 @@ bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction / if (isCivilian()) return false; - if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PASSIVE)) + if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_NPC)) return false; // skip fighting creature @@ -1945,7 +1947,7 @@ bool Creature::_IsTargetAcceptable(const Unit* target) const || (m_vehicle && (IsOnVehicle(target) || m_vehicle->GetBase()->IsOnVehicle(target)))) return false; - if (target->HasUnitState(UNIT_STAT_DIED)) + if (target->HasUnitState(UNIT_STATE_DIED)) { // guards can detect fake death if (isGuard() && target->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH)) @@ -2405,3 +2407,25 @@ bool Creature::IsDungeonBoss() const CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(GetEntry()); return cinfo && (cinfo->flags_extra & CREATURE_FLAG_EXTRA_DUNGEON_BOSS); } + +void Creature::SetWalk(bool enable) +{ + if (enable) + AddUnitMovementFlag(MOVEMENTFLAG_WALKING); + else + RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING); + WorldPacket data(enable ? SMSG_SPLINE_MOVE_SET_WALK_MODE : SMSG_SPLINE_MOVE_SET_RUN_MODE, 9); + data.append(GetPackGUID()); + SendMessageToSet(&data, true); +} + +void Creature::SetLevitate(bool enable) +{ + if (enable) + AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); + else + RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); + WorldPacket data(enable ? SMSG_SPLINE_MOVE_GRAVITY_DISABLE : SMSG_SPLINE_MOVE_GRAVITY_ENABLE, 9); + data.append(GetPackGUID()); + SendMessageToSet(&data, true); +} diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index d84221f0e63..e622c48761c 100755 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -512,7 +512,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature uint8 getLevelForTarget(WorldObject const* target) const; // overwrite Unit::getLevelForTarget for boss level support - bool IsInEvadeMode() const { return HasUnitState(UNIT_STAT_EVADE); } + bool IsInEvadeMode() const { return HasUnitState(UNIT_STATE_EVADE); } bool AIM_Initialize(CreatureAI* ai = NULL); void Motion_Initialize(); @@ -520,6 +520,9 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature void AI_SendMoveToPacket(float x, float y, float z, uint32 time, uint32 MovementFlags, uint8 type); CreatureAI* AI() const { return (CreatureAI*)i_AI; } + void SetWalk(bool enable); + void SetLevitate(bool enable); + uint32 GetShieldBlockValue() const //dunno mob block value { return (getLevel()/2 + uint32(GetStat(STAT_STRENGTH)/20)); @@ -573,7 +576,6 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature const char* GetNameForLocaleIdx(LocaleConstant locale_idx) const; void setDeathState(DeathState s); // override virtual Unit::setDeathState - bool FallGround(); bool LoadFromDB(uint32 guid, Map* map) { return LoadCreatureFromDB(guid, map, false); } bool LoadCreatureFromDB(uint32 guid, Map* map, bool addToMap = true); diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp index d32eff862bb..f440fd497fc 100755 --- a/src/server/game/Entities/Creature/CreatureGroups.cpp +++ b/src/server/game/Entities/Creature/CreatureGroups.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -203,7 +203,7 @@ void CreatureGroup::FormationReset(bool dismiss) if (dismiss) itr->first->GetMotionMaster()->Initialize(); else - itr->first->GetMotionMaster()->MoveIdle(MOTION_SLOT_IDLE); + itr->first->GetMotionMaster()->MoveIdle(); sLog->outDebug(LOG_FILTER_UNITS, "Set %s movement for member GUID: %u", dismiss ? "default" : "idle", itr->first->GetGUIDLow()); } } @@ -212,10 +212,12 @@ void CreatureGroup::FormationReset(bool dismiss) void CreatureGroup::LeaderMoveTo(float x, float y, float z) { + //! To do: This should probably get its own movement generator or use WaypointMovementGenerator. + //! If the leader's path is known, member's path can be plotted as well using formation offsets. if (!m_leader) return; - float pathangle = atan2(m_leader->GetPositionY() - y, m_leader->GetPositionX() - x); + float pathangle = atan2(m_leader->GetPositionY() - y, m_leader->GetPositionX() - x); for (CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr) { diff --git a/src/server/game/Entities/Creature/CreatureGroups.h b/src/server/game/Entities/Creature/CreatureGroups.h index 3ef7e157b66..80e552f7e93 100755 --- a/src/server/game/Entities/Creature/CreatureGroups.h +++ b/src/server/game/Entities/Creature/CreatureGroups.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp index 398deb04723..a39bd8eddf7 100755 --- a/src/server/game/Entities/Creature/GossipDef.cpp +++ b/src/server/game/Entities/Creature/GossipDef.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Creature/GossipDef.h b/src/server/game/Entities/Creature/GossipDef.h index 517395578cf..15766bbcd59 100755 --- a/src/server/game/Entities/Creature/GossipDef.h +++ b/src/server/game/Entities/Creature/GossipDef.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp index 1b06f0f0b6a..2af6b4c04fd 100755 --- a/src/server/game/Entities/Creature/TemporarySummon.cpp +++ b/src/server/game/Entities/Creature/TemporarySummon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Creature/TemporarySummon.h b/src/server/game/Entities/Creature/TemporarySummon.h index 69ae8349155..fa1e134b1ac 100755 --- a/src/server/game/Entities/Creature/TemporarySummon.h +++ b/src/server/game/Entities/Creature/TemporarySummon.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp index 4e0d2d7d0b9..fa975e0cd39 100755 --- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp +++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.h b/src/server/game/Entities/DynamicObject/DynamicObject.h index bd8c15cdba4..7e68f6acd38 100755 --- a/src/server/game/Entities/DynamicObject/DynamicObject.h +++ b/src/server/game/Entities/DynamicObject/DynamicObject.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index d2a3bfc884c..e26c6710b78 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -988,7 +988,7 @@ void GameObject::ResetDoorOrButton() m_cooldownTime = 0; } -void GameObject::UseDoorOrButton(uint32 time_to_restore, bool alternative /* = false */) +void GameObject::UseDoorOrButton(uint32 time_to_restore, bool alternative /* = false */, Unit* user /*=NULL*/) { if (m_lootState != GO_READY) return; @@ -997,7 +997,7 @@ void GameObject::UseDoorOrButton(uint32 time_to_restore, bool alternative /* = f time_to_restore = GetGOInfo()->GetAutoCloseTime(); SwitchDoorOrButton(true, alternative); - SetLootState(GO_ACTIVATED); + SetLootState(GO_ACTIVATED, user); m_cooldownTime = time(NULL) + time_to_restore; } @@ -1067,7 +1067,7 @@ void GameObject::Use(Unit* user) case GAMEOBJECT_TYPE_DOOR: //0 case GAMEOBJECT_TYPE_BUTTON: //1 //doors/buttons never really despawn, only reset to default state/flags - UseDoorOrButton(); + UseDoorOrButton(0, false, user); // activate script GetMap()->ScriptsStart(sGameObjectScripts, GetDBTableGUIDLow(), spellCaster, this); @@ -1220,7 +1220,7 @@ void GameObject::Use(Unit* user) TriggeringLinkedGameObject(trapEntry, user); SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); - SetLootState(GO_ACTIVATED); + SetLootState(GO_ACTIVATED, user); // this appear to be ok, however others exist in addition to this that should have custom (ex: 190510, 188692, 187389) if (info->goober.customAnim) @@ -1878,3 +1878,9 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* } } } + +void GameObject::SetLootState(LootState s, Unit* unit) +{ + m_lootState = s; + AI()->OnStateChanged(s, unit); +} diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index c47587177c8..f677d481c33 100755 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -713,7 +713,8 @@ class GameObject : public WorldObject, public GridObject<GameObject> void Use(Unit* user); LootState getLootState() const { return m_lootState; } - void SetLootState(LootState s) { m_lootState = s; } + // Note: unit is only used when s = GO_ACTIVATED + void SetLootState(LootState s, Unit* unit = NULL); uint16 GetLootMode() { return m_LootMode; } bool HasLootMode(uint16 lootMode) { return m_LootMode & lootMode; } @@ -747,7 +748,7 @@ class GameObject : public WorldObject, public GridObject<GameObject> bool hasQuest(uint32 quest_id) const; bool hasInvolvedQuest(uint32 quest_id) const; bool ActivateToQuest(Player* target) const; - void UseDoorOrButton(uint32 time_to_restore = 0, bool alternative = false); + void UseDoorOrButton(uint32 time_to_restore = 0, bool alternative = false, Unit* user = NULL); // 0 = use `gameobject`.`spawntimesecs` void ResetDoorOrButton(); diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp index c6c00820463..4eede93bd37 100755 --- a/src/server/game/Entities/Item/Container/Bag.cpp +++ b/src/server/game/Entities/Item/Container/Bag.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Item/Container/Bag.h b/src/server/game/Entities/Item/Container/Bag.h index 463425076d4..5a533d9cf57 100755 --- a/src/server/game/Entities/Item/Container/Bag.h +++ b/src/server/game/Entities/Item/Container/Bag.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index 07275166130..12c26904169 100755 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -320,7 +320,7 @@ void Item::SaveToDB(SQLTransaction& trans) case ITEM_CHANGED: { uint8 index = 0; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(uState == ITEM_NEW ? CHAR_ADD_ITEM_INSTANCE : CHAR_UPDATE_ITEM_INSTANCE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(uState == ITEM_NEW ? CHAR_REP_ITEM_INSTANCE : CHAR_UPD_ITEM_INSTANCE); stmt->setUInt32( index, GetEntry()); stmt->setUInt32(++index, GUID_LOPART(GetOwnerGUID())); stmt->setUInt32(++index, GUID_LOPART(GetUInt64Value(ITEM_FIELD_CREATOR))); @@ -354,7 +354,7 @@ void Item::SaveToDB(SQLTransaction& trans) if ((uState == ITEM_CHANGED) && HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED)) { - stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_GIFT_OWNER); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GIFT_OWNER); stmt->setUInt32(0, GUID_LOPART(GetOwnerGUID())); stmt->setUInt32(1, guid); trans->Append(stmt); @@ -460,7 +460,7 @@ bool Item::LoadFromDB(uint32 guid, uint64 owner_guid, Field* fields, uint32 entr if (need_save) // normal item changed state set not work at loading { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_ITEM_INSTANCE_ON_LOAD); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ITEM_INSTANCE_ON_LOAD); stmt->setUInt32(0, GetUInt32Value(ITEM_FIELD_DURATION)); stmt->setUInt32(1, GetUInt32Value(ITEM_FIELD_FLAGS)); stmt->setUInt32(2, GetUInt32Value(ITEM_FIELD_DURABILITY)); @@ -931,24 +931,20 @@ void Item::ClearEnchantment(EnchantmentSlot slot) bool Item::GemsFitSockets() const { - bool fits = true; for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot) { uint8 SocketColor = GetTemplate()->Socket[enchant_slot-SOCK_ENCHANTMENT_SLOT].Color; - uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot)); - if (!enchant_id) - { - if (SocketColor) fits &= false; + if (!SocketColor) // no socket slot continue; - } + + uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot)); + if (!enchant_id) // no gems on this socket + return false; SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id); - if (!enchantEntry) - { - if (SocketColor) fits &= false; - continue; - } + if (!enchantEntry) // invalid gem id on this socket + return false; uint8 GemColor = 0; @@ -964,9 +960,10 @@ bool Item::GemsFitSockets() const } } - fits &= (GemColor & SocketColor) ? true : false; + if (!(GemColor & SocketColor)) // bad gem color on this socket + return false; } - return fits; + return true; } uint8 Item::GetGemCountWithID(uint32 GemID) const diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h index 4a72e7fea2b..0960a3e5563 100755 --- a/src/server/game/Entities/Item/Item.h +++ b/src/server/game/Entities/Item/Item.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp index 4ed475e0545..b8eaf043b1f 100755 --- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp +++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.h b/src/server/game/Entities/Item/ItemEnchantmentMgr.h index 8fb852c5135..fe4dca40d24 100755 --- a/src/server/game/Entities/Item/ItemEnchantmentMgr.h +++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Item/ItemPrototype.h b/src/server/game/Entities/Item/ItemPrototype.h index 03212c129fd..2eae7234229 100755 --- a/src/server/game/Entities/Item/ItemPrototype.h +++ b/src/server/game/Entities/Item/ItemPrototype.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 68057d7148a..c9b25b66cdc 100755 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -45,6 +45,7 @@ #include "TemporarySummon.h" #include "Totem.h" #include "OutdoorPvPMgr.h" +#include "MovementPacketBuilder.h" uint32 GuidHigh2TypeId(uint32 guid_hi) { @@ -312,78 +313,17 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags) const *data << ((Unit*)this)->GetSpeed(MOVE_WALK); *data << ((Unit*)this)->GetSpeed(MOVE_RUN); - *data << ((Unit*)this)->GetSpeed(MOVE_SWIM_BACK); - *data << ((Unit*)this)->GetSpeed(MOVE_SWIM); *data << ((Unit*)this)->GetSpeed(MOVE_RUN_BACK); + *data << ((Unit*)this)->GetSpeed(MOVE_SWIM); + *data << ((Unit*)this)->GetSpeed(MOVE_SWIM_BACK); *data << ((Unit*)this)->GetSpeed(MOVE_FLIGHT); *data << ((Unit*)this)->GetSpeed(MOVE_FLIGHT_BACK); *data << ((Unit*)this)->GetSpeed(MOVE_TURN_RATE); *data << ((Unit*)this)->GetSpeed(MOVE_PITCH_RATE); - const Player* player = ToPlayer(); - // 0x08000000 - if (player && player->isInFlight()) - { - uint32 flags3 = SPLINEFLAG_GLIDE; - - *data << uint32(flags3); // splines flag? - - if (flags3 & 0x20000) // may be orientation - { - *data << (float)0; - } - else - { - if (flags3 & 0x8000) // probably x, y, z coords there - { - *data << (float)0; - *data << (float)0; - *data << (float)0; - } - - if (flags3 & 0x10000) // probably guid there - { - *data << uint64(0); - } - } - - FlightPathMovementGenerator *fmg = - (FlightPathMovementGenerator*)(player->GetMotionMaster()->top()); - TaxiPathNodeList const& path = fmg->GetPath(); - - float x, y, z; - player->GetPosition(x, y, z); - - uint32 inflighttime = uint32(path.GetPassedLength(fmg->GetCurrentNode(), x, y, z) * 32); - uint32 traveltime = uint32(path.GetTotalLength() * 32); - - *data << uint32(inflighttime); // passed move time? - *data << uint32(traveltime); // full move time? - *data << uint32(0); // ticks count? - - *data << float(0); // added in 3.1 - *data << float(0); // added in 3.1 - *data << float(0); // added in 3.1 - - *data << uint32(0); // added in 3.1 - - uint32 poscount = uint32(path.size()); - *data << uint32(poscount); // points count - - for (uint32 i = 0; i < poscount; ++i) - { - *data << float(path[i].x); - *data << float(path[i].y); - *data << float(path[i].z); - } - - *data << uint8(0); // added in 3.0.8 - - *data << float(path[poscount-1].x); - *data << float(path[poscount-1].y); - *data << float(path[poscount-1].z); - } + if (((Unit*)this)->m_movementInfo.GetMovementFlags() & MOVEMENTFLAG_SPLINE_ENABLED) + Movement::PacketBuilder::WriteCreate(*((Unit*)this)->movespline, *data); } else { @@ -487,7 +427,7 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags) const // 0x200 if (flags & UPDATEFLAG_ROTATION) { - *data << uint64(((GameObject*)this)->GetRotation()); + *data << int64(((GameObject*)this)->GetRotation()); } } @@ -1595,6 +1535,70 @@ void WorldObject::UpdateGroundPositionZ(float x, float y, float &z) const z = new_z+ 0.05f; // just to be sure that we are not a few pixel under the surface } +void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const +{ + switch (GetTypeId()) + { + case TYPEID_UNIT: + { + // non fly unit don't must be in air + // non swim unit must be at ground (mostly speedup, because it don't must be in water and water level check less fast + if (!ToCreature()->canFly()) + { + bool canSwim = ToCreature()->canSwim(); + float ground_z = z; + float max_z = canSwim + ? GetBaseMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK)) + : ((ground_z = GetBaseMap()->GetHeight(x, y, z, true))); + if (max_z > INVALID_HEIGHT) + { + if (z > max_z) + z = max_z; + else if (z < ground_z) + z = ground_z; + } + } + else + { + float ground_z = GetBaseMap()->GetHeight(x, y, z, true); + if (z < ground_z) + z = ground_z; + } + break; + } + case TYPEID_PLAYER: + { + // for server controlled moves playr work same as creature (but it can always swim) + if (!ToPlayer()->canFly()) + { + float ground_z = z; + float max_z = GetBaseMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK)); + if (max_z > INVALID_HEIGHT) + { + if (z > max_z) + z = max_z; + else if (z < ground_z) + z = ground_z; + } + } + else + { + float ground_z = GetBaseMap()->GetHeight(x, y, z, true); + if (z < ground_z) + z = ground_z; + } + break; + } + default: + { + float ground_z = GetBaseMap()->GetHeight(x, y, z, true); + if(ground_z > INVALID_HEIGHT) + z = ground_z; + break; + } + } +} + bool Position::IsPositionValid() const { return Trinity::IsValidMapCoord(m_positionX, m_positionY, m_positionZ, m_orientation); @@ -1668,7 +1672,14 @@ bool WorldObject::canSeeOrDetect(WorldObject const* obj, bool ignoreStealth, boo } } - if (!corpseCheck && !IsWithinDist(obj, GetSightRange(obj), false)) + WorldObject const* viewpoint = this; + if (Player const* player = this->ToPlayer()) + viewpoint = player->GetViewpoint(); + + if (!viewpoint) + viewpoint = this; + + if (!corpseCheck && !viewpoint->IsWithinDist(obj, GetSightRange(obj), false)) return false; } @@ -2030,7 +2041,8 @@ void Unit::BuildHeartBeatMsg(WorldPacket* data) const void WorldObject::SendMessageToSet(WorldPacket* data, bool self) { - SendMessageToSetInRange(data, GetVisibilityRange(), self); + if (IsInWorld()) + SendMessageToSetInRange(data, GetVisibilityRange(), self); } void WorldObject::SendMessageToSetInRange(WorldPacket* data, float dist, bool /*self*/) @@ -2450,7 +2462,7 @@ namespace Trinity float x, y, z; - if (!c->isAlive() || c->HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED) || + if (!c->isAlive() || c->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DISTRACTED) || !c->GetMotionMaster()->GetDestination(x, y, z)) { x = c->GetPositionX(); @@ -2518,7 +2530,7 @@ void WorldObject::GetNearPoint(WorldObject const* /*searcher*/, float &x, float { GetNearPoint2D(x, y, distance2d+searcher_size, absAngle); z = GetPositionZ(); - UpdateGroundPositionZ(x, y, z); + UpdateAllowedPositionZ(x, y, z); /* // if detection disabled, return first point diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index 786b23f6340..4cc298e4349 100755 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -497,7 +497,9 @@ struct MovementInfo } uint32 GetMovementFlags() { return flags; } + void SetMovementFlags(uint32 flag) { flags = flag; } void AddMovementFlag(uint32 flag) { flags |= flag; } + void RemoveMovementFlag(uint32 flag) { flags &= ~flag; } bool HasMovementFlag(uint32 flag) const { return flags & flag; } uint16 GetExtraMovementFlags() { return flags2; } @@ -615,6 +617,7 @@ class WorldObject : public Object, public WorldLocation return (m_valuesCount > UNIT_FIELD_COMBATREACH) ? m_floatValues[UNIT_FIELD_COMBATREACH] : DEFAULT_WORLD_OBJECT_SIZE; } void UpdateGroundPositionZ(float x, float y, float &z) const; + void UpdateAllowedPositionZ(float x, float y, float &z) const; void GetRandomPoint(const Position &srcPos, float distance, float &rand_x, float &rand_y, float &rand_z) const; void GetRandomPoint(const Position &srcPos, float distance, Position &pos) const diff --git a/src/server/game/Entities/Object/ObjectDefines.h b/src/server/game/Entities/Object/ObjectDefines.h index 4108063bfb3..c227d081d8b 100755 --- a/src/server/game/Entities/Object/ObjectDefines.h +++ b/src/server/game/Entities/Object/ObjectDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Object/ObjectPosSelector.cpp b/src/server/game/Entities/Object/ObjectPosSelector.cpp index fd32e531ed7..ec654954b80 100755 --- a/src/server/game/Entities/Object/ObjectPosSelector.cpp +++ b/src/server/game/Entities/Object/ObjectPosSelector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Object/ObjectPosSelector.h b/src/server/game/Entities/Object/ObjectPosSelector.h index df879c4dd19..b30694672df 100755 --- a/src/server/game/Entities/Object/ObjectPosSelector.h +++ b/src/server/game/Entities/Object/ObjectPosSelector.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Object/Updates/UpdateData.cpp b/src/server/game/Entities/Object/Updates/UpdateData.cpp index 547c415bc73..8f480ab3235 100755 --- a/src/server/game/Entities/Object/Updates/UpdateData.cpp +++ b/src/server/game/Entities/Object/Updates/UpdateData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Object/Updates/UpdateData.h b/src/server/game/Entities/Object/Updates/UpdateData.h index 2d102f63e59..e4caaec3117 100755 --- a/src/server/game/Entities/Object/Updates/UpdateData.h +++ b/src/server/game/Entities/Object/Updates/UpdateData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Object/Updates/UpdateFields.h b/src/server/game/Entities/Object/Updates/UpdateFields.h index 321d11fac8a..825bda98ae6 100755 --- a/src/server/game/Entities/Object/Updates/UpdateFields.h +++ b/src/server/game/Entities/Object/Updates/UpdateFields.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Object/Updates/UpdateMask.h b/src/server/game/Entities/Object/Updates/UpdateMask.h index abe3c299062..d4ecd42819c 100755 --- a/src/server/game/Entities/Object/Updates/UpdateMask.h +++ b/src/server/game/Entities/Object/Updates/UpdateMask.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index eb590e7b82f..bf6dc3b67d9 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -1151,6 +1151,9 @@ void Pet::_LoadAuras(uint32 timediff) int32 baseDamage[3]; Field* fields = result->Fetch(); uint64 caster_guid = fields[0].GetUInt64(); + // NULL guid stored - pet is the caster of the spell - see Pet::_SaveAuras + if (!caster_guid) + caster_guid = GetGUID(); uint32 spellid = fields[1].GetUInt32(); uint8 effmask = fields[2].GetUInt8(); uint8 recalculatemask = fields[3].GetUInt8(); @@ -1239,9 +1242,12 @@ void Pet::_SaveAuras(SQLTransaction& trans) } } + // don't save guid of caster in case we are caster of the spell - guid for pet is generated every pet load, so it won't match saved guid anyways + uint64 casterGUID = (itr->second->GetCasterGUID() == GetGUID()) ? NULL : itr->second->GetCasterGUID(); + trans->PAppend("INSERT INTO pet_aura (guid, caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, maxduration, remaintime, remaincharges) " "VALUES ('%u', '" UI64FMTD "', '%u', '%u', '%u', '%u', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%u')", - m_charmInfo->GetPetNumber(), itr->second->GetCasterGUID(), itr->second->GetId(), effMask, recalculateMask, + m_charmInfo->GetPetNumber(), casterGUID, itr->second->GetId(), effMask, recalculateMask, itr->second->GetStackAmount(), damage[0], damage[1], damage[2], baseDamage[0], baseDamage[1], baseDamage[2], itr->second->GetMaxDuration(), itr->second->GetDuration(), itr->second->GetCharges()); } diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h index ac86c061b31..1b1a6c0f62d 100755 --- a/src/server/game/Entities/Pet/Pet.h +++ b/src/server/game/Entities/Pet/Pet.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 53257622e68..38af97f61cb 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -296,15 +296,24 @@ Item* TradeData::GetItem(TradeSlots slot) const return m_items[slot] ? m_player->GetItemByGuid(m_items[slot]) : NULL; } -bool TradeData::HasItem(uint64 item_guid) const +bool TradeData::HasItem(uint64 itemGuid) const { for (uint8 i = 0; i < TRADE_SLOT_COUNT; ++i) - if (m_items[i] == item_guid) + if (m_items[i] == itemGuid) return true; return false; } +TradeSlots TradeData::GetTradeSlotForItem(uint64 itemGuid) const +{ + for (uint8 i = 0; i < TRADE_SLOT_COUNT; ++i) + if (m_items[i] == itemGuid) + return TradeSlots(i); + + return TRADE_SLOT_INVALID; +} + Item* TradeData::GetSpellCastItem() const { return m_spellCastItem ? m_player->GetItemByGuid(m_spellCastItem) : NULL; @@ -1580,7 +1589,7 @@ void Player::Update(uint32 p_time) GetAchievementMgr().UpdateTimedAchievements(p_time); - if (HasUnitState(UNIT_STAT_MELEE_ATTACKING) && !HasUnitState(UNIT_STAT_CASTING)) + if (HasUnitState(UNIT_STATE_MELEE_ATTACKING) && !HasUnitState(UNIT_STATE_CASTING)) { if (Unit* pVictim = getVictim()) { @@ -2101,6 +2110,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati // reset movement flags at teleport, because player will continue move with these flags after teleport SetUnitMovementFlags(0); + DisableSpline(); if (m_transport) { @@ -3241,7 +3251,7 @@ void Player::InitStatsForLevel(bool reapplyMods) // cleanup unit flags (will be re-applied if need at aura load). RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_ATTACKABLE_1 | - UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE | UNIT_FLAG_LOOTING | + UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_LOOTING | UNIT_FLAG_PET_IN_COMBAT | UNIT_FLAG_SILENCED | UNIT_FLAG_PACIFIED | UNIT_FLAG_STUNNED | UNIT_FLAG_IN_COMBAT | UNIT_FLAG_DISARMED | UNIT_FLAG_CONFUSED | UNIT_FLAG_FLEEING | UNIT_FLAG_NOT_SELECTABLE | @@ -4823,7 +4833,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC if (has_items) { // Data needs to be at first place for Item::LoadFromDB - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_MAILITEMS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAILITEMS); stmt->setUInt32(0, mail_id); PreparedQueryResult resultItems = CharacterDatabase.Query(stmt); if (resultItems) @@ -4942,7 +4952,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC // The character gets unlinked from the account, the name gets freed up and appears as deleted ingame case CHAR_DELETE_UNLINK: { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_DELETE_INFO); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_DELETE_INFO); stmt->setUInt32(0, guid); @@ -5148,43 +5158,10 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness) } } -/** - * FallMode = 0 implies that the player is dying, or already dead, and the proper death state will be set. - * = 1 simply causes the player to plummet towards the ground, and not suffer any damage. - * = 2 causes the player to plummet towards the ground, and causes falling damage, regardless - * of any auras that might of prevented fall damage. - */ -bool Player::FallGround(uint8 FallMode) -{ - // Let's abort after we called this function one time - if (getDeathState() == DEAD_FALLING && FallMode == 0) - return false; - - float x, y, z; - GetPosition(x, y, z); - float ground_Z = GetMap()->GetHeight(x, y, z); - float z_diff = 0.0f; - if ((z_diff = fabs(ground_Z - z)) < 0.1f) - return false; - - GetMotionMaster()->MoveFall(ground_Z, EVENT_FALL_GROUND); - - // Below formula for falling damage is from Player::HandleFall - if (FallMode == 2 && z_diff >= 14.57f) - { - uint32 damage = std::min(GetMaxHealth(), (uint32)((0.018f * z_diff - 0.2426f) * GetMaxHealth() * sWorld->getRate(RATE_DAMAGE_FALL))); - if (damage) - EnvironmentalDamage(DAMAGE_FALL, damage); - } - else if (FallMode == 0) - Unit::setDeathState(DEAD_FALLING); - return true; -} - void Player::KillPlayer() { if (IsFlying() && !GetTransport()) - FallGround(); + i_motionMaster.MoveFall(); SetMovement(MOVE_ROOT); @@ -7346,7 +7323,7 @@ uint32 Player::GetZoneIdFromDB(uint64 guid) if (zone > 0) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_ZONE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ZONE); stmt->setUInt16(0, uint16(zone)); stmt->setUInt32(1, guidLow); @@ -7403,6 +7380,22 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea) SendInitWorldStates(newZone, newArea); // only if really enters to new zone, not just area change, works strange... } + // group update + if (GetGroup()) + { + SetGroupUpdateFlag(GROUP_UPDATE_FULL); + Group* grp = GetGroup(); + if (GetSession() && grp->isLFGGroup() && sLFGMgr->IsTeleported(GetGUID())) + { + for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next()) + { + Player* tempplr = itr->getSource(); + if (tempplr) + GetSession()->SendNameQueryOpcode(tempplr->GetGUID()); + } + } + } + m_zoneUpdateId = newZone; m_zoneUpdateTimer = ZONE_UPDATE_INTERVAL; @@ -7490,10 +7483,6 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea) // recent client version not send leave/join channel packets for built-in local channels UpdateLocalChannels(newZone); - // group update - if (GetGroup()) - SetGroupUpdateFlag(GROUP_UPDATE_FULL); - UpdateZoneDependentAuras(newZone); } @@ -8728,7 +8717,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type) } } - go->SetLootState(GO_ACTIVATED); + go->SetLootState(GO_ACTIVATED, this); } if (go->getLootState() == GO_ACTIVATED) @@ -11396,7 +11385,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool { // May be here should be more stronger checks; STUNNED checked // ROOT, CONFUSED, DISTRACTED, FLEEING this needs to be checked. - if (HasUnitState(UNIT_STAT_STUNNED)) + if (HasUnitState(UNIT_STATE_STUNNED)) return EQUIP_ERR_YOU_ARE_STUNNED; // do not allow equipping gear except weapons, offhands, projectiles, relics in @@ -11826,6 +11815,93 @@ InventoryResult Player::CanUseItem(ItemTemplate const* proto) const return EQUIP_ERR_ITEM_NOT_FOUND; } +InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObject const* lootedObject) const +{ + LfgDungeonSet const& dungeons = sLFGMgr->GetSelectedDungeons(GetGUID()); + if (dungeons.empty()) + return EQUIP_ERR_OK; // not using LFG + + if (!GetGroup() || !GetGroup()->isLFGGroup()) + return EQUIP_ERR_OK; // not in LFG group + + // check if looted object is inside the lfg dungeon + bool lootedObjectInDungeon = false; + Map const* map = lootedObject->GetMap(); + if (uint32 dungeonId = sLFGMgr->GetDungeon(GetGroup()->GetGUID(), true)) + if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId)) + if (dungeon->map == map->GetId() && dungeon->difficulty == map->GetDifficulty()) + lootedObjectInDungeon = true; + + if (!lootedObjectInDungeon) + return EQUIP_ERR_OK; + + if (!proto) + return EQUIP_ERR_ITEM_NOT_FOUND; + // Used by group, function NeedBeforeGreed, to know if a prototype can be used by a player + + const static uint32 item_weapon_skills[MAX_ITEM_SUBCLASS_WEAPON] = + { + SKILL_AXES, SKILL_2H_AXES, SKILL_BOWS, SKILL_GUNS, SKILL_MACES, + SKILL_2H_MACES, SKILL_POLEARMS, SKILL_SWORDS, SKILL_2H_SWORDS, 0, + SKILL_STAVES, 0, 0, SKILL_FIST_WEAPONS, 0, + SKILL_DAGGERS, SKILL_THROWN, SKILL_ASSASSINATION, SKILL_CROSSBOWS, SKILL_WANDS, + SKILL_FISHING + }; //Copy from function Item::GetSkill() + + if ((proto->AllowableClass & getClassMask()) == 0 || (proto->AllowableRace & getRaceMask()) == 0) + return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM; + + if (proto->RequiredSpell != 0 && !HasSpell(proto->RequiredSpell)) + return EQUIP_ERR_NO_REQUIRED_PROFICIENCY; + + if (proto->RequiredSkill != 0) + { + if (!GetSkillValue(proto->RequiredSkill)) + return EQUIP_ERR_NO_REQUIRED_PROFICIENCY; + else if (GetSkillValue(proto->RequiredSkill) < proto->RequiredSkillRank) + return EQUIP_ERR_CANT_EQUIP_SKILL; + } + + uint8 _class = getClass(); + + if (proto->Class == ITEM_CLASS_WEAPON && GetSkillValue(item_weapon_skills[proto->SubClass]) == 0) + return EQUIP_ERR_NO_REQUIRED_PROFICIENCY; + + if (proto->Class == ITEM_CLASS_ARMOR && proto->SubClass > ITEM_SUBCLASS_ARMOR_MISC && proto->SubClass < ITEM_SUBCLASS_ARMOR_BUCKLER && proto->InventoryType != INVTYPE_CLOAK) + { + if (_class == CLASS_WARRIOR || _class == CLASS_PALADIN || _class == CLASS_DEATH_KNIGHT) + { + if (getLevel() < 40) + { + if (proto->SubClass != ITEM_SUBCLASS_ARMOR_MAIL) + return EQUIP_ERR_CANT_DO_RIGHT_NOW; + } + else if (proto->SubClass != ITEM_SUBCLASS_ARMOR_PLATE) + return EQUIP_ERR_CANT_DO_RIGHT_NOW; + } + else if (_class == CLASS_HUNTER || _class == CLASS_SHAMAN) + { + if (getLevel() < 40) + { + if (proto->SubClass != ITEM_SUBCLASS_ARMOR_LEATHER) + return EQUIP_ERR_CANT_DO_RIGHT_NOW; + } + else if (proto->SubClass != ITEM_SUBCLASS_ARMOR_MAIL) + return EQUIP_ERR_CANT_DO_RIGHT_NOW; + } + + if (_class == CLASS_ROGUE || _class == CLASS_DRUID) + if (proto->SubClass != ITEM_SUBCLASS_ARMOR_LEATHER) + return EQUIP_ERR_CANT_DO_RIGHT_NOW; + + if (_class == CLASS_MAGE || _class == CLASS_PRIEST || _class == CLASS_WARLOCK) + if (proto->SubClass != ITEM_SUBCLASS_ARMOR_CLOTH) + return EQUIP_ERR_CANT_DO_RIGHT_NOW; + } + + return EQUIP_ERR_OK; +} + InventoryResult Player::CanUseAmmo(uint32 item) const { sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanUseAmmo item = %u", item); @@ -11909,6 +11985,7 @@ Item* Player::StoreNewItem(ItemPosCountVec const& dest, uint32 item, bool update { ItemAddedQuestCheck(item, count); GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM, item, count); + GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM, item, 1); if (randomPropertyId) pItem->SetItemRandomProperties(randomPropertyId); pItem = StoreItem(dest, pItem, update); @@ -11931,7 +12008,7 @@ Item* Player::StoreNewItem(ItemPosCountVec const& dest, uint32 item, bool update for (++itr; itr != allowedLooters.end(); ++itr) ss << ' ' << *itr; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_ITEM_BOP_TRADE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_ITEM_BOP_TRADE); stmt->setUInt32(0, pItem->GetGUIDLow()); stmt->setString(1, ss.str()); CharacterDatabase.Execute(stmt); @@ -11962,7 +12039,6 @@ Item* Player::StoreItem(ItemPosCountVec const& dest, Item* pItem, bool update) lastItem = _StoreItem(pos, pItem, count, true, update); } - GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM, entry); return lastItem; } @@ -12733,6 +12809,14 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count) return; } + //! If trading + if (TradeData* tradeData = GetTradeData()) + { + //! If current item is in trade window (only possible with packet spoofing - silent return) + if (tradeData->GetTradeSlotForItem(pSrcItem->GetGUID()) != TRADE_SLOT_INVALID) + return; + } + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: SplitItem bag = %u, slot = %u, item = %u, count = %u", dstbag, dstslot, pSrcItem->GetEntry(), count); Item* pNewItem = pSrcItem->CloneItem(count, this); if (!pNewItem) @@ -12761,7 +12845,7 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count) pSrcItem->SetState(ITEM_CHANGED, this); StoreItem(dest, pNewItem, true); } - else if (IsBankPos (dst)) + else if (IsBankPos(dst)) { // change item amount before check (for unique max count check) pSrcItem->SetCount(pSrcItem->GetCount() - count); @@ -12781,7 +12865,7 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count) pSrcItem->SetState(ITEM_CHANGED, this); BankItem(dest, pNewItem, true); } - else if (IsEquipmentPos (dst)) + else if (IsEquipmentPos(dst)) { // change item amount before check (for unique max count check), provide space for splitted items pSrcItem->SetCount(pSrcItem->GetCount() - count); @@ -13997,6 +14081,10 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool PrepareQuestMenu(source->GetGUID()); } + if (source->GetTypeId() == TYPEID_GAMEOBJECT) + if (source->ToGameObject()->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) + PrepareQuestMenu(source->GetGUID()); + for (GossipMenuItemsMap::const_iterator itr = menuItemBounds.first; itr != menuItemBounds.second; ++itr) { bool canTalk = true; @@ -14082,11 +14170,6 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool switch (itr->second.OptionType) { - case GOSSIP_OPTION_QUESTGIVER: - if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) - PrepareQuestMenu(source->GetGUID()); - canTalk = false; - break; case GOSSIP_OPTION_GOSSIP: if (go->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER && go->GetGoType() != GAMEOBJECT_TYPE_GOOBER) canTalk = false; @@ -14240,7 +14323,7 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men break; case GOSSIP_OPTION_UNLEARNTALENTS: PlayerTalkClass->SendCloseGossip(); - source->ToCreature()->CastSpell(this, 46331, true); // Trainer: Untrain Talents + SendTalentWipeConfirm(guid); break; case GOSSIP_OPTION_UNLEARNPETTALENTS: PlayerTalkClass->SendCloseGossip(); @@ -14529,7 +14612,7 @@ bool Player::CanSeeStartQuest(Quest const* quest) SatisfyQuestExclusiveGroup(quest, false) && SatisfyQuestReputation(quest, false) && SatisfyQuestPreviousQuest(quest, false) && SatisfyQuestNextChain(quest, false) && SatisfyQuestPrevChain(quest, false) && SatisfyQuestDay(quest, false) && SatisfyQuestWeek(quest, false) && - !DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, quest->GetQuestId(), this)) + SatisfyQuestSeasonal(quest, false) && !DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, quest->GetQuestId(), this)) { return getLevel() + sWorld->getIntConfig(CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF) >= quest->GetMinLevel(); } @@ -14545,7 +14628,7 @@ bool Player::CanTakeQuest(Quest const* quest, bool msg) && SatisfyQuestPreviousQuest(quest, msg) && SatisfyQuestTimed(quest, msg) && SatisfyQuestNextChain(quest, msg) && SatisfyQuestPrevChain(quest, msg) && SatisfyQuestDay(quest, msg) && SatisfyQuestWeek(quest, msg) - && !DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, quest->GetQuestId(), this) + && SatisfyQuestSeasonal(quest,msg) && !DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, quest->GetQuestId(), this) && SatisfyQuestConditions(quest, msg); } @@ -14669,7 +14752,7 @@ bool Player::CanRewardQuest(Quest const* quest, bool msg) return false; // daily quest can't be rewarded (25 daily quest already completed) - if (!SatisfyQuestDay(quest, true) || !SatisfyQuestWeek(quest, true)) + if (!SatisfyQuestDay(quest, true) || !SatisfyQuestWeek(quest, true) || !SatisfyQuestSeasonal(quest,true)) return false; // rewarded and not repeatable quest (only cheating case, then ignore without message) @@ -14741,7 +14824,9 @@ bool Player::CanRewardQuest(Quest const* quest, uint32 reward, bool msg) void Player::AddQuest(Quest const* quest, Object* questGiver) { uint16 log_slot = FindQuestSlot(0); - ASSERT(log_slot < MAX_QUEST_LOG_SIZE); + + if (log_slot >= MAX_QUEST_LOG_SIZE) // Player does not have any free slot in the quest log + return; uint32 quest_id = quest->GetQuestId(); @@ -14978,6 +15063,8 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, } else if (quest->IsWeekly()) SetWeeklyQuestStatus(quest_id); + else if (quest->IsSeasonal()) + SetSeasonalQuestStatus(quest_id); RemoveActiveQuest(quest_id); m_RewardedQuests.insert(quest_id); @@ -15333,7 +15420,7 @@ bool Player::SatisfyQuestExclusiveGroup(Quest const* qInfo, bool msg) // not allow have daily quest if daily quest from exclusive group already recently completed Quest const* Nquest = sObjectMgr->GetQuestTemplate(exclude_Id); - if (!SatisfyQuestDay(Nquest, false) || !SatisfyQuestWeek(Nquest, false)) + if (!SatisfyQuestDay(Nquest, false) || !SatisfyQuestWeek(Nquest, false) || !SatisfyQuestSeasonal(Nquest,false)) { if (msg) SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ); @@ -15342,7 +15429,7 @@ bool Player::SatisfyQuestExclusiveGroup(Quest const* qInfo, bool msg) } // alternative quest already started or completed - but don't check rewarded states if both are repeatable - if (GetQuestStatus(exclude_Id) != QUEST_STATUS_NONE || (!(qInfo->IsRepeatable() && Nquest->IsRepeatable()) && m_RewardedQuests.find(exclude_Id) != m_RewardedQuests.end())) + if (GetQuestStatus(exclude_Id) != QUEST_STATUS_NONE || (!(qInfo->IsRepeatable() && Nquest->IsRepeatable()) && (m_RewardedQuests.find(exclude_Id) != m_RewardedQuests.end()))) { if (msg) SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ); @@ -15443,6 +15530,19 @@ bool Player::SatisfyQuestWeek(Quest const* qInfo, bool /*msg*/) return m_weeklyquests.find(qInfo->GetQuestId()) == m_weeklyquests.end(); } +bool Player::SatisfyQuestSeasonal(Quest const* qInfo, bool /*msg*/) +{ + if (!qInfo->IsSeasonal() || m_seasonalquests.empty()) + return true; + + uint16 eventId = sGameEventMgr->GetEventIdForQuest(qInfo); + if (m_seasonalquests.find(eventId) == m_seasonalquests.end()) + return false; + + // if not found in cooldown list + return m_seasonalquests[eventId].find(qInfo->GetQuestId()) == m_seasonalquests[eventId].end(); +} + bool Player::GiveQuestSourceItem(Quest const* quest) { uint32 srcitem = quest->GetSrcItemId(); @@ -16434,7 +16534,7 @@ void Player::SetHomebind(WorldLocation const& /*loc*/, uint32 /*area_id*/) m_homebindZ = GetPositionZ(); // update sql homebind - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_PLAYER_HOMEBIND); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_PLAYER_HOMEBIND); stmt->setUInt16(0, m_homebindMapId); stmt->setUInt16(1, m_homebindAreaId); stmt->setFloat (2, m_homebindX); @@ -16507,7 +16607,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) if (ObjectMgr::CheckPlayerName(m_name) != CHAR_NAME_SUCCESS || (AccountMgr::IsPlayerAccount(GetSession()->GetSecurity()) && sObjectMgr->IsReservedName(m_name))) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_AT_LOGIN_FLAG); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->setUInt16(0, uint16(AT_LOGIN_RENAME)); stmt->setUInt32(1, guid); @@ -16642,6 +16742,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) _LoadInstanceTimeRestrictions(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADINSTANCELOCKTIMES)); _LoadBGData(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADBGDATA)); + GetSession()->SetPlayer(this); MapEntry const* mapEntry = sMapStore.LookupEntry(mapId); if (!mapEntry || !IsPositionValid()) { @@ -16659,10 +16760,10 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) if (player_at_bg && currentBg->GetStatus() != STATUS_WAIT_LEAVE) { - BattlegroundQueueTypeId bgQueueTypeId = sBattlegroundMgr->BGQueueTypeId(currentBg->GetTypeID(true), currentBg->GetArenaType()); + BattlegroundQueueTypeId bgQueueTypeId = sBattlegroundMgr->BGQueueTypeId(currentBg->GetTypeID(), currentBg->GetArenaType()); AddBattlegroundQueueId(bgQueueTypeId); - m_bgData.bgTypeID = currentBg->GetTypeID(true); + m_bgData.bgTypeID = currentBg->GetTypeID(); //join player to battleground group currentBg->EventPlayerLoggedIn(this); @@ -16834,7 +16935,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) } // if the player is in an instance and it has been reset in the meantime teleport him to the entrance - if (instanceId && !sInstanceSaveMgr->GetInstanceSave(instanceId)) + if (instanceId && !sInstanceSaveMgr->GetInstanceSave(instanceId) && !map->IsBattlegroundOrArena()) { AreaTrigger const* at = sObjectMgr->GetMapEntranceTrigger(mapId); if (at) @@ -16980,7 +17081,8 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) _LoadQuestStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADQUESTSTATUS)); _LoadQuestStatusRewarded(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADQUESTSTATUSREW)); _LoadDailyQuestStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADDAILYQUESTSTATUS)); - _LoadWeeklyQuestStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADWEKLYQUESTSTATUS)); + _LoadWeeklyQuestStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADWEEKLYQUESTSTATUS)); + _LoadSeasonalQuestStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADSEASONALQUESTSTATUS)); _LoadRandomBGStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADRANDOMBG)); // after spell and quest load @@ -17441,7 +17543,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F } else { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_ITEM_REFUNDS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ITEM_REFUNDS); stmt->setUInt32(0, item->GetGUIDLow()); stmt->setUInt32(1, GetGUIDLow()); if (PreparedQueryResult result = CharacterDatabase.Query(stmt)) @@ -17461,7 +17563,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F } else if (item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_BOP_TRADEABLE)) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_ITEM_BOP_TRADE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ITEM_BOP_TRADE); stmt->setUInt32(0, item->GetGUIDLow()); if (PreparedQueryResult result = CharacterDatabase.Query(stmt)) { @@ -17524,7 +17626,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F void Player::_LoadMailedItems(Mail* mail) { // data needs to be at first place for Item::LoadFromDB - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_MAILITEMS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAILITEMS); stmt->setUInt32(0, mail->messageID); PreparedQueryResult result = CharacterDatabase.Query(stmt); if (!result) @@ -17560,7 +17662,13 @@ void Player::_LoadMailedItems(Mail* mail) if (!item->LoadFromDB(itemGuid, MAKE_NEW_GUID(fields[13].GetUInt32(), 0, HIGHGUID_PLAYER), fields, itemTemplate)) { sLog->outError("Player::_LoadMailedItems - Item in mail (%u) doesn't exist !!!! - item guid: %u, deleted from mail", mail->messageID, itemGuid); - CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid = '%u'", itemGuid); + + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_MAIL_ITEM); + + stmt->setUInt32(0, itemGuid); + + CharacterDatabase.Execute(stmt); + item->FSetState(ITEM_REMOVED); SQLTransaction temp = SQLTransaction(NULL); @@ -17826,7 +17934,8 @@ void Player::_LoadWeeklyQuestStatus(PreparedQueryResult result) { do { - uint32 quest_id = (*result)[0].GetUInt32(); + Field* fields = result->Fetch(); + uint32 quest_id = fields[0].GetUInt32(); Quest const* quest = sObjectMgr->GetQuestTemplate(quest_id); if (!quest) continue; @@ -17840,6 +17949,30 @@ void Player::_LoadWeeklyQuestStatus(PreparedQueryResult result) m_WeeklyQuestChanged = false; } +void Player::_LoadSeasonalQuestStatus(PreparedQueryResult result) +{ + m_seasonalquests.clear(); + + if (result) + { + do + { + Field* fields = result->Fetch(); + uint32 quest_id = fields[0].GetUInt32(); + uint32 event_id = fields[1].GetUInt32(); + Quest const* quest = sObjectMgr->GetQuestTemplate(quest_id); + if (!quest) + continue; + + m_seasonalquests[event_id].insert(quest_id); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Seasonal quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow()); + } + while (result->NextRow()); + } + + m_SeasonalQuestChanged = false; +} + void Player::_LoadSpells(PreparedQueryResult result) { //QueryResult* result = CharacterDatabase.PQuery("SELECT spell, active, disabled FROM character_spell WHERE guid = '%u'", GetGUIDLow()); @@ -17895,33 +18028,43 @@ void Player::_LoadBoundInstances(PreparedQueryResult result) // so the value read from the DB may be wrong here but only if the InstanceSave is loaded // and in that case it is not used + bool deleteInstance = false; + MapEntry const* mapEntry = sMapStore.LookupEntry(mapId); if (!mapEntry || !mapEntry->IsDungeon()) { sLog->outError("_LoadBoundInstances: player %s(%d) has bind to not existed or not dungeon map %d", GetName(), GetGUIDLow(), mapId); - CharacterDatabase.PExecute("DELETE FROM character_instance WHERE guid = '%d' AND instance = '%d'", GetGUIDLow(), instanceId); - continue; + deleteInstance = true; } - - if (difficulty >= MAX_DIFFICULTY) + else if (difficulty >= MAX_DIFFICULTY) { sLog->outError("_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u", GetName(), GetGUIDLow(), difficulty, mapId); - CharacterDatabase.PExecute("DELETE FROM character_instance WHERE guid = '%d' AND instance = '%d'", GetGUIDLow(), instanceId); - continue; + deleteInstance = true; } - - MapDifficulty const* mapDiff = GetMapDifficultyData(mapId, Difficulty(difficulty)); - if (!mapDiff) + else { - sLog->outError("_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u", GetName(), GetGUIDLow(), difficulty, mapId); - CharacterDatabase.PExecute("DELETE FROM character_instance WHERE guid = '%d' AND instance = '%d'", GetGUIDLow(), instanceId); - continue; + MapDifficulty const* mapDiff = GetMapDifficultyData(mapId, Difficulty(difficulty)); + if (!mapDiff) + { + sLog->outError("_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u", GetName(), GetGUIDLow(), difficulty, mapId); + deleteInstance = true; + } + else if (!perm && group) + { + sLog->outError("_LoadBoundInstances: player %s(%d) is in group %d but has a non-permanent character bind to map %d, %d, %d", GetName(), GetGUIDLow(), GUID_LOPART(group->GetGUID()), mapId, instanceId, difficulty); + deleteInstance = true; + } } - if (!perm && group) + if (deleteInstance) { - sLog->outError("_LoadBoundInstances: player %s(%d) is in group %d but has a non-permanent character bind to map %d, %d, %d", GetName(), GetGUIDLow(), GUID_LOPART(group->GetGUID()), mapId, instanceId, difficulty); - CharacterDatabase.PExecute("DELETE FROM character_instance WHERE guid = '%d' AND instance = '%d'", GetGUIDLow(), instanceId); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_INSTANCE); + + stmt->setUInt32(0, GetGUIDLow()); + stmt->setUInt32(1, instanceId); + + CharacterDatabase.Execute(stmt); + continue; } @@ -17970,7 +18113,15 @@ void Player::UnbindInstance(BoundInstancesMap::iterator &itr, Difficulty difficu if (itr != m_boundInstances[difficulty].end()) { if (!unload) - CharacterDatabase.PExecute("DELETE FROM character_instance WHERE guid = '%u' AND instance = '%u'", GetGUIDLow(), itr->second.save->GetInstanceId()); + { + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_INSTANCE); + + stmt->setUInt32(0, GetGUIDLow()); + stmt->setUInt32(1, itr->second.save->GetInstanceId()); + + CharacterDatabase.Execute(stmt); + } + itr->second.save->RemovePlayer(this); // save can become invalid m_boundInstances[difficulty].erase(itr++); } @@ -17986,11 +18137,28 @@ InstancePlayerBind* Player::BindToInstance(InstanceSave* save, bool permanent, b // update the save when the group kills a boss if (permanent != bind.perm || save != bind.save) if (!load) - CharacterDatabase.PExecute("UPDATE character_instance SET instance = '%u', permanent = '%u' WHERE guid = '%u' AND instance = '%u'", save->GetInstanceId(), permanent, GetGUIDLow(), bind.save->GetInstanceId()); + { + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_INSTANCE); + + stmt->setUInt32(0, save->GetInstanceId()); + stmt->setBool(1, permanent); + stmt->setUInt32(2, GetGUIDLow()); + stmt->setUInt32(3, bind.save->GetInstanceId()); + + CharacterDatabase.Execute(stmt); + } } else if (!load) - CharacterDatabase.PExecute("INSERT INTO character_instance (guid, instance, permanent) VALUES ('%u', '%u', '%u')", GetGUIDLow(), save->GetInstanceId(), permanent); + { + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_INSTANCE); + + stmt->setUInt32(0, GetGUIDLow()); + stmt->setUInt32(1, save->GetInstanceId()); + stmt->setBool(2, permanent); + + CharacterDatabase.Execute(stmt); + } if (bind.save != save) { @@ -18262,7 +18430,7 @@ bool Player::_LoadHomeBind(PreparedQueryResult result) m_homebindY = info->positionY; m_homebindZ = info->positionZ; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_PLAYER_HOMEBIND); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PLAYER_HOMEBIND); stmt->setUInt32(0, GetGUIDLow()); stmt->setUInt16(1, m_homebindMapId); stmt->setUInt16(2, m_homebindAreaId); @@ -18307,7 +18475,7 @@ void Player::SaveToDB(bool create /*=false*/) { //! Insert query //! TO DO: Filter out more redundant fields that can take their default value at player create - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_CHARACTER); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHARACTER); stmt->setUInt32(index++, GetGUIDLow()); stmt->setUInt32(index++, GetSession()->GetAccountId()); stmt->setString(index++, GetName()); @@ -18531,6 +18699,7 @@ void Player::SaveToDB(bool create /*=false*/) _SaveQuestStatus(trans); _SaveDailyQuestStatus(trans); _SaveWeeklyQuestStatus(trans); + _SaveSeasonalQuestStatus(trans); _SaveTalents(trans); _SaveSpells(trans); _SaveSpellCooldowns(trans); @@ -18632,7 +18801,7 @@ void Player::_SaveAuras(SQLTransaction& trans) } uint8 index = 0; - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_AURA); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_AURA); stmt->setUInt32(index++, GetGUIDLow()); stmt->setUInt64(index++, itr->second->GetCasterGUID()); stmt->setUInt64(index++, itr->second->GetCastItemGUID()); @@ -18869,18 +19038,28 @@ void Player::_SaveDailyQuestStatus(SQLTransaction& trans) // save last daily quest time for all quests: we need only mostly reset time for reset check anyway // we don't need transactions here. - trans->PAppend("DELETE FROM character_queststatus_daily WHERE guid = '%u'", GetGUIDLow()); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_STATUS_DAILY_CHAR); + stmt->setUInt32(0, GetGUIDLow()); + trans->Append(stmt); for (uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx) if (GetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx)) - trans->PAppend("INSERT INTO character_queststatus_daily (guid, quest, time) VALUES ('%u', '%u', '" UI64FMTD "')", - GetGUIDLow(), GetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx), uint64(m_lastDailyQuestTime)); + { + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHARACTER_DAILYQUESTSTATUS); + stmt->setUInt32(0, GetGUIDLow()); + stmt->setUInt32(1, GetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx)); + stmt->setUInt64(2, uint64(m_lastDailyQuestTime)); + trans->Append(stmt); + } if (!m_DFQuests.empty()) { for (DFQuestsDoneList::iterator itr = m_DFQuests.begin(); itr != m_DFQuests.end(); ++itr) { - trans->PAppend("INSERT INTO character_queststatus_daily (guid, quest, time) VALUES ('%u', '%u', '" UI64FMTD "')", - GetGUIDLow(), (*itr), uint64(m_lastDailyQuestTime)); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHARACTER_DAILYQUESTSTATUS); + stmt->setUInt32(0, GetGUIDLow()); + stmt->setUInt32(1, (*itr)); + stmt->setUInt64(2, uint64(m_lastDailyQuestTime)); + trans->Append(stmt); } } } @@ -18891,18 +19070,51 @@ void Player::_SaveWeeklyQuestStatus(SQLTransaction& trans) return; // we don't need transactions here. - trans->PAppend("DELETE FROM character_queststatus_weekly WHERE guid = '%u'", GetGUIDLow()); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_STATUS_WEEKLY_CHAR); + stmt->setUInt32(0, GetGUIDLow()); + trans->Append(stmt); for (QuestSet::const_iterator iter = m_weeklyquests.begin(); iter != m_weeklyquests.end(); ++iter) { uint32 quest_id = *iter; - trans->PAppend("INSERT INTO character_queststatus_weekly (guid, quest) VALUES ('%u', '%u')", GetGUIDLow(), quest_id); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHARACTER_WEEKLYQUESTSTATUS); + stmt->setUInt32(0, GetGUIDLow()); + stmt->setUInt32(1, quest_id); + trans->Append(stmt); } m_WeeklyQuestChanged = false; } +void Player::_SaveSeasonalQuestStatus(SQLTransaction& trans) +{ + if (!m_SeasonalQuestChanged || m_seasonalquests.empty()) + return; + + // we don't need transactions here. + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_STATUS_SEASONAL_CHAR); + stmt->setUInt32(0, GetGUIDLow()); + trans->Append(stmt); + + for (SeasonalEventQuestMap::const_iterator iter = m_seasonalquests.begin(); iter != m_seasonalquests.end(); ++iter) + { + uint16 event_id = iter->first; + for (SeasonalQuestSet::const_iterator itr = iter->second.begin(); itr != iter->second.end(); ++itr) + { + uint32 quest_id = (*itr); + + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHARACTER_SEASONALQUESTSTATUS); + stmt->setUInt32(0, GetGUIDLow()); + stmt->setUInt32(1, quest_id); + stmt->setUInt32(2, event_id); + trans->Append(stmt); + } + } + + m_SeasonalQuestChanged = false; +} + void Player::_SaveSkills(SQLTransaction& trans) { // we don't need transactions here. @@ -19073,13 +19285,17 @@ void Player::SendAttackSwingNotInRange() void Player::SavePositionInDB(uint32 mapid, float x, float y, float z, float o, uint32 zone, uint64 guid) { - std::ostringstream ss; - ss << "UPDATE characters SET position_x='" << x << "', position_y='" << y - << "', position_z='" << z << "', orientation='" << o << "', map='" << mapid - << "', zone='" << zone << "', trans_x='0', trans_y='0', trans_z='0', " - << "transguid='0', taxi_path='' WHERE guid='" << GUID_LOPART(guid) << '\''; - sLog->outDebug(LOG_FILTER_UNITS, "%s", ss.str().c_str()); - CharacterDatabase.Execute(ss.str().c_str()); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHARACTER_POSITION); + + stmt->setFloat(0, x); + stmt->setFloat(1, y); + stmt->setFloat(2, z); + stmt->setFloat(3, o); + stmt->setUInt16(4, uint16(mapid)); + stmt->setUInt16(5, uint16(zone)); + stmt->setUInt32(6, GUID_LOPART(guid)); + + CharacterDatabase.Execute(stmt); } void Player::SetUInt32ValueInArray(Tokens& tokens, uint16 index, uint32 value) @@ -19102,11 +19318,18 @@ void Player::Customize(uint64 guid, uint8 gender, uint8 skin, uint8 face, uint8 Field* fields = result->Fetch(); - uint32 player_bytes2 = fields[0].GetUInt32(); - player_bytes2 &= ~0xFF; - player_bytes2 |= facialHair; + uint32 playerBytes2 = fields[0].GetUInt32(); + playerBytes2 &= ~0xFF; + playerBytes2 |= facialHair; - CharacterDatabase.PExecute("UPDATE characters SET gender = '%u', playerBytes = '%u', playerBytes2 = '%u' WHERE guid = '%u'", gender, skin | (face << 8) | (hairStyle << 16) | (hairColor << 24), player_bytes2, GUID_LOPART(guid)); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GENDER_PLAYERBYTES); + + stmt->setUInt8(0, gender); + stmt->setUInt32(1, skin | (face << 8) | (hairStyle << 16) | (hairColor << 24)); + stmt->setUInt32(2, playerBytes2); + stmt->setUInt32(3, GUID_LOPART(guid)); + + CharacterDatabase.Execute(stmt); } void Player::SendAttackSwingDeadTarget() @@ -19953,9 +20176,22 @@ void Player::RemovePetitionsAndSigns(uint64 guid, uint32 type) } while (result->NextRow()); if (type == 10) - CharacterDatabase.PExecute("DELETE FROM petition_sign WHERE playerguid = '%u'", GUID_LOPART(guid)); + { + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ALL_PETITION_SIGNATURES); + + stmt->setUInt32(0, GUID_LOPART(guid)); + + CharacterDatabase.Execute(stmt); + } else - CharacterDatabase.PExecute("DELETE FROM petition_sign WHERE playerguid = '%u' AND type = '%u'", GUID_LOPART(guid), type); + { + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_PETITION_SIGNATURE); + + stmt->setUInt32(0, GUID_LOPART(guid)); + stmt->setUInt8(1, uint8(type)); + + CharacterDatabase.Execute(stmt); + } } SQLTransaction trans = CharacterDatabase.BeginTransaction(); @@ -19974,7 +20210,7 @@ void Player::RemovePetitionsAndSigns(uint64 guid, uint32 type) void Player::LeaveAllArenaTeams(uint64 guid) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_ARENA_TEAMS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PLAYER_ARENA_TEAMS); stmt->setUInt32(0, GUID_LOPART(guid)); PreparedQueryResult result = CharacterDatabase.Query(stmt); @@ -20029,7 +20265,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc return false; // not let cheating with start flight in time of logout process || while in combat || has type state: stunned || has type state: root - if (GetSession()->isLogingOut() || isInCombat() || HasUnitState(UNIT_STAT_STUNNED) || HasUnitState(UNIT_STAT_ROOT)) + if (GetSession()->isLogingOut() || isInCombat() || HasUnitState(UNIT_STATE_STUNNED) || HasUnitState(UNIT_STATE_ROOT)) { WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4); data << uint32(ERR_TAXIPLAYERBUSY); @@ -21324,9 +21560,7 @@ void Player::SendInitialVisiblePackets(Unit* target) SendAurasForTarget(target); if (target->isAlive()) { - if (target->GetMotionMaster()->GetCurrentMovementGeneratorType() != IDLE_MOTION_TYPE) - target->SendMonsterMoveWithSpeedToCurrentDestination(this); - if (target->HasUnitState(UNIT_STAT_MELEE_ATTACKING) && target->getVictim()) + if (target->HasUnitState(UNIT_STATE_MELEE_ATTACKING) && target->getVictim()) target->SendMeleeAttackStart(target->getVictim()); } } @@ -21583,6 +21817,8 @@ void Player::SendInitialPacketsBeforeAddToMap() // SMSG_PET_GUIDS // SMSG_UPDATE_WORLD_STATE // SMSG_POWER_UPDATE + + SetMover(this); } void Player::SendInitialPacketsAfterAddToMap() @@ -21971,6 +22207,16 @@ void Player::SetWeeklyQuestStatus(uint32 quest_id) m_WeeklyQuestChanged = true; } +void Player::SetSeasonalQuestStatus(uint32 quest_id) +{ + Quest const* quest = sObjectMgr->GetQuestTemplate(quest_id); + if (!quest) + return; + + m_seasonalquests[sGameEventMgr->GetEventIdForQuest(quest)].insert(quest_id); + m_SeasonalQuestChanged = true; +} + void Player::ResetDailyQuestStatus() { for (uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx) @@ -21993,6 +22239,16 @@ void Player::ResetWeeklyQuestStatus() m_WeeklyQuestChanged = false; } +void Player::ResetSeasonalQuestStatus(uint16 event_id) +{ + if (m_seasonalquests.empty() || m_seasonalquests[event_id].empty()) + return; + + m_seasonalquests.erase(event_id); + // DB data deleted in caller + m_SeasonalQuestChanged = false; +} + Battleground* Player::GetBattleground() const { if (GetBattlegroundId() == 0) @@ -23136,6 +23392,9 @@ void Player::RemoveRunesByAuraEffect(AuraEffect const* aura) void Player::RestoreBaseRune(uint8 index) { AuraEffect const* aura = m_runes->runes[index].ConvertAura; + // If rune was converted by a non-pasive aura that still active we should keep it converted + if (aura && !(aura->GetSpellInfo()->Attributes & SPELL_ATTR0_PASSIVE)) + return; ConvertRune(index, GetBaseRune(index)); SetRuneConvertAura(index, NULL); // Don't drop passive talents providing rune convertion @@ -23383,7 +23642,14 @@ void Player::_LoadSkills(PreparedQueryResult result) if (value == 0) { sLog->outError("Character %u has skill %u with value 0. Will be deleted.", GetGUIDLow(), skill); - CharacterDatabase.PExecute("DELETE FROM character_skills WHERE guid = '%u' AND skill = '%u' ", GetGUIDLow(), skill); + + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHARACTER_SKILL); + + stmt->setUInt32(0, GetGUIDLow()); + stmt->setUInt16(1, skill); + + CharacterDatabase.Execute(stmt); + continue; } @@ -24172,7 +24438,7 @@ void Player::_SaveEquipmentSets(SQLTransaction& trans) ++itr; break; // nothing do case EQUIPMENT_SET_CHANGED: - stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_EQUIP_SET); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_EQUIP_SET); stmt->setString(j++, eqset.Name.c_str()); stmt->setString(j++, eqset.IconName.c_str()); for (uint8 i=0; i<EQUIPMENT_SLOT_END; ++i) @@ -24185,7 +24451,7 @@ void Player::_SaveEquipmentSets(SQLTransaction& trans) ++itr; break; case EQUIPMENT_SET_NEW: - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_EQUIP_SET); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_EQUIP_SET); stmt->setUInt32(j++, GetGUIDLow()); stmt->setUInt64(j++, eqset.Guid); stmt->setUInt32(j++, index); @@ -24213,7 +24479,7 @@ void Player::_SaveBGData(SQLTransaction& trans) stmt->setUInt32(0, GetGUIDLow()); trans->Append(stmt); /* guid, bgInstanceID, bgTeam, x, y, z, o, map, taxi[0], taxi[1], mountSpell */ - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_PLAYER_BGDATA); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PLAYER_BGDATA); stmt->setUInt32(0, GetGUIDLow()); stmt->setUInt32(1, m_bgData.bgInstanceID); stmt->setUInt16(2, m_bgData.bgTeam); @@ -24243,12 +24509,19 @@ void Player::DeleteEquipmentSet(uint64 setGuid) } } -void Player::RemoveAtLoginFlag(AtLoginFlags f, bool in_db_also /*= false*/) +void Player::RemoveAtLoginFlag(AtLoginFlags flags, bool persist /*= false*/) { - m_atLoginFlags &= ~f; + m_atLoginFlags &= ~flags; + + if (persist) + { + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_REM_AT_LOGIN_FLAG); - if (in_db_also) - CharacterDatabase.PExecute("UPDATE characters set at_login = at_login & ~ %u WHERE guid ='%u'", uint32(f), GetGUIDLow()); + stmt->setUInt16(0, uint16(flags)); + stmt->setUInt32(1, GetGUIDLow()); + + CharacterDatabase.Execute(stmt); + } } void Player::SendClearCooldown(uint32 spell_id, Unit* target) @@ -24508,7 +24781,7 @@ void Player::ActivateSpec(uint8 spec) InitTalentForLevel(); { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_ACTIONS_SPEC); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ACTIONS_SPEC); stmt->setUInt32(0, GetGUIDLow()); stmt->setUInt8(1, m_activeSpec); if (PreparedQueryResult result = CharacterDatabase.Query(stmt)) @@ -24760,7 +25033,13 @@ void Player::SetRandomWinner(bool isWinner) { m_IsBGRandomWinner = isWinner; if (m_IsBGRandomWinner) - CharacterDatabase.PExecute("INSERT INTO character_battleground_random (guid) VALUES ('%u')", GetGUIDLow()); + { + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_BATTLEGROUND_RANDOM); + + stmt->setUInt32(0, GetGUIDLow()); + + CharacterDatabase.Execute(stmt); + } } void Player::_LoadRandomBGStatus(PreparedQueryResult result) @@ -24814,7 +25093,7 @@ void Player::_SaveInstanceTimeRestrictions(SQLTransaction& trans) for (InstanceTimeMap::const_iterator itr = _instanceResetTimes.begin(); itr != _instanceResetTimes.end(); ++itr) { - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_ACCOUNT_INSTANCE_LOCK_TIMES); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_ACCOUNT_INSTANCE_LOCK_TIMES); stmt->setUInt32(0, GetSession()->GetAccountId()); stmt->setUInt32(1, itr->first); stmt->setUInt64(2, itr->second); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index a9bba9cbdc4..489b4eacec5 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -274,13 +274,14 @@ struct PvPInfo struct DuelInfo { - DuelInfo() : initiator(NULL), opponent(NULL), startTimer(0), startTime(0), outOfBound(0) {} + DuelInfo() : initiator(NULL), opponent(NULL), startTimer(0), startTime(0), outOfBound(0), isMounted(false) {} Player* initiator; Player* opponent; time_t startTimer; time_t startTime; time_t outOfBound; + bool isMounted; }; struct Areas @@ -686,7 +687,8 @@ enum TradeSlots { TRADE_SLOT_COUNT = 7, TRADE_SLOT_TRADED_COUNT = 6, - TRADE_SLOT_NONTRADED = 6 + TRADE_SLOT_NONTRADED = 6, + TRADE_SLOT_INVALID = -1, }; enum TransferAbortReason @@ -815,11 +817,12 @@ enum PlayerLoginQueryIndex PLAYER_LOGIN_QUERY_LOADTALENTS = 23, PLAYER_LOGIN_QUERY_LOADACCOUNTDATA = 24, PLAYER_LOGIN_QUERY_LOADSKILLS = 25, - PLAYER_LOGIN_QUERY_LOADWEKLYQUESTSTATUS = 26, + PLAYER_LOGIN_QUERY_LOADWEEKLYQUESTSTATUS = 26, PLAYER_LOGIN_QUERY_LOADRANDOMBG = 27, PLAYER_LOGIN_QUERY_LOADBANNED = 28, PLAYER_LOGIN_QUERY_LOADQUESTSTATUSREW = 29, PLAYER_LOGIN_QUERY_LOADINSTANCELOCKTIMES = 30, + PLAYER_LOGIN_QUERY_LOADSEASONALQUESTSTATUS = 31, MAX_PLAYER_LOGIN_QUERY, }; @@ -1000,7 +1003,8 @@ class TradeData TradeData* GetTraderData() const; Item* GetItem(TradeSlots slot) const; - bool HasItem(uint64 item_guid) const; + bool HasItem(uint64 itemGuid) const; + TradeSlots GetTradeSlotForItem(uint64 itemGuid) const; void SetItem(TradeSlots slot, Item* item); uint32 GetSpell() const { return m_spell; } @@ -1276,6 +1280,7 @@ class Player : public Unit, public GridObject<Player> bool HasItemTotemCategory(uint32 TotemCategory) const; InventoryResult CanUseItem(ItemTemplate const* pItem) const; InventoryResult CanUseAmmo(uint32 item) const; + InventoryResult CanRollForItemInLFG(ItemTemplate const* item, WorldObject const* lootedObject) const; Item* StoreNewItem(ItemPosCountVec const& pos, uint32 item, bool update, int32 randomPropertyId = 0); Item* StoreNewItem(ItemPosCountVec const& pos, uint32 item, bool update, int32 randomPropertyId, AllowedLooterSet &allowedLooters); Item* StoreItem(ItemPosCountVec const& pos, Item* pItem, bool update); @@ -1422,6 +1427,7 @@ class Player : public Unit, public GridObject<Player> bool SatisfyQuestPrevChain(Quest const* qInfo, bool msg); bool SatisfyQuestDay(Quest const* qInfo, bool msg); bool SatisfyQuestWeek(Quest const* qInfo, bool msg); + bool SatisfyQuestSeasonal(Quest const* qInfo, bool msg); bool GiveQuestSourceItem(Quest const* quest); bool TakeQuestSourceItem(uint32 questId, bool msg); bool GetQuestRewardStatus(uint32 quest_id) const; @@ -1432,8 +1438,10 @@ class Player : public Unit, public GridObject<Player> void SetDailyQuestStatus(uint32 quest_id); void SetWeeklyQuestStatus(uint32 quest_id); + void SetSeasonalQuestStatus(uint32 quest_id); void ResetDailyQuestStatus(); void ResetWeeklyQuestStatus(); + void ResetSeasonalQuestStatus(uint16 event_id); uint16 FindQuestSlot(uint32 quest_id) const; uint32 GetQuestSlotQuestId(uint16 slot) const { return GetUInt32Value(PLAYER_QUEST_LOG_1_1 + slot * MAX_QUEST_OFFSET + QUEST_ID_OFFSET); } @@ -1798,7 +1806,7 @@ class Player : public Unit, public GridObject<Player> void SetContestedPvPTimer(uint32 newTime) {m_contestedPvPTimer = newTime;} void ResetContestedPvP() { - ClearUnitState(UNIT_STAT_ATTACK_PLAYER); + ClearUnitState(UNIT_STATE_ATTACK_PLAYER); RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP); m_contestedPvPTimer = 0; } @@ -1960,7 +1968,6 @@ class Player : public Unit, public GridObject<Player> Corpse* GetCorpse() const; void SpawnCorpseBones(); void CreateCorpse(); - bool FallGround(uint8 FallMode = 0); void KillPlayer(); uint32 GetResurrectionSpellId(); void ResurrectPlayer(float restore_percent, bool applySickness = false); @@ -2352,7 +2359,7 @@ class Player : public Unit, public GridObject<Player> bool HasAtLoginFlag(AtLoginFlags f) const { return m_atLoginFlags & f; } void SetAtLoginFlag(AtLoginFlags f) { m_atLoginFlags |= f; } - void RemoveAtLoginFlag(AtLoginFlags f, bool in_db_also = false); + void RemoveAtLoginFlag(AtLoginFlags flags, bool persist = false); bool isUsingLfg(); @@ -2558,8 +2565,11 @@ class Player : public Unit, public GridObject<Player> //We allow only one timed quest active at the same time. Below can then be simple value instead of set. typedef std::set<uint32> QuestSet; + typedef std::set<uint32> SeasonalQuestSet; + typedef UNORDERED_MAP<uint32,SeasonalQuestSet> SeasonalEventQuestMap; QuestSet m_timedquests; QuestSet m_weeklyquests; + SeasonalEventQuestMap m_seasonalquests; uint64 m_divider; uint32 m_ingametime; @@ -2580,6 +2590,7 @@ class Player : public Unit, public GridObject<Player> void _LoadQuestStatusRewarded(PreparedQueryResult result); void _LoadDailyQuestStatus(PreparedQueryResult result); void _LoadWeeklyQuestStatus(PreparedQueryResult result); + void _LoadSeasonalQuestStatus(PreparedQueryResult result); void _LoadRandomBGStatus(PreparedQueryResult result); void _LoadGroup(PreparedQueryResult result); void _LoadSkills(PreparedQueryResult result); @@ -2605,6 +2616,7 @@ class Player : public Unit, public GridObject<Player> void _SaveQuestStatus(SQLTransaction& trans); void _SaveDailyQuestStatus(SQLTransaction& trans); void _SaveWeeklyQuestStatus(SQLTransaction& trans); + void _SaveSeasonalQuestStatus(SQLTransaction& trans); void _SaveSkills(SQLTransaction& trans); void _SaveSpells(SQLTransaction& trans); void _SaveEquipmentSets(SQLTransaction& trans); @@ -2716,6 +2728,7 @@ class Player : public Unit, public GridObject<Player> bool m_DailyQuestChanged; bool m_WeeklyQuestChanged; + bool m_SeasonalQuestChanged; time_t m_lastDailyQuestTime; uint32 m_drunkTimer; diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp index dbb18496515..cb327b83d17 100755 --- a/src/server/game/Entities/Player/SocialMgr.cpp +++ b/src/server/game/Entities/Player/SocialMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -47,7 +47,7 @@ uint32 PlayerSocial::GetNumberOfSocialsWithFlag(SocialFlag flag) return counter; } -bool PlayerSocial::AddToSocialList(uint32 friend_guid, bool ignore) +bool PlayerSocial::AddToSocialList(uint32 friendGuid, bool ignore) { // check client limits if (ignore) @@ -65,25 +65,39 @@ bool PlayerSocial::AddToSocialList(uint32 friend_guid, bool ignore) if (ignore) flag = SOCIAL_FLAG_IGNORED; - PlayerSocialMap::const_iterator itr = m_playerSocialMap.find(friend_guid); + PlayerSocialMap::const_iterator itr = m_playerSocialMap.find(friendGuid); if (itr != m_playerSocialMap.end()) { - CharacterDatabase.PExecute("UPDATE character_social SET flags = (flags | %u) WHERE guid = '%u' AND friend = '%u'", flag, GetPlayerGUID(), friend_guid); - m_playerSocialMap[friend_guid].Flags |= flag; + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_CHARACTER_SOCIAL_FLAGS); + + stmt->setUInt8(0, uint8(flag)); + stmt->setUInt32(1, GetPlayerGUID()); + stmt->setUInt32(2, friendGuid); + + CharacterDatabase.Execute(stmt); + + m_playerSocialMap[friendGuid].Flags |= flag; } else { - CharacterDatabase.PExecute("INSERT INTO character_social (guid, friend, flags) VALUES ('%u', '%u', '%u')", GetPlayerGUID(), friend_guid, flag); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHARACTER_SOCIAL); + + stmt->setUInt32(0, GetPlayerGUID()); + stmt->setUInt32(1, friendGuid); + stmt->setUInt8(2, uint8(flag)); + + CharacterDatabase.Execute(stmt); + FriendInfo fi; fi.Flags |= flag; - m_playerSocialMap[friend_guid] = fi; + m_playerSocialMap[friendGuid] = fi; } return true; } -void PlayerSocial::RemoveFromSocialList(uint32 friend_guid, bool ignore) +void PlayerSocial::RemoveFromSocialList(uint32 friendGuid, bool ignore) { - PlayerSocialMap::iterator itr = m_playerSocialMap.find(friend_guid); + PlayerSocialMap::iterator itr = m_playerSocialMap.find(friendGuid); if (itr == m_playerSocialMap.end()) // not exist return; @@ -94,24 +108,44 @@ void PlayerSocial::RemoveFromSocialList(uint32 friend_guid, bool ignore) itr->second.Flags &= ~flag; if (itr->second.Flags == 0) { - CharacterDatabase.PExecute("DELETE FROM character_social WHERE guid = '%u' AND friend = '%u'", GetPlayerGUID(), friend_guid); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHARACTER_SOCIAL); + + stmt->setUInt32(0, GetPlayerGUID()); + stmt->setUInt32(1, friendGuid); + + CharacterDatabase.Execute(stmt); + m_playerSocialMap.erase(itr); } else - CharacterDatabase.PExecute("UPDATE character_social SET flags = (flags & ~%u) WHERE guid = '%u' AND friend = '%u'", flag, GetPlayerGUID(), friend_guid); + { + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_REM_CHARACTER_SOCIAL_FLAGS); + + stmt->setUInt8(0, uint8(flag)); + stmt->setUInt32(1, GetPlayerGUID()); + stmt->setUInt32(2, friendGuid); + + CharacterDatabase.Execute(stmt); + } } -void PlayerSocial::SetFriendNote(uint32 friend_guid, std::string note) +void PlayerSocial::SetFriendNote(uint32 friendGuid, std::string note) { - PlayerSocialMap::const_iterator itr = m_playerSocialMap.find(friend_guid); + PlayerSocialMap::const_iterator itr = m_playerSocialMap.find(friendGuid); if (itr == m_playerSocialMap.end()) // not exist return; utf8truncate(note, 48); // DB and client size limitation - CharacterDatabase.EscapeString(note); - CharacterDatabase.PExecute("UPDATE character_social SET note = '%s' WHERE guid = '%u' AND friend = '%u'", note.c_str(), GetPlayerGUID(), friend_guid); - m_playerSocialMap[friend_guid].Note = note; + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHARACTER_SOCIAL_NOTE); + + stmt->setString(0, note); + stmt->setUInt32(1, GetPlayerGUID()); + stmt->setUInt32(2, friendGuid); + + CharacterDatabase.Execute(stmt); + + m_playerSocialMap[friendGuid].Note = note; } void PlayerSocial::SendSocialList(Player* player) diff --git a/src/server/game/Entities/Player/SocialMgr.h b/src/server/game/Entities/Player/SocialMgr.h index 78965c13948..540b425588e 100755 --- a/src/server/game/Entities/Player/SocialMgr.h +++ b/src/server/game/Entities/Player/SocialMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -122,7 +122,7 @@ class PlayerSocial // adding/removing bool AddToSocialList(uint32 friend_guid, bool ignore); void RemoveFromSocialList(uint32 friend_guid, bool ignore); - void SetFriendNote(uint32 friend_guid, std::string note); + void SetFriendNote(uint32 friendGuid, std::string note); // Packet send's void SendSocialList(Player* player); // Misc diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp index fc368b1f109..80c5de35e59 100755 --- a/src/server/game/Entities/Totem/Totem.cpp +++ b/src/server/game/Entities/Totem/Totem.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Totem/Totem.h b/src/server/game/Entities/Totem/Totem.h index 93fc2145901..8b00da34d73 100755 --- a/src/server/game/Entities/Totem/Totem.h +++ b/src/server/game/Entities/Totem/Totem.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index d533f6fe5b9..67d1636c7e2 100755 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h index 8fcecffe239..518dcf6359d 100755 --- a/src/server/game/Entities/Transport/Transport.h +++ b/src/server/game/Entities/Transport/Transport.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index 3ab2f786086..c0bd5cb95a6 100755 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index fec9a13192c..5b18713740f 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -45,16 +45,16 @@ #include "InstanceSaveMgr.h" #include "GridNotifiersImpl.h" #include "CellImpl.h" -#include "Path.h" #include "CreatureGroups.h" #include "PetAI.h" #include "PassiveAI.h" -#include "Traveller.h" #include "TemporarySummon.h" #include "Vehicle.h" #include "Transport.h" #include "InstanceScript.h" #include "SpellInfo.h" +#include "MoveSplineInit.h" +#include "MoveSpline.h" #include <math.h> @@ -62,9 +62,9 @@ float baseMoveSpeed[MAX_MOVE_TYPE] = { 2.5f, // MOVE_WALK 7.0f, // MOVE_RUN - 2.5f, // MOVE_RUN_BACK + 4.5f, // MOVE_RUN_BACK 4.722222f, // MOVE_SWIM - 4.5f, // MOVE_SWIM_BACK + 2.5f, // MOVE_SWIM_BACK 3.141594f, // MOVE_TURN_RATE 7.0f, // MOVE_FLIGHT 4.5f, // MOVE_FLIGHT_BACK @@ -73,9 +73,9 @@ float baseMoveSpeed[MAX_MOVE_TYPE] = float playerBaseMoveSpeed[MAX_MOVE_TYPE] = { 2.5f, // MOVE_WALK 7.0f, // MOVE_RUN - 2.5f, // MOVE_RUN_BACK + 4.5f, // MOVE_RUN_BACK 4.722222f, // MOVE_SWIM - 4.5f, // MOVE_SWIM_BACK + 2.5f, // MOVE_SWIM_BACK 3.141594f, // MOVE_TURN_RATE 7.0f, // MOVE_FLIGHT 4.5f, // MOVE_FLIGHT_BACK @@ -148,7 +148,7 @@ Unit::Unit(bool isWorldObject): WorldObject(isWorldObject), m_movedPlayer(NULL), m_lastSanctuaryTime(0), IsAIEnabled(false), NeedChangeAI(false), m_ControlledByPlayer(false), i_AI(NULL), i_disabledAI(NULL), m_procDeep(0), m_removedAurasCount(0), i_motionMaster(this), m_ThreatManager(this), m_vehicle(NULL), -m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE), m_HostileRefManager(this) +m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE), m_HostileRefManager(this), movespline(new Movement::MoveSpline()) { #ifdef _MSC_VER #pragma warning(default:4355) @@ -280,6 +280,7 @@ Unit::~Unit() delete m_charmInfo; delete m_vehicleKit; + delete movespline; ASSERT(!m_duringRemoveFromWorld); ASSERT(!m_attacking); @@ -315,7 +316,7 @@ void Unit::Update(uint32 p_time) // update combat timer only for players and pets (only pets with PetAI) if (isInCombat() && (GetTypeId() == TYPEID_PLAYER || (ToCreature()->isPet() && IsControlledByPlayer()))) { - // Check UNIT_STAT_MELEE_ATTACKING or UNIT_STAT_CHASE (without UNIT_STAT_FOLLOW in this case) so pets can reach far away + // Check UNIT_STATE_MELEE_ATTACKING or UNIT_STATE_CHASE (without UNIT_STATE_FOLLOW in this case) so pets can reach far away // targets without stopping half way there and running off. // These flags are reset after target dies or another command is given. if (m_HostileRefManager.isEmpty()) @@ -346,6 +347,7 @@ void Unit::Update(uint32 p_time) ModifyAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT, HealthAbovePct(75)); } + UpdateSplineMovement(p_time); i_motionMaster.UpdateMotion(p_time); } @@ -357,151 +359,46 @@ bool Unit::haveOffhandWeapon() const return m_canDualWield; } -void Unit::SendMonsterMoveWithSpeedToCurrentDestination(Player* player) +void Unit::MonsterMoveWithSpeed(float x, float y, float z, float speed) { - float x, y, z; - if (GetMotionMaster()->GetDestination(x, y, z)) - SendMonsterMoveWithSpeed(x, y, z, 0, player); -} - -void Unit::SendMonsterMoveWithSpeed(float x, float y, float z, uint32 transitTime, Player* player) -{ - if (!transitTime) - { - if (GetTypeId() == TYPEID_PLAYER) - { - Traveller<Player> traveller(*(Player*)this); - transitTime = traveller.GetTotalTrevelTimeTo(x, y, z); - } - else - { - Traveller<Creature> traveller(*ToCreature()); - transitTime = traveller.GetTotalTrevelTimeTo(x, y, z); - } - } - //float orientation = (float)atan2((double)dy, (double)dx); - SendMonsterMove(x, y, z, transitTime, player); + Movement::MoveSplineInit init(*this); + init.MoveTo(x,y,z); + init.SetVelocity(speed); + init.Launch(); } -void Unit::SetFacing(float ori, WorldObject* obj) +void Unit::UpdateSplineMovement(uint32 t_diff) { - SetOrientation(obj ? GetAngle(obj) : ori); - - WorldPacket data(SMSG_MONSTER_MOVE, (1+12+4+1+(obj ? 8 : 4)+4+4+4+12+GetPackGUID().size())); - data.append(GetPackGUID()); - data << uint8(0); // unk - data << GetPositionX() << GetPositionY() << GetPositionZ(); - data << getMSTime(); - if (obj) - { - data << uint8(SPLINETYPE_FACING_TARGET); - data << uint64(obj->GetGUID()); - } - else - { - data << uint8(SPLINETYPE_FACING_ANGLE); - data << ori; - } - data << uint32(SPLINEFLAG_NONE); - data << uint32(0); // move time 0 - data << uint32(1); // one point - data << GetPositionX() << GetPositionY() << GetPositionZ(); - SendMessageToSet(&data, true); -} - -void Unit::SendMonsterStop(bool on_death) -{ - WorldPacket data(SMSG_MONSTER_MOVE, (17 + GetPackGUID().size())); - data.append(GetPackGUID()); - data << uint8(0); // new in 3.1 - data << GetPositionX() << GetPositionY() << GetPositionZ(); - data << getMSTime(); - - if (on_death == true) - { - data << uint8(0); - data << uint32((GetUnitMovementFlags() & MOVEMENTFLAG_LEVITATING) ? SPLINEFLAG_FLYING : SPLINEFLAG_WALKING); - data << uint32(0); // Time in between points - data << uint32(1); // 1 single waypoint - data << GetPositionX() << GetPositionY() << GetPositionZ(); - } - else - data << uint8(1); - - SendMessageToSet(&data, true); - - ClearUnitState(UNIT_STAT_MOVE); -} - -void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 Time, Player* player) -{ - WorldPacket data(SMSG_MONSTER_MOVE, 1+12+4+1+4+4+4+12+GetPackGUID().size()); - data.append(GetPackGUID()); - - data << uint8(0); // new in 3.1 - data << GetPositionX() << GetPositionY() << GetPositionZ(); - data << getMSTime(); - - data << uint8(0); - data << uint32((GetUnitMovementFlags() & MOVEMENTFLAG_LEVITATING) ? SPLINEFLAG_FLYING : SPLINEFLAG_WALKING); - data << Time; // Time in between points - data << uint32(1); // 1 single waypoint - data << NewPosX << NewPosY << NewPosZ; // the single waypoint Point B - - if (player) - player->GetSession()->SendPacket(&data); - else - SendMessageToSet(&data, true); - - AddUnitState(UNIT_STAT_MOVE); -} + enum{ + POSITION_UPDATE_DELAY = 400, + }; -void Unit::SendMonsterMove(MonsterMoveData const& moveData, Player* player) -{ - WorldPacket data(SMSG_MONSTER_MOVE, GetPackGUID().size() + 1 + 12 + 4 + 1 + 4 + 8 + 4 + 4 + 12); - data.append(GetPackGUID()); + if (movespline->Finalized()) + return; - data << uint8(0); // new in 3.1 - data << GetPositionX() << GetPositionY() << GetPositionZ(); - data << getMSTime(); + movespline->updateState(t_diff); + bool arrived = movespline->Finalized(); - data << uint8(0); - data << moveData.SplineFlag; + if (arrived) + DisableSpline(); - if (moveData.SplineFlag & SPLINEFLAG_ANIMATIONTIER) + m_movesplineTimer.Update(t_diff); + if (m_movesplineTimer.Passed() || arrived) { - data << uint8(moveData.AnimationState); - data << uint32(0); - } - - data << moveData.Time; + m_movesplineTimer.Reset(POSITION_UPDATE_DELAY); + Movement::Location loc = movespline->ComputePosition(); - if (moveData.SplineFlag & SPLINEFLAG_TRAJECTORY) - { - data << moveData.SpeedZ; - data << uint32(0); // walk time after jump + if (GetTypeId() == TYPEID_PLAYER) + ((Player*)this)->UpdatePosition(loc.x,loc.y,loc.z,loc.orientation); + else + GetMap()->CreatureRelocation((Creature*)this,loc.x,loc.y,loc.z,loc.orientation); } - - data << uint32(1); // waypoint count - data << moveData.DestLocation.GetPositionX(); - data << moveData.DestLocation.GetPositionY(); - data << moveData.DestLocation.GetPositionZ(); - - if (player) - player->GetSession()->SendPacket(&data); - else - SendMessageToSet(&data, true); } -void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 MoveFlags, uint32 time, float speedZ, Player* player) +void Unit::DisableSpline() { - MonsterMoveData data; - data.DestLocation.Relocate(NewPosX, NewPosY, NewPosZ); - data.SplineFlag = MoveFlags; - data.Time = time; - data.SpeedZ = speedZ; - - SendMonsterMove(data, player); + m_movementInfo.RemoveMovementFlag(MovementFlags(MOVEMENTFLAG_SPLINE_ENABLED|MOVEMENTFLAG_FORWARD)); + movespline->_Interrupt(); } void Unit::SendMonsterMoveExitVehicle(Position const* newPos) @@ -619,9 +516,32 @@ bool Unit::HasAuraTypeWithFamilyFlags(AuraType auraType, uint32 familyName, uint return false; } +bool Unit::HasBreakableByDamageAuraType(AuraType type, uint32 excludeAura) const +{ + AuraEffectList const& auras = GetAuraEffectsByType(type); + for (AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr) + if ((!excludeAura || excludeAura != (*itr)->GetSpellInfo()->Id) && //Avoid self interrupt of channeled Crowd Control spells like Seduction + ((*itr)->GetSpellInfo()->Attributes & SPELL_ATTR0_BREAKABLE_BY_DAMAGE || (*itr)->GetSpellInfo()->AuraInterruptFlags & AURA_INTERRUPT_FLAG_TAKE_DAMAGE)) + return true; + return false; +} + +bool Unit::HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel) const +{ + uint32 excludeAura = 0; + if (Spell* currentChanneledSpell = excludeCasterChannel ? excludeCasterChannel->GetCurrentSpell(CURRENT_CHANNELED_SPELL) : NULL) + excludeAura = currentChanneledSpell->GetSpellInfo()->Id; //Avoid self interrupt of channeled Crowd Control spells like Seduction + + return ( HasBreakableByDamageAuraType(SPELL_AURA_MOD_CONFUSE, excludeAura) + || HasBreakableByDamageAuraType(SPELL_AURA_MOD_FEAR, excludeAura) + || HasBreakableByDamageAuraType(SPELL_AURA_MOD_STUN, excludeAura) + || HasBreakableByDamageAuraType(SPELL_AURA_MOD_ROOT, excludeAura) + || HasBreakableByDamageAuraType(SPELL_AURA_TRANSFORM, excludeAura)); +} + void Unit::DealDamageMods(Unit* victim, uint32 &damage, uint32* absorb) { - if (!victim || !victim->isAlive() || victim->HasUnitState(UNIT_STAT_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode())) + if (!victim || !victim->isAlive() || victim->HasUnitState(UNIT_STATE_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode())) { if (absorb) *absorb += damage; @@ -731,6 +651,7 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam // duel ends when player has 1 or less hp bool duel_hasEnded = false; + bool duel_wasMounted = false; if (victim->GetTypeId() == TYPEID_PLAYER && victim->ToPlayer()->duel && damage >= (health-1)) { // prevent kill only if killed in duel and killed by opponent or opponent controlled creature @@ -739,6 +660,20 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam duel_hasEnded = true; } + else if (victim->IsVehicle() && damage >= (health-1) && victim->GetCharmer() && victim->GetCharmer()->GetTypeId() == TYPEID_PLAYER) + { + Player* victimRider = victim->GetCharmer()->ToPlayer(); + + if (victimRider && victimRider->duel && victimRider->duel->isMounted) + { + // prevent kill only if killed in duel and killed by opponent or opponent controlled creature + if (victimRider->duel->opponent == this || victimRider->duel->opponent->GetGUID() == GetCharmerGUID()) + damage = health - 1; + + duel_wasMounted = true; + duel_hasEnded = true; + } + } if (GetTypeId() == TYPEID_PLAYER && this != victim) { @@ -848,12 +783,25 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam // last damage from duel opponent if (duel_hasEnded) { - ASSERT(victim->GetTypeId() == TYPEID_PLAYER); - Player* he = victim->ToPlayer(); + Player* he; + + if (duel_wasMounted) + { + ASSERT(victim->GetCharmer()->GetTypeId() == TYPEID_PLAYER); + he = victim->GetCharmer()->ToPlayer(); + } + else + { + ASSERT(victim->GetTypeId() == TYPEID_PLAYER); + he = victim->ToPlayer(); + } ASSERT(he->duel); - he->SetHealth(1); + if (duel_wasMounted) // In this case victim==mount + victim->SetHealth(1); + else + he->SetHealth(1); he->duel->opponent->CombatStopWithPets(true); he->CombatStopWithPets(true); @@ -1121,13 +1069,13 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss) if (!victim) return; - if (!victim->isAlive() || victim->HasUnitState(UNIT_STAT_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode())) + if (!victim->isAlive() || victim->HasUnitState(UNIT_STATE_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode())) return; SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(damageInfo->SpellID); if (spellProto == NULL) { - sLog->outDebug(LOG_FILTER_UNITS, "Unit::DealSpellDamage have wrong damageInfo->SpellID: %u", damageInfo->SpellID); + sLog->outDebug(LOG_FILTER_UNITS, "Unit::DealSpellDamage has wrong damageInfo->SpellID: %u", damageInfo->SpellID); return; } @@ -1338,14 +1286,14 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss) { Unit* victim = damageInfo->target; - if (!victim->isAlive() || victim->HasUnitState(UNIT_STAT_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode())) + if (!victim->isAlive() || victim->HasUnitState(UNIT_STATE_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode())) return; // Hmmmm dont like this emotes client must by self do all animations if (damageInfo->HitInfo & HITINFO_CRITICALHIT) - victim->HandleEmoteCommand(EMOTE_ONESHOT_WOUNDCRITICAL); + victim->HandleEmoteCommand(EMOTE_ONESHOT_WOUND_CRITICAL); if (damageInfo->blocked_amount && damageInfo->TargetState != VICTIMSTATE_BLOCKS) - victim->HandleEmoteCommand(EMOTE_ONESHOT_PARRYSHIELD); + victim->HandleEmoteCommand(EMOTE_ONESHOT_PARRY_SHIELD); if (damageInfo->TargetState == VICTIMSTATE_PARRY) { @@ -1914,7 +1862,7 @@ void Unit::CalcHealAbsorb(Unit* victim, const SpellInfo* healSpell, uint32 &heal void Unit::AttackerStateUpdate (Unit* victim, WeaponAttackType attType, bool extra) { - if (HasUnitState(UNIT_STAT_CANNOT_AUTOATTACK) || HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED)) + if (HasUnitState(UNIT_STATE_CANNOT_AUTOATTACK) || HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED)) return; if (!victim->isAlive()) @@ -2217,12 +2165,12 @@ void Unit::SendMeleeAttackStart(Unit* victim) void Unit::SendMeleeAttackStop(Unit* victim) { - WorldPacket data(SMSG_ATTACKSTOP, (8+8+4)); // we guess size + WorldPacket data(SMSG_ATTACKSTOP, (8+8+4)); data.append(GetPackGUID()); data.append(victim ? victim->GetPackGUID() : 0); // can be 0x00... data << uint32(0); // can be 0x1 SendMessageToSet(&data, true); - sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTART"); + sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTOP"); if (victim) sLog->outDetail("%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUIDLow()); @@ -2397,7 +2345,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spell) case MELEE_HIT_BLOCK: canBlock = false; break; case MELEE_HIT_PARRY: canParry = false; break; default: - sLog->outStaticDebug("Spell %u SPELL_AURA_IGNORE_COMBAT_RESULT have unhandled state %d", (*i)->GetId(), (*i)->GetMiscValue()); + sLog->outStaticDebug("Spell %u SPELL_AURA_IGNORE_COMBAT_RESULT has unhandled state %d", (*i)->GetId(), (*i)->GetMiscValue()); break; } } @@ -2487,7 +2435,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spell) // Chance hit from victim SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE auras modHitChance += victim->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE, schoolMask); // Reduce spell hit chance for Area of effect spells from victim SPELL_AURA_MOD_AOE_AVOIDANCE aura - if (spell->IsAOE()) + if (spell->IsTargetingArea()) modHitChance -= victim->GetTotalAuraModifier(SPELL_AURA_MOD_AOE_AVOIDANCE); // Decrease hit chance from victim rating bonus @@ -2632,7 +2580,7 @@ uint32 Unit::GetDefenseSkillValue(Unit const* target) const float Unit::GetUnitDodgeChance() const { - if (IsNonMeleeSpellCasted(false) || HasUnitState(UNIT_STAT_CONTROLLED)) + if (IsNonMeleeSpellCasted(false) || HasUnitState(UNIT_STATE_CONTROLLED)) return 0.0f; if (GetTypeId() == TYPEID_PLAYER) @@ -2652,7 +2600,7 @@ float Unit::GetUnitDodgeChance() const float Unit::GetUnitParryChance() const { - if (IsNonMeleeSpellCasted(false) || HasUnitState(UNIT_STAT_CONTROLLED)) + if (IsNonMeleeSpellCasted(false) || HasUnitState(UNIT_STATE_CONTROLLED)) return 0.0f; float chance = 0.0f; @@ -2698,7 +2646,7 @@ float Unit::GetUnitMissChance(WeaponAttackType attType) const float Unit::GetUnitBlockChance() const { - if (IsNonMeleeSpellCasted(false) || HasUnitState(UNIT_STAT_CONTROLLED)) + if (IsNonMeleeSpellCasted(false) || HasUnitState(UNIT_STATE_CONTROLLED)) return 0.0f; if (Player const* player = ToPlayer()) @@ -2950,7 +2898,7 @@ void Unit::SetCurrentCastedSpell(Spell* pSpell) InterruptSpell(CURRENT_AUTOREPEAT_SPELL); m_AutoRepeatFirstCast = true; } - AddUnitState(UNIT_STAT_CASTING); + AddUnitState(UNIT_STATE_CASTING); } break; case CURRENT_CHANNELED_SPELL: @@ -2963,7 +2911,7 @@ void Unit::SetCurrentCastedSpell(Spell* pSpell) if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL] && m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Id != 75) InterruptSpell(CURRENT_AUTOREPEAT_SPELL); - AddUnitState(UNIT_STAT_CASTING); + AddUnitState(UNIT_STATE_CASTING); } break; case CURRENT_AUTOREPEAT_SPELL: @@ -3106,17 +3054,6 @@ bool Unit::isInBackInMap(Unit const* target, float distance, float arc) const return IsWithinDistInMap(target, distance) && !HasInArc(2 * M_PI - arc, target); } -void Unit::SetFacingToObject(WorldObject* pObject) -{ - // update orientation at server - SetOrientation(GetAngle(pObject)); - - // and client - WorldPacket data; - BuildHeartBeatMsg(&data); - SendMessageToSet(&data, false); -} - bool Unit::isInAccessiblePlaceFor(Creature const* c) const { if (IsInWater()) @@ -3420,19 +3357,19 @@ void Unit::_RemoveNoStackAurasDueToAura(Aura* aura) return; bool remove = false; - for (AuraMap::iterator i = m_ownedAuras.begin(); i != m_ownedAuras.end(); ++i) + for (AuraApplicationMap::iterator i = m_appliedAuras.begin(); i != m_appliedAuras.end(); ++i) { if (remove) { remove = false; - i = m_ownedAuras.begin(); + i = m_appliedAuras.begin(); } - if (aura->CanStackWith(i->second)) + if (aura->CanStackWith(i->second->GetBase())) continue; - RemoveOwnedAura(i, AURA_REMOVE_BY_DEFAULT); - if (i == m_ownedAuras.end()) + RemoveAura(i, AURA_REMOVE_BY_DEFAULT); + if (i == m_appliedAuras.end()) break; remove = true; } @@ -3606,17 +3543,25 @@ void Unit::RemoveAuraFromStack(uint32 spellId, uint64 casterGUID, AuraRemoveMode } } -void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit* dispeller, uint8 chargesRemoved/*= 1*/) +void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint32 dispellerSpellId, uint64 casterGUID, Unit* dispeller, uint8 chargesRemoved/*= 1*/) { for (AuraMap::iterator iter = m_ownedAuras.lower_bound(spellId); iter != m_ownedAuras.upper_bound(spellId);) { Aura* aura = iter->second; if (aura->GetCasterGUID() == casterGUID) { + DispelInfo dispelInfo(dispeller, dispellerSpellId, chargesRemoved); + + // Call OnDispel hook on AuraScript + aura->CallScriptDispel(&dispelInfo); + if (aura->GetSpellInfo()->AttributesEx7 & SPELL_ATTR7_DISPEL_CHARGES) - aura->ModCharges(-chargesRemoved, AURA_REMOVE_BY_ENEMY_SPELL); + aura->ModCharges(-dispelInfo.GetRemovedCharges(), AURA_REMOVE_BY_ENEMY_SPELL); else - aura->ModStackAmount(-chargesRemoved, AURA_REMOVE_BY_ENEMY_SPELL); + aura->ModStackAmount(-dispelInfo.GetRemovedCharges(), AURA_REMOVE_BY_ENEMY_SPELL); + + // Call AfterDispel hook on AuraScript + aura->CallScriptAfterDispel(&dispelInfo); switch (aura->GetSpellInfo()->SpellFamilyName) { @@ -3646,7 +3591,7 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit { // final heal int32 healAmount = aurEff->GetAmount(); - int32 stack = chargesRemoved; + int32 stack = dispelInfo.GetRemovedCharges(); CastCustomSpell(this, 33778, &healAmount, &stack, NULL, true, NULL, NULL, aura->GetCasterGUID()); // mana @@ -4643,7 +4588,7 @@ void Unit::AddGameObject(GameObject* gameObj) SpellInfo const* createBySpell = sSpellMgr->GetSpellInfo(gameObj->GetSpellId()); // Need disable spell use for owner if (createBySpell && createBySpell->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE) - // note: item based cooldowns and cooldown spell mods with charges ignored (unknown existed cases) + // note: item based cooldowns and cooldown spell mods with charges ignored (unknown existing cases) ToPlayer()->AddSpellAndCategoryCooldowns(createBySpell, 0, NULL, true); } } @@ -4673,7 +4618,7 @@ void Unit::RemoveGameObject(GameObject* gameObj, bool del) SpellInfo const* createBySpell = sSpellMgr->GetSpellInfo(spellid); // Need activate spell use for owner if (createBySpell && createBySpell->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE) - // note: item based cooldowns and cooldown spell mods with charges ignored (unknown existed cases) + // note: item based cooldowns and cooldown spell mods with charges ignored (unknown existing cases) ToPlayer()->SendCooldownEvent(createBySpell); } } @@ -4948,8 +4893,8 @@ bool Unit::HandleHasteAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere case 13877: case 33735: { - target = SelectNearbyTarget(); - if (!target || target == victim) + target = SelectNearbyTarget(victim); + if (!target) return false; basepoints0 = damage; triggered_spell_id = 22482; @@ -4968,7 +4913,7 @@ bool Unit::HandleHasteAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (!triggerEntry) { - sLog->outError("Unit::HandleHasteAuraProc: Spell %u have not existed triggered spell %u", hasteSpell->Id, triggered_spell_id); + sLog->outError("Unit::HandleHasteAuraProc: Spell %u has non-existing triggered spell %u", hasteSpell->Id, triggered_spell_id); return false; } @@ -5026,7 +4971,7 @@ bool Unit::HandleSpellCritChanceAuraProc(Unit* victim, uint32 /*damage*/, AuraEf if (!triggerEntry) { - sLog->outError("Unit::HandleHasteAuraProc: Spell %u have not existed triggered spell %u", triggeredByAuraSpell->Id, triggered_spell_id); + sLog->outError("Unit::HandleHasteAuraProc: Spell %u has non-existing triggered spell %u", triggeredByAuraSpell->Id, triggered_spell_id); return false; } @@ -5096,7 +5041,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere case 18765: case 35429: { - target = SelectNearbyTarget(); + target = SelectNearbyTarget(victim); if (!target) return false; @@ -5622,7 +5567,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere case SPELLFAMILY_MAGE: { // Magic Absorption - if (dummySpell->SpellIconID == 459) // only this spell have SpellIconID == 459 and dummy aura + if (dummySpell->SpellIconID == 459) // only this spell has SpellIconID == 459 and dummy aura { if (getPowerType() != POWER_MANA) return false; @@ -5816,7 +5761,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere // Sweeping Strikes case 12328: { - target = SelectNearbyTarget(); + target = SelectNearbyTarget(victim); if (!target) return false; @@ -5892,12 +5837,12 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (!victim || !victim->isAlive() || !procSpell) return false; - target = SelectNearbyTarget(); - if (!target || target == victim) + target = SelectNearbyTarget(victim); + if (!target) return false; - CastSpell(target, 58567, true); - return true; + triggered_spell_id = 58567; + break; } break; } @@ -7003,26 +6948,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere { switch (dummySpell->Id) { - // Earthen Power (Rank 1, 2) - case 51523: - case 51524: - { - // Totem itself must be a caster of this spell - Unit* caster = NULL; - for (ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr) { - if ((*itr)->GetEntry() != 2630) - continue; - - caster = *itr; - break; - } - - if (!caster) - return false; - - caster->CastSpell(caster, 59566, true, castItem, triggeredByAura, originalCaster); - return true; - } // Tidal Force case 55198: { @@ -7069,7 +6994,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere triggered_spell_id = 28850; break; } - // Windfury Weapon (Passive) 1-5 Ranks + // Windfury Weapon (Passive) 1-8 Ranks case 33757: { Player* player = ToPlayer(); @@ -7084,8 +7009,10 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere return false; WeaponAttackType attType = WeaponAttackType(player->GetAttackBySlot(castItem->GetSlot())); - if ((attType != BASE_ATTACK && attType != OFF_ATTACK) || !isAttackReady(attType)) - return false; + if ((attType != BASE_ATTACK && attType != OFF_ATTACK) + || attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK + || attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK) + return false; // Now compute real proc chance... uint32 chance = 20; @@ -7124,15 +7051,20 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere SpellInfo const* windfurySpellInfo = sSpellMgr->GetSpellInfo(spellId); if (!windfurySpellInfo) { - sLog->outError("Unit::HandleDummyAuraProc: non existed spell id: %u (Windfury)", spellId); + sLog->outError("Unit::HandleDummyAuraProc: non-existing spell id: %u (Windfury)", spellId); return false; } int32 extra_attack_power = CalculateSpellDamage(victim, windfurySpellInfo, 1); // Value gained from additional AP - basepoints0 = int32(extra_attack_power / 14.0f * GetAttackTime(BASE_ATTACK) / 1000); - triggered_spell_id = 25504; + basepoints0 = int32(extra_attack_power / 14.0f * GetAttackTime(attType) / 1000); + + if (procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK) + triggered_spell_id = 25504; + + if (procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK) + triggered_spell_id = 33750; // apply cooldown before cast to prevent processing itself if (cooldown) @@ -7195,6 +7127,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere return false; basepoints0 = CalculatePctN(int32(damage), triggerAmount); triggered_spell_id = 58879; + // Cast on spirit wolf + CastCustomSpell(this, triggered_spell_id, &basepoints0, NULL, NULL, true, NULL, triggeredByAura); break; } // Shaman T8 Elemental 4P Bonus @@ -7370,6 +7304,13 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (GetTypeId() != TYPEID_PLAYER || !victim || !victim->isAlive() || !castItem || !castItem->IsEquipped()) return false; + Player* player = ToPlayer(); + WeaponAttackType attType = WeaponAttackType(player->GetAttackBySlot(castItem->GetSlot())); + if ((attType != BASE_ATTACK && attType != OFF_ATTACK) + || attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK + || attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK) + return false; + float fire_onhit = float(CalculatePctF(dummySpell->Effects[EFFECT_0]. CalcValue(), 1.0f)); float add_spellpower = (float)(SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FIRE) @@ -7379,7 +7320,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere ApplyPctF(add_spellpower, 3.84f); // Enchant on Off-Hand and ready? - if (castItem->GetSlot() == EQUIPMENT_SLOT_OFFHAND && isAttackReady(OFF_ATTACK)) + if (castItem->GetSlot() == EQUIPMENT_SLOT_OFFHAND && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK) { float BaseWeaponSpeed = GetAttackTime(OFF_ATTACK) / 1000.0f; @@ -7389,7 +7330,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere } // Enchant on Main-Hand and ready? - else if (castItem->GetSlot() == EQUIPMENT_SLOT_MAINHAND && isAttackReady(BASE_ATTACK)) + else if (castItem->GetSlot() == EQUIPMENT_SLOT_MAINHAND && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK) { float BaseWeaponSpeed = GetAttackTime(BASE_ATTACK) / 1000.0f; @@ -7431,7 +7372,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere return false; } // Lightning Overload - if (dummySpell->SpellIconID == 2018) // only this spell have SpellFamily Shaman SpellIconID == 2018 and dummy aura + if (dummySpell->SpellIconID == 2018) // only this spell has SpellFamily Shaman SpellIconID == 2018 and dummy aura { if (!procSpell || GetTypeId() != TYPEID_PLAYER || !victim) return false; @@ -7483,7 +7424,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (!roll_chance_f(chance)) return false; - // Remove cooldown (Chain Lightning - have Category Recovery time) + // Remove cooldown (Chain Lightning - has Category Recovery time) ToPlayer()->RemoveSpellCooldown(spellId); } @@ -7794,7 +7735,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere SpellInfo const* triggerEntry = sSpellMgr->GetSpellInfo(triggered_spell_id); if (!triggerEntry) { - sLog->outError("Unit::HandleDummyAuraProc: Spell %u have not existed triggered spell %u", dummySpell->Id, triggered_spell_id); + sLog->outError("Unit::HandleDummyAuraProc: Spell %u has non-existing triggered spell %u", dummySpell->Id, triggered_spell_id); return false; } @@ -7852,7 +7793,7 @@ bool Unit::HandleObsModEnergyAuraProc(Unit* victim, uint32 /*damage*/, AuraEffec // Try handle unknown trigger spells if (!triggerEntry) { - sLog->outError("Unit::HandleObsModEnergyAuraProc: Spell %u have not existed triggered spell %u", dummySpell->Id, triggered_spell_id); + sLog->outError("Unit::HandleObsModEnergyAuraProc: Spell %u has non-existing triggered spell %u", dummySpell->Id, triggered_spell_id); return false; } @@ -7905,7 +7846,7 @@ bool Unit::HandleModDamagePctTakenAuraProc(Unit* victim, uint32 /*damage*/, Aura if (!triggerEntry) { - sLog->outError("Unit::HandleModDamagePctTakenAuraProc: Spell %u have not existed triggered spell %u", dummySpell->Id, triggered_spell_id); + sLog->outError("Unit::HandleModDamagePctTakenAuraProc: Spell %u has non-existing triggered spell %u", dummySpell->Id, triggered_spell_id); return false; } @@ -8651,8 +8592,8 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg SpellInfo const* triggerEntry = sSpellMgr->GetSpellInfo(trigger_spell_id); if (triggerEntry == NULL) { - // Not cast unknown spell - // sLog->outError("Unit::HandleProcTriggerSpell: Spell %u have 0 in EffectTriggered[%d], not handled custom case?", auraSpellInfo->Id, triggeredByAura->GetEffIndex()); + // Don't cast unknown spell + // sLog->outError("Unit::HandleProcTriggerSpell: Spell %u has 0 in EffectTriggered[%d]. Unhandled custom case?", auraSpellInfo->Id, triggeredByAura->GetEffIndex()); return false; } @@ -8739,7 +8680,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg if (!victim || !victim->isAlive()) return false; - // Not give if target already have full health + // Doesn't proc if target already has full health if (victim->IsFullHealth()) return false; // If your Greater Heal brings the target to full health, you gain $37595s1 mana. @@ -8944,18 +8885,17 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg // Maelstrom Weapon case 53817: { - // Item - Shaman T10 Enhancement 4P Bonus - if (AuraEffect const* aurEff = GetAuraEffect(70832, 0)) - if (Aura const* maelstrom = GetAura(53817)) - if ((maelstrom->GetStackAmount() == maelstrom->GetSpellInfo()->StackAmount) && roll_chance_i(aurEff->GetAmount())) - CastSpell(this, 70831, true, castItem, triggeredByAura); - - // have rank dependent proc chance, ignore too often cases + // has rank dependant proc chance, ignore too often cases // PPM = 2.5 * (rank of talent), uint32 rank = auraSpellInfo->GetRank(); // 5 rank -> 100% 4 rank -> 80% and etc from full rate if (!roll_chance_i(20*rank)) return false; + // Item - Shaman T10 Enhancement 4P Bonus + if (AuraEffect const* aurEff = GetAuraEffect(70832, 0)) + if (Aura const* maelstrom = GetAura(53817)) + if ((maelstrom->GetStackAmount() == maelstrom->GetSpellInfo()->StackAmount - 1) && roll_chance_i(aurEff->GetAmount())) + CastSpell(this, 70831, true, castItem, triggeredByAura); break; } // Astral Shift @@ -9304,7 +9244,7 @@ ReputationRank Unit::GetReactionTo(Unit const* target) const && selfPlayerOwner->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP)) return REP_HOSTILE; - // if faction have reputation then hostile state dependent only from at_war state + // if faction has reputation, hostile state depends only from AtWar state if (selfPlayerOwner->GetReputationMgr().IsAtWar(targetFactionEntry)) return REP_HOSTILE; return REP_FRIENDLY; @@ -9438,16 +9378,16 @@ bool Unit::Attack(Unit* victim, bool meleeAttack) // switch to melee attack from ranged/magic if (meleeAttack) { - if (!HasUnitState(UNIT_STAT_MELEE_ATTACKING)) + if (!HasUnitState(UNIT_STATE_MELEE_ATTACKING)) { - AddUnitState(UNIT_STAT_MELEE_ATTACKING); + AddUnitState(UNIT_STATE_MELEE_ATTACKING); SendMeleeAttackStart(victim); return true; } } - else if (HasUnitState(UNIT_STAT_MELEE_ATTACKING)) + else if (HasUnitState(UNIT_STATE_MELEE_ATTACKING)) { - ClearUnitState(UNIT_STAT_MELEE_ATTACKING); + ClearUnitState(UNIT_STATE_MELEE_ATTACKING); SendMeleeAttackStop(victim); return true; } @@ -9457,7 +9397,7 @@ bool Unit::Attack(Unit* victim, bool meleeAttack) // switch target InterruptSpell(CURRENT_MELEE_SPELL); if (!meleeAttack) - ClearUnitState(UNIT_STAT_MELEE_ATTACKING); + ClearUnitState(UNIT_STATE_MELEE_ATTACKING); } if (m_attacking) @@ -9470,7 +9410,7 @@ bool Unit::Attack(Unit* victim, bool meleeAttack) SetTarget(victim->GetGUID()); if (meleeAttack) - AddUnitState(UNIT_STAT_MELEE_ATTACKING); + AddUnitState(UNIT_STATE_MELEE_ATTACKING); // set position before any AI calls/assistance //if (GetTypeId() == TYPEID_UNIT) @@ -9511,7 +9451,7 @@ bool Unit::AttackStop() // Clear our target SetTarget(0); - ClearUnitState(UNIT_STAT_MELEE_ATTACKING); + ClearUnitState(UNIT_STATE_MELEE_ATTACKING); InterruptSpell(CURRENT_MELEE_SPELL); @@ -9554,7 +9494,7 @@ void Unit::CombatStopWithPets(bool includingCast) bool Unit::isAttackingPlayer() const { - if (HasUnitState(UNIT_STAT_ATTACK_PLAYER)) + if (HasUnitState(UNIT_STATE_ATTACK_PLAYER)) return true; for (ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr) @@ -10450,7 +10390,7 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 { if (victim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, spellProto, this)) { - // effect 0 have expected value but in negative state + // effect 0 has expected value but in negative state int32 bonus = -(*i)->GetBase()->GetEffect(0)->GetAmount(); AddPctN(DoneTotalMod, bonus); } @@ -11481,7 +11421,8 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo) return true; } - if (spellInfo->Mechanic) + // Spells that don't have effectMechanics. + if (!spellInfo->HasAnyEffectMechanic() && spellInfo->Mechanic) { SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC]; for (SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr) @@ -11489,14 +11430,19 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo) return true; } - for (int i = 0; i < MAX_SPELL_EFFECTS; ++i) + bool immuneToAllEffects = true; + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) { // State/effect immunities applied by aura expect full spell immunity // Ignore effects with mechanic, they are supposed to be checked separately - if (!spellInfo->Effects[i].Mechanic) - if (IsImmunedToSpellEffect(spellInfo, i)) - return true; + if (spellInfo->Effects[i].Mechanic || !IsImmunedToSpellEffect(spellInfo, i)) + { + immuneToAllEffects = false; + break; + } } + if (immuneToAllEffects) //Return immune only if the target is immune to all spell effects. + return true; if (spellInfo->Id != 42292 && spellInfo->Id !=59752) { @@ -11708,7 +11654,7 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT { if (victim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, spellProto, this)) { - // effect 0 have expected value but in negative state + // effect 0 has expected value but in negative state int32 bonus = -(*i)->GetBase()->GetEffect(0)->GetAmount(); AddPctN(DoneTotalMod, bonus); } @@ -11984,7 +11930,7 @@ void Unit::Dismount() { if (Pet* pPet = player->GetPet()) { - if (pPet->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED) && !pPet->HasUnitState(UNIT_STAT_STUNNED)) + if (pPet->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED) && !pPet->HasUnitState(UNIT_STATE_STUNNED)) pPet->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); } else @@ -12053,7 +11999,7 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy) if (PvP) m_CombatTimer = 5000; - if (isInCombat() || HasUnitState(UNIT_STAT_EVADE)) + if (isInCombat() || HasUnitState(UNIT_STATE_EVADE)) return; SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); @@ -12071,7 +12017,7 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy) if (IsAIEnabled) { creature->AI()->EnterCombat(enemy); - RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); // always remove Out of Combat Non Attackable flag if we enter combat and AI is enabled + RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); // unit has engaged in combat, remove immunity so players can fight back } if (creature->GetFormation()) creature->GetFormation()->MemberAttackStart(creature, enemy); @@ -12103,10 +12049,10 @@ void Unit::ClearInCombat() // Player's state will be cleared in Player::UpdateContestedPvP if (Creature* creature = ToCreature()) { - if (creature->GetCreatureInfo() && creature->GetCreatureInfo()->unit_flags & UNIT_FLAG_OOC_NOT_ATTACKABLE) - SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); // re-apply Out of Combat Non Attackable flag if we leave combat, can be overriden in scripts in EnterEvadeMode() + if (creature->GetCreatureInfo() && creature->GetCreatureInfo()->unit_flags & UNIT_FLAG_IMMUNE_TO_PC) + SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); // set immunity state to the one from db on evade - ClearUnitState(UNIT_STAT_ATTACK_PLAYER); + ClearUnitState(UNIT_STATE_ATTACK_PLAYER); if (HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED)) SetUInt32Value(UNIT_DYNAMIC_FLAGS, creature->GetCreatureInfo()->dynamicflags); @@ -12132,13 +12078,13 @@ bool Unit::isTargetableForAttack(bool checkFakeDeath) const return false; if (HasFlag(UNIT_FIELD_FLAGS, - UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE)) + UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC)) return false; if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->isGameMaster()) return false; - return !HasUnitState(UNIT_STAT_UNATTACKABLE) && (!checkFakeDeath || !HasUnitState(UNIT_STAT_DIED)); + return !HasUnitState(UNIT_STATE_UNATTACKABLE) && (!checkFakeDeath || !HasUnitState(UNIT_STATE_DIED)); } bool Unit::IsValidAttackTarget(Unit const* target) const @@ -12156,7 +12102,7 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) co return false; // can't attack unattackable units or GMs - if (target->HasUnitState(UNIT_STAT_UNATTACKABLE) + if (target->HasUnitState(UNIT_STATE_UNATTACKABLE) || (target->GetTypeId() == TYPEID_PLAYER && target->ToPlayer()->isGameMaster())) return false; @@ -12166,7 +12112,7 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) co return false; // can't attack invisible (ignore stealth for aoe spells) - if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAOE())) + if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAffectingArea())) return false; // can't attack dead @@ -12185,10 +12131,11 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) co } // check flags if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_TAXI_FLIGHT | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_UNK_16) - || (!HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE)) - || (!target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE)) - || (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) - || (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE))) + || (!HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC)) + || (!target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC)) + || (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC)) + // check if this is a world trigger cast - GOs are using world triggers to cast their spells, so we need to ignore their immunity flag here, this is a temp workaround, needs removal when go cast is implemented properly + || (GetEntry() != WORLD_TRIGGER && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC))) return false; // CvC case - can attack each other only when one of them is hostile @@ -12250,7 +12197,7 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co return true; // can't assist unattackable units or GMs - if (target->HasUnitState(UNIT_STAT_UNATTACKABLE) + if (target->HasUnitState(UNIT_STATE_UNATTACKABLE) || (target->GetTypeId() == TYPEID_PLAYER && target->ToPlayer()->isGameMaster())) return false; @@ -12260,7 +12207,7 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co return false; // can't assist invisible - if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAOE())) + if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAffectingArea())) return false; // can't assist dead @@ -12276,12 +12223,12 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co { if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE)) { - if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) + if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC)) return false; } else { - if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE)) + if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC)) return false; } } @@ -12745,11 +12692,15 @@ void Unit::setDeathState(DeathState s) ClearDiminishings(); GetMotionMaster()->Clear(false); GetMotionMaster()->MoveIdle(); - SendMonsterStop(true); + StopMoving(); // without this when removing IncreaseMaxHealth aura player may stuck with 1 hp // do not why since in IncreaseMaxHealth currenthealth is checked SetHealth(0); SetPower(getPowerType(), 0); + + // players in instance don't have ZoneScript, but they have InstanceScript + if (ZoneScript* zoneScript = GetZoneScript() ? GetZoneScript() : (ZoneScript*)GetInstanceScript()) + zoneScript->OnUnitDeath(this); } else if (s == JUST_ALIVED) RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); // clear skinnable for creature and player (at battleground) @@ -12973,7 +12924,7 @@ Unit* Creature::SelectVictim() // last case when creature must not go to evade mode: // it in combat but attacker not make any damage and not enter to aggro radius to have record in threat list // for example at owner command to pet attack some far away creature - // Note: creature not have targeted movement generator but have attacker in this case + // Note: creature does not have targeted movement generator but has attacker in this case for (AttackerSet::const_iterator itr = m_attackers.begin(); itr != m_attackers.end(); ++itr) { if ((*itr) && !canCreatureAttack(*itr) && (*itr)->GetTypeId() != TYPEID_PLAYER @@ -13359,7 +13310,7 @@ bool Unit::HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, f { if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END) { - sLog->outError("ERROR in HandleStatModifier(): non existed UnitMods or wrong UnitModifierType!"); + sLog->outError("ERROR in HandleStatModifier(): non-existing UnitMods or wrong UnitModifierType!"); return false; } @@ -13424,7 +13375,7 @@ float Unit::GetModifierValue(UnitMods unitMod, UnitModifierType modifierType) co { if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END) { - sLog->outError("trial to access non existed modifier value from UnitMods!"); + sLog->outError("attempt to access non-existing modifier value from UnitMods!"); return 0.0f; } @@ -13454,7 +13405,7 @@ float Unit::GetTotalAuraModValue(UnitMods unitMod) const { if (unitMod >= UNIT_MOD_END) { - sLog->outError("trial to access non existed UnitMods in GetTotalAuraModValue()!"); + sLog->outError("attempt to access non-existing UnitMods in GetTotalAuraModValue()!"); return 0.0f; } @@ -13562,7 +13513,7 @@ void Unit::SetHealth(uint32 val) { if (getDeathState() == JUST_DIED) val = 0; - else if (GetTypeId() == TYPEID_PLAYER && (getDeathState() == DEAD || getDeathState() == DEAD_FALLING)) + else if (GetTypeId() == TYPEID_PLAYER && getDeathState() == DEAD) val = 1; else { @@ -13683,7 +13634,7 @@ void Unit::SetMaxPower(Powers power, uint32 val) uint32 Unit::GetCreatePowers(Powers power) const { - // POWER_FOCUS and POWER_HAPPINESS only have hunter pet + // Only hunter pets have POWER_FOCUS and POWER_HAPPINESS switch (power) { case POWER_MANA: return GetCreateMana(); @@ -14111,12 +14062,12 @@ bool InitTriggerAuraData() isTriggerAura[SPELL_AURA_DUMMY] = true; isTriggerAura[SPELL_AURA_MOD_CONFUSE] = true; isTriggerAura[SPELL_AURA_MOD_THREAT] = true; - isTriggerAura[SPELL_AURA_MOD_STUN] = true; // Aura not have charges but need remove him on trigger + isTriggerAura[SPELL_AURA_MOD_STUN] = true; // Aura does not have charges but needs to be removed on trigger isTriggerAura[SPELL_AURA_MOD_DAMAGE_DONE] = true; isTriggerAura[SPELL_AURA_MOD_DAMAGE_TAKEN] = true; isTriggerAura[SPELL_AURA_MOD_RESISTANCE] = true; isTriggerAura[SPELL_AURA_MOD_STEALTH] = true; - isTriggerAura[SPELL_AURA_MOD_FEAR] = true; // Aura not have charges but need remove him on trigger + isTriggerAura[SPELL_AURA_MOD_FEAR] = true; // Aura does not have charges but needs to be removed on trigger isTriggerAura[SPELL_AURA_MOD_ROOT] = true; isTriggerAura[SPELL_AURA_TRANSFORM] = true; isTriggerAura[SPELL_AURA_REFLECT_SPELLS] = true; @@ -14677,17 +14628,15 @@ void Unit::SendPetAIReaction(uint64 guid) void Unit::StopMoving() { - ClearUnitState(UNIT_STAT_MOVING); + ClearUnitState(UNIT_STATE_MOVING); - // send explicit stop packet - // rely on vmaps here because for example stormwind is in air - //float z = sMapMgr->GetBaseMap(GetMapId())->GetHeight(GetPositionX(), GetPositionY(), GetPositionZ(), true); - //if (fabs(GetPositionZ() - z) < 2.0f) - // Relocate(GetPositionX(), GetPositionY(), z); - //Relocate(GetPositionX(), GetPositionY(), GetPositionZ()); + // not need send any packets if not in world + if (!IsInWorld()) + return; - if (!(GetUnitMovementFlags() & MOVEMENTFLAG_ONTRANSPORT)) - SendMonsterStop(); + Movement::MoveSplineInit init(*this); + init.SetFacing(GetOrientation()); + init.Launch(); } void Unit::SendMovementFlagUpdate() @@ -14854,7 +14803,7 @@ void Unit::UpdateReactives(uint32 p_time) } } -Unit* Unit::SelectNearbyTarget(float dist) const +Unit* Unit::SelectNearbyTarget(Unit* exclude, float dist) const { std::list<Unit*> targets; Trinity::AnyUnfriendlyUnitInObjectRangeCheck u_check(this, this, dist); @@ -14864,6 +14813,9 @@ Unit* Unit::SelectNearbyTarget(float dist) const // remove current target if (getVictim()) targets.remove(getVictim()); + + if (exclude) + targets.remove(exclude); // remove not LoS targets for (std::list<Unit*>::iterator tIter = targets.begin(); tIter != targets.end();) @@ -14953,7 +14905,7 @@ uint32 Unit::GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectTyp break; } - if (spellProto->Effects[i].IsArea()) + if (spellProto->Effects[i].IsTargetingArea()) AreaEffect = true; } @@ -15061,16 +15013,16 @@ void Unit::SetContestedPvP(Player* attackedPlayer) return; player->SetContestedPvPTimer(30000); - if (!player->HasUnitState(UNIT_STAT_ATTACK_PLAYER)) + if (!player->HasUnitState(UNIT_STATE_ATTACK_PLAYER)) { - player->AddUnitState(UNIT_STAT_ATTACK_PLAYER); + player->AddUnitState(UNIT_STATE_ATTACK_PLAYER); player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP); // call MoveInLineOfSight for nearby contested guards UpdateObjectVisibility(); } - if (!HasUnitState(UNIT_STAT_ATTACK_PLAYER)) + if (!HasUnitState(UNIT_STATE_ATTACK_PLAYER)) { - AddUnitState(UNIT_STAT_ATTACK_PLAYER); + AddUnitState(UNIT_STATE_ATTACK_PLAYER); // call MoveInLineOfSight for nearby contested guards UpdateObjectVisibility(); } @@ -15325,7 +15277,7 @@ bool Unit::HandleAuraRaidProcFromCharge(AuraEffect* triggeredByAura) damageSpellId = 43594; break; default: - sLog->outError("Unit::HandleAuraRaidProcFromCharge, received not handled spell: %u", spellProto->Id); + sLog->outError("Unit::HandleAuraRaidProcFromCharge, received unhandled spell: %u", spellProto->Id); return false; } @@ -15638,28 +15590,28 @@ void Unit::SetControlled(bool apply, UnitState state) AddUnitState(state); switch (state) { - case UNIT_STAT_STUNNED: + case UNIT_STATE_STUNNED: SetStunned(true); CastStop(); break; - case UNIT_STAT_ROOT: - if (!HasUnitState(UNIT_STAT_STUNNED)) + case UNIT_STATE_ROOT: + if (!HasUnitState(UNIT_STATE_STUNNED)) SetRooted(true); break; - case UNIT_STAT_CONFUSED: - if (!HasUnitState(UNIT_STAT_STUNNED)) + case UNIT_STATE_CONFUSED: + if (!HasUnitState(UNIT_STATE_STUNNED)) { - ClearUnitState(UNIT_STAT_MELEE_ATTACKING); + ClearUnitState(UNIT_STATE_MELEE_ATTACKING); SendMeleeAttackStop(); // SendAutoRepeatCancel ? SetConfused(true); CastStop(); } break; - case UNIT_STAT_FLEEING: - if (!HasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_CONFUSED)) + case UNIT_STATE_FLEEING: + if (!HasUnitState(UNIT_STATE_STUNNED | UNIT_STATE_CONFUSED)) { - ClearUnitState(UNIT_STAT_MELEE_ATTACKING); + ClearUnitState(UNIT_STATE_MELEE_ATTACKING); SendMeleeAttackStop(); // SendAutoRepeatCancel ? SetFeared(true); @@ -15674,29 +15626,29 @@ void Unit::SetControlled(bool apply, UnitState state) { switch (state) { - case UNIT_STAT_STUNNED: if (HasAuraType(SPELL_AURA_MOD_STUN)) return; + case UNIT_STATE_STUNNED: if (HasAuraType(SPELL_AURA_MOD_STUN)) return; else SetStunned(false); break; - case UNIT_STAT_ROOT: if (HasAuraType(SPELL_AURA_MOD_ROOT) || GetVehicle()) return; + case UNIT_STATE_ROOT: if (HasAuraType(SPELL_AURA_MOD_ROOT) || GetVehicle()) return; else SetRooted(false); break; - case UNIT_STAT_CONFUSED:if (HasAuraType(SPELL_AURA_MOD_CONFUSE)) return; + case UNIT_STATE_CONFUSED:if (HasAuraType(SPELL_AURA_MOD_CONFUSE)) return; else SetConfused(false); break; - case UNIT_STAT_FLEEING: if (HasAuraType(SPELL_AURA_MOD_FEAR)) return; + case UNIT_STATE_FLEEING: if (HasAuraType(SPELL_AURA_MOD_FEAR)) return; else SetFeared(false); break; default: return; } ClearUnitState(state); - if (HasUnitState(UNIT_STAT_STUNNED)) + if (HasUnitState(UNIT_STATE_STUNNED)) SetStunned(true); else { - if (HasUnitState(UNIT_STAT_ROOT)) + if (HasUnitState(UNIT_STATE_ROOT)) SetRooted(true); - if (HasUnitState(UNIT_STAT_CONFUSED)) + if (HasUnitState(UNIT_STATE_CONFUSED)) SetConfused(true); - else if (HasUnitState(UNIT_STAT_FLEEING)) + else if (HasUnitState(UNIT_STATE_FLEEING)) SetFeared(true); } } @@ -15738,7 +15690,7 @@ void Unit::SetStunned(bool apply) if (!owner || (owner->GetTypeId() == TYPEID_PLAYER && !owner->ToPlayer()->IsMounted())) RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); - if (!HasUnitState(UNIT_STAT_ROOT)) // prevent allow move if have also root effect + if (!HasUnitState(UNIT_STATE_ROOT)) // prevent moving if it also has root effect { WorldPacket data(SMSG_FORCE_MOVE_UNROOT, 8+4); data.append(GetPackGUID()); @@ -15780,7 +15732,7 @@ void Unit::SetRooted(bool apply) } else { - if (!HasUnitState(UNIT_STAT_STUNNED)) // prevent allow move if have also stun effect + if (!HasUnitState(UNIT_STATE_STUNNED)) // prevent moving if it also has stun effect { if (GetTypeId() == TYPEID_PLAYER) { @@ -15872,7 +15824,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au return false; } - //if (HasUnitState(UNIT_STAT_UNATTACKABLE)) + //if (HasUnitState(UNIT_STATE_UNATTACKABLE)) // return false; if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->GetTransport()) @@ -15960,14 +15912,16 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au case CHARM_TYPE_VEHICLE: SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED); charmer->ToPlayer()->SetClientControl(this, 1); + charmer->ToPlayer()->SetMover(this); charmer->ToPlayer()->SetViewpoint(this, true); charmer->ToPlayer()->VehicleSpellInitialize(); break; case CHARM_TYPE_POSSESS: - AddUnitState(UNIT_STAT_POSSESSED); + AddUnitState(UNIT_STATE_POSSESSED); SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED); charmer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); charmer->ToPlayer()->SetClientControl(this, 1); + charmer->ToPlayer()->SetMover(this); charmer->ToPlayer()->SetViewpoint(this, true); charmer->ToPlayer()->PossessSpellInitialize(); break; @@ -16014,7 +15968,7 @@ void Unit::RemoveCharmedBy(Unit* charmer) } CharmType type; - if (HasUnitState(UNIT_STAT_POSSESSED)) + if (HasUnitState(UNIT_STATE_POSSESSED)) type = CHARM_TYPE_POSSESS; else if (charmer && charmer->IsOnVehicle(this)) type = CHARM_TYPE_VEHICLE; @@ -16032,7 +15986,7 @@ void Unit::RemoveCharmedBy(Unit* charmer) if (type == CHARM_TYPE_POSSESS) { - ClearUnitState(UNIT_STAT_POSSESSED); + ClearUnitState(UNIT_STATE_POSSESSED); RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED); } @@ -16258,7 +16212,7 @@ void Unit::GetRaidMember(std::list<Unit*> &nearMembers, float radius) if (owner->isAlive() && (owner == this || IsWithinDistInMap(owner, radius))) nearMembers.push_back(owner); if (Guardian* pet = owner->GetGuardianPet()) - if (pet->isAlive() && (pet == this && IsWithinDistInMap(pet, radius))) + if (pet->isAlive() && (pet == this || IsWithinDistInMap(pet, radius))) nearMembers.push_back(pet); } } @@ -16295,7 +16249,7 @@ void Unit::GetPartyMemberInDist(std::list<Unit*> &TagUnitMap, float radius) if (owner->isAlive() && (owner == this || IsWithinDistInMap(owner, radius))) TagUnitMap.push_back(owner); if (Guardian* pet = owner->GetGuardianPet()) - if (pet->isAlive() && (pet == this && IsWithinDistInMap(pet, radius))) + if (pet->isAlive() && (pet == this || IsWithinDistInMap(pet, radius))) TagUnitMap.push_back(pet); } } @@ -17063,11 +17017,15 @@ void Unit::_ExitVehicle(Position const* exitPosition) m_vehicle->RemovePassenger(this); + // If player is on mouted duel and exits the mount should immediatly lose the duel + if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->duel && ToPlayer()->duel->isMounted) + ToPlayer()->DuelComplete(DUEL_FLED); + // This should be done before dismiss, because there may be some aura removal Vehicle* vehicle = m_vehicle; m_vehicle = NULL; - SetControlled(false, UNIT_STAT_ROOT); // SMSG_MOVE_FORCE_UNROOT, ~MOVEMENTFLAG_ROOT + SetControlled(false, UNIT_STATE_ROOT); // SMSG_MOVE_FORCE_UNROOT, ~MOVEMENTFLAG_ROOT Position pos; if (!exitPosition) // Exit position not specified @@ -17075,7 +17033,7 @@ void Unit::_ExitVehicle(Position const* exitPosition) else pos = *exitPosition; - AddUnitState(UNIT_STAT_MOVE); + AddUnitState(UNIT_STATE_MOVE); if (GetTypeId() == TYPEID_PLAYER) ToPlayer()->SetFallInformation(0, GetPositionZ()); @@ -17092,9 +17050,7 @@ void Unit::_ExitVehicle(Position const* exitPosition) if (Player* player = ToPlayer()) player->ResummonPetTemporaryUnSummonedIfAny(); - WorldPacket data2; - BuildHeartBeatMsg(&data2); - SendMessageToSet(&data2, false); + SendMovementFlagUpdate(); if (vehicle->GetBase()->HasUnitTypeMask(UNIT_MASK_MINION)) if (((Minion*)vehicle->GetBase())->GetOwner() == this) @@ -17113,25 +17069,6 @@ void Unit::_ExitVehicle(Position const* exitPosition) void Unit::BuildMovementPacket(ByteBuffer *data) const { - switch (GetTypeId()) - { - case TYPEID_UNIT: - if (canFly()) - const_cast<Unit*>(this)->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); - break; - case TYPEID_PLAYER: - // remove unknown, unused etc flags for now - const_cast<Unit*>(this)->RemoveUnitMovementFlag(MOVEMENTFLAG_SPLINE_ENABLED); - if (isInFlight()) - { - WPAssert(const_cast<Unit*>(this)->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE); - const_cast<Unit*>(this)->AddUnitMovementFlag(MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_SPLINE_ENABLED); - } - break; - default: - break; - } - *data << uint32(GetUnitMovementFlags()); // movement flags *data << uint16(m_movementInfo.flags2); // 2.3.0 *data << uint32(getMSTime()); // time @@ -17195,13 +17132,13 @@ void Unit::SetFlying(bool apply) void Unit::NearTeleportTo(float x, float y, float z, float orientation, bool casting /*= false*/) { + DisableSpline(); if (GetTypeId() == TYPEID_PLAYER) ToPlayer()->TeleportTo(GetMapId(), x, y, z, orientation, TELE_TO_NOT_LEAVE_TRANSPORT | TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (casting ? TELE_TO_SPELL : 0)); else { - // FIXME: this interrupts spell visual - DestroyForNearbyPlayers(); UpdatePosition(x, y, z, orientation, true); + SendMovementFlagUpdate(); } } @@ -17483,3 +17420,26 @@ bool CharmInfo::IsReturning() { return m_isReturning; } + +void Unit::SetInFront(Unit const* target) +{ + if (!HasUnitState(UNIT_STATE_CANNOT_TURN)) + SetOrientation(GetAngle(target)); +} + +void Unit::SetFacingTo(float ori) +{ + Movement::MoveSplineInit init(*this); + init.SetFacing(ori); + init.Launch(); +} + +void Unit::SetFacingToObject(WorldObject* pObject) +{ + // never face when already moving + if (!IsStopped()) + return; + + // TODO: figure out under what conditions creature will move towards object instead of facing it where it currently is. + SetFacingTo(GetAngle(pObject)); +} diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index b18223ae3ce..423f83844d3 100755 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -465,42 +465,50 @@ enum DeathState CORPSE = 2, DEAD = 3, JUST_ALIVED = 4, - DEAD_FALLING= 5 }; enum UnitState { - UNIT_STAT_DIED = 0x00000001, // player has fake death aura - UNIT_STAT_MELEE_ATTACKING = 0x00000002, // player is melee attacking someone - //UNIT_STAT_MELEE_ATTACK_BY = 0x00000004, // player is melee attack by someone - UNIT_STAT_STUNNED = 0x00000008, - UNIT_STAT_ROAMING = 0x00000010, - UNIT_STAT_CHASE = 0x00000020, - //UNIT_STAT_SEARCHING = 0x00000040, - UNIT_STAT_FLEEING = 0x00000080, - UNIT_STAT_IN_FLIGHT = 0x00000100, // player is in flight mode - UNIT_STAT_FOLLOW = 0x00000200, - UNIT_STAT_ROOT = 0x00000400, - UNIT_STAT_CONFUSED = 0x00000800, - UNIT_STAT_DISTRACTED = 0x00001000, - UNIT_STAT_ISOLATED = 0x00002000, // area auras do not affect other players - UNIT_STAT_ATTACK_PLAYER = 0x00004000, - UNIT_STAT_CASTING = 0x00008000, - UNIT_STAT_POSSESSED = 0x00010000, - UNIT_STAT_CHARGING = 0x00020000, - UNIT_STAT_JUMPING = 0x00040000, - UNIT_STAT_ONVEHICLE = 0x00080000, - UNIT_STAT_MOVE = 0x00100000, - UNIT_STAT_ROTATING = 0x00200000, - UNIT_STAT_EVADE = 0x00400000, - UNIT_STAT_UNATTACKABLE = (UNIT_STAT_IN_FLIGHT | UNIT_STAT_ONVEHICLE), - UNIT_STAT_MOVING = (UNIT_STAT_ROAMING | UNIT_STAT_CHASE), - UNIT_STAT_CONTROLLED = (UNIT_STAT_CONFUSED | UNIT_STAT_STUNNED | UNIT_STAT_FLEEING), - UNIT_STAT_LOST_CONTROL = (UNIT_STAT_CONTROLLED | UNIT_STAT_JUMPING | UNIT_STAT_CHARGING), - UNIT_STAT_SIGHTLESS = (UNIT_STAT_LOST_CONTROL | UNIT_STAT_EVADE), - UNIT_STAT_CANNOT_AUTOATTACK = (UNIT_STAT_LOST_CONTROL | UNIT_STAT_CASTING), - UNIT_STAT_CANNOT_TURN = (UNIT_STAT_LOST_CONTROL | UNIT_STAT_ROTATING), - UNIT_STAT_ALL_STATE = 0xffffffff //(UNIT_STAT_STOPPED | UNIT_STAT_MOVING | UNIT_STAT_IN_COMBAT | UNIT_STAT_IN_FLIGHT) + UNIT_STATE_DIED = 0x00000001, // player has fake death aura + UNIT_STATE_MELEE_ATTACKING = 0x00000002, // player is melee attacking someone + //UNIT_STATE_MELEE_ATTACK_BY = 0x00000004, // player is melee attack by someone + UNIT_STATE_STUNNED = 0x00000008, + UNIT_STATE_ROAMING = 0x00000010, + UNIT_STATE_CHASE = 0x00000020, + //UNIT_STATE_SEARCHING = 0x00000040, + UNIT_STATE_FLEEING = 0x00000080, + UNIT_STATE_IN_FLIGHT = 0x00000100, // player is in flight mode + UNIT_STATE_FOLLOW = 0x00000200, + UNIT_STATE_ROOT = 0x00000400, + UNIT_STATE_CONFUSED = 0x00000800, + UNIT_STATE_DISTRACTED = 0x00001000, + UNIT_STATE_ISOLATED = 0x00002000, // area auras do not affect other players + UNIT_STATE_ATTACK_PLAYER = 0x00004000, + UNIT_STATE_CASTING = 0x00008000, + UNIT_STATE_POSSESSED = 0x00010000, + UNIT_STATE_CHARGING = 0x00020000, + UNIT_STATE_JUMPING = 0x00040000, + UNIT_STATE_ONVEHICLE = 0x00080000, + UNIT_STATE_MOVE = 0x00100000, + UNIT_STATE_ROTATING = 0x00200000, + UNIT_STATE_EVADE = 0x00400000, + UNIT_STATE_ROAMING_MOVE = 0x00800000, + UNIT_STATE_CONFUSED_MOVE = 0x01000000, + UNIT_STATE_FLEEING_MOVE = 0x02000000, + UNIT_STATE_CHASE_MOVE = 0x04000000, + UNIT_STATE_FOLLOW_MOVE = 0x08000000, + UNIT_STATE_UNATTACKABLE = (UNIT_STATE_IN_FLIGHT | UNIT_STATE_ONVEHICLE), + //UNIT_STATE_MOVING = (UNIT_STATE_ROAMING | UNIT_STATE_CHASE), + // for real move using movegen check and stop (except unstoppable flight) + UNIT_STATE_MOVING = UNIT_STATE_ROAMING_MOVE | UNIT_STATE_CONFUSED_MOVE | UNIT_STATE_FLEEING_MOVE| UNIT_STATE_CHASE_MOVE | UNIT_STATE_FOLLOW_MOVE , + UNIT_STATE_CONTROLLED = (UNIT_STATE_CONFUSED | UNIT_STATE_STUNNED | UNIT_STATE_FLEEING), + UNIT_STATE_LOST_CONTROL = (UNIT_STATE_CONTROLLED | UNIT_STATE_JUMPING | UNIT_STATE_CHARGING), + UNIT_STATE_SIGHTLESS = (UNIT_STATE_LOST_CONTROL | UNIT_STATE_EVADE), + UNIT_STATE_CANNOT_AUTOATTACK = (UNIT_STATE_LOST_CONTROL | UNIT_STATE_CASTING), + UNIT_STATE_CANNOT_TURN = (UNIT_STATE_LOST_CONTROL | UNIT_STATE_ROTATING), + // stay by different reasons + UNIT_STATE_NOT_MOVE = UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DIED | UNIT_STATE_DISTRACTED, + UNIT_STATE_ALL_STATE = 0xffffffff //(UNIT_STATE_STOPPED | UNIT_STATE_MOVING | UNIT_STATE_IN_COMBAT | UNIT_STATE_IN_FLIGHT) }; enum UnitMoveType @@ -581,8 +589,8 @@ enum UnitFlags UNIT_FLAG_PREPARATION = 0x00000020, // don't take reagents for spells with SPELL_ATTR5_NO_REAGENT_WHILE_PREP UNIT_FLAG_UNK_6 = 0x00000040, UNIT_FLAG_NOT_ATTACKABLE_1 = 0x00000080, // ?? (UNIT_FLAG_PVP_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1) is NON_PVP_ATTACKABLE - UNIT_FLAG_OOC_NOT_ATTACKABLE = 0x00000100, // 2.0.8 - (OOC Out Of Combat) Can not be attacked when not in combat. Removed if unit for some reason enter combat. - UNIT_FLAG_PASSIVE = 0x00000200, // makes you unable to attack everything. Almost identical to our "civilian"-term. Will ignore it's surroundings and not engage in combat unless "called upon" or engaged by another unit. + UNIT_FLAG_IMMUNE_TO_PC = 0x00000100, // disables combat/assistance with PlayerCharacters (PC) - see Unit::_IsValidAttackTarget, Unit::_IsValidAssistTarget + UNIT_FLAG_IMMUNE_TO_NPC = 0x00000200, // disables combat/assistance with NonPlayerCharacters (NPC) - see Unit::_IsValidAttackTarget, Unit::_IsValidAssistTarget UNIT_FLAG_LOOTING = 0x00000400, // loot animation UNIT_FLAG_PET_IN_COMBAT = 0x00000800, // in combat?, 2.0.8 UNIT_FLAG_PVP = 0x00001000, // changed in 3.0.3 @@ -719,59 +727,18 @@ enum MovementFlags2 MOVEMENTFLAG2_UNK15 = 0x00004000, MOVEMENTFLAG2_UNK16 = 0x00008000, }; + enum SplineFlags { - SPLINEFLAG_NONE = 0x00000000, - SPLINEFLAG_FORWARD = 0x00000001, - SPLINEFLAG_BACKWARD = 0x00000002, - SPLINEFLAG_STRAFE_LEFT = 0x00000004, - SPLINEFLAG_STRAFE_RIGHT = 0x00000008, - SPLINEFLAG_LEFT = 0x00000010, - SPLINEFLAG_RIGHT = 0x00000020, - SPLINEFLAG_PITCH_UP = 0x00000040, - SPLINEFLAG_PITCH_DOWN = 0x00000080, - SPLINEFLAG_DONE = 0x00000100, - SPLINEFLAG_FALLING = 0x00000200, - SPLINEFLAG_NO_SPLINE = 0x00000400, - SPLINEFLAG_TRAJECTORY = 0x00000800, - SPLINEFLAG_WALKING = 0x00001000, - SPLINEFLAG_FLYING = 0x00002000, - SPLINEFLAG_KNOCKBACK = 0x00004000, - SPLINEFLAG_FINAL_POINT = 0x00008000, - SPLINEFLAG_FINAL_TARGET = 0x00010000, - SPLINEFLAG_FINAL_FACING = 0x00020000, - SPLINEFLAG_CATMULL_ROM = 0x00040000, - SPLINEFLAG_UNKNOWN20 = 0x00080000, - SPLINEFLAG_UNKNOWN21 = 0x00100000, - SPLINEFLAG_ANIMATIONTIER = 0x00200000, - SPLINEFLAG_UNKNOWN23 = 0x00400000, - SPLINEFLAG_TRANSPORT = 0x00800000, - SPLINEFLAG_EXIT_VEHICLE = 0x01000000, - SPLINEFLAG_UNKNOWN26 = 0x02000000, - SPLINEFLAG_UNKNOWN27 = 0x04000000, - SPLINEFLAG_UNKNOWN28 = 0x08000000, - SPLINEFLAG_UNKNOWN29 = 0x10000000, - SPLINEFLAG_ANIMATION = 0x20000000, - SPLINEFLAG_UNKNOWN31 = 0x40000000, - SPLINEFLAG_UNKNOWN32 = 0x80000000, - - SPLINEFLAG_GLIDE = SPLINEFLAG_WALKING | SPLINEFLAG_FLYING, -}; - -enum SplineMode -{ - SPLINEMODE_LINEAR = 0, - SPLINEMODE_CATMULL_ROM = 1, - SPLINEMODE_BEZIER3 = 2 + SPLINEFLAG_WALKMODE = 0x00001000, + SPLINEFLAG_FLYING = 0x00002000, + SPLINEFLAG_TRANSPORT = 0x00800000, + SPLINEFLAG_EXIT_VEHICLE = 0x01000000, }; enum SplineType { - SPLINETYPE_NORMAL = 0, - SPLINETYPE_STOP = 1, - SPLINETYPE_FACING_SPOT = 2, - SPLINETYPE_FACING_TARGET = 3, - SPLINETYPE_FACING_ANGLE = 4 + SPLINETYPE_FACING_ANGLE = 4, }; enum UnitTypeMask @@ -789,6 +756,10 @@ enum UnitTypeMask UNIT_MASK_ACCESSORY = 0x00000200, }; +namespace Movement{ + class MoveSpline; +} + enum DiminishingLevels { DIMINISHING_LEVEL_1 = 0, @@ -817,6 +788,25 @@ enum MeleeHitOutcome MELEE_HIT_GLANCING, MELEE_HIT_CRIT, MELEE_HIT_CRUSHING, MELEE_HIT_NORMAL }; +class DispelInfo +{ +private: + Unit* const m_dispeller; + uint32 const m_dispellerSpellId; + uint8 m_chargesRemoved; +public: + explicit DispelInfo(Unit* _dispeller, uint32 _dispellerSpellId, uint8 _chargesRemoved) : + m_dispeller(_dispeller), m_dispellerSpellId(_dispellerSpellId), m_chargesRemoved(_chargesRemoved) {} + + Unit* GetDispeller() { return m_dispeller; } + uint32 GetDispellerSpellId() { return m_dispellerSpellId; } + uint8 GetRemovedCharges() { return m_chargesRemoved; } + void SetRemovedCharges(uint8 amount) + { + m_chargesRemoved = amount; + } +}; + struct CleanDamage { CleanDamage(uint32 mitigated, uint32 absorbed, WeaponAttackType _attackType, MeleeHitOutcome _hitOutCome) : @@ -1309,7 +1299,7 @@ class Unit : public WorldObject void CombatStop(bool includingCast = false); void CombatStopWithPets(bool includingCast = false); void StopAttackFaction(uint32 faction_id); - Unit* SelectNearbyTarget(float dist = NOMINAL_MELEE_RANGE) const; + Unit* SelectNearbyTarget(Unit* exclude = NULL, float dist = NOMINAL_MELEE_RANGE) const; void SendMeleeAttackStop(Unit* victim = NULL); void SendMeleeAttackStart(Unit* pVictim); @@ -1318,8 +1308,8 @@ class Unit : public WorldObject void ClearUnitState(uint32 f) { m_state &= ~f; } bool CanFreeMove() const { - return !HasUnitState(UNIT_STAT_CONFUSED | UNIT_STAT_FLEEING | UNIT_STAT_IN_FLIGHT | - UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED) && GetOwnerGUID() == 0; + return !HasUnitState(UNIT_STATE_CONFUSED | UNIT_STATE_FLEEING | UNIT_STATE_IN_FLIGHT | + UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DISTRACTED) && GetOwnerGUID() == 0; } uint32 HasUnitTypeMask(uint32 mask) const { return mask & m_unitTypeMask; } @@ -1554,7 +1544,7 @@ class Unit : public WorldObject } bool isSpiritService() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITHEALER | UNIT_NPC_FLAG_SPIRITGUIDE); } - bool isInFlight() const { return HasUnitState(UNIT_STAT_IN_FLIGHT); } + bool isInFlight() const { return HasUnitState(UNIT_STATE_IN_FLIGHT); } bool isInCombat() const { return HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); } void CombatStart(Unit* target, bool initialAggro = true); @@ -1565,6 +1555,8 @@ class Unit : public WorldObject bool HasAuraTypeWithFamilyFlags(AuraType auraType, uint32 familyName, uint32 familyFlags) const; bool virtual HasSpell(uint32 /*spellID*/) const { return false; } + bool HasBreakableByDamageAuraType(AuraType type, uint32 excludeAura = 0) const; + bool HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel = NULL) const; bool HasStealthAura() const { return HasAuraType(SPELL_AURA_MOD_STEALTH); } bool HasInvisibilityAura() const { return HasAuraType(SPELL_AURA_MOD_INVISIBILITY); } @@ -1628,20 +1620,18 @@ class Unit : public WorldObject void JumpTo(float speedXY, float speedZ, bool forward = true); void JumpTo(WorldObject* obj, float speedZ); - void SetFacing(float ori, WorldObject* obj = NULL); - void SendMonsterStop(bool on_death = false); - void SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 Time, Player* player = NULL); - void SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 MoveFlags, uint32 time, float speedZ, Player* player = NULL); - void SendMonsterMove(MonsterMoveData const& moveData, Player* receiver = NULL); + void MonsterMoveWithSpeed(float x, float y, float z, float speed); + //void SetFacing(float ori, WorldObject* obj = NULL); void SendMonsterMoveExitVehicle(Position const* newPos); //void SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 type, uint32 MovementFlags, uint32 Time, Player* player = NULL); void SendMonsterMoveTransport(Unit* vehicleOwner); - void SendMonsterMoveWithSpeed(float x, float y, float z, uint32 transitTime = 0, Player* player = NULL); - void SendMonsterMoveWithSpeedToCurrentDestination(Player* player = NULL); void SendMovementFlagUpdate(); + bool IsLevitating() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_LEVITATING);} + bool IsWalking() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_WALKING);} - template<typename PathElem, typename PathNode> - void SendMonsterMoveByPath(Path<PathElem, PathNode> const& path, uint32 start, uint32 end); + void SetInFront(Unit const* target); + void SetFacingTo(float ori); + void SetFacingToObject(WorldObject* pObject); void SendChangeCurrentVictimOpcode(HostileReference* pHostileReference); void SendClearThreatListOpcode(); @@ -1713,8 +1703,8 @@ class Unit : public WorldObject void RemoveAllControlled(); bool isCharmed() const { return GetCharmerGUID() != 0; } - bool isPossessed() const { return HasUnitState(UNIT_STAT_POSSESSED); } - bool isPossessedByPlayer() const { return HasUnitState(UNIT_STAT_POSSESSED) && IS_PLAYER_GUID(GetCharmerGUID()); } + bool isPossessed() const { return HasUnitState(UNIT_STATE_POSSESSED); } + bool isPossessedByPlayer() const { return HasUnitState(UNIT_STATE_POSSESSED) && IS_PLAYER_GUID(GetCharmerGUID()); } bool isPossessing() const { if (Unit* u = GetCharm()) @@ -1775,7 +1765,7 @@ class Unit : public WorldObject void RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID = 0, uint8 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); void RemoveAuraFromStack(uint32 spellId, uint64 casterGUID = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); - void RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit* dispeller, uint8 chargesRemoved = 1); + void RemoveAurasDueToSpellByDispel(uint32 spellId, uint32 dispellerSpellId, uint64 casterGUID, Unit* dispeller, uint8 chargesRemoved = 1); void RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit* stealer); void RemoveAurasDueToItemSpell(Item* castItem, uint32 spellId); void RemoveAurasByType(AuraType auraType, uint64 casterGUID = 0, Aura* except = NULL, bool negative = true, bool positive = true); @@ -1951,13 +1941,7 @@ class Unit : public WorldObject void SetBaseWeaponDamage(WeaponAttackType attType, WeaponDamageRange damageRange, float value) { m_weaponDamage[attType][damageRange] = value; } bool isInFrontInMap(Unit const* target, float distance, float arc = M_PI) const; - void SetInFront(Unit const* target) - { - if (!HasUnitState(UNIT_STAT_CANNOT_TURN)) - SetOrientation(GetAngle(target)); - } bool isInBackInMap(Unit const* target, float distance, float arc = M_PI) const; - void SetFacingToObject(WorldObject* pObject); // Visibility system bool IsVisible() const { return (m_serverSideVisibility.GetValue(SERVERSIDE_VISIBILITY_GM) > SEC_PLAYER) ? false : true; } @@ -2085,7 +2069,7 @@ class Unit : public WorldObject MotionMaster* GetMotionMaster() { return &i_motionMaster; } const MotionMaster* GetMotionMaster() const { return &i_motionMaster; } - bool IsStopped() const { return !(HasUnitState(UNIT_STAT_MOVING)); } + bool IsStopped() const { return !(HasUnitState(UNIT_STATE_MOVING)); } void StopMoving(); void AddUnitMovementFlag(uint32 f) { m_movementInfo.flags |= f; } @@ -2232,6 +2216,9 @@ class Unit : public WorldObject SetUInt64Value(UNIT_FIELD_TARGET, 0); } + // Movement info + Movement::MoveSpline * movespline; + protected: explicit Unit (bool isWorldObject); @@ -2303,6 +2290,8 @@ class Unit : public WorldObject bool IsAlwaysVisibleFor(WorldObject const* seer) const; bool IsAlwaysDetectableFor(WorldObject const* seer) const; + + void DisableSpline(); private: bool IsTriggeredAtSpellProcEvent(Unit* pVictim, Aura* aura, SpellInfo const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const* & spellProcEvent); bool HandleDummyAuraProc(Unit* pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); @@ -2316,6 +2305,8 @@ class Unit : public WorldObject bool HandleAuraRaidProcFromChargeWithValue(AuraEffect* triggeredByAura); bool HandleAuraRaidProcFromCharge(AuraEffect* triggeredByAura); + void UpdateSplineMovement(uint32 t_diff); + // player or player's pet float GetCombatRatingReduction(CombatRating cr) const; uint32 GetCombatRatingDamageReduction(CombatRating cr, float rate, float cap, uint32 damage) const; @@ -2330,6 +2321,7 @@ class Unit : public WorldObject uint32 m_state; // Even derived shouldn't modify uint32 m_CombatTimer; uint32 m_lastManaUse; // msecs + TimeTrackerSmall m_movesplineTimer; Diminishing m_Diminishing; // Manage all Units that are threatened by us @@ -2382,31 +2374,4 @@ namespace Trinity const bool m_ascending; }; } - -template<typename Elem, typename Node> -inline void Unit::SendMonsterMoveByPath(Path<Elem, Node> const& path, uint32 start, uint32 end) -{ - uint32 traveltime = uint32(path.GetTotalLength(start, end) * 32); - uint32 pathSize = end - start; - WorldPacket data(SMSG_MONSTER_MOVE, (GetPackGUID().size()+1+4+4+4+4+1+4+4+4+pathSize*4*3)); - data.append(GetPackGUID()); - data << uint8(0); - data << GetPositionX(); - data << GetPositionY(); - data << GetPositionZ(); - data << uint32(getMSTime()); - data << uint8(0); - data << uint32(((GetUnitMovementFlags() & MOVEMENTFLAG_LEVITATING) || isInFlight()) ? (SPLINEFLAG_FLYING|SPLINEFLAG_WALKING) : SPLINEFLAG_WALKING); - data << uint32(traveltime); - data << uint32(pathSize); - - for (uint32 i = start; i < end; ++i) - { - data << float(path[i].x); - data << float(path[i].y); - data << float(path[i].z); - } - - SendMessageToSet(&data, true); -} #endif diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index d3c3268e9ce..fc6c6cb063e 100755 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -176,7 +176,7 @@ void Vehicle::ApplyAllImmunities() case 160: // Strand of the Ancients case 244: // Wintergrasp case 510: // Isle of Conquest - _me->SetControlled(true, UNIT_STAT_ROOT); + _me->SetControlled(true, UNIT_STATE_ROOT); // why we need to apply this? we can simple add immunities to slow mechanic in DB _me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_DECREASE_SPEED, true); break; @@ -342,7 +342,7 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId) } if (seat->second.SeatInfo->m_flags && !(seat->second.SeatInfo->m_flags & VEHICLE_SEAT_FLAG_UNK1)) - unit->AddUnitState(UNIT_STAT_ONVEHICLE); + unit->AddUnitState(UNIT_STATE_ONVEHICLE); unit->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); VehicleSeatEntry const* veSeat = seat->second.SeatInfo; @@ -364,7 +364,7 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId) if (_me->IsInWorld()) { unit->SendClearTarget(); // SMSG_BREAK_TARGET - unit->SetControlled(true, UNIT_STAT_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_SPLINE_MOVE_ROOT here (for creatures) + unit->SetControlled(true, UNIT_STATE_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_SPLINE_MOVE_ROOT here (for creatures) // also adds MOVEMENTFLAG_ROOT unit->SendMonsterMoveTransport(_me); // SMSG_MONSTER_MOVE_TRANSPORT @@ -407,7 +407,7 @@ void Vehicle::RemovePassenger(Unit* unit) ++_usableSeatNum; } - unit->ClearUnitState(UNIT_STAT_ONVEHICLE); + unit->ClearUnitState(UNIT_STATE_ONVEHICLE); if (_me->GetTypeId() == TYPEID_UNIT && unit->GetTypeId() == TYPEID_PLAYER && seat->first == 0 && seat->second.SeatInfo->m_flags & VEHICLE_SEAT_FLAG_CAN_CONTROL) _me->RemoveCharmedBy(unit); diff --git a/src/server/game/Entities/Vehicle/Vehicle.h b/src/server/game/Entities/Vehicle/Vehicle.h index 51ad500572b..213be5a21fe 100755 --- a/src/server/game/Entities/Vehicle/Vehicle.h +++ b/src/server/game/Entities/Vehicle/Vehicle.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Vehicle/VehicleDefines.h b/src/server/game/Entities/Vehicle/VehicleDefines.h index 4d46ce956de..2b1d27243a8 100644 --- a/src/server/game/Entities/Vehicle/VehicleDefines.h +++ b/src/server/game/Entities/Vehicle/VehicleDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index 5cb130b93e4..6f5dc0e511e 100755 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -759,6 +759,50 @@ void GameEventMgr::LoadFromDB() } } + sLog->outString("Loading Game Event Seasonal Quest Relations..."); + { + uint32 oldMSTime = getMSTime(); + + // 0 1 + QueryResult result = WorldDatabase.Query("SELECT questId, eventEntry FROM game_event_seasonal_questrelation"); + + if (!result) + { + sLog->outString(">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty."); + sLog->outString(); + } + else + { + uint32 count = 0; + do + { + Field* fields = result->Fetch(); + + uint32 questId = fields[0].GetUInt32(); + uint16 eventEntry = fields[1].GetUInt16(); + + if (!sObjectMgr->GetQuestTemplate(questId)) + { + sLog->outErrorDb("`game_event_seasonal_questrelation` quest id (%u) does not exist in `quest_template`", questId); + continue; + } + + if (eventEntry >= mGameEvent.size()) + { + sLog->outErrorDb("`game_event_seasonal_questrelation` event id (%u) is out of range compared to max event in `game_event`", eventEntry); + continue; + } + + _questToEventLinks[questId] = eventEntry; + ++count; + } + while (result->NextRow()); + + sLog->outString(">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); + } + } + sLog->outString("Loading Game Event Vendor Additions Data..."); { uint32 oldMSTime = getMSTime(); @@ -1079,6 +1123,8 @@ void GameEventMgr::UnApplyEvent(uint16 event_id) UpdateEventNPCVendor(event_id, false); // update bg holiday UpdateBattlegroundSettings(); + // check for seasonal quest reset. + sWorld->ResetEventSeasonalQuests(event_id); } void GameEventMgr::ApplyNewEvent(uint16 event_id) @@ -1544,7 +1590,7 @@ void GameEventMgr::HandleQuestComplete(uint32 quest_id) stmt->setUInt32(1, condition); trans->Append(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GAME_EVENT_CONDITION_SAVE); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GAME_EVENT_CONDITION_SAVE); stmt->setUInt8(0, uint8(event_id)); stmt->setUInt32(1, condition); stmt->setFloat(2, citr->second.done); @@ -1588,7 +1634,7 @@ void GameEventMgr::SaveWorldEventStateToDB(uint16 event_id) stmt->setUInt8(0, uint8(event_id)); trans->Append(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GAME_EVENT_SAVE); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GAME_EVENT_SAVE); stmt->setUInt8(0, uint8(event_id)); stmt->setUInt8(1, mGameEvent[event_id].state); stmt->setUInt32(2, mGameEvent[event_id].nextstart ? uint32(mGameEvent[event_id].nextstart) : 0); @@ -1628,6 +1674,18 @@ void GameEventMgr::RunSmartAIScripts(uint16 event_id, bool activate) } } +uint16 GameEventMgr::GetEventIdForQuest(Quest const* quest) const +{ + if (!quest) + return 0; + + UNORDERED_MAP<uint32, uint16>::const_iterator itr = _questToEventLinks.find(quest->GetQuestId()); + if (itr == _questToEventLinks.end()) + return 0; + + return itr->second; +} + bool IsHolidayActive(HolidayIds id) { if (id == HOLIDAY_NONE) @@ -1643,7 +1701,7 @@ bool IsHolidayActive(HolidayIds id) return false; } - bool IsEventActive(uint16 event_id) +bool IsEventActive(uint16 event_id) { GameEventMgr::ActiveEvents const& ae = sGameEventMgr->GetActiveEventList(); return ae.find(event_id) != ae.end(); diff --git a/src/server/game/Events/GameEventMgr.h b/src/server/game/Events/GameEventMgr.h index bba92b4d24c..d9b5890bfe5 100755 --- a/src/server/game/Events/GameEventMgr.h +++ b/src/server/game/Events/GameEventMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -89,6 +89,7 @@ struct NPCVendorEntry class Player; class Creature; +class Quest; class GameEventMgr { @@ -118,6 +119,7 @@ class GameEventMgr void HandleWorldEventGossip(Player* player, Creature* c); uint32 GetNPCFlag(Creature* cr); uint32 GetNpcTextId(uint32 guid); + uint16 GetEventIdForQuest(Quest const* quest) const; private: void SendWorldStateUpdate(Player* player, uint16 event_id); void AddActiveEvent(uint16 event_id) { m_ActiveEvents.insert(event_id); } @@ -169,6 +171,7 @@ class GameEventMgr QuestIdToEventConditionMap mQuestToEventConditions; GameEventNPCFlagMap mGameEventNPCFlags; ActiveEvents m_ActiveEvents; + UNORDERED_MAP<uint32, uint16> _questToEventLinks; bool isSystemInit; public: GameEventGuidMap mGameEventCreatureGuids; diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp index 8b545548946..1a069a27825 100755 --- a/src/server/game/Globals/ObjectAccessor.cpp +++ b/src/server/game/Globals/ObjectAccessor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h index 92c947eb86f..92a7a24571e 100755 --- a/src/server/game/Globals/ObjectAccessor.h +++ b/src/server/game/Globals/ObjectAccessor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 5353e048066..dc78489070e 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -1400,7 +1400,7 @@ bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow) uint64 linkedGuid = MAKE_NEW_GUID(linkedGuidLow, slave->id, HIGHGUID_UNIT); mLinkedRespawnMap[guid] = linkedGuid; - PreparedStatement *stmt = WorldDatabase.GetPreparedStatement(WORLD_REP_CRELINKED_RESPAWN); + PreparedStatement *stmt = WorldDatabase.GetPreparedStatement(WORLD_REP_CREATURE_LINKED_RESPAWN); stmt->setUInt32(0, guidLow); stmt->setUInt32(1, linkedGuidLow); WorldDatabase.Execute(stmt); @@ -1900,7 +1900,7 @@ void ObjectMgr::LoadCreatureRespawnTimes() uint32 count = 0; - PreparedQueryResult result = CharacterDatabase.Query(CharacterDatabase.GetPreparedStatement(CHAR_LOAD_CREATURE_RESPAWNS)); + PreparedQueryResult result = CharacterDatabase.Query(CharacterDatabase.GetPreparedStatement(CHAR_SEL_CREATURE_RESPAWNS)); if (!result) { sLog->outString(">> Loaded 0 creature respawn time."); @@ -1934,7 +1934,7 @@ void ObjectMgr::LoadGameobjectRespawnTimes() uint32 count = 0; - PreparedQueryResult result = CharacterDatabase.Query(CharacterDatabase.GetPreparedStatement(CHAR_LOAD_GO_RESPAWNS)); + PreparedQueryResult result = CharacterDatabase.Query(CharacterDatabase.GetPreparedStatement(CHAR_SEL_GO_RESPAWNS)); if (!result) { sLog->outString(">> Loaded 0 gameobject respawn times. DB table `gameobject_respawn` is empty!"); @@ -3683,7 +3683,7 @@ void ObjectMgr::LoadQuests() QueryResult result = WorldDatabase.Query("SELECT " //0 1 2 3 4 5 6 7 8 9 10 11 12 "Id, Method, Level, MinLevel, MaxLevel, ZoneOrSort, Type, SuggestedPlayers, LimitTime, RequiredClasses, RequiredRaces, RequiredSkillId, RequiredSkillPoints, " - // 13 14 15 16 17 18 19 20 + // 13 14 15 16 17 18 19 20 "RequiredFactionId1, RequiredFactionId2, RequiredFactionValue1, RequiredFactionValue2, RequiredMinRepFaction, RequiredMaxRepFaction, RequiredMinRepValue, RequiredMaxRepValue, " // 21 22 23 24 25 26 27 28 29 30 31 "PrevQuestId, NextQuestId, ExclusiveGroup, NextQuestIdChain, RewardXPId, RewardOrRequiredMoney, RewardMoneyMaxLevel, RewardSpell, RewardSpellCast, RewardHonor, RewardHonorMultiplier, " @@ -5304,7 +5304,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) stmt->setUInt64(0, basetime); CharacterDatabase.Execute(stmt); } - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_EXPIRED_MAIL); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_EXPIRED_MAIL); stmt->setUInt64(0, basetime); PreparedQueryResult result = CharacterDatabase.Query(stmt); if (!result) @@ -5315,7 +5315,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) } std::map<uint32 /*messageId*/, MailItemInfoVec> itemsCache; - stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_EXPIRED_MAIL_ITEMS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_EXPIRED_MAIL_ITEMS); stmt->setUInt64(0, basetime); if (PreparedQueryResult items = CharacterDatabase.Query(stmt)) { @@ -5379,7 +5379,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) else { // Mail will be returned - stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_MAIL_RETURNED); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_MAIL_RETURNED); stmt->setUInt32(0, m->receiver); stmt->setUInt32(1, m->sender); stmt->setUInt64(2, basetime + 30 * DAY); @@ -5390,12 +5390,12 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) for (MailItemInfoVec::iterator itr2 = m->items.begin(); itr2 != m->items.end(); ++itr2) { // Update receiver in mail items for its proper delivery, and in instance_item for avoid lost item at sender delete - stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_MAIL_ITEM_RECEIVER); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_MAIL_ITEM_RECEIVER); stmt->setUInt32(0, m->sender); stmt->setUInt32(1, itr2->item_guid); CharacterDatabase.Execute(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_ITEM_OWNER); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ITEM_OWNER); stmt->setUInt32(0, m->sender); stmt->setUInt32(1, itr2->item_guid); CharacterDatabase.Execute(stmt); @@ -5873,7 +5873,7 @@ GraveYardData const* ObjectMgr::FindGraveYardData(uint32 id, uint32 zoneId) return NULL; } -bool ObjectMgr::AddGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool inDB) +bool ObjectMgr::AddGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool persist /*= true*/) { if (FindGraveYardData(id, zoneId)) return false; @@ -5886,16 +5886,21 @@ bool ObjectMgr::AddGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool inD mGraveYardMap.insert(GraveYardMap::value_type(zoneId, data)); // add link to DB - if (inDB) + if (persist) { - WorldDatabase.PExecute("INSERT INTO game_graveyard_zone (id, ghost_zone, faction) " - "VALUES ('%u', '%u', '%u')", id, zoneId, team); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_GRAVEYARD_ZONE); + + stmt->setUInt32(0, id); + stmt->setUInt32(1, zoneId); + stmt->setUInt16(2, uint16(team)); + + WorldDatabase.Execute(stmt); } return true; } -void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool inDB) +void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool persist /*= false*/) { GraveYardMap::iterator graveLow = mGraveYardMap.lower_bound(zoneId); GraveYardMap::iterator graveUp = mGraveYardMap.upper_bound(zoneId); @@ -5934,9 +5939,15 @@ void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool mGraveYardMap.erase(itr); // remove link from DB - if (inDB) + if (persist) { - WorldDatabase.PExecute("DELETE FROM game_graveyard_zone WHERE id = '%u' AND ghost_zone = '%u' AND faction = '%u'", id, zoneId, team); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_GRAVEYARD_ZONE); + + stmt->setUInt32(0, id); + stmt->setUInt32(1, zoneId); + stmt->setUInt16(2, uint16(team)); + + WorldDatabase.Execute(stmt); } return; @@ -6160,10 +6171,10 @@ void ObjectMgr::SetHighestGuids() m_hiItemGuid = (*result)[0].GetUInt32()+1; // Cleanup other tables from not existed guids ( >= m_hiItemGuid) - CharacterDatabase.PExecute("DELETE FROM character_inventory WHERE item >= '%u'", m_hiItemGuid); - CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid >= '%u'", m_hiItemGuid); - CharacterDatabase.PExecute("DELETE FROM auctionhouse WHERE itemguid >= '%u'", m_hiItemGuid); - CharacterDatabase.PExecute("DELETE FROM guild_bank_item WHERE item_guid >= '%u'", m_hiItemGuid); + CharacterDatabase.PExecute("DELETE FROM character_inventory WHERE item >= '%u'", m_hiItemGuid); // One-time query + CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid >= '%u'", m_hiItemGuid); // One-time query + CharacterDatabase.PExecute("DELETE FROM auctionhouse WHERE itemguid >= '%u'", m_hiItemGuid); // One-time query + CharacterDatabase.PExecute("DELETE FROM guild_bank_item WHERE item_guid >= '%u'", m_hiItemGuid); // One-time query result = WorldDatabase.Query("SELECT MAX(guid) FROM gameobject"); if (result) @@ -6708,7 +6719,7 @@ void ObjectMgr::LoadCorpses() { uint32 oldMSTime = getMSTime(); - PreparedQueryResult result = CharacterDatabase.Query(CharacterDatabase.GetPreparedStatement(CHAR_LOAD_CORPSES)); + PreparedQueryResult result = CharacterDatabase.Query(CharacterDatabase.GetPreparedStatement(CHAR_SEL_CORPSES)); if (!result) { sLog->outString(">> Loaded 0 corpses. DB table `pet_name_generation` is empty."); @@ -7251,7 +7262,7 @@ void ObjectMgr::SaveCreatureRespawnTime(uint32 loguid, uint32 instance, time_t t m_CreatureRespawnTimesMtx.release(); } - PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_CREATURE_RESPAWN); + PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_CREATURE_RESPAWN); stmt->setUInt32(0, loguid); stmt->setUInt64(1, uint64(t)); stmt->setUInt32(2, instance); @@ -7299,7 +7310,7 @@ void ObjectMgr::SaveGORespawnTime(uint32 loguid, uint32 instance, time_t t) m_GORespawnTimesMtx.release(); } - PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GO_RESPAWN); + PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_GO_RESPAWN); stmt->setUInt32(0, loguid); stmt->setUInt64(1, uint64(t)); stmt->setUInt32(2, instance); @@ -8046,11 +8057,18 @@ bool ObjectMgr::AddGameTele(GameTele& tele) m_GameTeleMap[new_id] = tele; - std::string safeName(tele.name); - WorldDatabase.EscapeString(safeName); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_GAME_TELE); + + stmt->setUInt32(0, new_id); + stmt->setFloat(1, tele.position_x); + stmt->setFloat(2, tele.position_y); + stmt->setFloat(3, tele.position_z); + stmt->setFloat(4, tele.orientation); + stmt->setUInt16(5, uint16(tele.mapId)); + stmt->setString(6, tele.name); + + WorldDatabase.Execute(stmt); - WorldDatabase.PExecute("INSERT INTO game_tele (id, position_x, position_y, position_z, orientation, map, name) VALUES (%u, %f, %f, %f, %f, %d, '%s')", - new_id, tele.position_x, tele.position_y, tele.position_z, tele.orientation, tele.mapId, safeName.c_str()); return true; } @@ -8068,7 +8086,12 @@ bool ObjectMgr::DeleteGameTele(const std::string& name) { if (itr->second.wnameLow == wname) { - WorldDatabase.PExecute("DELETE FROM game_tele WHERE name = '%s'", itr->second.name.c_str()); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_GAME_TELE); + + stmt->setString(0, itr->second.name); + + WorldDatabase.Execute(stmt); + m_GameTeleMap.erase(itr); return true; } @@ -8456,16 +8479,26 @@ void ObjectMgr::LoadGossipMenuItems() sLog->outString(); } -void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedcost, bool savetodb) +void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist /*= true*/) { VendorItemData& vList = m_mCacheVendorItemMap[entry]; - vList.AddItem(item, maxcount, incrtime, extendedcost); + vList.AddItem(item, maxcount, incrtime, extendedCost); - if (savetodb) - WorldDatabase.PExecute("INSERT INTO npc_vendor (entry, item, maxcount, incrtime, extendedcost) VALUES('%u', '%u', '%u', '%u', '%u')", entry, item, maxcount, incrtime, extendedcost); + if (persist) + { + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_NPC_VENODR); + + stmt->setUInt32(0, entry); + stmt->setUInt32(1, item); + stmt->setUInt8(2, maxcount); + stmt->setUInt32(3, incrtime); + stmt->setUInt32(4, extendedCost); + + WorldDatabase.Execute(stmt); + } } -bool ObjectMgr::RemoveVendorItem(uint32 entry, uint32 item, bool savetodb) +bool ObjectMgr::RemoveVendorItem(uint32 entry, uint32 item, bool persist /*= true*/) { CacheVendorItemMap::iterator iter = m_mCacheVendorItemMap.find(entry); if (iter == m_mCacheVendorItemMap.end()) @@ -8474,7 +8507,16 @@ bool ObjectMgr::RemoveVendorItem(uint32 entry, uint32 item, bool savetodb) if (!iter->second.RemoveItem(item)) return false; - if (savetodb) WorldDatabase.PExecute("DELETE FROM npc_vendor WHERE entry='%u' AND item='%u'", entry, item); + if (persist) + { + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_NPC_VENDOR); + + stmt->setUInt32(0, entry); + stmt->setUInt32(1, item); + + WorldDatabase.Execute(stmt); + } + return true; } @@ -8641,7 +8683,7 @@ void ObjectMgr::CheckScripts(ScriptsType type, std::set<int32>& ids) case SCRIPT_COMMAND_TALK: { if (!GetTrinityStringLocale (itrM->second.Talk.TextID)) - sLog->outErrorDb("Table `db_script_string` not has string id %u used db script (ID: %u)", itrM->second.Talk.TextID, itrMM->first); + sLog->outErrorDb("Table `%s` references invalid text id %u from `db_script_string`, script id: %u.", GetScriptsTableNameByType(type).c_str(), itrM->second.Talk.TextID, itrMM->first); if (ids.find(itrM->second.Talk.TextID) != ids.end()) ids.erase(itrM->second.Talk.TextID); diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 88c593a009d..126cca59ef0 100755 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -670,6 +670,7 @@ class ObjectMgr return NULL; return info; } + void GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, PlayerLevelInfo* info) const; uint64 GetPlayerGUIDByName(std::string name) const; @@ -687,6 +688,7 @@ class ObjectMgr QuestMap::const_iterator itr = mQuestTemplates.find(quest_id); return itr != mQuestTemplates.end() ? itr->second : NULL; } + QuestMap const& GetQuestTemplates() const { return mQuestTemplates; } uint32 GetQuestForAreaTrigger(uint32 Trigger_ID) const @@ -696,6 +698,7 @@ class ObjectMgr return itr->second; return 0; } + bool IsTavernAreaTrigger(uint32 Trigger_ID) const { return mTavernAreaTriggerSet.find(Trigger_ID) != mTavernAreaTriggerSet.end(); @@ -710,8 +713,8 @@ class ObjectMgr WorldSafeLocsEntry const* GetDefaultGraveYard(uint32 team); WorldSafeLocsEntry const* GetClosestGraveYard(float x, float y, float z, uint32 MapId, uint32 team); - bool AddGraveYardLink(uint32 id, uint32 zone, uint32 team, bool inDB = true); - void RemoveGraveYardLink(uint32 id, uint32 zone, uint32 team, bool inDB = false); + bool AddGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool persist = true); + void RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool persist = false); void LoadGraveyardZones(); GraveYardData const* FindGraveYardData(uint32 id, uint32 zone); @@ -1138,8 +1141,8 @@ class ObjectMgr return &iter->second; } - void AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 ExtendedCost, bool savetodb = true); // for event - bool RemoveVendorItem(uint32 entry, uint32 item, bool savetodb = true); // for event + void AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist = true); // for event + bool RemoveVendorItem(uint32 entry, uint32 item, bool persist = true); // for event bool IsVendorItemValid(uint32 vendor_entry, uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* player = NULL, std::set<uint32>* skip_vendors = NULL, uint32 ORnpcflag = 0) const; void LoadScriptNames(); diff --git a/src/server/game/Grids/Cells/Cell.h b/src/server/game/Grids/Cells/Cell.h index 13bb0afc494..67b862845b9 100755 --- a/src/server/game/Grids/Cells/Cell.h +++ b/src/server/game/Grids/Cells/Cell.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/Cells/CellImpl.h b/src/server/game/Grids/Cells/CellImpl.h index af697b9f21d..77830bc59d5 100644 --- a/src/server/game/Grids/Cells/CellImpl.h +++ b/src/server/game/Grids/Cells/CellImpl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/Grid.h b/src/server/game/Grids/Grid.h index 7e66cf1080a..d9350e9e897 100755 --- a/src/server/game/Grids/Grid.h +++ b/src/server/game/Grids/Grid.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/GridDefines.h b/src/server/game/Grids/GridDefines.h index a9c0bf88769..8651680cb49 100644 --- a/src/server/game/Grids/GridDefines.h +++ b/src/server/game/Grids/GridDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/GridLoader.h b/src/server/game/Grids/GridLoader.h index 43564c920e2..85393872eb9 100755 --- a/src/server/game/Grids/GridLoader.h +++ b/src/server/game/Grids/GridLoader.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/GridRefManager.h b/src/server/game/Grids/GridRefManager.h index cd972e237ca..66b6313c997 100755 --- a/src/server/game/Grids/GridRefManager.h +++ b/src/server/game/Grids/GridRefManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/GridReference.h b/src/server/game/Grids/GridReference.h index 601542daa0d..107bddf04eb 100755 --- a/src/server/game/Grids/GridReference.h +++ b/src/server/game/Grids/GridReference.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/GridStates.cpp b/src/server/game/Grids/GridStates.cpp index 4e63388c356..c2f66bc3e8a 100755 --- a/src/server/game/Grids/GridStates.cpp +++ b/src/server/game/Grids/GridStates.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/GridStates.h b/src/server/game/Grids/GridStates.h index 78f70356608..08b66f6bb35 100755 --- a/src/server/game/Grids/GridStates.h +++ b/src/server/game/Grids/GridStates.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/NGrid.h b/src/server/game/Grids/NGrid.h index c87fd7e6129..b5701a7a590 100755 --- a/src/server/game/Grids/NGrid.h +++ b/src/server/game/Grids/NGrid.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp index 99d402b4add..2446e9d4276 100755 --- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp +++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -113,7 +113,7 @@ inline void CreatureUnitRelocationWorker(Creature* c, Unit* u) if (!u->isAlive() || !c->isAlive() || c == u || u->isInFlight()) return; - if (c->HasReactState(REACT_AGGRESSIVE) && !c->HasUnitState(UNIT_STAT_SIGHTLESS)) + if (c->HasReactState(REACT_AGGRESSIVE) && !c->HasUnitState(UNIT_STATE_SIGHTLESS)) if (c->IsAIEnabled && c->canSeeOrDetect(u, false, true)) c->AI()->MoveInLineOfSight_Safe(u); } diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 239c3710b5b..e3029a1be65 100755 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -746,7 +746,7 @@ namespace Trinity bool operator()(Unit* u) { if (u->isAlive() && u->isInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) && - (u->isFeared() || u->isCharmed() || u->isFrozen() || u->HasUnitState(UNIT_STAT_STUNNED) || u->HasUnitState(UNIT_STAT_CONFUSED))) + (u->isFeared() || u->isCharmed() || u->isFrozen() || u->HasUnitState(UNIT_STATE_STUNNED) || u->HasUnitState(UNIT_STATE_CONFUSED))) { return true; } diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h index 543a1d1e280..34fe7757c5f 100755 --- a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h +++ b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp index cc5e3f5158a..519a53ad184 100755 --- a/src/server/game/Grids/ObjectGridLoader.cpp +++ b/src/server/game/Grids/ObjectGridLoader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/ObjectGridLoader.h b/src/server/game/Grids/ObjectGridLoader.h index 09a8fb2af9c..f768bd0826b 100755 --- a/src/server/game/Grids/ObjectGridLoader.h +++ b/src/server/game/Grids/ObjectGridLoader.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index ffb5e0ca1aa..b31b632e963 100755 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -124,7 +124,7 @@ bool Group::Create(Player* leader) sGroupMgr->RegisterGroupDbStoreId(m_dbStoreId, this); // Store group in database - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GROUP); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GROUP); uint8 index = 0; @@ -190,6 +190,9 @@ void Group::LoadGroupFromDB(Field* fields) m_raidDifficulty = RAID_DIFFICULTY_10MAN_NORMAL; else m_raidDifficulty = Difficulty(r_diff); + + if (m_groupType & GROUPTYPE_LFG) + sLFGMgr->_LoadFromDB(fields, GetGUID()); } void Group::LoadMemberFromDB(uint32 guidLow, uint8 memberFlags, uint8 subgroup, uint8 roles) @@ -200,7 +203,9 @@ void Group::LoadMemberFromDB(uint32 guidLow, uint8 memberFlags, uint8 subgroup, // skip non-existed member if (!sObjectMgr->GetPlayerNameByGUID(member.guid, member.name)) { - CharacterDatabase.PQuery("DELETE FROM group_member WHERE memberGuid=%u", guidLow); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GROUP_MEMBER); + stmt->setUInt32(0, guidLow); + CharacterDatabase.Execute(stmt); return; } @@ -211,6 +216,14 @@ void Group::LoadMemberFromDB(uint32 guidLow, uint8 memberFlags, uint8 subgroup, m_memberSlots.push_back(member); SubGroupCounterIncrease(subgroup); + + if (isLFGGroup()) + { + LfgDungeonSet Dungeons; + Dungeons.insert(sLFGMgr->GetDungeon(GetGUID())); + sLFGMgr->SetSelectedDungeons(member.guid, Dungeons); + sLFGMgr->SetState(member.guid, sLFGMgr->GetState(GetGUID())); + } } void Group::ConvertToLFG() @@ -219,7 +232,7 @@ void Group::ConvertToLFG() m_lootMethod = NEED_BEFORE_GREED; if (!isBGGroup()) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_GROUP_TYPE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_TYPE); stmt->setUInt8(0, uint8(m_groupType)); stmt->setUInt32(1, m_dbStoreId); @@ -238,7 +251,7 @@ void Group::ConvertToRaid() if (!isBGGroup()) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_GROUP_TYPE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_TYPE); stmt->setUInt8(0, uint8(m_groupType)); stmt->setUInt32(1, m_dbStoreId); @@ -378,7 +391,7 @@ bool Group::AddMember(Player* player) // insert into the table if we're not a battleground group if (!isBGGroup()) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GROUP_MEMBER); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GROUP_MEMBER); stmt->setUInt32(0, m_dbStoreId); stmt->setUInt32(1, GUID_LOPART(member.guid)); @@ -441,7 +454,7 @@ bool Group::RemoveMember(uint64 guid, const RemoveMethod &method /*= GROUP_REMOV return m_memberSlots.size(); // remove member and change leader (if need) only if strong more 2 members _before_ member remove (BG allow 1 member group) - if (GetMembersCount() > (isBGGroup() ? 1u : 2u)) + if (GetMembersCount() > ((isBGGroup() || isLFGGroup()) ? 1u : 2u)) { Player* player = ObjectAccessor::FindPlayer(guid); if (player) @@ -485,6 +498,8 @@ bool Group::RemoveMember(uint64 guid, const RemoveMethod &method /*= GROUP_REMOV CharacterDatabase.Execute(stmt); + DelinkMember(guid); + // Reevaluate group enchanter if the leaving player had enchanting skill or the player is offline if ((player && player->GetSkillValue(SKILL_ENCHANTING)) || !player) ResetMaxEnchantingLevel(); @@ -535,6 +550,20 @@ bool Group::RemoveMember(uint64 guid, const RemoveMethod &method /*= GROUP_REMOV SendUpdate(); + if (isLFGGroup() && GetMembersCount() == 1) + { + Player* Leader = ObjectAccessor::FindPlayer(GetLeaderGUID()); + LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(sLFGMgr->GetDungeon(GetGUID())); + if ((Leader && dungeon && Leader->isAlive() && Leader->GetMapId() != dungeon->map) || !dungeon) + { + Disband(); + return false; + } + } + + if (m_memberMgr.getSize() < ((isLFGGroup() || isBGGroup()) ? 1u : 2u)) + Disband(); + return true; } // If group size before player removal <= 2 then disband it @@ -590,7 +619,7 @@ void Group::ChangeLeader(uint64 guid) Player::ConvertInstancesToGroup(player, this, true); // Update the group leader - stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_GROUP_LEADER); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_LEADER); stmt->setUInt32(0, player->GetGUIDLow()); stmt->setUInt32(1, m_dbStoreId); @@ -674,6 +703,10 @@ void Group::Disband(bool hideDestroy /* = false */) ResetInstances(INSTANCE_RESET_GROUP_DISBAND, false, NULL); ResetInstances(INSTANCE_RESET_GROUP_DISBAND, true, NULL); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_LFG_DATA); + stmt->setUInt32(0, m_dbStoreId); + CharacterDatabase.Execute(stmt); + sGroupMgr->FreeGroupDbStoreId(this); } @@ -709,6 +742,28 @@ void Group::SendLootStartRoll(uint32 CountDown, uint32 mapid, const Roll &r) } } +void Group::SendLootStartRollToPlayer(uint32 countDown, uint32 mapId, Player* p, bool canNeed, Roll const& r) +{ + if (!p || !p->GetSession()) + return; + + WorldPacket data(SMSG_LOOT_START_ROLL, (8 + 4 + 4 + 4 + 4 + 4 + 4 + 1 )); + data << uint64(r.itemGUID); // guid of rolled item + data << uint32(mapId); // 3.3.3 mapid + data << uint32(r.totalPlayersRolling); // maybe the number of players rolling for it??? + data << uint32(r.itemid); // the itemEntryId for the item that shall be rolled for + data << uint32(r.itemRandomSuffix); // randomSuffix + data << uint32(r.itemRandomPropId); // item random property ID + data << uint32(r.itemCount); // items in stack + data << uint32(countDown); // the countdown time to choose "need" or "greed" + uint8 voteMask = r.rollVoteMask; + if (!canNeed) + voteMask &= ~ROLL_FLAG_TYPE_NEED; + data << uint8(voteMask); // roll type mask + + p->GetSession()->SendPacket(&data); +} + void Group::SendLootRoll(uint64 SourceGuid, uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r) { WorldPacket data(SMSG_LOOT_ROLL, (8+4+8+4+4+4+1+1+1)); @@ -887,11 +942,11 @@ void Group::GroupLoot(Loot* loot, WorldObject* pLootedObject) } } -void Group::NeedBeforeGreed(Loot* loot, WorldObject* pLootedObject) +void Group::NeedBeforeGreed(Loot* loot, WorldObject* lootedObject) { ItemTemplate const* item; uint8 itemSlot = 0; - for (std::vector<LootItem>::iterator i=loot->items.begin(); i != loot->items.end(); ++i, ++itemSlot) + for (std::vector<LootItem>::iterator i = loot->items.begin(); i != loot->items.end(); ++i, ++itemSlot) { if (i->freeforall) continue; @@ -902,7 +957,7 @@ void Group::NeedBeforeGreed(Loot* loot, WorldObject* pLootedObject) if (item->Quality >= uint32(m_lootThreshold)) { uint64 newitemGUID = MAKE_NEW_GUID(sObjectMgr->GenerateLowGuid(HIGHGUID_ITEM), 0, HIGHGUID_ITEM); - Roll* r=new Roll(newitemGUID, *i); + Roll* r = new Roll(newitemGUID, *i); for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next()) { @@ -911,21 +966,17 @@ void Group::NeedBeforeGreed(Loot* loot, WorldObject* pLootedObject) continue; bool allowedForPlayer = i->AllowedForPlayer(playerToRoll); - if (playerToRoll->CanUseItem(item) == EQUIP_ERR_OK && allowedForPlayer) + if (allowedForPlayer && playerToRoll->IsWithinDistInMap(lootedObject, sWorld->getFloatConfig(CONFIG_GROUP_XP_DISTANCE), false)) { - if (playerToRoll->IsWithinDistInMap(pLootedObject, sWorld->getFloatConfig(CONFIG_GROUP_XP_DISTANCE), false)) + r->totalPlayersRolling++; + if (playerToRoll->GetPassOnGroupLoot()) { - r->totalPlayersRolling++; - - if (playerToRoll->GetPassOnGroupLoot()) - { - r->playerVote[playerToRoll->GetGUID()] = PASS; - r->totalPass++; - // can't broadcast the pass now. need to wait until all rolling players are known. - } - else - r->playerVote[playerToRoll->GetGUID()] = NOT_EMITED_YET; + r->playerVote[playerToRoll->GetGUID()] = PASS; + r->totalPass++; + // can't broadcast the pass now. need to wait until all rolling players are known. } + else + r->playerVote[playerToRoll->GetGUID()] = NOT_EMITED_YET; } } @@ -941,29 +992,31 @@ void Group::NeedBeforeGreed(Loot* loot, WorldObject* pLootedObject) loot->items[itemSlot].is_blocked = true; - // If there is any "auto pass", broadcast the pass now. - if (r->totalPass) + //Broadcast Pass and Send Rollstart + for (Roll::PlayerVote::const_iterator itr = r->playerVote.begin(); itr != r->playerVote.end(); ++itr) { - for (Roll::PlayerVote::const_iterator itr=r->playerVote.begin(); itr != r->playerVote.end(); ++itr) - { - Player* p = ObjectAccessor::FindPlayer(itr->first); - if (!p || !p->GetSession()) - continue; + Player* p = ObjectAccessor::FindPlayer(itr->first); + if (!p || !p->GetSession()) + continue; - if (itr->second == PASS) - SendLootRoll(newitemGUID, p->GetGUID(), 128, ROLL_PASS, *r); - } + if (itr->second == PASS) + SendLootRoll(newitemGUID, p->GetGUID(), 128, ROLL_PASS, *r); + else + SendLootStartRollToPlayer(60000, lootedObject->GetMapId(), p, p->CanRollForItemInLFG(item, lootedObject) == EQUIP_ERR_OK, *r); } - SendLootStartRoll(60000, pLootedObject->GetMapId(), *r); - RollId.push_back(r); - if (Creature* creature = pLootedObject->ToCreature()) + if (Creature* creature = lootedObject->ToCreature()) { creature->m_groupLootTimer = 60000; creature->lootingGroupLowGUID = GetLowGUID(); } + else if (GameObject* go = lootedObject->ToGameObject()) + { + go->m_groupLootTimer = 60000; + go->lootingGroupLowGUID = GetLowGUID(); + } } else delete r; @@ -1242,9 +1295,7 @@ void Group::SendTargetIconList(WorldSession* session) void Group::SendUpdate() { for (member_witerator witr = m_memberSlots.begin(); witr != m_memberSlots.end(); ++witr) - { SendUpdateToPlayer(witr->guid, &(*witr)); - } } void Group::SendUpdateToPlayer(uint64 playerGUID, MemberSlot* slot) @@ -1380,7 +1431,7 @@ bool Group::_setMembersGroup(uint64 guid, uint8 group) if (!isBGGroup()) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_GROUP_MEMBER_SUBGROUP); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_MEMBER_SUBGROUP); stmt->setUInt8(0, group); stmt->setUInt32(1, GUID_LOPART(guid)); @@ -1431,7 +1482,7 @@ void Group::ChangeMembersGroup(uint64 guid, uint8 group) // Preserve new sub group in database for non-raid groups if (!isBGGroup()) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_GROUP_MEMBER_SUBGROUP); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_MEMBER_SUBGROUP); stmt->setUInt8(0, group); stmt->setUInt32(1, GUID_LOPART(guid)); @@ -1626,7 +1677,7 @@ void Group::SetDungeonDifficulty(Difficulty difficulty) m_dungeonDifficulty = difficulty; if (!isBGGroup()) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_GROUP_DIFFICULTY); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_DIFFICULTY); stmt->setUInt8(0, uint8(m_dungeonDifficulty)); stmt->setUInt32(1, m_dbStoreId); @@ -1650,7 +1701,7 @@ void Group::SetRaidDifficulty(Difficulty difficulty) m_raidDifficulty = difficulty; if (!isBGGroup()) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_GROUP_RAID_DIFFICULTY); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_RAID_DIFFICULTY); stmt->setUInt8(0, uint8(m_raidDifficulty)); stmt->setUInt32(1, m_dbStoreId); @@ -1805,7 +1856,7 @@ InstanceGroupBind* Group::BindToInstance(InstanceSave* save, bool permanent, boo InstanceGroupBind& bind = m_boundInstances[save->GetDifficulty()][save->GetMapId()]; if (!load && (!bind.save || permanent != bind.perm || save != bind.save)) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GROUP_INSTANCE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_GROUP_INSTANCE); stmt->setUInt32(0, m_dbStoreId); stmt->setUInt32(1, save->GetInstanceId()); @@ -2073,7 +2124,7 @@ void Group::SetGroupMemberFlag(uint64 guid, bool apply, GroupMemberFlags flag) ToggleGroupMemberFlag(slot, flag, apply); // Preserve the new setting in the db - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_GROUP_MEMBER_FLAG); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_MEMBER_FLAG); stmt->setUInt8(0, slot->flags); stmt->setUInt32(0, GUID_LOPART(guid)); @@ -2118,8 +2169,19 @@ void Group::LinkMember(GroupReference* pRef) m_memberMgr.insertFirst(pRef); } -void Group::DelinkMember(GroupReference* /*pRef*/) const +void Group::DelinkMember(uint64 guid) { + GroupReference* ref = m_memberMgr.getFirst(); + while (ref) + { + GroupReference* nextRef = ref->next(); + if (ref->getSource()->GetGUID() == guid) + { + ref->unlink(); + break; + } + ref = nextRef; + } } Group::BoundInstancesMap& Group::GetBoundInstances(Difficulty difficulty) diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h index c51aa6dd7bf..03f946cd3b6 100755 --- a/src/server/game/Groups/Group.h +++ b/src/server/game/Groups/Group.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -273,6 +273,7 @@ class Group bool isRollLootActive() const; void SendLootStartRoll(uint32 CountDown, uint32 mapid, const Roll &r); + void SendLootStartRollToPlayer(uint32 countDown, uint32 mapId, Player* p, bool canNeed, Roll const& r); void SendLootRoll(uint64 SourceGuid, uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r); void SendLootRollWon(uint64 SourceGuid, uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r); void SendLootAllPassed(uint32 NumberOfPlayers, const Roll &r); @@ -289,7 +290,7 @@ class Group void ResetMaxEnchantingLevel(); void LinkMember(GroupReference* pRef); - void DelinkMember(GroupReference* /*pRef*/) const; + void DelinkMember(uint64 guid); InstanceGroupBind* BindToInstance(InstanceSave* save, bool permanent, bool load = false); void UnbindInstance(uint32 mapid, uint8 difficulty, bool unload = false); diff --git a/src/server/game/Groups/GroupMgr.cpp b/src/server/game/Groups/GroupMgr.cpp index 33c0734d0b3..ae400852c73 100644 --- a/src/server/game/Groups/GroupMgr.cpp +++ b/src/server/game/Groups/GroupMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -119,10 +119,10 @@ void GroupMgr::LoadGroups() // Delete all groups with less than 2 members CharacterDatabase.DirectExecute("DELETE FROM groups WHERE guid NOT IN (SELECT guid FROM group_member GROUP BY guid HAVING COUNT(guid) > 1)"); - // 0 1 2 3 4 5 6 7 8 9 - QueryResult result = CharacterDatabase.PQuery("SELECT leaderGuid, lootMethod, looterGuid, lootThreshold, icon1, icon2, icon3, icon4, icon5, icon6" - // 10 11 12 13 14 15 - ", icon7, icon8, groupType, difficulty, raiddifficulty, guid FROM groups ORDER BY guid ASC"); + // 0 1 2 3 4 5 6 7 8 9 + QueryResult result = CharacterDatabase.PQuery("SELECT g.leaderGuid, g.lootMethod, g.looterGuid, g.lootThreshold, g.icon1, g.icon2, g.icon3, g.icon4, g.icon5, g.icon6" + // 10 11 12 13 14 15 16 17 + ", g.icon7, g.icon8, g.groupType, g.difficulty, g.raiddifficulty, g.guid, lfg.dungeon, lfg.state FROM groups g LEFT JOIN lfg_data lfg ON lfg.guid = g.guid ORDER BY g.guid ASC"); if (!result) { sLog->outString(">> Loaded 0 group definitions. DB table `groups` is empty!"); diff --git a/src/server/game/Groups/GroupMgr.h b/src/server/game/Groups/GroupMgr.h index aa74112ad35..ba706687441 100644 --- a/src/server/game/Groups/GroupMgr.h +++ b/src/server/game/Groups/GroupMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Groups/GroupRefManager.h b/src/server/game/Groups/GroupRefManager.h index 01cc85d6d6e..9bcc05f8724 100755 --- a/src/server/game/Groups/GroupRefManager.h +++ b/src/server/game/Groups/GroupRefManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Groups/GroupReference.cpp b/src/server/game/Groups/GroupReference.cpp index 2c03020a4fc..68d85c5bce9 100755 --- a/src/server/game/Groups/GroupReference.cpp +++ b/src/server/game/Groups/GroupReference.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -28,12 +28,12 @@ void GroupReference::targetObjectBuildLink() void GroupReference::targetObjectDestroyLink() { // called from unlink() - getTarget()->DelinkMember(this); + //getTarget()->DelinkMember(this); } void GroupReference::sourceObjectDestroyLink() { // called from invalidate() - getTarget()->DelinkMember(this); + //getTarget()->DelinkMember(this); } diff --git a/src/server/game/Groups/GroupReference.h b/src/server/game/Groups/GroupReference.h index 2f5ad755443..2048fd9cb0d 100755 --- a/src/server/game/Groups/GroupReference.h +++ b/src/server/game/Groups/GroupReference.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 94fcbbdda25..5691dcab862 100755 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -128,7 +128,7 @@ void Guild::EventLogEntry::SaveToDB(SQLTransaction& trans) const CharacterDatabase.ExecuteOrAppend(trans, stmt); uint8 index = 0; - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GUILD_EVENTLOG); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_EVENTLOG); stmt->setUInt32( index, m_guildId); stmt->setUInt32(++index, m_guid); stmt->setUInt8 (++index, uint8(m_eventType)); @@ -169,7 +169,7 @@ void Guild::BankEventLogEntry::SaveToDB(SQLTransaction& trans) const CharacterDatabase.ExecuteOrAppend(trans, stmt); index = 0; - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GUILD_BANK_EVENTLOG); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_BANK_EVENTLOG); stmt->setUInt32( index, m_guildId); stmt->setUInt32(++index, m_guid); stmt->setUInt8 (++index, m_bankTabId); @@ -212,7 +212,7 @@ void Guild::RankInfo::LoadFromDB(Field* fields) void Guild::RankInfo::SaveToDB(SQLTransaction& trans) const { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GUILD_RANK); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_RANK); stmt->setUInt32(0, m_guildId); stmt->setUInt8 (1, m_rankId); stmt->setString(2, m_name); @@ -238,7 +238,7 @@ void Guild::RankInfo::SetName(const std::string& name) m_name = name; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_GUILD_RANK_NAME); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_RANK_NAME); stmt->setString(0, m_name); stmt->setUInt8 (1, m_rankId); stmt->setUInt32(2, m_guildId); @@ -255,7 +255,7 @@ void Guild::RankInfo::SetRights(uint32 rights) m_rights = rights; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_GUILD_RANK_RIGHTS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_RANK_RIGHTS); stmt->setUInt32(0, m_rights); stmt->setUInt8 (1, m_rankId); stmt->setUInt32(2, m_guildId); @@ -273,13 +273,13 @@ void Guild::RankInfo::SetBankMoneyPerDay(uint32 money) m_bankMoneyPerDay = money; PreparedStatement* stmt = NULL; - stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_GUILD_RANK_BANK_MONEY); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_RANK_BANK_MONEY); stmt->setUInt32(0, money); stmt->setUInt8 (1, m_rankId); stmt->setUInt32(2, m_guildId); CharacterDatabase.Execute(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_RESET_GUILD_RANK_BANK_RESET_TIME); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_RANK_BANK_RESET_TIME); stmt->setUInt32(0, m_guildId); stmt->setUInt8 (1, m_rankId); CharacterDatabase.Execute(stmt); @@ -305,7 +305,7 @@ void Guild::RankInfo::SetBankTabSlotsAndRights(uint8 tabId, GuildBankRightsAndSl stmt->setUInt8 (2, m_rankId); CharacterDatabase.Execute(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GUILD_BANK_RIGHT); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_BANK_RIGHT); stmt->setUInt32(0, m_guildId); stmt->setUInt8 (1, tabId); stmt->setUInt8 (2, m_rankId); @@ -313,7 +313,7 @@ void Guild::RankInfo::SetBankTabSlotsAndRights(uint8 tabId, GuildBankRightsAndSl stmt->setUInt32(4, m_bankTabRightsAndSlots[tabId].slots); CharacterDatabase.Execute(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_RESET_GUILD_RANK_BANK_TIME0 + tabId); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_RANK_BANK_TIME0 + tabId); stmt->setUInt32(0, m_guildId); stmt->setUInt8 (1, m_rankId); CharacterDatabase.Execute(stmt); @@ -432,7 +432,7 @@ void Guild::BankTab::SetInfo(const std::string& name, const std::string& icon) m_name = name; m_icon = icon; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_GUILD_BANK_TAB_INFO); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_BANK_TAB_INFO); stmt->setString(0, m_name); stmt->setString(1, m_icon); stmt->setUInt32(2, m_guildId); @@ -448,7 +448,7 @@ void Guild::BankTab::SetText(const std::string& text) m_text = text; utf8truncate(m_text, MAX_GUILD_BANK_TAB_TEXT_LEN); // DB and client size limitation - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_GUILD_BANK_TAB_TEXT); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_BANK_TAB_TEXT); stmt->setString(0, m_text); stmt->setUInt32(1, m_guildId); stmt->setUInt8 (2, m_tabId); @@ -474,7 +474,7 @@ bool Guild::BankTab::SetItem(SQLTransaction& trans, uint8 slotId, Item* pItem) if (pItem) { - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GUILD_BANK_ITEM); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_BANK_ITEM); stmt->setUInt32(0, m_guildId); stmt->setUInt8 (1, m_tabId); stmt->setUInt8 (2, slotId); @@ -528,7 +528,7 @@ void Guild::Member::SetPublicNote(const std::string& publicNote) m_publicNote = publicNote; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_GUILD_MEMBER_PNOTE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_MEMBER_PNOTE); stmt->setString(0, publicNote); stmt->setUInt32(1, GUID_LOPART(m_guid)); CharacterDatabase.Execute(stmt); @@ -541,7 +541,7 @@ void Guild::Member::SetOfficerNote(const std::string& officerNote) m_officerNote = officerNote; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_GUILD_MEMBER_OFFNOTE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_MEMBER_OFFNOTE); stmt->setString(0, officerNote); stmt->setUInt32(1, GUID_LOPART(m_guid)); CharacterDatabase.Execute(stmt); @@ -555,7 +555,7 @@ void Guild::Member::ChangeRank(uint8 newRank) if (Player* player = FindPlayer()) player->SetRank(newRank); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_GUILD_MEMBER_RANK); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_MEMBER_RANK); stmt->setUInt8 (0, newRank); stmt->setUInt32(1, GUID_LOPART(m_guid)); CharacterDatabase.Execute(stmt); @@ -563,7 +563,7 @@ void Guild::Member::ChangeRank(uint8 newRank) void Guild::Member::SaveToDB(SQLTransaction& trans) const { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GUILD_MEMBER); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_MEMBER); stmt->setUInt32(0, m_guildId); stmt->setUInt32(1, GUID_LOPART(m_guid)); stmt->setUInt8 (2, m_rankId); @@ -659,8 +659,8 @@ void Guild::Member::DecreaseBankRemainingValue(SQLTransaction& trans, uint8 tabI PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement( tabId == GUILD_BANK_MAX_TABS ? - CHAR_SET_GUILD_MEMBER_BANK_REM_MONEY : - CHAR_SET_GUILD_MEMBER_BANK_REM_SLOTS0 + tabId); + CHAR_UPD_GUILD_MEMBER_BANK_REM_MONEY : + CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS0 + tabId); stmt->setUInt32(0, m_bankRemaining[tabId].value); stmt->setUInt32(1, m_guildId); stmt->setUInt32(2, GUID_LOPART(m_guid)); @@ -693,8 +693,8 @@ uint32 Guild::Member::GetBankRemainingValue(uint8 tabId, const Guild* guild) con PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement( tabId == GUILD_BANK_MAX_TABS ? - CHAR_SET_GUILD_MEMBER_BANK_TIME_MONEY : - CHAR_SET_GUILD_MEMBER_BANK_TIME_REM_SLOTS0 + tabId); + CHAR_UPD_GUILD_MEMBER_BANK_TIME_MONEY : + CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS0 + tabId); stmt->setUInt32(0, m_bankRemaining[tabId].resetTime); stmt->setUInt32(1, m_bankRemaining[tabId].value); stmt->setUInt32(2, m_guildId); @@ -737,7 +737,7 @@ void EmblemInfo::WritePacket(WorldPacket& data) const void EmblemInfo::SaveToDB(uint32 guildId) const { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_GUILD_EMBLEM_INFO); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_EMBLEM_INFO); stmt->setUInt32(0, m_style); stmt->setUInt32(1, m_color); stmt->setUInt32(2, m_borderStyle); @@ -1121,7 +1121,7 @@ bool Guild::Create(Player* pLeader, const std::string& name) trans->Append(stmt); uint8 index = 0; - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GUILD); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD); stmt->setUInt32( index, m_id); stmt->setString(++index, name); stmt->setUInt32(++index, GUID_LOPART(m_leaderGuid)); @@ -1259,7 +1259,7 @@ void Guild::HandleSetMOTD(WorldSession* session, const std::string& motd) sScriptMgr->OnGuildMOTDChanged(this, motd); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_GUILD_MOTD); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_MOTD); stmt->setString(0, motd); stmt->setUInt32(1, m_id); CharacterDatabase.Execute(stmt); @@ -1282,7 +1282,7 @@ void Guild::HandleSetInfo(WorldSession* session, const std::string& info) sScriptMgr->OnGuildInfoChanged(this, info); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_GUILD_INFO); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_INFO); stmt->setString(0, info); stmt->setUInt32(1, m_id); CharacterDatabase.Execute(stmt); @@ -2094,7 +2094,7 @@ bool Guild::AddMember(uint64 guid, uint8 rankId) { bool ok = false; // Player must exist - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_CHAR_DATA_FOR_GUILD); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_DATA_FOR_GUILD); stmt->setUInt32(0, lowguid); if (PreparedQueryResult result = CharacterDatabase.Query(stmt)) { @@ -2266,7 +2266,7 @@ bool Guild::_CreateNewBankTab() stmt->setUInt8 (1, tabId); trans->Append(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GUILD_BANK_TAB); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_BANK_TAB); stmt->setUInt32(0, m_id); stmt->setUInt8 (1, tabId); trans->Append(stmt); @@ -2309,7 +2309,7 @@ void Guild::_CreateRank(const std::string& name, uint32 rights) for (uint8 i = 0; i < _GetPurchasedTabsSize(); ++i) { // Create bank rights with default values - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GUILD_BANK_RIGHT_DEFAULT); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_BANK_RIGHT_DEFAULT); stmt->setUInt32(0, m_id); stmt->setUInt8 (1, i); stmt->setUInt8 (2, newRankId); @@ -2366,7 +2366,7 @@ bool Guild::_ModifyBankMoney(SQLTransaction& trans, uint64 amount, bool add) m_bankMoney -= amount; } - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_GUILD_BANK_MONEY); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_BANK_MONEY); stmt->setUInt64(0, m_bankMoney); stmt->setUInt32(1, m_id); trans->Append(stmt); @@ -2381,7 +2381,7 @@ void Guild::_SetLeaderGUID(Member* pLeader) m_leaderGuid = pLeader->GetGUID(); pLeader->ChangeRank(GR_GUILDMASTER); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_GUILD_LEADER); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_LEADER); stmt->setUInt32(0, GUID_LOPART(m_leaderGuid)); stmt->setUInt32(1, m_id); CharacterDatabase.Execute(stmt); diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h index 3ac2b0a490d..e18e62e51b7 100755 --- a/src/server/game/Guilds/Guild.h +++ b/src/server/game/Guilds/Guild.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Guilds/GuildMgr.cpp b/src/server/game/Guilds/GuildMgr.cpp index 8eac07918de..67260daf638 100644 --- a/src/server/game/Guilds/GuildMgr.cpp +++ b/src/server/game/Guilds/GuildMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Guilds/GuildMgr.h b/src/server/game/Guilds/GuildMgr.h index e53c46cb6be..9654fced227 100644 --- a/src/server/game/Guilds/GuildMgr.h +++ b/src/server/game/Guilds/GuildMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp b/src/server/game/Handlers/AddonHandler.cpp index c7299eb0caa..ef537cb6198 100755 --- a/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp +++ b/src/server/game/Handlers/AddonHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Handlers/AddonHandler.h b/src/server/game/Handlers/AddonHandler.h index fe8fc6d631c..36cb19e5698 100755 --- a/src/server/game/Server/Protocol/Handlers/AddonHandler.h +++ b/src/server/game/Handlers/AddonHandler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp b/src/server/game/Handlers/ArenaTeamHandler.cpp index 095f8396dd7..8fb820713ce 100755 --- a/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp +++ b/src/server/game/Handlers/ArenaTeamHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp index 1710a387307..8a98b038efd 100755 --- a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp +++ b/src/server/game/Handlers/AuctionHouseHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -46,7 +46,7 @@ void WorldSession::HandleAuctionHelloOpcode(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); SendAuctionHello(guid, unit); @@ -101,14 +101,14 @@ void WorldSession::SendAuctionBidderNotification(uint32 location, uint32 auction //this void causes on client to display: "Your auction sold" void WorldSession::SendAuctionOwnerNotification(AuctionEntry* auction) { - WorldPacket data(SMSG_AUCTION_OWNER_NOTIFICATION, (7*4)); - data << auction->Id; - data << auction->bid; - data << (uint32) 0; //unk - data << (uint32) 0; //unk - data << (uint32) 0; //unk - data << auction->item_template; - data << (uint32) 0; //unk + WorldPacket data(SMSG_AUCTION_OWNER_NOTIFICATION, (8*4)); + data << uint32(auction->Id); + data << uint32(auction->bid); + data << uint32(0); //unk + data << uint64(0); //unk (bidder guid?) + data << uint32(auction->item_template); + data << uint32(0); //unk + data << float(0); //unk (time?) SendPacket(&data); } @@ -161,7 +161,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); Item* it = player->GetItemByGuid(item); @@ -274,7 +274,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction()); @@ -394,7 +394,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction()); @@ -482,7 +482,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction()); @@ -531,7 +531,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction()); @@ -586,7 +586,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction()); diff --git a/src/server/game/Server/Protocol/Handlers/AuthHandler.cpp b/src/server/game/Handlers/AuthHandler.cpp index d85f3e24aff..9a3e756dda3 100755 --- a/src/server/game/Server/Protocol/Handlers/AuthHandler.cpp +++ b/src/server/game/Handlers/AuthHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp index 95327a71374..d1aa0021a75 100755 --- a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Handlers/BattleGroundHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp index 4c6ec6571a4..be547c84b19 100755 --- a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp +++ b/src/server/game/Handlers/CalendarHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp b/src/server/game/Handlers/ChannelHandler.cpp index d08e7d9f930..9b749fa8005 100755 --- a/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp +++ b/src/server/game/Handlers/ChannelHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 2a4e1c50ac5..0094c20d927 100755..100644 --- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -43,6 +43,7 @@ #include "ScriptMgr.h" #include "Battleground.h" #include "AccountMgr.h" +#include "LFGMgr.h" class LoginQueryHolder : public SQLQueryHolder { @@ -65,134 +66,138 @@ bool LoginQueryHolder::Initialize() uint32 lowGuid = GUID_LOPART(m_guid); PreparedStatement* stmt = NULL; - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADFROM, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_GROUP); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GROUP_MEMBER); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADGROUP, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_BOUNDINSTANCES); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_INSTANCE); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADBOUNDINSTANCES, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_AURAS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_AURAS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADAURAS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_SPELLS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SPELL); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSPELLS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_QUESTSTATUS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_QUESTSTATUS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADQUESTSTATUS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_DAILYQUESTSTATUS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_DAILYQUESTSTATUS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADDAILYQUESTSTATUS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_WEKLYQUESTSTATUS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_WEEKLYQUESTSTATUS); stmt->setUInt32(0, lowGuid); - res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADWEKLYQUESTSTATUS, stmt); + res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADWEEKLYQUESTSTATUS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_REPUTATION); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SEASONALQUESTSTATUS); + stmt->setUInt32(0, lowGuid); + res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSEASONALQUESTSTATUS, stmt); + + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_REPUTATION); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADREPUTATION, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_INVENTORY); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_INVENTORY); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADINVENTORY, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_ACTIONS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ACTIONS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADACTIONS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_MAILCOUNT); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_MAILCOUNT); stmt->setUInt32(0, lowGuid); stmt->setUInt64(1, uint64(time(NULL))); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADMAILCOUNT, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_MAILDATE); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_MAILDATE); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADMAILDATE, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_SOCIALLIST); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SOCIALLIST); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSOCIALLIST, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_HOMEBIND); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_HOMEBIND); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADHOMEBIND, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_SPELLCOOLDOWNS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SPELLCOOLDOWNS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSPELLCOOLDOWNS, stmt); if (sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED)) { - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_DECLINEDNAMES); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_DECLINEDNAMES); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADDECLINEDNAMES, stmt); } - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_GUILD); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_MEMBER); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADGUILD, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_ARENAINFO); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ARENAINFO); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADARENAINFO, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_ACHIEVEMENTS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ACHIEVEMENTS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADACHIEVEMENTS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_CRITERIAPROGRESS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_CRITERIAPROGRESS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADCRITERIAPROGRESS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_EQUIPMENTSETS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_EQUIPMENTSETS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADEQUIPMENTSETS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_BGDATA); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_BGDATA); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADBGDATA, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_GLYPHS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_GLYPHS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADGLYPHS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_TALENTS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_TALENTS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADTALENTS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_ACCOUNT_DATA); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PLAYER_ACCOUNT_DATA); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADACCOUNTDATA, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_SKILLS); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SKILLS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSKILLS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_RANDOMBG); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_RANDOMBG); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADRANDOMBG, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_BANNED); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_BANNED); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADBANNED, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_QUESTSTATUSREW); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_QUESTSTATUSREW); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADQUESTSTATUSREW, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_ACCOUNT_INSTANCELOCKTIMES); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ACCOUNT_INSTANCELOCKTIMES); stmt->setUInt32(0, m_accountId); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADINSTANCELOCKTIMES, stmt); - + return res; } @@ -234,9 +239,9 @@ void WorldSession::HandleCharEnumOpcode(WorldPacket & /*recv_data*/) /// get all the data necessary for loading all characters (along with their pets) on the account if (sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED)) - stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_ENUM_DECLINED_NAME); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ENUM_DECLINED_NAME); else - stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_ENUM); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ENUM); stmt->setUInt8(0, PET_SAVE_AS_CURRENT); stmt->setUInt32(1, GetAccountId()); @@ -383,7 +388,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data) delete _charCreateCallback.GetParam(); // Delete existing if any, to make the callback chain reset to stage 0 _charCreateCallback.SetParam(new CharacterCreateInfo(name, race_, class_, gender, skin, face, hairStyle, hairColor, facialHair, outfitId, recv_data)); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_CHECK_NAME); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHECK_NAME); stmt->setString(0, name); _charCreateCallback.SetFutureResult(CharacterDatabase.AsyncQuery(stmt)); } @@ -410,7 +415,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte ASSERT(_charCreateCallback.GetParam() == createInfo); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_SUM_REALMCHARS); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_SUM_REALM_CHARACTERS); stmt->setUInt32(0, GetAccountId()); _charCreateCallback.FreeResult(); @@ -443,7 +448,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte ASSERT(_charCreateCallback.GetParam() == createInfo); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_SUM_CHARS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_SUM_CHARS); stmt->setUInt32(0, GetAccountId()); _charCreateCallback.FreeResult(); @@ -476,7 +481,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte if (!allowTwoSideAccounts || skipCinematics == 1 || createInfo->Class == CLASS_DEATH_KNIGHT) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_CHAR_CREATE_INFO); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_CREATE_INFO); stmt->setUInt32(0, GetAccountId()); stmt->setUInt32(1, (skipCinematics == 1 || createInfo->Class == CLASS_DEATH_KNIGHT) ? 10 : 1); _charCreateCallback.SetFutureResult(CharacterDatabase.AsyncQuery(stmt)); @@ -634,12 +639,12 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte SQLTransaction trans = LoginDatabase.BeginTransaction(); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_REALMCHARACTERS); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_REALM_CHARACTERS); stmt->setUInt32(0, GetAccountId()); stmt->setUInt32(1, realmID); trans->Append(stmt); - stmt = LoginDatabase.GetPreparedStatement(LOGIN_ADD_REALMCHARACTERS); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_REALM_CHARACTERS); stmt->setUInt32(0, createInfo->CharCount); stmt->setUInt32(1, GetAccountId()); stmt->setUInt32(2, realmID); @@ -772,6 +777,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) // "GetAccountId() == db stored account id" checked in LoadFromDB (prevent login not own character using cheating tools) if (!pCurrChar->LoadFromDB(GUID_LOPART(playerGuid), holder)) { + SetPlayer(NULL); KickPlayer(); // disconnect client, player no set to session and it will not deleted or saved at kick delete pCurrChar; // delete it manually delete holder; // delete all unprocessed queries @@ -780,9 +786,6 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) } pCurrChar->GetMotionMaster()->Initialize(); - - SetPlayer(pCurrChar); - pCurrChar->SendDungeonDifficulty(false); WorldPacket data(SMSG_LOGIN_VERIFY_WORLD, 20); @@ -890,6 +893,17 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) } } + if (Group* group = pCurrChar->GetGroup()) + { + if (group->isLFGGroup()) + { + LfgDungeonSet Dungeons; + Dungeons.insert(sLFGMgr->GetDungeon(group->GetGUID())); + sLFGMgr->SetSelectedDungeons(pCurrChar->GetGUID(), Dungeons); + sLFGMgr->SetState(pCurrChar->GetGUID(), sLFGMgr->GetState(group->GetGUID())); + } + } + if (!pCurrChar->GetMap()->AddPlayerToMap(pCurrChar) || !pCurrChar->CheckInstanceLoginValid()) { AreaTrigger const* at = sObjectMgr->GetGoBackTrigger(pCurrChar->GetMapId()); @@ -904,8 +918,18 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) pCurrChar->SendInitialPacketsAfterAddToMap(); - CharacterDatabase.PExecute("UPDATE characters SET online = 1 WHERE guid = '%u'", pCurrChar->GetGUIDLow()); - LoginDatabase.PExecute("UPDATE account SET online = 1 WHERE id = '%u'", GetAccountId()); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_ONLINE); + + stmt->setUInt32(0, pCurrChar->GetGUIDLow()); + + CharacterDatabase.Execute(stmt); + + stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_ACCOUNT_ONLINE); + + stmt->setUInt32(0, GetAccountId()); + + LoginDatabase.Execute(stmt); + pCurrChar->SetInGameTime(getMSTime()); // announce group about member online (must be after add to player list to receive announce to self) @@ -980,7 +1004,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) sLog->outChar("Account: %d (IP: %s) Login Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), pCurrChar->GetName(), pCurrChar->GetGUIDLow()); - if (!pCurrChar->IsStandState() && !pCurrChar->HasUnitState(UNIT_STAT_STUNNED)) + if (!pCurrChar->IsStandState() && !pCurrChar->HasUnitState(UNIT_STATE_STUNNED)) pCurrChar->SetStandState(UNIT_STAND_STATE_STAND); m_playerLoading = false; @@ -1108,7 +1132,7 @@ void WorldSession::HandleCharRenameOpcode(WorldPacket& recv_data) // and that there is no character with the desired new name _charRenameCallback.SetParam(newName); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_FREE_NAME); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_FREE_NAME); stmt->setUInt32(0, GUID_LOPART(guid)); stmt->setUInt32(1, GetAccountId()); @@ -1137,7 +1161,7 @@ void WorldSession::HandleChangePlayerNameOpcodeCallBack(PreparedQueryResult resu uint64 guid = MAKE_NEW_GUID(guidLow, 0, HIGHGUID_PLAYER); // Update name and at_login flag in the db - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_NAME); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_NAME); stmt->setString(0, newName); stmt->setUInt16(1, AT_LOGIN_RENAME); @@ -1330,10 +1354,10 @@ void WorldSession::HandleRemoveGlyph(WorldPacket & recv_data) void WorldSession::HandleCharCustomize(WorldPacket& recv_data) { uint64 guid; - std::string newname; + std::string newName; recv_data >> guid; - recv_data >> newname; + recv_data >> newName; uint8 gender, skin, face, hairStyle, hairColor, facialHair; recv_data >> gender >> skin >> hairColor >> hairStyle >> facialHair >> face; @@ -1359,7 +1383,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data) } // prevent character rename to invalid name - if (!normalizePlayerName(newname)) + if (!normalizePlayerName(newName)) { WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1); data << uint8(CHAR_NAME_NO_NAME); @@ -1367,7 +1391,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data) return; } - uint8 res = ObjectMgr::CheckPlayerName(newname, true); + uint8 res = ObjectMgr::CheckPlayerName(newName, true); if (res != CHAR_NAME_SUCCESS) { WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1); @@ -1377,7 +1401,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data) } // check name limitations - if (AccountMgr::IsPlayerAccount(GetSecurity()) && sObjectMgr->IsReservedName(newname)) + if (AccountMgr::IsPlayerAccount(GetSecurity()) && sObjectMgr->IsReservedName(newName)) { WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1); data << uint8(CHAR_NAME_RESERVED); @@ -1386,7 +1410,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data) } // character with this name already exist - if (uint64 newguid = sObjectMgr->GetPlayerGUIDByName(newname)) + if (uint64 newguid = sObjectMgr->GetPlayerGUIDByName(newName)) { if (newguid != guid) { @@ -1397,22 +1421,34 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data) } } - CharacterDatabase.EscapeString(newname); if (QueryResult oldNameResult = CharacterDatabase.PQuery("SELECT name FROM characters WHERE guid ='%u'", GUID_LOPART(guid))) { std::string oldname = oldNameResult->Fetch()[0].GetString(); std::string IP_str = GetRemoteAddress(); - sLog->outChar("Account: %d (IP: %s), Character[%s] (guid:%u) Customized to: %s", GetAccountId(), IP_str.c_str(), oldname.c_str(), GUID_LOPART(guid), newname.c_str()); + sLog->outChar("Account: %d (IP: %s), Character[%s] (guid:%u) Customized to: %s", GetAccountId(), IP_str.c_str(), oldname.c_str(), GUID_LOPART(guid), newName.c_str()); } Player::Customize(guid, gender, skin, face, hairStyle, hairColor, facialHair); - CharacterDatabase.PExecute("UPDATE characters set name = '%s', at_login = at_login & ~ %u WHERE guid ='%u'", newname.c_str(), uint32(AT_LOGIN_CUSTOMIZE), GUID_LOPART(guid)); - CharacterDatabase.PExecute("DELETE FROM character_declinedname WHERE guid ='%u'", GUID_LOPART(guid)); - sWorld->UpdateCharacterNameData(GUID_LOPART(guid), newname, gender); - WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1+8+(newname.size()+1)+6); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_NAME_AT_LOGIN); + + stmt->setString(0, newName); + stmt->setUInt16(1, uint16(AT_LOGIN_CUSTOMIZE)); + stmt->setUInt32(2, GUID_LOPART(guid)); + + CharacterDatabase.Execute(stmt); + + stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_DECLINED_NAME); + + stmt->setUInt32(0, GUID_LOPART(guid)); + + CharacterDatabase.Execute(stmt); + + sWorld->UpdateCharacterNameData(GUID_LOPART(guid), newName, gender); + + WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1+8+(newName.size()+1)+6); data << uint8(RESPONSE_SUCCESS); data << uint64(guid); - data << newname; + data << newName; data << uint8(gender); data << uint8(skin); data << uint8(face); @@ -1774,7 +1810,9 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data) if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD)) { // Reset guild - trans->PAppend("DELETE FROM `guild_member` WHERE `guid`= '%u'", lowGuid); + if (QueryResult result = CharacterDatabase.PQuery("SELECT guildid FROM `guild_member` WHERE guid ='%u'", lowGuid)) + if (Guild* guild = sGuildMgr->GetGuildById((result->Fetch()[0]).GetUInt32())) + guild->DeleteMember(MAKE_NEW_GUID(lowGuid, 0, HIGHGUID_PLAYER)); } if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND)) @@ -1792,7 +1830,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data) stmt->setUInt32(0, lowGuid); trans->Append(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_PLAYER_HOMEBIND); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PLAYER_HOMEBIND); stmt->setUInt32(0, lowGuid); if (team == BG_TEAM_ALLIANCE) { diff --git a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp index 852549b3f53..966eae598a6 100755 --- a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp +++ b/src/server/game/Handlers/ChatHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -481,7 +481,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data) void WorldSession::HandleEmoteOpcode(WorldPacket & recv_data) { - if (!GetPlayer()->isAlive() || GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (!GetPlayer()->isAlive() || GetPlayer()->HasUnitState(UNIT_STATE_DIED)) return; uint32 emote; @@ -558,7 +558,7 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket & recv_data) break; default: // Only allow text-emotes for "dead" entities (feign death included) - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) break; GetPlayer()->HandleEmoteCommand(emote_anim); break; diff --git a/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp index e6c4499baab..6693cdfca27 100755 --- a/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp +++ b/src/server/game/Handlers/CombatHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp b/src/server/game/Handlers/DuelHandler.cpp index b1e6f3fdc3f..8afd9f3b978 100755 --- a/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp +++ b/src/server/game/Handlers/DuelHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp index 65865280459..9343a5356b6 100755 --- a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp +++ b/src/server/game/Handlers/GroupHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp index 7e964b4faf6..9115f8f0f1e 100755 --- a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp +++ b/src/server/game/Handlers/GuildHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -303,7 +303,7 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket) if (GetPlayer()->GetNPCIfCanInteractWith(vendorGuid, UNIT_NPC_FLAG_TABARDDESIGNER)) { // Remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); if (Guild* guild = _GetPlayerGuild(this)) diff --git a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index 4d323996de7..802597e14eb 100755 --- a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -503,7 +503,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); Item* pItem = _player->GetItemByGuid(itemguid); @@ -614,7 +614,7 @@ void WorldSession::HandleBuybackItem(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); Item* pItem = _player->GetItemFromBuyBackSlot(slot); @@ -732,11 +732,11 @@ void WorldSession::SendListInventory(uint64 vendorGuid) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); // Stop the npc if moving - if (vendor->HasUnitState(UNIT_STAT_MOVING)) + if (vendor->HasUnitState(UNIT_STATE_MOVING)) vendor->StopMoving(); VendorItemData const* items = vendor->GetVendorItems(); diff --git a/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp index 3df59b9bba1..3c6bd28b5cb 100755 --- a/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp +++ b/src/server/game/Handlers/LFGHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -48,7 +48,8 @@ void BuildPartyLockDungeonBlock(WorldPacket& data, const LfgLockPartyMap& lockMa void WorldSession::HandleLfgJoinOpcode(WorldPacket& recv_data) { if (!sWorld->getBoolConfig(CONFIG_DUNGEON_FINDER_ENABLE) || - (GetPlayer()->GetGroup() && GetPlayer()->GetGroup()->GetLeaderGUID() != GetPlayer()->GetGUID())) + (GetPlayer()->GetGroup() && GetPlayer()->GetGroup()->GetLeaderGUID() != GetPlayer()->GetGUID() && + (GetPlayer()->GetGroup()->GetMembersCount() == MAXGROUPSIZE || !GetPlayer()->GetGroup()->isLFGGroup()))) { recv_data.rfinish(); return; diff --git a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp index 05b4afc99e7..6508f08dc22 100755 --- a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp +++ b/src/server/game/Handlers/LootHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -324,7 +324,7 @@ void WorldSession::DoLootRelease(uint64 lguid) else { // not fully looted object - go->SetLootState(GO_ACTIVATED); + go->SetLootState(GO_ACTIVATED, player); // if the round robin player release, reset it. if (player->GetGUID() == loot->roundRobinPlayer) diff --git a/src/server/game/Server/Protocol/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp index 2dee8e3ae15..a8522bb2582 100755 --- a/src/server/game/Server/Protocol/Handlers/MailHandler.cpp +++ b/src/server/game/Handlers/MailHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 6b972f94dd5..f109332e235 100755 --- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -122,7 +122,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); if ((unit && unit->GetCreatureInfo()->ScriptID != unit->LastUsedScriptID) || (go && go->GetGOInfo()->ScriptId != go->LastUsedScriptID)) @@ -160,7 +160,8 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) else { go->AI()->GossipSelect(_player, menuId, gossipListId); - sScriptMgr->OnGossipSelect(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId)); + if (!sScriptMgr->OnGossipSelect(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId))) + _player->OnGossipSelect(go, gossipListId, menuId); } } } @@ -169,6 +170,11 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_WHO Message"); + time_t now = time(NULL); + if (now - timeLastWhoCommand < 5) + return; + else timeLastWhoCommand = now; + uint32 matchcount = 0; uint32 level_min, level_max, racemask, classmask, zones_count, str_count; @@ -533,7 +539,7 @@ void WorldSession::HandleAddFriendOpcode(WorldPacket & recv_data) sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s asked to add friend : '%s'", GetPlayer()->GetName(), friendName.c_str()); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_GUID_RACE_ACC_BY_NAME); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUID_RACE_ACC_BY_NAME); stmt->setString(0, friendName); @@ -624,7 +630,7 @@ void WorldSession::HandleAddIgnoreOpcode(WorldPacket & recv_data) sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s asked to Ignore: '%s'", GetPlayer()->GetName(), ignoreName.c_str()); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_GUID_BY_NAME); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUID_BY_NAME); stmt->setString(0, ignoreName); @@ -709,7 +715,7 @@ void WorldSession::HandleBugOpcode(WorldPacket & recv_data) sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", type.c_str()); sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", content.c_str()); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_BUG_REPORT); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_BUG_REPORT); stmt->setString(0, type); stmt->setString(1, content); diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index ae2612e4ced..7d1233c8f70 100755 --- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -472,22 +472,8 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data) if (GetPlayer()->IsInWorld()) { - if (Unit* mover = ObjectAccessor::GetUnit(*GetPlayer(), guid)) - { - GetPlayer()->SetMover(mover); - if (mover != GetPlayer() && mover->canFly()) - { - WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12); - data.append(mover->GetPackGUID()); - data << uint32(0); - SendPacket(&data); - } - } - else - { + if (_player->m_mover->GetGUID() != guid) sLog->outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " (%s - Entry: %u) and should be " UI64FMTD, guid, GetLogNameForGuid(guid), GUID_ENPART(guid), _player->m_mover->GetGUID()); - GetPlayer()->SetMover(GetPlayer()); - } } } diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp index 4162289f0ce..1f286a0af05 100755 --- a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -60,7 +60,7 @@ void WorldSession::HandleTabardVendorActivateOpcode(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); SendTabardVendorActivate(guid); @@ -89,7 +89,7 @@ void WorldSession::HandleBankerActivateOpcode(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); SendShowBank(guid); @@ -128,7 +128,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); // trainer list loaded at check; @@ -250,7 +250,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); if (!unit->isCanTrainingOf(_player, true)) @@ -314,7 +314,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data) GetPlayer()->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TALK); // remove fake death - //if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + //if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) // GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); if (unit->isArmorer() || unit->isCivilian() || unit->isQuestGiver() || unit->isServiceProvider() || unit->isGuard()) @@ -369,7 +369,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); if (!code.empty()) @@ -400,7 +400,7 @@ void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); SendSpiritResurrect(); @@ -455,7 +455,7 @@ void WorldSession::HandleBinderActivateOpcode(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); SendBindPoint(unit); @@ -470,7 +470,7 @@ void WorldSession::SendBindPoint(Creature* npc) uint32 bindspell = 3286; // update sql homebind - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_PLAYER_HOMEBIND); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_PLAYER_HOMEBIND); stmt->setUInt16(0, _player->GetMapId()); stmt->setUInt16(1, _player->GetAreaId()); stmt->setFloat (2, _player->GetPositionX()); @@ -507,7 +507,7 @@ void WorldSession::HandleListStabledPetsOpcode(WorldPacket & recv_data) return; // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); // remove mounts this fix bug where getting pet from stable while mounted deletes pet. @@ -519,7 +519,7 @@ void WorldSession::HandleListStabledPetsOpcode(WorldPacket & recv_data) void WorldSession::SendStablePet(uint64 guid) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_PET_SLOTS_DETAIL); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_SLOTS_DETAIL); stmt->setUInt32(0, _player->GetGUIDLow()); stmt->setUInt8(1, PET_SAVE_FIRST_STABLE_SLOT); @@ -609,7 +609,7 @@ void WorldSession::HandleStablePet(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); Pet* pet = _player->GetPet(); @@ -621,7 +621,7 @@ void WorldSession::HandleStablePet(WorldPacket & recv_data) return; } - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_PET_SLOTS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_SLOTS); stmt->setUInt32(0, _player->GetGUIDLow()); stmt->setUInt8(1, PET_SAVE_FIRST_STABLE_SLOT); @@ -679,10 +679,10 @@ void WorldSession::HandleUnstablePet(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_PET_ENTRY); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_ENTRY); stmt->setUInt32(0, _player->GetGUIDLow()); stmt->setUInt32(1, petnumber); @@ -759,7 +759,7 @@ void WorldSession::HandleBuyStableSlot(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); if (GetPlayer()->m_stableSlots < MAX_PET_STABLES) @@ -798,7 +798,7 @@ void WorldSession::HandleStableSwapPet(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); Pet* pet = _player->GetPet(); @@ -811,7 +811,7 @@ void WorldSession::HandleStableSwapPet(WorldPacket & recv_data) // Find swapped pet slot in stable - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_PET_SLOT_BY_ID); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_SLOT_BY_ID); stmt->setUInt32(0, _player->GetGUIDLow()); stmt->setUInt32(1, petId); @@ -886,7 +886,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); // reputation discount diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.h b/src/server/game/Handlers/NPCHandler.h index 2b14e0edc21..af84b71a74f 100755 --- a/src/server/game/Server/Protocol/Handlers/NPCHandler.h +++ b/src/server/game/Handlers/NPCHandler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index 5a8781d3925..16b6a4bb714 100755 --- a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -155,6 +155,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid case COMMAND_STAY: //flat=1792 //STAY pet->AttackStop(); pet->InterruptNonMeleeSpells(false); + pet->GetMotionMaster()->Clear(false); pet->GetMotionMaster()->MoveIdle(); charmInfo->SetCommandState(COMMAND_STAY); @@ -201,7 +202,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid return; } - pet->ClearUnitState(UNIT_STAT_FOLLOW); + pet->ClearUnitState(UNIT_STATE_FOLLOW); // This is true if pet has no target or has target but targets differs. if (pet->getVictim() != TargetUnit || (pet->getVictim() == TargetUnit && !pet->GetCharmInfo()->IsCommandAttack())) { @@ -776,7 +777,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket) targets.Read(recvPacket, caster); HandleClientCastFlags(recvPacket, castFlags, targets); - caster->ClearUnitState(UNIT_STAT_FOLLOW); + caster->ClearUnitState(UNIT_STATE_FOLLOW); Spell* spell = new Spell(caster, spellInfo, TRIGGERED_NONE); spell->m_cast_count = castCount; // probably pending spell cast diff --git a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp index fed84728efd..b4c07811598 100755 --- a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Handlers/PetitionsHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -98,7 +98,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); uint32 charterid = 0; @@ -539,7 +539,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data) return; } - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_PETITION_SIGNATURE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PETITION_SIGNATURE); stmt->setUInt32(0, GUID_LOPART(ownerGuid)); stmt->setUInt32(1, GUID_LOPART(petitionGuid)); @@ -715,7 +715,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data) uint32 type; std::string name; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PETITION); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PETITION); stmt->setUInt32(0, GUID_LOPART(petitionGuid)); PreparedQueryResult result = CharacterDatabase.Query(stmt); @@ -780,7 +780,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data) // Get petition signatures from db uint8 signatures; - stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PETITION_SIGNATURE); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PETITION_SIGNATURE); stmt->setUInt32(0, GUID_LOPART(petitionGuid)); result = CharacterDatabase.Query(stmt); diff --git a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp index 042b1242a95..5702eefffec 100755 --- a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp +++ b/src/server/game/Handlers/QueryHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp index e0bcadc89e9..f9aa40cdcda 100755 --- a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp +++ b/src/server/game/Handlers/QuestHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -95,7 +95,7 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); // Stop the npc if moving creature->StopMoving(); diff --git a/src/server/game/Server/Protocol/Handlers/ReferAFriendHandler.cpp b/src/server/game/Handlers/ReferAFriendHandler.cpp index 58d425ddf98..58d425ddf98 100644 --- a/src/server/game/Server/Protocol/Handlers/ReferAFriendHandler.cpp +++ b/src/server/game/Handlers/ReferAFriendHandler.cpp diff --git a/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp index 7e1ed01f9d3..355effba0c6 100755 --- a/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp +++ b/src/server/game/Handlers/SkillHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -68,7 +68,7 @@ void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); if (!(_player->resetTalents())) diff --git a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index ffe205304e3..b8908d0f9f9 100755 --- a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp b/src/server/game/Handlers/TaxiHandler.cpp index fe6d3f02ffa..8eb1eab06d9 100755 --- a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp +++ b/src/server/game/Handlers/TaxiHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -27,7 +27,6 @@ #include "UpdateMask.h" #include "Path.h" #include "WaypointMovementGenerator.h" -#include "DestinationHolderImp.h" void WorldSession::HandleTaxiNodeStatusQueryOpcode(WorldPacket & recv_data) { @@ -80,7 +79,7 @@ void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket & recv_data) } // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); // unknown taxi node case @@ -119,7 +118,7 @@ void WorldSession::SendTaxiMenu(Creature* unit) void WorldSession::SendDoFlight(uint32 mountDisplayId, uint32 path, uint32 pathNode) { // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); while (GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE) diff --git a/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp b/src/server/game/Handlers/TicketHandler.cpp index ad883394270..a270d42b000 100755 --- a/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp +++ b/src/server/game/Handlers/TicketHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -137,7 +137,7 @@ void WorldSession::HandleGMSurveySubmit(WorldPacket& recv_data) std::string comment; // comment ("Usage: GMSurveyAnswerSubmit(question, rank, comment)") recv_data >> comment; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GM_SUBSURVEY); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GM_SUBSURVEY); stmt->setUInt32(0, nextSurveyID); stmt->setUInt32(1, subSurveyId); stmt->setUInt32(2, rank); @@ -148,7 +148,7 @@ void WorldSession::HandleGMSurveySubmit(WorldPacket& recv_data) std::string comment; // just a guess recv_data >> comment; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GM_SURVEY); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GM_SURVEY); stmt->setUInt32(0, GUID_LOPART(GetPlayer()->GetGUID())); stmt->setUInt32(1, nextSurveyID); stmt->setUInt32(2, mainSurvey); @@ -169,7 +169,7 @@ void WorldSession::HandleReportLag(WorldPacket& recv_data) recv_data >> y; recv_data >> z; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_LAG_REPORT); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_LAG_REPORT); stmt->setUInt32(0, GUID_LOPART(GetPlayer()->GetGUID())); stmt->setUInt8 (1, lagType); stmt->setUInt16(2, mapId); diff --git a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp index 865158e7860..4c39992f344 100755 --- a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp +++ b/src/server/game/Handlers/TradeHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -561,7 +561,7 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket) return; } - if (GetPlayer()->HasUnitState(UNIT_STAT_STUNNED)) + if (GetPlayer()->HasUnitState(UNIT_STATE_STUNNED)) { SendTradeStatus(TRADE_STATUS_YOU_STUNNED); return; @@ -611,7 +611,7 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket) return; } - if (pOther->HasUnitState(UNIT_STAT_STUNNED)) + if (pOther->HasUnitState(UNIT_STATE_STUNNED)) { SendTradeStatus(TRADE_STATUS_TARGET_STUNNED); return; diff --git a/src/server/game/Server/Protocol/Handlers/VehicleHandler.cpp b/src/server/game/Handlers/VehicleHandler.cpp index 256f8b327ff..ce4f6ccb8fe 100644 --- a/src/server/game/Server/Protocol/Handlers/VehicleHandler.cpp +++ b/src/server/game/Handlers/VehicleHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Server/Protocol/Handlers/VoiceChatHandler.cpp b/src/server/game/Handlers/VoiceChatHandler.cpp index be8307b29b1..34ad5ac3eae 100755 --- a/src/server/game/Server/Protocol/Handlers/VoiceChatHandler.cpp +++ b/src/server/game/Handlers/VoiceChatHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index 9d5ffb6542a..722b7089a17 100755 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -139,7 +139,7 @@ void InstanceSaveManager::RemoveInstanceSave(uint32 InstanceId) // save the resettime for normal instances only when they get unloaded if (time_t resettime = itr->second->GetResetTimeForDB()) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_INSTANCE_RESETTIME); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_INSTANCE_RESETTIME); stmt->setUInt32(0, uint32(resettime)); stmt->setUInt32(1, InstanceId); @@ -184,7 +184,7 @@ void InstanceSave::SaveToDB() } } - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_INSTANCE_SAVE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_INSTANCE_SAVE); stmt->setUInt32(0, m_instanceid); stmt->setUInt16(1, GetMapId()); stmt->setUInt32(2, uint32(GetResetTimeForDB())); @@ -256,7 +256,7 @@ void InstanceSaveManager::LoadInstances() CharacterDatabase.DirectExecute("DELETE tmp.* FROM group_instance AS tmp LEFT JOIN instance ON tmp.instance = instance.id WHERE tmp.instance > 0 AND instance.id IS NULL"); // Clean invalid references to instance - CharacterDatabase.DirectExecute(CharacterDatabase.GetPreparedStatement(CHAR_RESET_NONEXISTENT_INSTANCE_FOR_CORPSES)); + CharacterDatabase.DirectExecute(CharacterDatabase.GetPreparedStatement(CHAR_UPD_NONEXISTENT_INSTANCE_FOR_CORPSES)); CharacterDatabase.DirectExecute("UPDATE characters AS tmp LEFT JOIN instance ON tmp.instance_id = instance.id SET tmp.instance_id = 0 WHERE tmp.instance_id > 0 AND instance.id IS NULL"); // Initialize instance id storage (Needs to be done after the trash has been clean out) @@ -316,7 +316,7 @@ void InstanceSaveManager::LoadResetTimes() while (result->NextRow()); // update reset time for normal instances with the max creature respawn time + X hours - if (PreparedQueryResult result2 = CharacterDatabase.Query(CharacterDatabase.GetPreparedStatement(CHAR_GET_MAX_CREATURE_RESPAWNS))) + if (PreparedQueryResult result2 = CharacterDatabase.Query(CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAX_CREATURE_RESPAWNS))) { do { @@ -532,8 +532,8 @@ void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId) if (iMap && iMap->IsDungeon()) ((InstanceMap*)iMap)->Reset(INSTANCE_RESET_RESPAWN_DELAY); - else - sObjectMgr->DeleteRespawnTimeForInstance(instanceId); // even if map is not loaded + + sObjectMgr->DeleteRespawnTimeForInstance(instanceId); // even if map is not loaded // Free up the instance id and allow it to be reused sMapMgr->FreeInstanceId(instanceId); @@ -586,7 +586,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b ScheduleReset(true, time_t(next_reset-3600), InstResetEvent(1, mapid, difficulty, 0)); // Update it in the DB - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_GLOBAL_INSTANCE_RESETTIME); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GLOBAL_INSTANCE_RESETTIME); stmt->setUInt32(0, next_reset); stmt->setUInt16(1, uint16(mapid)); diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h index b4e97f40f87..83c2170255d 100755 --- a/src/server/game/Instances/InstanceSaveMgr.h +++ b/src/server/game/Instances/InstanceSaveMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index b8987be9adb..90fb8ffb9f0 100755 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -32,7 +32,7 @@ void InstanceScript::SaveToDB() if (data.empty()) return; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_INSTANCE_DATA); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_INSTANCE_DATA); stmt->setUInt32(0, GetCompletedEncounterMask()); stmt->setString(1, data); stmt->setUInt32(2, instance->GetInstanceId()); @@ -302,21 +302,21 @@ void InstanceScript::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData) } // Send Notify to all players in instance -void InstanceScript::DoSendNotifyToInstance(const char *format, ...) +void InstanceScript::DoSendNotifyToInstance(char const* format, ...) { - InstanceMap::PlayerList const &PlayerList = instance->GetPlayers(); + InstanceMap::PlayerList const& players = instance->GetPlayers(); - if (!PlayerList.isEmpty()) + if (!players.isEmpty()) { va_list ap; va_start(ap, format); - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - { - if (Player* player = i->getSource()) - if (WorldSession* pSession = player->GetSession()) - pSession->SendNotification(format, ap); - } + char buff[1024]; + vsnprintf(buff, 1024, format, ap); va_end(ap); + for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i) + if (Player* player = i->getSource()) + if (WorldSession* session = player->GetSession()) + session->SendNotification(buff); } } diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index 1751b7b3106..69f11c203c1 100755 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index dd17e8277d6..c9e8f68af52 100755 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h index 10ae786a7d6..4a6becc7eff 100755 --- a/src/server/game/Loot/LootMgr.h +++ b/src/server/game/Loot/LootMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp index e5de3e35956..3c3888eb9f8 100755 --- a/src/server/game/Mails/Mail.cpp +++ b/src/server/game/Mails/Mail.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -154,7 +154,7 @@ void MailDraft::SendReturnToSender(uint32 sender_acc, uint32 sender_guid, uint32 Item* item = mailItemIter->second; item->SaveToDB(trans); // item not in inventory and can be save standalone // owner in data will set at mail receive and item extracting - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_ITEM_OWNER); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ITEM_OWNER); stmt->setUInt32(0, receiver_guid); stmt->setUInt32(1, item->GetGUIDLow()); trans->Append(stmt); @@ -200,7 +200,7 @@ void MailDraft::SendMailTo(SQLTransaction& trans, MailReceiver const& receiver, // Add to DB uint8 index = 0; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_MAIL); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_MAIL); stmt->setUInt32( index, mailId); stmt->setUInt8 (++index, uint8(sender.GetMailMessageType())); stmt->setInt8 (++index, int8(sender.GetStationery())); @@ -220,7 +220,7 @@ void MailDraft::SendMailTo(SQLTransaction& trans, MailReceiver const& receiver, for (MailItemMap::const_iterator mailItemIter = m_items.begin(); mailItemIter != m_items.end(); ++mailItemIter) { Item* pItem = mailItemIter->second; - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_MAIL_ITEM); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_MAIL_ITEM); stmt->setUInt32(0, mailId); stmt->setUInt32(1, pItem->GetGUIDLow()); stmt->setUInt32(2, receiver.GetPlayerGUIDLow()); diff --git a/src/server/game/Mails/Mail.h b/src/server/game/Mails/Mail.h index f37a7f1beb7..6615d59160a 100755 --- a/src/server/game/Mails/Mail.h +++ b/src/server/game/Mails/Mail.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 34a7b60bcbd..df5ec540427 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -1539,6 +1539,24 @@ inline GridMap* Map::GetGrid(float x, float y) return GridMaps[gx][gy]; } +float Map::GetWaterOrGroundLevel(float x, float y, float z, float* ground /*= NULL*/, bool swim /*= false*/) const +{ + if (const_cast<Map*>(this)->GetGrid(x, y)) + { + // we need ground level (including grid height version) for proper return water level in point + float ground_z = GetHeight(x, y, z, true, 50.0f); + if (ground) + *ground = ground_z; + + LiquidData liquid_status; + + ZLiquidStatus res = getLiquidStatus(x, y, ground_z, MAP_ALL_LIQUIDS, &liquid_status); + return res ? ( swim ? liquid_status.level - 2.0f : liquid_status.level) : ground_z; + } + + return VMAP_INVALID_HEIGHT_VALUE; +} + float Map::GetHeight(float x, float y, float z, bool checkVMap /*= true*/, float maxSearchDist /*= DEFAULT_HEIGHT_SEARCH*/) const { // find raw .map surface under Z coordinates diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 542d9119830..f3b45bd8f37 100755 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -424,6 +424,8 @@ class Map : public GridRefManager<NGridType> InstanceMap* ToInstanceMap(){ if (IsDungeon()) return reinterpret_cast<InstanceMap*>(this); else return NULL; } const InstanceMap* ToInstanceMap() const { if (IsDungeon()) return (const InstanceMap*)((InstanceMap*)this); else return NULL; } + float GetWaterOrGroundLevel(float x, float y, float z, float* ground = NULL, bool swim = false) const; + private: void LoadMapAndVMap(int gx, int gy); void LoadVMap(int gx, int gy); diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index a56a193ba64..fbe609bee23 100755 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -124,9 +124,17 @@ Map* MapInstanced::CreateInstanceForPlayer(const uint32 mapId, Player* player) // the instance id is set in battlegroundid NewInstanceId = player->GetBattlegroundId(); if (!NewInstanceId) return NULL; - map = FindInstanceMap(NewInstanceId); + map = sMapMgr->FindMap(mapId, NewInstanceId); if (!map) - map = CreateBattleground(NewInstanceId, player->GetBattleground()); + { + if (Battleground* bg = player->GetBattleground()) + map = CreateBattleground(NewInstanceId, bg); + else + { + player->TeleportToBGEntryPoint(); + return NULL; + } + } } else { diff --git a/src/server/game/Maps/MapInstanced.h b/src/server/game/Maps/MapInstanced.h index 9b714cb7fb3..0b1a404630b 100755 --- a/src/server/game/Maps/MapInstanced.h +++ b/src/server/game/Maps/MapInstanced.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index f31f1348b44..0fb28008c1e 100755 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -25,7 +25,6 @@ #include "GridDefines.h" #include "MapInstanced.h" #include "InstanceScript.h" -#include "DestinationHolderImp.h" #include "Config.h" #include "World.h" #include "CellImpl.h" diff --git a/src/server/game/Maps/MapManager.h b/src/server/game/Maps/MapManager.h index 3b168a57cd5..1049325237a 100755 --- a/src/server/game/Maps/MapManager.h +++ b/src/server/game/Maps/MapManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Maps/MapRefManager.h b/src/server/game/Maps/MapRefManager.h index 48d960988f6..3976139a18d 100755 --- a/src/server/game/Maps/MapRefManager.h +++ b/src/server/game/Maps/MapRefManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Maps/MapReference.h b/src/server/game/Maps/MapReference.h index 1b939c329aa..86709fb28ab 100755 --- a/src/server/game/Maps/MapReference.h +++ b/src/server/game/Maps/MapReference.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Maps/ZoneScript.h b/src/server/game/Maps/ZoneScript.h index 58ba9ae2c43..df6349a7664 100755 --- a/src/server/game/Maps/ZoneScript.h +++ b/src/server/game/Maps/ZoneScript.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -37,7 +37,7 @@ class ZoneScript virtual void OnGameObjectCreate(GameObject* /*go*/) {} virtual void OnGameObjectRemove(GameObject* /*go*/) {} - virtual void OnCreatureDeath(Creature* /*creature*/) {} + virtual void OnUnitDeath(Unit* /*unit*/) {} //All-purpose data storage 64 bit virtual uint64 GetData64(uint32 /*DataId*/) { return 0; } diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h index cbcad520e5f..4faacc1f7b7 100755 --- a/src/server/game/Miscellaneous/Formulas.h +++ b/src/server/game/Miscellaneous/Formulas.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index a5935e1de9f..e751dbf92fe 100755 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -492,9 +492,9 @@ enum TrinityStrings LANG_MOVEGENS_WAYPOINT = 529, LANG_MOVEGENS_ANIMAL_RANDOM = 530, LANG_MOVEGENS_CONFUSED = 531, - LANG_MOVEGENS_TARGETED_PLAYER = 532, - LANG_MOVEGENS_TARGETED_CREATURE = 533, - LANG_MOVEGENS_TARGETED_NULL = 534, + LANG_MOVEGENS_CHASE_PLAYER = 532, + LANG_MOVEGENS_CHASE_CREATURE = 533, + LANG_MOVEGENS_CHASE_NULL = 534, LANG_MOVEGENS_HOME_CREATURE = 535, LANG_MOVEGENS_HOME_PLAYER = 536, LANG_MOVEGENS_FLIGHT = 537, @@ -807,7 +807,11 @@ enum TrinityStrings LANG_CHAR_NOT_BANNED = 1136, LANG_DEV_ON = 1137, LANG_DEV_OFF = 1138, - // Room for more level 3 1139-1199 not used + LANG_MOVEGENS_FOLLOW_PLAYER = 1139, + LANG_MOVEGENS_FOLLOW_CREATURE = 1140, + LANG_MOVEGENS_FOLLOW_NULL = 1141, + LANG_MOVEGENS_EFFECT = 1142, + // Room for more level 3 1143-1199 not used // Debug commands LANG_CINEMATIC_NOT_EXIST = 1200, diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 952df731c19..f5f8133ebef 100755 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -95,6 +95,7 @@ enum Races // Class value is index in ChrClasses.dbc enum Classes { + CLASS_NONE = 0, CLASS_WARRIOR = 1, CLASS_PALADIN = 2, CLASS_HUNTER = 3, @@ -1502,6 +1503,7 @@ enum GameObjectDestructibleState GO_DESTRUCTIBLE_REBUILDING = 3, }; +// EmotesText.dbc enum TextEmotes { TEXT_EMOTE_AGREE = 1, @@ -1665,7 +1667,7 @@ enum TextEmotes TEXT_EMOTE_ATTACKMYTARGET = 307, TEXT_EMOTE_OOM = 323, TEXT_EMOTE_FOLLOW = 324, - TEXT_EMOTE_HELP = 325, + TEXT_EMOTE_WAIT = 325, TEXT_EMOTE_HEALME = 326, TEXT_EMOTE_OPENFIRE = 327, TEXT_EMOTE_FLIRT = 328, @@ -1674,7 +1676,7 @@ enum TextEmotes TEXT_EMOTE_WINK = 363, TEXT_EMOTE_PAT = 364, TEXT_EMOTE_SERIOUS = 365, - TEXT_EMOTE_MOUNTSPECIAL = 366, + TEXT_EMOTE_MOUNT_SPECIAL = 366, TEXT_EMOTE_GOODLUCK = 367, TEXT_EMOTE_BLAME = 368, TEXT_EMOTE_BLANK = 369, @@ -1687,6 +1689,7 @@ enum TextEmotes TEXT_EMOTE_ENEMY = 376, TEXT_EMOTE_EYEBROW = 377, TEXT_EMOTE_TOAST = 378, + TEXT_EMOTE_FAIL = 379, TEXT_EMOTE_HIGHFIVE = 380, TEXT_EMOTE_ABSENT = 381, TEXT_EMOTE_ARM = 382, @@ -1741,6 +1744,7 @@ enum TextEmotes TEXT_EMOTE_SNEEZE = 436, TEXT_EMOTE_SNORT = 437, TEXT_EMOTE_SQUEAL = 438, + TEXT_EMOTE_STOPATTACK = 439, TEXT_EMOTE_SUSPICIOUS = 440, TEXT_EMOTE_THINK = 441, TEXT_EMOTE_TRUCE = 442, @@ -1756,402 +1760,695 @@ enum TextEmotes TEXT_EMOTE_YW = 453, }; +// Emotes.dbc enum Emote { - EMOTE_ONESHOT_NONE = 0, - EMOTE_ONESHOT_TALK = 1, - EMOTE_ONESHOT_BOW = 2, - EMOTE_ONESHOT_WAVE = 3, - EMOTE_ONESHOT_CHEER = 4, - EMOTE_ONESHOT_EXCLAMATION = 5, - EMOTE_ONESHOT_QUESTION = 6, - EMOTE_ONESHOT_EAT = 7, - EMOTE_STATE_DANCE = 10, - EMOTE_ONESHOT_LAUGH = 11, - EMOTE_STATE_SLEEP = 12, - EMOTE_STATE_SIT = 13, - EMOTE_ONESHOT_RUDE = 14, - EMOTE_ONESHOT_ROAR = 15, - EMOTE_ONESHOT_KNEEL = 16, - EMOTE_ONESHOT_KISS = 17, - EMOTE_ONESHOT_CRY = 18, - EMOTE_ONESHOT_CHICKEN = 19, - EMOTE_ONESHOT_BEG = 20, - EMOTE_ONESHOT_APPLAUD = 21, - EMOTE_ONESHOT_SHOUT = 22, - EMOTE_ONESHOT_FLEX = 23, - EMOTE_ONESHOT_SHY = 24, - EMOTE_ONESHOT_POINT = 25, - EMOTE_STATE_STAND = 26, - EMOTE_STATE_READYUNARMED = 27, - EMOTE_STATE_WORK_SHEATHED = 28, - EMOTE_STATE_POINT = 29, - EMOTE_STATE_NONE = 30, - EMOTE_ONESHOT_WOUND = 33, - EMOTE_ONESHOT_WOUNDCRITICAL = 34, - EMOTE_ONESHOT_ATTACKUNARMED = 35, - EMOTE_ONESHOT_ATTACK1H = 36, - EMOTE_ONESHOT_ATTACK2HTIGHT = 37, - EMOTE_ONESHOT_ATTACK2HLOOSE = 38, - EMOTE_ONESHOT_PARRYUNARMED = 39, - EMOTE_ONESHOT_PARRYSHIELD = 43, - EMOTE_ONESHOT_READYUNARMED = 44, - EMOTE_ONESHOT_READY1H = 45, - EMOTE_ONESHOT_READYBOW = 48, - EMOTE_ONESHOT_SPELLPRECAST = 50, - EMOTE_ONESHOT_SPELLCAST = 51, - EMOTE_ONESHOT_BATTLEROAR = 53, - EMOTE_ONESHOT_SPECIALATTACK1H = 54, - EMOTE_ONESHOT_KICK = 60, - EMOTE_ONESHOT_ATTACKTHROWN = 61, - EMOTE_STATE_STUN = 64, - EMOTE_STATE_DEAD = 65, - EMOTE_ONESHOT_SALUTE = 66, - EMOTE_STATE_KNEEL = 68, - EMOTE_STATE_USESTANDING = 69, - EMOTE_ONESHOT_WAVE_NOSHEATHE = 70, - EMOTE_ONESHOT_CHEER_NOSHEATHE = 71, - EMOTE_ONESHOT_EAT_NOSHEATHE = 92, - EMOTE_STATE_STUN_NOSHEATHE = 93, - EMOTE_ONESHOT_DANCE = 94, - EMOTE_ONESHOT_SALUTE_NOSHEATH = 113, - EMOTE_STATE_USESTANDING_NOSHEATHE = 133, - EMOTE_ONESHOT_LAUGH_NOSHEATHE = 153, - EMOTE_STATE_WORK = 173, - EMOTE_STATE_SPELLPRECAST = 193, - EMOTE_ONESHOT_READYRIFLE = 213, - EMOTE_STATE_READYRIFLE = 214, - EMOTE_STATE_WORK_MINING = 233, - EMOTE_STATE_WORK_CHOPWOOD = 234, - EMOTE_STATE_APPLAUD = 253, - EMOTE_ONESHOT_LIFTOFF = 254, - EMOTE_ONESHOT_YES = 273, - EMOTE_ONESHOT_NO = 274, - EMOTE_ONESHOT_TRAIN = 275, - EMOTE_ONESHOT_LAND = 293, - EMOTE_STATE_AT_EASE = 313, - EMOTE_STATE_READY1H = 333, - EMOTE_STATE_SPELLKNEELSTART = 353, - EMOTE_STATE_SUBMERGED = 373, - EMOTE_ONESHOT_SUBMERGE = 374, - EMOTE_STATE_READY2H = 375, - EMOTE_STATE_READYBOW = 376, - EMOTE_ONESHOT_MOUNTSPECIAL = 377, - EMOTE_STATE_TALK = 378, - EMOTE_STATE_FISHING = 379, - EMOTE_ONESHOT_FISHING = 380, - EMOTE_ONESHOT_LOOT = 381, - EMOTE_STATE_WHIRLWIND = 382, - EMOTE_STATE_DROWNED = 383, - EMOTE_STATE_HOLD_BOW = 384, - EMOTE_STATE_HOLD_RIFLE = 385, - EMOTE_STATE_HOLD_THROWN = 386, - EMOTE_ONESHOT_DROWN = 387, - EMOTE_ONESHOT_STOMP = 388, - EMOTE_ONESHOT_ATTACKOFF = 389, - EMOTE_ONESHOT_ATTACKOFFPIERCE = 390, - EMOTE_STATE_ROAR = 391, - EMOTE_STATE_LAUGH = 392, - EMOTE_ONESHOT_CREATURE_SPECIAL = 393, - EMOTE_ONESHOT_JUMPLANDRUN = 394, - EMOTE_ONESHOT_JUMPEND = 395, - EMOTE_ONESHOT_TALK_NOSHEATHE = 396, - EMOTE_ONESHOT_POINT_NOSHEATHE = 397, - EMOTE_STATE_CANNIBALIZE = 398, - EMOTE_ONESHOT_JUMPSTART = 399, - EMOTE_STATE_DANCESPECIAL = 400, - EMOTE_ONESHOT_DANCESPECIAL = 401, - EMOTE_ONESHOT_CUSTOMSPELL01 = 402, - EMOTE_ONESHOT_CUSTOMSPELL02 = 403, - EMOTE_ONESHOT_CUSTOMSPELL03 = 404, - EMOTE_ONESHOT_CUSTOMSPELL04 = 405, - EMOTE_ONESHOT_CUSTOMSPELL05 = 406, - EMOTE_ONESHOT_CUSTOMSPELL06 = 407, - EMOTE_ONESHOT_CUSTOMSPELL07 = 408, - EMOTE_ONESHOT_CUSTOMSPELL08 = 409, - EMOTE_ONESHOT_CUSTOMSPELL09 = 410, - EMOTE_ONESHOT_CUSTOMSPELL10 = 411, - EMOTE_STATE_EXCLAIM = 412, - EMOTE_STATE_DANCE_CUSTOM = 413, - EMOTE_STATE_SIT_CHAIR_MED = 415, - EMOTE_STATE_CUSTOM_SPELL_01 = 416, - EMOTE_STATE_CUSTOM_SPELL_02 = 417, - EMOTE_STATE_EAT = 418, - EMOTE_STATE_CUSTOM_SPELL_04 = 419, - EMOTE_STATE_CUSTOM_SPELL_03 = 420, - EMOTE_STATE_CUSTOM_SPELL_05 = 421, - EMOTE_STATE_SPELLEFFECT_HOLD = 422, - EMOTE_STATE_EAT_NO_SHEATHE = 423, - EMOTE_STATE_MOUNT = 424, - EMOTE_STATE_READY2HL = 425, - EMOTE_STATE_SIT_CHAIR_HIGH = 426, - EMOTE_STATE_FALL = 427, - EMOTE_STATE_LOOT = 428, - EMOTE_STATE_SUBMERGED_NEW = 429, - EMOTE_ONESHOT_COWER = 430, - EMOTE_STATE_COWER = 431, - EMOTE_ONESHOT_USESTANDING = 432, - EMOTE_STATE_STEALTH_STAND = 433, - EMOTE_ONESHOT_OMNICAST_GHOUL = 434, - EMOTE_ONESHOT_ATTACKBOW = 435, - EMOTE_ONESHOT_ATTACKRIFLE = 436, - EMOTE_STATE_SWIM_IDLE = 437, - EMOTE_STATE_ATTACK_UNARMED = 438, - EMOTE_ONESHOT_SPELLCAST_W_SOUND = 439, - EMOTE_ONESHOT_DODGE = 440, - EMOTE_ONESHOT_PARRY1H = 441, - EMOTE_ONESHOT_PARRY2H = 442, - EMOTE_ONESHOT_PARRY2HL = 443, - EMOTE_STATE_FLYFALL = 444, - EMOTE_ONESHOT_FLYDEATH = 445, - EMOTE_STATE_FLY_FALL = 446, - EMOTE_ONESHOT_FLY_SIT_GROUND_DOWN = 447, - EMOTE_ONESHOT_FLY_SIT_GROUND_UP = 448, - EMOTE_ONESHOT_EMERGE = 449, - EMOTE_ONESHOT_DRAGONSPIT = 450, - EMOTE_STATE_SPECIALUNARMED = 451, - EMOTE_ONESHOT_FLYGRAB = 452, - EMOTE_STATE_FLYGRABCLOSED = 453, - EMOTE_ONESHOT_FLYGRABTHROWN = 454, - EMOTE_STATE_FLY_SIT_GROUND = 455, - EMOTE_STATE_WALKBACKWARDS = 456, - EMOTE_ONESHOT_FLYTALK = 457, - EMOTE_ONESHOT_FLYATTACK1H = 458, - EMOTE_STATE_CUSTOMSPELL08 = 459, - EMOTE_ONESHOT_FLY_DRAGONSPIT = 460, - EMOTE_STATE_SIT_CHAIR_LOW = 461, - EMOTE_ONE_SHOT_STUN = 462, - EMOTE_ONESHOT_SPELLCAST_OMNI = 463, - EMOTE_STATE_READYTHROWN = 464 -}; - + EMOTE_ONESHOT_NONE = 0, + EMOTE_ONESHOT_TALK = 1, + EMOTE_ONESHOT_BOW = 2, + EMOTE_ONESHOT_WAVE = 3, + EMOTE_ONESHOT_CHEER = 4, + EMOTE_ONESHOT_EXCLAMATION = 5, + EMOTE_ONESHOT_QUESTION = 6, + EMOTE_ONESHOT_EAT = 7, + EMOTE_STATE_DANCE = 10, + EMOTE_ONESHOT_LAUGH = 11, + EMOTE_STATE_SLEEP = 12, + EMOTE_STATE_SIT = 13, + EMOTE_ONESHOT_RUDE = 14, + EMOTE_ONESHOT_ROAR = 15, + EMOTE_ONESHOT_KNEEL = 16, + EMOTE_ONESHOT_KISS = 17, + EMOTE_ONESHOT_CRY = 18, + EMOTE_ONESHOT_CHICKEN = 19, + EMOTE_ONESHOT_BEG = 20, + EMOTE_ONESHOT_APPLAUD = 21, + EMOTE_ONESHOT_SHOUT = 22, + EMOTE_ONESHOT_FLEX = 23, + EMOTE_ONESHOT_SHY = 24, + EMOTE_ONESHOT_POINT = 25, + EMOTE_STATE_STAND = 26, + EMOTE_STATE_READY_UNARMED = 27, + EMOTE_STATE_WORK_SHEATHED = 28, + EMOTE_STATE_POINT = 29, + EMOTE_STATE_NONE = 30, + EMOTE_ONESHOT_WOUND = 33, + EMOTE_ONESHOT_WOUND_CRITICAL = 34, + EMOTE_ONESHOT_ATTACK_UNARMED = 35, + EMOTE_ONESHOT_ATTACK1H = 36, + EMOTE_ONESHOT_ATTACK2HTIGHT = 37, + EMOTE_ONESHOT_ATTACK2H_LOOSE = 38, + EMOTE_ONESHOT_PARRY_UNARMED = 39, + EMOTE_ONESHOT_PARRY_SHIELD = 43, + EMOTE_ONESHOT_READY_UNARMED = 44, + EMOTE_ONESHOT_READY1H = 45, + EMOTE_ONESHOT_READY_BOW = 48, + EMOTE_ONESHOT_SPELL_PRECAST = 50, + EMOTE_ONESHOT_SPELL_CAST = 51, + EMOTE_ONESHOT_BATTLE_ROAR = 53, + EMOTE_ONESHOT_SPECIALATTACK1H = 54, + EMOTE_ONESHOT_KICK = 60, + EMOTE_ONESHOT_ATTACK_THROWN = 61, + EMOTE_STATE_STUN = 64, + EMOTE_STATE_DEAD = 65, + EMOTE_ONESHOT_SALUTE = 66, + EMOTE_STATE_KNEEL = 68, + EMOTE_STATE_USE_STANDING = 69, + EMOTE_ONESHOT_WAVE_NO_SHEATHE = 70, + EMOTE_ONESHOT_CHEER_NO_SHEATHE = 71, + EMOTE_ONESHOT_EAT_NO_SHEATHE = 92, + EMOTE_STATE_STUN_NO_SHEATHE = 93, + EMOTE_ONESHOT_DANCE = 94, + EMOTE_ONESHOT_SALUTE_NO_SHEATH = 113, + EMOTE_STATE_USE_STANDING_NO_SHEATHE = 133, + EMOTE_ONESHOT_LAUGH_NO_SHEATHE = 153, + EMOTE_STATE_WORK = 173, + EMOTE_STATE_SPELL_PRECAST = 193, + EMOTE_ONESHOT_READY_RIFLE = 213, + EMOTE_STATE_READY_RIFLE = 214, + EMOTE_STATE_WORK_MINING = 233, + EMOTE_STATE_WORK_CHOPWOOD = 234, + EMOTE_STATE_APPLAUD = 253, + EMOTE_ONESHOT_LIFTOFF = 254, + EMOTE_ONESHOT_YES = 273, + EMOTE_ONESHOT_NO = 274, + EMOTE_ONESHOT_TRAIN = 275, + EMOTE_ONESHOT_LAND = 293, + EMOTE_STATE_AT_EASE = 313, + EMOTE_STATE_READY1H = 333, + EMOTE_STATE_SPELL_KNEEL_START = 353, + EMOTE_STATE_SUBMERGED = 373, + EMOTE_ONESHOT_SUBMERGE = 374, + EMOTE_STATE_READY2H = 375, + EMOTE_STATE_READY_BOW = 376, + EMOTE_ONESHOT_MOUNT_SPECIAL = 377, + EMOTE_STATE_TALK = 378, + EMOTE_STATE_FISHING = 379, + EMOTE_ONESHOT_FISHING = 380, + EMOTE_ONESHOT_LOOT = 381, + EMOTE_STATE_WHIRLWIND = 382, + EMOTE_STATE_DROWNED = 383, + EMOTE_STATE_HOLD_BOW = 384, + EMOTE_STATE_HOLD_RIFLE = 385, + EMOTE_STATE_HOLD_THROWN = 386, + EMOTE_ONESHOT_DROWN = 387, + EMOTE_ONESHOT_STOMP = 388, + EMOTE_ONESHOT_ATTACK_OFF = 389, + EMOTE_ONESHOT_ATTACK_OFF_PIERCE = 390, + EMOTE_STATE_ROAR = 391, + EMOTE_STATE_LAUGH = 392, + EMOTE_ONESHOT_CREATURE_SPECIAL = 393, + EMOTE_ONESHOT_JUMPLANDRUN = 394, + EMOTE_ONESHOT_JUMPEND = 395, + EMOTE_ONESHOT_TALK_NO_SHEATHE = 396, + EMOTE_ONESHOT_POINT_NO_SHEATHE = 397, + EMOTE_STATE_CANNIBALIZE = 398, + EMOTE_ONESHOT_JUMPSTART = 399, + EMOTE_STATE_DANCESPECIAL = 400, + EMOTE_ONESHOT_DANCESPECIAL = 401, + EMOTE_ONESHOT_CUSTOM_SPELL_01 = 402, + EMOTE_ONESHOT_CUSTOM_SPELL_02 = 403, + EMOTE_ONESHOT_CUSTOM_SPELL_03 = 404, + EMOTE_ONESHOT_CUSTOM_SPELL_04 = 405, + EMOTE_ONESHOT_CUSTOM_SPELL_05 = 406, + EMOTE_ONESHOT_CUSTOM_SPELL_06 = 407, + EMOTE_ONESHOT_CUSTOM_SPELL_07 = 408, + EMOTE_ONESHOT_CUSTOM_SPELL_08 = 409, + EMOTE_ONESHOT_CUSTOM_SPELL_09 = 410, + EMOTE_ONESHOT_CUSTOM_SPELL_10 = 411, + EMOTE_STATE_EXCLAIM = 412, + EMOTE_STATE_DANCE_CUSTOM = 413, + EMOTE_STATE_SIT_CHAIR_MED = 415, + EMOTE_STATE_CUSTOM_SPELL_01 = 416, + EMOTE_STATE_CUSTOM_SPELL_02 = 417, + EMOTE_STATE_EAT = 418, + EMOTE_STATE_CUSTOM_SPELL_04 = 419, + EMOTE_STATE_CUSTOM_SPELL_03 = 420, + EMOTE_STATE_CUSTOM_SPELL_05 = 421, + EMOTE_STATE_SPELLEFFECT_HOLD = 422, + EMOTE_STATE_EAT_NO_SHEATHE = 423, + EMOTE_STATE_MOUNT = 424, + EMOTE_STATE_READY2HL = 425, + EMOTE_STATE_SIT_CHAIR_HIGH = 426, + EMOTE_STATE_FALL = 427, + EMOTE_STATE_LOOT = 428, + EMOTE_STATE_SUBMERGED_NEW = 429, + EMOTE_ONESHOT_COWER = 430, + EMOTE_STATE_COWER = 431, + EMOTE_ONESHOT_USE_STANDING = 432, + EMOTE_STATE_STEALTH_STAND = 433, + EMOTE_ONESHOT_OMNICAST_GHOUL = 434, + EMOTE_ONESHOT_ATTACK_BOW = 435, + EMOTE_ONESHOT_ATTACK_RIFLE = 436, + EMOTE_STATE_SWIM_IDLE = 437, + EMOTE_STATE_ATTACK_UNARMED = 438, + EMOTE_ONESHOT_SPELL_CAST_W_SOUND = 439, + EMOTE_ONESHOT_DODGE = 440, + EMOTE_ONESHOT_PARRY1H = 441, + EMOTE_ONESHOT_PARRY2H = 442, + EMOTE_ONESHOT_PARRY2HL = 443, + EMOTE_STATE_FLYFALL = 444, + EMOTE_ONESHOT_FLYDEATH = 445, + EMOTE_STATE_FLY_FALL = 446, + EMOTE_ONESHOT_FLY_SIT_GROUND_DOWN = 447, + EMOTE_ONESHOT_FLY_SIT_GROUND_UP = 448, + EMOTE_ONESHOT_EMERGE = 449, + EMOTE_ONESHOT_DRAGON_SPIT = 450, + EMOTE_STATE_SPECIAL_UNARMED = 451, + EMOTE_ONESHOT_FLYGRAB = 452, + EMOTE_STATE_FLYGRABCLOSED = 453, + EMOTE_ONESHOT_FLYGRABTHROWN = 454, + EMOTE_STATE_FLY_SIT_GROUND = 455, + EMOTE_STATE_WALK_BACKWARDS = 456, + EMOTE_ONESHOT_FLYTALK = 457, + EMOTE_ONESHOT_FLYATTACK1H = 458, + EMOTE_STATE_CUSTOM_SPELL_08 = 459, + EMOTE_ONESHOT_FLY_DRAGON_SPIT = 460, + EMOTE_STATE_SIT_CHAIR_LOW = 461, + EMOTE_ONESHOT_STUN = 462, + EMOTE_ONESHOT_SPELL_CAST_OMNI = 463, + EMOTE_STATE_READY_THROWN = 465, + EMOTE_ONESHOT_WORK_CHOPWOOD = 466, + EMOTE_ONESHOT_WORK_MINING = 467, + EMOTE_STATE_SPELL_CHANNEL_OMNI = 468, + EMOTE_STATE_SPELL_CHANNEL_DIRECTED = 469, + EMOTE_STAND_STATE_NONE = 470, + EMOTE_STATE_READYJOUST = 471, + EMOTE_STATE_STRANGULATE = 473, + EMOTE_STATE_READY_SPELL_OMNI = 474, + EMOTE_STATE_HOLD_JOUST = 475, + EMOTE_ONESHOT_CRY_JAINA = 476 +}; + +// AnimationData.dbc enum Anim { - ANIM_STAND = 0x0, - ANIM_DEATH = 0x1, - ANIM_SPELL = 0x2, - ANIM_STOP = 0x3, - ANIM_WALK = 0x4, - ANIM_RUN = 0x5, - ANIM_DEAD = 0x6, - ANIM_RISE = 0x7, - ANIM_STANDWOUND = 0x8, - ANIM_COMBATWOUND = 0x9, - ANIM_COMBATCRITICAL = 0xA, - ANIM_SHUFFLE_LEFT = 0xB, - ANIM_SHUFFLE_RIGHT = 0xC, - ANIM_WALK_BACKWARDS = 0xD, - ANIM_STUN = 0xE, - ANIM_HANDS_CLOSED = 0xF, - ANIM_ATTACKUNARMED = 0x10, - ANIM_ATTACK1H = 0x11, - ANIM_ATTACK2HTIGHT = 0x12, - ANIM_ATTACK2HLOOSE = 0x13, - ANIM_PARRYUNARMED = 0x14, - ANIM_PARRY1H = 0x15, - ANIM_PARRY2HTIGHT = 0x16, - ANIM_PARRY2HLOOSE = 0x17, - ANIM_PARRYSHIELD = 0x18, - ANIM_READYUNARMED = 0x19, - ANIM_READY1H = 0x1A, - ANIM_READY2HTIGHT = 0x1B, - ANIM_READY2HLOOSE = 0x1C, - ANIM_READYBOW = 0x1D, - ANIM_DODGE = 0x1E, - ANIM_SPELLPRECAST = 0x1F, - ANIM_SPELLCAST = 0x20, - ANIM_SPELLCASTAREA = 0x21, - ANIM_NPCWELCOME = 0x22, - ANIM_NPCGOODBYE = 0x23, - ANIM_BLOCK = 0x24, - ANIM_JUMPSTART = 0x25, - ANIM_JUMP = 0x26, - ANIM_JUMPEND = 0x27, - ANIM_FALL = 0x28, - ANIM_SWIMIDLE = 0x29, - ANIM_SWIM = 0x2A, - ANIM_SWIM_LEFT = 0x2B, - ANIM_SWIM_RIGHT = 0x2C, - ANIM_SWIM_BACKWARDS = 0x2D, - ANIM_ATTACKBOW = 0x2E, - ANIM_FIREBOW = 0x2F, - ANIM_READYRIFLE = 0x30, - ANIM_ATTACKRIFLE = 0x31, - ANIM_LOOT = 0x32, - ANIM_SPELL_PRECAST_DIRECTED = 0x33, - ANIM_SPELL_PRECAST_OMNI = 0x34, - ANIM_SPELL_CAST_DIRECTED = 0x35, - ANIM_SPELL_CAST_OMNI = 0x36, - ANIM_SPELL_BATTLEROAR = 0x37, - ANIM_SPELL_READYABILITY = 0x38, - ANIM_SPELL_SPECIAL1H = 0x39, - ANIM_SPELL_SPECIAL2H = 0x3A, - ANIM_SPELL_SHIELDBASH = 0x3B, - ANIM_EMOTE_TALK = 0x3C, - ANIM_EMOTE_EAT = 0x3D, - ANIM_EMOTE_WORK = 0x3E, - ANIM_EMOTE_USE_STANDING = 0x3F, - ANIM_EMOTE_EXCLAMATION = 0x40, - ANIM_EMOTE_QUESTION = 0x41, - ANIM_EMOTE_BOW = 0x42, - ANIM_EMOTE_WAVE = 0x43, - ANIM_EMOTE_CHEER = 0x44, - ANIM_EMOTE_DANCE = 0x45, - ANIM_EMOTE_LAUGH = 0x46, - ANIM_EMOTE_SLEEP = 0x47, - ANIM_EMOTE_SIT_GROUND = 0x48, - ANIM_EMOTE_RUDE = 0x49, - ANIM_EMOTE_ROAR = 0x4A, - ANIM_EMOTE_KNEEL = 0x4B, - ANIM_EMOTE_KISS = 0x4C, - ANIM_EMOTE_CRY = 0x4D, - ANIM_EMOTE_CHICKEN = 0x4E, - ANIM_EMOTE_BEG = 0x4F, - ANIM_EMOTE_APPLAUD = 0x50, - ANIM_EMOTE_SHOUT = 0x51, - ANIM_EMOTE_FLEX = 0x52, - ANIM_EMOTE_SHY = 0x53, - ANIM_EMOTE_POINT = 0x54, - ANIM_ATTACK1HPIERCE = 0x55, - ANIM_ATTACK2HLOOSEPIERCE = 0x56, - ANIM_ATTACKOFF = 0x57, - ANIM_ATTACKOFFPIERCE = 0x58, - ANIM_SHEATHE = 0x59, - ANIM_HIPSHEATHE = 0x5A, - ANIM_MOUNT = 0x5B, - ANIM_RUN_LEANRIGHT = 0x5C, - ANIM_RUN_LEANLEFT = 0x5D, - ANIM_MOUNT_SPECIAL = 0x5E, - ANIM_KICK = 0x5F, - ANIM_SITDOWN = 0x60, - ANIM_SITTING = 0x61, - ANIM_SITUP = 0x62, - ANIM_SLEEPDOWN = 0x63, - ANIM_SLEEPING = 0x64, - ANIM_SLEEPUP = 0x65, - ANIM_SITCHAIRLOW = 0x66, - ANIM_SITCHAIRMEDIUM = 0x67, - ANIM_SITCHAIRHIGH = 0x68, - ANIM_LOADBOW = 0x69, - ANIM_LOADRIFLE = 0x6A, - ANIM_ATTACKTHROWN = 0x6B, - ANIM_READYTHROWN = 0x6C, - ANIM_HOLDBOW = 0x6D, - ANIM_HOLDRIFLE = 0x6E, - ANIM_HOLDTHROWN = 0x6F, - ANIM_LOADTHROWN = 0x70, - ANIM_EMOTE_SALUTE = 0x71, - ANIM_KNEELDOWN = 0x72, - ANIM_KNEELING = 0x73, - ANIM_KNEELUP = 0x74, - ANIM_ATTACKUNARMEDOFF = 0x75, - ANIM_SPECIALUNARMED = 0x76, - ANIM_STEALTHWALK = 0x77, - ANIM_STEALTHSTAND = 0x78, - ANIM_KNOCKDOWN = 0x79, - ANIM_EATING = 0x7A, - ANIM_USESTANDINGLOOP = 0x7B, - ANIM_CHANNELCASTDIRECTED = 0x7C, - ANIM_CHANNELCASTOMNI = 0x7D, - ANIM_WHIRLWIND = 0x7E, - ANIM_BIRTH = 0x7F, - ANIM_USESTANDINGSTART = 0x80, - ANIM_USESTANDINGEND = 0x81, - ANIM_HOWL = 0x82, - ANIM_DROWN = 0x83, - ANIM_DROWNED = 0x84, - ANIM_FISHINGCAST = 0x85, - ANIM_FISHINGLOOP = 0x86, - ANIM_FLY = 0x87, - ANIM_EMOTE_WORK_NO_SHEATHE = 0x88, - ANIM_EMOTE_STUN_NO_SHEATHE = 0x89, - ANIM_EMOTE_USE_STANDING_NO_SHEATHE= 0x8A, - ANIM_SPELL_SLEEP_DOWN = 0x8B, - ANIM_SPELL_KNEEL_START = 0x8C, - ANIM_SPELL_KNEEL_LOOP = 0x8D, - ANIM_SPELL_KNEEL_END = 0x8E, - ANIM_SPRINT = 0x8F, - ANIM_IN_FIGHT = 0x90, - - ANIM_GAMEOBJ_SPAWN = 145, - ANIM_GAMEOBJ_CLOSE = 146, - ANIM_GAMEOBJ_CLOSED = 147, - ANIM_GAMEOBJ_OPEN = 148, - ANIM_GAMEOBJ_OPENED = 149, - ANIM_GAMEOBJ_DESTROY = 150, - ANIM_GAMEOBJ_DESTROYED = 151, - ANIM_GAMEOBJ_REBUILD = 152, - ANIM_GAMEOBJ_CUSTOM0 = 153, - ANIM_GAMEOBJ_CUSTOM1 = 154, - ANIM_GAMEOBJ_CUSTOM2 = 155, - ANIM_GAMEOBJ_CUSTOM3 = 156, - ANIM_GAMEOBJ_DESPAWN = 157, - ANIM_HOLD = 158, - ANIM_DECAY = 159, - ANIM_BOWPULL = 160, - ANIM_BOWRELEASE = 161, - ANIM_SHIPSTART = 162, - ANIM_SHIPMOVEING = 163, - ANIM_SHIPSTOP = 164, - ANIM_GROUPARROW = 165, - ANIM_ARROW = 166, - ANIM_CORPSEARROW = 167, - ANIM_GUIDEARROW = 168, - ANIM_SWAY = 169, - ANIM_DRUIDCATPOUNCE = 170, - ANIM_DRUIDCATRIP = 171, - ANIM_DRUIDCATRAKE = 172, - ANIM_DRUIDCATRAVAGE = 173, - ANIM_DRUIDCATCLAW = 174, - ANIM_DRUIDCATCOWER = 175, - ANIM_DRUIDBEARSWIPE = 176, - ANIM_DRUIDBEARBITE = 177, - ANIM_DRUIDBEARMAUL = 178, - ANIM_DRUIDBEARBASH = 179, - ANIM_DRAGONTAIL = 180, - ANIM_DRAGONSTOMP = 181, - ANIM_DRAGONSPIT = 182, - ANIM_DRAGONSPITHOVER = 183, - ANIM_DRAGONSPITFLY = 184, - ANIM_EMOTEYES = 185, - ANIM_EMOTENO = 186, - ANIM_JUMPLANDRUN = 187, - ANIM_LOOTHOLD = 188, - ANIM_LOOTUP = 189, - ANIM_STANDHIGH = 190, - ANIM_IMPACT = 191, - ANIM_LIFTOFF = 192, - ANIM_HOVER = 193, - ANIM_SUCCUBUSENTICE = 194, - ANIM_EMOTETRAIN = 195, - ANIM_EMOTEDEAD = 196, - ANIM_EMOTEDANCEONCE = 197, - ANIM_DEFLECT = 198, - ANIM_EMOTEEATNOSHEATHE = 199, - ANIM_LAND = 200, - ANIM_SUBMERGE = 201, - ANIM_SUBMERGED = 202, - ANIM_CANNIBALIZE = 203, - ANIM_ARROWBIRTH = 204, - ANIM_GROURARROWBIRTH = 205, - ANIM_CORPSEARROWBIRTH = 206, - ANIM_GUIDEARROWBIRTH = 207, - ANIM_EMOTETALKNOSHEATHE = 208, - ANIM_EMOTEPOINTNOSHEATHE = 209, - ANIM_EMOTESALUTENOSHEATHE = 210, - ANIM_EMOTEDANCESPECIAL = 211, - ANIM_MUTILATE = 212, - ANIM_CUSTOMSPELL01 = 213, - ANIM_CUSTOMSPELL02 = 214, - ANIM_CUSTOMSPELL03 = 215, - ANIM_CUSTOMSPELL04 = 216, - ANIM_CUSTOMSPELL05 = 217, - ANIM_CUSTOMSPELL06 = 218, - ANIM_CUSTOMSPELL07 = 219, - ANIM_CUSTOMSPELL08 = 220, - ANIM_CUSTOMSPELL09 = 221, - ANIM_CUSTOMSPELL10 = 222, - ANIM_StealthRun = 223 + ANIM_STAND = 0, + ANIM_DEATH = 1, + ANIM_SPELL = 2, + ANIM_STOP = 3, + ANIM_WALK = 4, + ANIM_RUN = 5, + ANIM_DEAD = 6, + ANIM_RISE = 7, + ANIM_STAND_WOUND = 8, + ANIM_COMBAT_WOUND = 9, + ANIM_COMBAT_CRITICAL = 10, + ANIM_SHUFFLE_LEFT = 11, + ANIM_SHUFFLE_RIGHT = 12, + ANIM_WALK_BACKWARDS = 13, + ANIM_STUN = 14, + ANIM_HANDS_CLOSED = 15, + ANIM_ATTACK_UNARMED = 16, + ANIM_ATTACK1H = 17, + ANIM_ATTACK2H = 18, + ANIM_ATTACK2HL = 19, + ANIM_PARRY_UNARMED = 20, + ANIM_PARRY1H = 21, + ANIM_PARRY2H = 22, + ANIM_PARRY2HL = 23, + ANIM_SHIELD_BLOCK = 24, + ANIM_READY_UNARMED = 25, + ANIM_READY1H = 26, + ANIM_READY2H = 27, + ANIM_READY2HL = 28, + ANIM_READY_BOW = 29, + ANIM_DODGE = 30, + ANIM_SPELL_PRECAST = 31, + ANIM_SPELL_CAST = 32, + ANIM_SPELL_CAST_AREA = 33, + ANIM_NPC_WELCOME = 34, + ANIM_NPC_GOODBYE = 35, + ANIM_BLOCK = 36, + ANIM_JUMP_START = 37, + ANIM_JUMP = 38, + ANIM_JUMP_END = 39, + ANIM_FALL = 40, + ANIM_SWIM_IDLE = 41, + ANIM_SWIM = 42, + ANIM_SWIM_LEFT = 43, + ANIM_SWIM_RIGHT = 44, + ANIM_SWIM_BACKWARDS = 45, + ANIM_ATTACK_BOW = 46, + ANIM_FIRE_BOW = 47, + ANIM_READY_RIFLE = 48, + ANIM_ATTACK_RIFLE = 49, + ANIM_LOOT = 50, + ANIM_READY_SPELL_DIRECTED = 51, + ANIM_READY_SPELL_OMNI = 52, + ANIM_SPELL_CAST_DIRECTED = 53, + ANIM_SPELL_CAST_OMNI = 54, + ANIM_BATTLE_ROAR = 55, + ANIM_READY_ABILITY = 56, + ANIM_SPECIAL1H = 57, + ANIM_SPECIAL2H = 58, + ANIM_SHIELD_BASH = 59, + ANIM_EMOTE_TALK = 60, + ANIM_EMOTE_EAT = 61, + ANIM_EMOTE_WORK = 62, + ANIM_EMOTE_USE_STANDING = 63, + ANIM_EMOTE_TALK_EXCLAMATION = 64, + ANIM_EMOTE_TALK_QUESTION = 65, + ANIM_EMOTE_BOW = 66, + ANIM_EMOTE_WAVE = 67, + ANIM_EMOTE_CHEER = 68, + ANIM_EMOTE_DANCE = 69, + ANIM_EMOTE_LAUGH = 70, + ANIM_EMOTE_SLEEP = 71, + ANIM_EMOTE_SIT_GROUND = 72, + ANIM_EMOTE_RUDE = 73, + ANIM_EMOTE_ROAR = 74, + ANIM_EMOTE_KNEEL = 75, + ANIM_EMOTE_KISS = 76, + ANIM_EMOTE_CRY = 77, + ANIM_EMOTE_CHICKEN = 78, + ANIM_EMOTE_BEG = 79, + ANIM_EMOTE_APPLAUD = 80, + ANIM_EMOTE_SHOUT = 81, + ANIM_EMOTE_FLEX = 82, + ANIM_EMOTE_SHY = 83, + ANIM_EMOTE_POINT = 84, + ANIM_ATTACK1H_PIERCE = 85, + ANIM_ATTACK2H_LOOSE_PIERCE = 86, + ANIM_ATTACK_OFF = 87, + ANIM_ATTACK_OFF_PIERCE = 88, + ANIM_SHEATHE = 89, + ANIM_HIP_SHEATHE = 90, + ANIM_MOUNT = 91, + ANIM_RUN_RIGHT = 92, + ANIM_RUN_LEFT = 93, + ANIM_MOUNT_SPECIAL = 94, + ANIM_KICK = 95, + ANIM_SIT_GROUND_DOWN = 96, + ANIM_SIT_GROUND = 97, + ANIM_SIT_GROUND_UP = 98, + ANIM_SLEEP_DOWN = 99, + ANIM_SLEEP = 100, + ANIM_SLEEP_UP = 101, + ANIM_SIT_CHAIR_LOW = 102, + ANIM_SIT_CHAIR_MED = 103, + ANIM_SIT_CHAIR_HIGH = 104, + ANIM_LOAD_BOW = 105, + ANIM_LOAD_RIFLE = 106, + ANIM_ATTACK_THROWN = 107, + ANIM_READY_THROWN = 108, + ANIM_HOLD_BOW = 109, + ANIM_HOLD_RIFLE = 110, + ANIM_HOLD_THROWN = 111, + ANIM_LOAD_THROWN = 112, + ANIM_EMOTE_SALUTE = 113, + ANIM_KNEEL_START = 114, + ANIM_KNEEL_LOOP = 115, + ANIM_KNEEL_END = 116, + ANIM_ATTACK_UNARMED_OFF = 117, + ANIM_SPECIAL_UNARMED = 118, + ANIM_STEALTH_WALK = 119, + ANIM_STEALTH_STAND = 120, + ANIM_KNOCKDOWN = 121, + ANIM_EATING_LOOP = 122, + ANIM_USE_STANDING_LOOP = 123, + ANIM_CHANNEL_CAST_DIRECTED = 124, + ANIM_CHANNEL_CAST_OMNI = 125, + ANIM_WHIRLWIND = 126, + ANIM_BIRTH = 127, + ANIM_USE_STANDING_START = 128, + ANIM_USE_STANDING_END = 129, + ANIM_CREATURE_SPECIAL = 130, + ANIM_DROWN = 131, + ANIM_DROWNED = 132, + ANIM_FISHING_CAST = 133, + ANIM_FISHING_LOOP = 134, + ANIM_FLY = 135, + ANIM_EMOTE_WORK_NO_SHEATHE = 136, + ANIM_EMOTE_STUN_NO_SHEATHE = 137, + ANIM_EMOTE_USE_STANDING_NO_SHEATHE = 138, + ANIM_SPELL_SLEEP_DOWN = 139, + ANIM_SPELL_KNEEL_START = 140, + ANIM_SPELL_KNEEL_LOOP = 141, + ANIM_SPELL_KNEEL_END = 142, + ANIM_SPRINT = 143, + ANIM_IN_FIGHT = 144, + ANIM_SPAWN = 145, + ANIM_CLOSE = 146, + ANIM_CLOSED = 147, + ANIM_OPEN = 148, + ANIM_OPENED = 149, + ANIM_DESTROY = 150, + ANIM_DESTROYED = 151, + ANIM_REBUILD = 152, + ANIM_CUSTOM_0 = 153, + ANIM_CUSTOM_1 = 154, + ANIM_CUSTOM_2 = 155, + ANIM_CUSTOM_3 = 156, + ANIM_DESPAWN = 157, + ANIM_HOLD = 158, + ANIM_DECAY = 159, + ANIM_BOW_PULL = 160, + ANIM_BOW_RELEASE = 161, + ANIM_SHIP_START = 162, + ANIM_SHIP_MOVING = 163, + ANIM_SHIP_STOP = 164, + ANIM_GROUP_ARROW = 165, + ANIM_ARROW = 166, + ANIM_CORPSE_ARROW = 167, + ANIM_GUIDE_ARROW = 168, + ANIM_SWAY = 169, + ANIM_DRUID_CAT_POUNCE = 170, + ANIM_DRUID_CAT_RIP = 171, + ANIM_DRUID_CAT_RAKE = 172, + ANIM_DRUID_CAT_RAVAGE = 173, + ANIM_DRUID_CAT_CLAW = 174, + ANIM_DRUID_CAT_COWER = 175, + ANIM_DRUID_BEAR_SWIPE = 176, + ANIM_DRUID_BEAR_BITE = 177, + ANIM_DRUID_BEAR_MAUL = 178, + ANIM_DRUID_BEAR_BASH = 179, + ANIM_DRAGON_TAIL = 180, + ANIM_DRAGON_STOMP = 181, + ANIM_DRAGON_SPIT = 182, + ANIM_DRAGON_SPIT_HOVER = 183, + ANIM_DRAGON_SPIT_FLY = 184, + ANIM_EMOTE_YES = 185, + ANIM_EMOTE_NO = 186, + ANIM_JUMP_LAND_RUN = 187, + ANIM_LOOT_HOLD = 188, + ANIM_LOOT_UP = 189, + ANIM_STAND_HIGH = 190, + ANIM_IMPACT = 191, + ANIM_LIFTOFF = 192, + ANIM_HOVER = 193, + ANIM_SUCCUBUS_ENTICE = 194, + ANIM_EMOTE_TRAIN = 195, + ANIM_EMOTE_DEAD = 196, + ANIM_EMOTE_DANCE_ONCE = 197, + ANIM_DEFLECT = 198, + ANIM_EMOTE_EAT_NO_SHEATHE = 199, + ANIM_LAND = 200, + ANIM_SUBMERGE = 201, + ANIM_SUBMERGED = 202, + ANIM_CANNIBALIZE = 203, + ANIM_ARROW_BIRTH = 204, + ANIM_GROUP_ARROW_BIRTH = 205, + ANIM_CORPSE_ARROW_BIRTH = 206, + ANIM_GUIDE_ARROW_BIRTH = 207, + ANIM_EMOTE_TALK_NO_SHEATHE = 208, + ANIM_EMOTE_POINT_NO_SHEATHE = 209, + ANIM_EMOTE_SALUTE_NO_SHEATHE = 210, + ANIM_EMOTE_DANCE_SPECIAL = 211, + ANIM_MUTILATE = 212, + ANIM_CUSTOM_SPELL_01 = 213, + ANIM_CUSTOM_SPELL_02 = 214, + ANIM_CUSTOM_SPELL_03 = 215, + ANIM_CUSTOM_SPELL_04 = 216, + ANIM_CUSTOM_SPELL_05 = 217, + ANIM_CUSTOM_SPELL_06 = 218, + ANIM_CUSTOM_SPELL_07 = 219, + ANIM_CUSTOM_SPELL_08 = 220, + ANIM_CUSTOM_SPELL_09 = 221, + ANIM_CUSTOM_SPELL_10 = 222, + ANIM_STEALTH_RUN = 223, + ANIM_EMERGE = 224, + ANIM_COWER = 225, + ANIM_GRAB = 226, + ANIM_GRAB_CLOSED = 227, + ANIM_GRAB_THROWN = 228, + ANIM_FLY_STAND = 229, + ANIM_FLY_DEATH = 230, + ANIM_FLY_SPELL = 231, + ANIM_FLY_STOP = 232, + ANIM_FLY_WALK = 233, + ANIM_FLY_RUN = 234, + ANIM_FLY_DEAD = 235, + ANIM_FLY_RISE = 236, + ANIM_FLY_STAND_WOUND = 237, + ANIM_FLY_COMBAT_WOUND = 238, + ANIM_FLY_COMBAT_CRITICAL = 239, + ANIM_FLY_SHUFFLE_LEFT = 240, + ANIM_FLY_SHUFFLE_RIGHT = 241, + ANIM_FLY_WALK_BACKWARDS = 242, + ANIM_FLY_STUN = 243, + ANIM_FLY_HANDS_CLOSED = 244, + ANIM_FLY_ATTACK_UNARMED = 245, + ANIM_FLY_ATTACK1H = 246, + ANIM_FLY_ATTACK2H = 247, + ANIM_FLY_ATTACK2HL = 248, + ANIM_FLY_PARRY_UNARMED = 249, + ANIM_FLY_PARRY1H = 250, + ANIM_FLY_PARRY2H = 251, + ANIM_FLY_PARRY2HL = 252, + ANIM_FLY_SHIELD_BLOCK = 253, + ANIM_FLY_READY_UNARMED = 254, + ANIM_FLY_READY1H = 255, + ANIM_FLY_READY2H = 256, + ANIM_FLY_READY2HL = 257, + ANIM_FLY_READY_BOW = 258, + ANIM_FLY_DODGE = 259, + ANIM_FLY_SPELL_PRECAST = 260, + ANIM_FLY_SPELL_CAST = 261, + ANIM_FLY_SPELL_CAST_AREA = 262, + ANIM_FLY_NPC_WELCOME = 263, + ANIM_FLY_NPC_GOODBYE = 264, + ANIM_FLY_BLOCK = 265, + ANIM_FLY_JUMP_START = 266, + ANIM_FLY_JUMP = 267, + ANIM_FLY_JUMP_END = 268, + ANIM_FLY_FALL = 269, + ANIM_FLY_SWIM_IDLE = 270, + ANIM_FLY_SWIM = 271, + ANIM_FLY_SWIM_LEFT = 272, + ANIM_FLY_SWIM_RIGHT = 273, + ANIM_FLY_SWIM_BACKWARDS = 274, + ANIM_FLY_ATTACK_BOW = 275, + ANIM_FLY_FIRE_BOW = 276, + ANIM_FLY_READY_RIFLE = 277, + ANIM_FLY_ATTACK_RIFLE = 278, + ANIM_FLY_LOOT = 279, + ANIM_FLY_READY_SPELL_DIRECTED = 280, + ANIM_FLY_READY_SPELL_OMNI = 281, + ANIM_FLY_SPELL_CAST_DIRECTED = 282, + ANIM_FLY_SPELL_CAST_OMNI = 283, + ANIM_FLY_SPELL_BATTLE_ROAR = 284, + ANIM_FLY_READY_ABILITY = 285, + ANIM_FLY_SPECIAL1H = 286, + ANIM_FLY_SPECIAL2H = 287, + ANIM_FLY_SHIELD_BASH = 288, + ANIM_FLY_EMOTE_TALK = 289, + ANIM_FLY_EMOTE_EAT = 290, + ANIM_FLY_EMOTE_WORK = 291, + ANIM_FLY_USE_STANDING = 292, + ANIM_FLY_EMOTE_TALK_EXCLAMATION = 293, + ANIM_FLY_EMOTE_TALK_QUESTION = 294, + ANIM_FLY_EMOTE_BOW = 295, + ANIM_FLY_EMOTE_WAVE = 296, + ANIM_FLY_EMOTE_CHEER = 297, + ANIM_FLY_EMOTE_DANCE = 298, + ANIM_FLY_EMOTE_LAUGH = 299, + ANIM_FLY_EMOTE_SLEEP = 300, + ANIM_FLY_EMOTE_SIT_GROUND = 301, + ANIM_FLY_EMOTE_RUDE = 302, + ANIM_FLY_EMOTE_ROAR = 303, + ANIM_FLY_EMOTE_KNEEL = 304, + ANIM_FLY_EMOTE_KISS = 305, + ANIM_FLY_EMOTE_CRY = 306, + ANIM_FLY_EMOTE_CHICKEN = 307, + ANIM_FLY_EMOTE_BEG = 308, + ANIM_FLY_EMOTE_APPLAUD = 309, + ANIM_FLY_EMOTE_SHOUT = 310, + ANIM_FLY_EMOTE_FLEX = 311, + ANIM_FLY_EMOTE_SHY = 312, + ANIM_FLY_EMOTE_POINT = 313, + ANIM_FLY_ATTACK1H_PIERCE = 314, + ANIM_FLY_ATTACK2H_LOOSE_PIERCE = 315, + ANIM_FLY_ATTACK_OFF = 316, + ANIM_FLY_ATTACK_OFF_PIERCE = 317, + ANIM_FLY_SHEATH = 318, + ANIM_FLY_HIP_SHEATH = 319, + ANIM_FLY_MOUNT = 320, + ANIM_FLY_RUN_RIGHT = 321, + ANIM_FLY_RUN_LEFT = 322, + ANIM_FLY_MOUNT_SPECIAL = 323, + ANIM_FLY_KICK = 324, + ANIM_FLY_SIT_GROUND_DOWN = 325, + ANIM_FLY_SIT_GROUND = 326, + ANIM_FLY_SIT_GROUND_UP = 327, + ANIM_FLY_SLEEP_DOWN = 328, + ANIM_FLY_SLEEP = 329, + ANIM_FLY_SLEEP_UP = 330, + ANIM_FLY_SIT_CHAIR_LOW = 331, + ANIM_FLY_SIT_CHAIR_MED = 332, + ANIM_FLY_SIT_CHAIR_HIGH = 333, + ANIM_FLY_LOAD_BOW = 334, + ANIM_FLY_LOAD_RIFLE = 335, + ANIM_FLY_ATTACK_THROWN = 336, + ANIM_FLY_READY_THROWN = 337, + ANIM_FLY_HOLD_BOW = 338, + ANIM_FLY_HOLD_RIFLE = 339, + ANIM_FLY_HOLD_THROWN = 340, + ANIM_FLY_LOAD_THROWN = 341, + ANIM_FLY_EMOTE_SALUTE = 342, + ANIM_FLY_KNEEL_START = 343, + ANIM_FLY_KNEEL_LOOP = 344, + ANIM_FLY_KNEEL_END = 345, + ANIM_FLY_ATTACK_UNARMED_OFF = 346, + ANIM_FLY_SPECIAL_UNARMED = 347, + ANIM_FLY_STEALTH_WALK = 348, + ANIM_FLY_STEALTH_STAND = 349, + ANIM_FLY_KNOCKDOWN = 350, + ANIM_FLY_EATING_LOOP = 351, + ANIM_FLY_USE_STANDING_LOOP = 352, + ANIM_FLY_CHANNEL_CAST_DIRECTED = 353, + ANIM_FLY_CHANNEL_CAST_OMNI = 354, + ANIM_FLY_WHIRLWIND = 355, + ANIM_FLY_BIRTH = 356, + ANIM_FLY_USE_STANDING_START = 357, + ANIM_FLY_USE_STANDING_END = 358, + ANIM_FLY_CREATURE_SPECIAL = 359, + ANIM_FLY_DROWN = 360, + ANIM_FLY_DROWNED = 361, + ANIM_FLY_FISHING_CAST = 362, + ANIM_FLY_FISHING_LOOP = 363, + ANIM_FLY_FLY = 364, + ANIM_FLY_EMOTE_WORK_NO_SHEATHE = 365, + ANIM_FLY_EMOTE_STUN_NO_SHEATHE = 366, + ANIM_FLY_EMOTE_USE_STANDING_NO_SHEATHE = 367, + ANIM_FLY_SPELL_SLEEP_DOWN = 368, + ANIM_FLY_SPELL_KNEEL_START = 369, + ANIM_FLY_SPELL_KNEEL_LOOP = 370, + ANIM_FLY_SPELL_KNEEL_END = 371, + ANIM_FLY_SPRINT = 372, + ANIM_FLY_IN_FLIGHT = 373, + ANIM_FLY_SPAWN = 374, + ANIM_FLY_CLOSE = 375, + ANIM_FLY_CLOSED = 376, + ANIM_FLY_OPEN = 377, + ANIM_FLY_OPENED = 378, + ANIM_FLY_DESTROY = 379, + ANIM_FLY_DESTROYED = 380, + ANIM_FLY_REBUILD = 381, + ANIM_FLY_CUSTOM_0 = 382, + ANIM_FLY_CUSTOM_1 = 383, + ANIM_FLY_CUSTOM_2 = 384, + ANIM_FLY_CUSTOM_3 = 385, + ANIM_FLY_DESPAWN = 386, + ANIM_FLY_HOLD = 387, + ANIM_FLY_DECAY = 388, + ANIM_FLY_BOW_PULL = 389, + ANIM_FLY_BOW_RELEASE = 390, + ANIM_FLY_SHIP_START = 391, + ANIM_FLY_SHIP_MOVING = 392, + ANIM_FLY_SHIP_STOP = 393, + ANIM_FLY_GROUP_ARROW = 394, + ANIM_FLY_ARROW = 395, + ANIM_FLY_CORPSE_ARROW = 396, + ANIM_FLY_GUIDE_ARROW = 397, + ANIM_FLY_SWAY = 398, + ANIM_FLY_DRUID_CAT_POUNCE = 399, + ANIM_FLY_DRUID_CAT_RIP = 400, + ANIM_FLY_DRUID_CAT_RAKE = 401, + ANIM_FLY_DRUID_CAT_RAVAGE = 402, + ANIM_FLY_DRUID_CAT_CLAW = 403, + ANIM_FLY_DRUID_CAT_COWER = 404, + ANIM_FLY_DRUID_BEAR_SWIPE = 405, + ANIM_FLY_DRUID_BEAR_BITE = 406, + ANIM_FLY_DRUID_BEAR_MAUL = 407, + ANIM_FLY_DRUID_BEAR_BASH = 408, + ANIM_FLY_DRAGON_TAIL = 409, + ANIM_FLY_DRAGON_STOMP = 410, + ANIM_FLY_DRAGON_SPIT = 411, + ANIM_FLY_DRAGON_SPIT_HOVER = 412, + ANIM_FLY_DRAGON_SPIT_FLY = 413, + ANIM_FLY_EMOTE_YES = 414, + ANIM_FLY_EMOTE_NO = 415, + ANIM_FLY_JUMP_LAND_RUN = 416, + ANIM_FLY_LOOT_HOLD = 417, + ANIM_FLY_LOOT_UP = 418, + ANIM_FLY_STAND_HIGH = 419, + ANIM_FLY_IMPACT = 420, + ANIM_FLY_LIFTOFF = 421, + ANIM_FLY_HOVER = 422, + ANIM_FLY_SUCCUBUS_ENTICE = 423, + ANIM_FLY_EMOTE_TRAIN = 424, + ANIM_FLY_EMOTE_DEAD = 425, + ANIM_FLY_EMOTE_DANCE_ONCE = 426, + ANIM_FLY_DEFLECT = 427, + ANIM_FLY_EMOTE_EAT_NO_SHEATHE = 428, + ANIM_FLY_LAND = 429, + ANIM_FLY_SUBMERGE = 430, + ANIM_FLY_SUBMERGED = 431, + ANIM_FLY_CANNIBALIZE = 432, + ANIM_FLY_ARROW_BIRTH = 433, + ANIM_FLY_GROUP_ARROW_BIRTH = 434, + ANIM_FLY_CORPSE_ARROW_BIRTH = 435, + ANIM_FLY_GUIDE_ARROW_BIRTH = 436, + ANIM_FLY_EMOTE_TALK_NO_SHEATHE = 437, + ANIM_FLY_EMOTE_POINT_NO_SHEATHE = 438, + ANIM_FLY_EMOTE_SALUTE_NO_SHEATHE = 439, + ANIM_FLY_EMOTE_DANCE_SPECIAL = 440, + ANIM_FLY_MUTILATE = 441, + ANIM_FLY_CUSTOM_SPELL_01 = 442, + ANIM_FLY_CUSTOM_SPELL_02 = 443, + ANIM_FLY_CUSTOM_SPELL_03 = 444, + ANIM_FLY_CUSTOM_SPELL_04 = 445, + ANIM_FLY_CUSTOM_SPELL_05 = 446, + ANIM_FLY_CUSTOM_SPELL_06 = 447, + ANIM_FLY_CUSTOM_SPELL_07 = 448, + ANIM_FLY_CUSTOM_SPELL_08 = 449, + ANIM_FLY_CUSTOM_SPELL_09 = 450, + ANIM_FLY_CUSTOM_SPELL_10 = 451, + ANIM_FLY_STEALTH_RUN = 452, + ANIM_FLY_EMERGE = 453, + ANIM_FLY_COWER = 454, + ANIM_FLY_GRAB = 455, + ANIM_FLY_GRAB_CLOSED = 456, + ANIM_FLY_GRAB_THROWN = 457, + ANIM_TO_FLY = 458, + ANIM_TO_HOVER = 459, + ANIM_TO_GROUND = 460, + ANIM_FLY_TO_FLY = 461, + ANIM_FLY_TO_HOVER = 462, + ANIM_FLY_TO_GROUND = 463, + ANIM_SETTLE = 464, + ANIM_FLY_SETTLE = 465, + ANIM_DEATH_START = 466, + ANIM_DEATH_LOOP = 467, + ANIM_DEATH_END = 468, + ANIM_FLY_DEATH_START = 469, + ANIM_FLY_DEATH_LOOP = 470, + ANIM_FLY_DEATH_END = 471, + ANIM_DEATH_END_HOLD = 472, + ANIM_FLY_DEATH_END_HOLD = 473, + ANIM_STRANGULATE = 474, + ANIM_FLY_STRANGULATE = 475, + ANIM_READY_JOUST = 476, + ANIM_LOAD_JOUST = 477, + ANIM_HOLD_JOUST = 478, + ANIM_FLY_READY_JOUST = 479, + ANIM_FLY_LOAD_JOUST = 480, + ANIM_FLY_HOLD_JOUST = 481, + ANIM_ATTACK_JOUST = 482, + ANIM_FLY_ATTACK_JOUST = 483, + ANIM_RECLINED_MOUNT = 484, + ANIM_FLY_RECLINED_MOUNT = 485, + ANIM_TO_ALTERED = 486, + ANIM_FROM_ALTERED = 487, + ANIM_FLY_TO_ALTERED = 488, + ANIM_FLY_FROM_ALTERED = 489, + ANIM_IN_STOCKS = 490, + ANIM_FLY_IN_STOCKS = 491, + ANIM_VEHICLE_GRAB = 492, + ANIM_VEHICLE_THROW = 493, + ANIM_FLY_VEHICLE_GRAB = 494, + ANIM_FLY_VEHICLE_THROW = 495, + ANIM_TO_ALTERED_POST_SWAP = 496, + ANIM_FROM_ALTERED_POST_SWAP = 497, + ANIM_FLY_TO_ALTERED_POST_SWAP = 498, + ANIM_FLY_FROM_ALTERED_POST_SWAP = 499, + ANIM_RECLINED_MOUNT_PASSENGER = 500, + ANIM_FLY_RECLINED_MOUNT_PASSENGER = 501, + ANIM_CARRY2H = 502, + ANIM_CARRIED2H = 503, + ANIM_FLY_CARRY2H = 504, + ANIM_FLY_CARRIED2H = 505 }; enum LockKeyType @@ -2326,7 +2623,7 @@ enum HolidayIds HOLIDAY_HARVEST_FESTIVAL = 321, HOLIDAY_HALLOWS_END = 324, HOLIDAY_LUNAR_FESTIVAL = 327, - HOLIDAY_LOVE_IS_IN_THE_AIR = 335, + // HOLIDAY_LOVE_IS_IN_THE_AIR = 335, unused/duplicated HOLIDAY_FIRE_FESTIVAL = 341, HOLIDAY_CALL_TO_ARMS_EY = 353, HOLIDAY_BREWFEST = 372, @@ -2339,6 +2636,7 @@ enum HolidayIds HOLIDAY_WOTLK_LAUNCH = 406, HOLIDAY_DAY_OF_DEAD = 409, HOLIDAY_CALL_TO_ARMS_IC = 420, + HOLIDAY_LOVE_IS_IN_THE_AIR = 423, HOLIDAY_KALU_AK_FISHING_DERBY = 424 }; @@ -2398,7 +2696,10 @@ enum QuestSort QUEST_SORT_BREWFEST = 370, QUEST_SORT_INSCRIPTION = 371, QUEST_SORT_DEATH_KNIGHT = 372, - QUEST_SORT_JEWELCRAFTING = 373 + QUEST_SORT_JEWELCRAFTING = 373, + QUEST_SORT_NOBLEGARDEN = 374, + QUEST_SORT_PILGRIMS_BOUNTY = 375, + QUEST_SORT_LOVE_IS_IN_THE_AIR = 376, }; inline uint8 ClassByQuestSort(int32 QuestSort) @@ -2460,8 +2761,8 @@ enum SkillType SKILL_SURVIVAL2 = 142, SKILL_RIDING_HORSE = 148, SKILL_RIDING_WOLF = 149, - SKILL_RIDING_RAM = 152, SKILL_RIDING_TIGER = 150, + SKILL_RIDING_RAM = 152, SKILL_SWIMING = 155, SKILL_2H_MACES = 160, SKILL_UNARMED = 162, diff --git a/src/server/game/Movement/DestinationHolder.cpp b/src/server/game/Movement/DestinationHolder.cpp deleted file mode 100755 index 6247111e1b6..00000000000 --- a/src/server/game/Movement/DestinationHolder.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> - * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> - * - * 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/>. - */ - -#include "DestinationHolder.h" - diff --git a/src/server/game/Movement/DestinationHolder.h b/src/server/game/Movement/DestinationHolder.h deleted file mode 100755 index 2b36fe471b8..00000000000 --- a/src/server/game/Movement/DestinationHolder.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> - * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> - * - * 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 TRINITY_DESTINATION_HOLDER_H -#define TRINITY_DESTINATION_HOLDER_H - -#include "Define.h" -#include "Timer.h" - -class WorldObject; -class Map; - -#define TRAVELLER_UPDATE_INTERVAL 300 - -template<typename TRAVELLER> -class DestinationHolder -{ - TimeTrackerSmall i_tracker; - uint32 i_totalTravelTime; - uint32 i_timeElapsed; - bool i_destSet; - float i_fromX, i_fromY, i_fromZ; - float i_destX, i_destY, i_destZ; - - public: - DestinationHolder() : i_tracker(TRAVELLER_UPDATE_INTERVAL), i_totalTravelTime(0), i_timeElapsed(0), - i_destSet(false), i_fromX(0), i_fromY(0), i_fromZ(0), i_destX(0), i_destY(0), i_destZ(0) {} - - uint32 SetDestination(TRAVELLER &traveller, float dest_x, float dest_y, float dest_z, bool sendMove = true); - void GetDestination(float &x, float &y, float &z) const { x = i_destX; y = i_destY; z = i_destZ; } - bool UpdateExpired(void) const { return i_tracker.Passed(); } - void ResetUpdate(uint32 t = TRAVELLER_UPDATE_INTERVAL) { i_tracker.Reset(t); } - uint32 GetTotalTravelTime(void) const { return i_totalTravelTime; } - void IncreaseTravelTime(uint32 increment) { i_totalTravelTime += increment; } - void ResetTravelTime() { i_totalTravelTime = 0; } - bool HasDestination(void) const { return i_destSet; } - float GetDestinationDiff(float x, float y, float z) const; - bool HasArrived(void) const { return (i_totalTravelTime == 0 || i_timeElapsed >= i_totalTravelTime); } - bool UpdateTraveller(TRAVELLER &traveller, uint32 diff, bool micro_movement=false); - uint32 StartTravel(TRAVELLER &traveller, bool sendMove = true); - void GetLocationNow(const Map* map, float &x, float &y, float &z, bool is3D = false) const; - void GetLocationNowNoMicroMovement(float &x, float &y, float &z) const; // For use without micro movement - float GetDistance3dFromDestSq(const WorldObject &obj) const; - - private: - void _findOffSetPoint(float x1, float y1, float x2, float y2, float offset, float &x, float &y); - -}; -#endif - diff --git a/src/server/game/Movement/DestinationHolderImp.h b/src/server/game/Movement/DestinationHolderImp.h deleted file mode 100755 index 84e7fbf4f08..00000000000 --- a/src/server/game/Movement/DestinationHolderImp.h +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> - * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> - * - * 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 TRINITY_DESTINATIONHOLDERIMP_H -#define TRINITY_DESTINATIONHOLDERIMP_H - -#include "MapManager.h" -#include "DestinationHolder.h" - -#include <cmath> - -template<typename TRAVELLER> -void -DestinationHolder<TRAVELLER>::_findOffSetPoint(float x1, float y1, float x2, float y2, float offset, float &x, float &y) -{ - /* given the point (x1, y1) and (x2, y2).. need to find the point (x, y) on the same line - * such that the distance from (x, y) to (x2, y2) is offset. - * Let the distance of p1 to p2 = d.. then the ratio of offset/d = (x2-x)/(x2-x1) - * hence x = x2 - (offset/d)*(x2-x1) - * like wise offset/d = (y2-y)/(y2-y1); - */ - if (offset == 0) - { - x = x2; - y = y2; - } - else - { - double x_diff = double(x2 - x1); - double y_diff = double(y2 - y1); - double distance_d = (double)((x_diff*x_diff) + (y_diff * y_diff)); - if (distance_d == 0) - { - x = x2; - y = y2; - } - else - { - distance_d = ::sqrt(distance_d); // starting distance - double distance_ratio = (double)(distance_d - offset)/(double)distance_d; - // line above has revised formula which is more correct, I think - x = (float)(x1 + (distance_ratio*x_diff)); - y = (float)(y1 + (distance_ratio*y_diff)); - } - } -} - -template<typename TRAVELLER> -uint32 -DestinationHolder<TRAVELLER>::SetDestination(TRAVELLER &traveller, float dest_x, float dest_y, float dest_z, bool sendMove) -{ - i_destSet = true; - i_destX = dest_x; - i_destY = dest_y; - i_destZ = dest_z; - - return StartTravel(traveller, sendMove); -} - -template<typename TRAVELLER> -uint32 -DestinationHolder<TRAVELLER>::StartTravel(TRAVELLER &traveller, bool sendMove) -{ - if (!i_destSet) return 0; - - i_fromX = traveller.GetPositionX(); - i_fromY = traveller.GetPositionY(); - i_fromZ = traveller.GetPositionZ(); - - i_totalTravelTime = traveller.GetTotalTrevelTimeTo(i_destX, i_destY, i_destZ); - i_timeElapsed = 0; - if (sendMove) - traveller.MoveTo(i_destX, i_destY, i_destZ, i_totalTravelTime); - return i_totalTravelTime; -} - -template<typename TRAVELLER> -bool -DestinationHolder<TRAVELLER>::UpdateTraveller(TRAVELLER &traveller, uint32 diff, bool micro_movement) -{ - i_timeElapsed += diff; - - // Update every TRAVELLER_UPDATE_INTERVAL - i_tracker.Update(diff); - if (!i_tracker.Passed()) - return false; - else - ResetUpdate(); - - if (!i_destSet) return true; - - float x, y, z; - if (!micro_movement) - GetLocationNowNoMicroMovement(x, y, z); - else - { - if (!traveller.GetTraveller().HasUnitState(UNIT_STAT_MOVING | UNIT_STAT_IN_FLIGHT)) - return true; - - if (traveller.GetTraveller().HasUnitState(UNIT_STAT_IN_FLIGHT)) - GetLocationNow(traveller.GetTraveller().GetBaseMap(), x, y, z, true); // Should reposition Object with right Coord, so I can bypass some Grid Relocation - else - GetLocationNow(traveller.GetTraveller().GetBaseMap(), x, y, z, false); - - // Change movement computation to micro movement based on last tick coords, this makes system work - // even on multiple floors zones without hugh vmaps usage ;) - - // Take care of underrun of uint32 - if (i_totalTravelTime >= i_timeElapsed) - i_totalTravelTime -= i_timeElapsed; // Consider only the remaining part - else - i_totalTravelTime = 0; - - i_timeElapsed = 0; - i_fromX = x; // and change origine - i_fromY = y; // then I take into account only micro movement - i_fromZ = z; - } - - if (traveller.GetTraveller().GetPositionX() != x || traveller.GetTraveller().GetPositionY() != y || traveller.GetTraveller().GetPositionZ() != z) - { - float ori = traveller.GetTraveller().GetAngle(x, y); - traveller.Relocation(x, y, z, ori); - } - - return true; -} - -template<typename TRAVELLER> -void -DestinationHolder<TRAVELLER>::GetLocationNow(const Map* map, float &x, float &y, float &z, bool is3D) const -{ - if (HasArrived()) - { - x = i_destX; - y = i_destY; - z = i_destZ; - } - else if (HasDestination()) - { - double percent_passed = (double)i_timeElapsed / (double)i_totalTravelTime; - const float distanceX = (float)((i_destX - i_fromX) * percent_passed); - const float distanceY = (float)((i_destY - i_fromY) * percent_passed); - const float distanceZ = (float)((i_destZ - i_fromZ) * percent_passed); - x = i_fromX + distanceX; - y = i_fromY + distanceY; - float z2 = i_fromZ + distanceZ; - // All that is not finished but previous code neither... Traveller need be able to swim. - if (is3D) - z = z2; - else - { - //That part is good for mob Walking on the floor. But the floor is not always what we thought. - z = map->GetHeight(x, y, i_fromZ, false); // Disable cave check - const float groundDist = sqrt(distanceX*distanceX + distanceY*distanceY); - const float zDist = fabs(i_fromZ - z) + 0.000001f; - const float slope = groundDist / zDist; - if (slope < 1.0f) // This prevents the ground returned by GetHeight to be used when in cave - z = z2; // a climb or jump of more than 45 is denied - } - } -} - -template<typename TRAVELLER> -float -DestinationHolder<TRAVELLER>::GetDistance3dFromDestSq(const WorldObject &obj) const -{ - float x, y, z; - obj.GetPosition(x, y, z); - return (i_destX-x)*(i_destX-x)+(i_destY-y)*(i_destY-y)+(i_destZ-z)*(i_destZ-z); -} - -template<typename TRAVELLER> -float -DestinationHolder<TRAVELLER>::GetDestinationDiff(float x, float y, float z) const -{ - return sqrt(((x-i_destX)*(x-i_destX)) + ((y-i_destY)*(y-i_destY)) + ((z-i_destZ)*(z-i_destZ))); -} - -template<typename TRAVELLER> -void -DestinationHolder<TRAVELLER>::GetLocationNowNoMicroMovement(float &x, float &y, float &z) const -{ - if (HasArrived()) - { - x = i_destX; - y = i_destY; - z = i_destZ; - } - else - { - double percent_passed = (double)i_timeElapsed / (double)i_totalTravelTime; - x = (float)(i_fromX + ((i_destX - i_fromX) * percent_passed)); - y = (float)(i_fromY + ((i_destY - i_fromY) * percent_passed)); - z = (float)(i_fromZ + ((i_destZ - i_fromZ) * percent_passed)); - } -} - -#endif - diff --git a/src/server/game/Movement/FollowerRefManager.h b/src/server/game/Movement/FollowerRefManager.h index db2a0d1c5a8..5066804d60f 100755 --- a/src/server/game/Movement/FollowerRefManager.h +++ b/src/server/game/Movement/FollowerRefManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/FollowerReference.cpp b/src/server/game/Movement/FollowerReference.cpp index 9ef1734c78c..997d066a9f2 100755 --- a/src/server/game/Movement/FollowerReference.cpp +++ b/src/server/game/Movement/FollowerReference.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/FollowerReference.h b/src/server/game/Movement/FollowerReference.h index e5b6075ec38..6a1a3719cb8 100755 --- a/src/server/game/Movement/FollowerReference.h +++ b/src/server/game/Movement/FollowerReference.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index ec928e74a34..4945ae2a014 100755 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -19,7 +19,6 @@ #include "MotionMaster.h" #include "CreatureAISelector.h" #include "Creature.h" -#include "Traveller.h" #include "ConfusedMovementGenerator.h" #include "FleeingMovementGenerator.h" @@ -29,7 +28,8 @@ #include "TargetedMovementGenerator.h" #include "WaypointMovementGenerator.h" #include "RandomMovementGenerator.h" - +#include "MoveSpline.h" +#include "MoveSplineInit.h" #include <cassert> inline bool isStatic(MovementGenerator *mv) @@ -80,7 +80,7 @@ void MotionMaster::UpdateMotion(uint32 diff) if (!i_owner) return; - if (i_owner->HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED)) // what about UNIT_STAT_DISTRACTED? Why is this not included? + if (i_owner->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED)) // what about UNIT_STATE_DISTRACTED? Why is this not included? return; ASSERT(!empty()); @@ -175,12 +175,11 @@ void MotionMaster::DelayedExpire() --i_top; } -void MotionMaster::MoveIdle(MovementSlot slot) +void MotionMaster::MoveIdle() { - //if (empty() || !isStatic(top())) - // push(&si_idleMovement); - if (!isStatic(Impl[slot])) - Mutate(&si_idleMovement, slot); + //! Should be preceded by MovementExpired or Clear if there's an overlying movementgenerator active + if (empty() || !isStatic(top())) + Mutate(&si_idleMovement, MOTION_SLOT_IDLE); } void MotionMaster::MoveRandom(float spawndist) @@ -194,16 +193,23 @@ void MotionMaster::MoveRandom(float spawndist) void MotionMaster::MoveTargetedHome() { - //if (i_owner->HasUnitState(UNIT_STAT_FLEEING)) - // return; - Clear(false); - if (i_owner->GetTypeId() == TYPEID_UNIT) + if (i_owner->GetTypeId()==TYPEID_UNIT && !((Creature*)i_owner)->GetCharmerOrOwnerGUID()) { sLog->outStaticDebug("Creature (Entry: %u GUID: %u) targeted home", i_owner->GetEntry(), i_owner->GetGUIDLow()); Mutate(new HomeMovementGenerator<Creature>(), MOTION_SLOT_ACTIVE); } + else if (i_owner->GetTypeId()==TYPEID_UNIT && ((Creature*)i_owner)->GetCharmerOrOwnerGUID()) + { + sLog->outStaticDebug("Pet or controlled creature (Entry: %u GUID: %u) targeting home", i_owner->GetEntry(), i_owner->GetGUIDLow() ); + Unit *target = ((Creature*)i_owner)->GetCharmerOrOwner(); + if (target) + { + sLog->outStaticDebug("Following %s (GUID: %u)", target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : ((Creature*)target)->GetDBTableGUIDLow() ); + Mutate(new FollowMovementGenerator<Creature>(*target,PET_FOLLOW_DIST,PET_FOLLOW_ANGLE), MOTION_SLOT_ACTIVE); + } + } else { sLog->outError("Player (GUID: %u) attempt targeted home", i_owner->GetGUIDLow()); @@ -231,14 +237,14 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle) if (!target || target == i_owner || i_owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE)) return; - i_owner->ClearUnitState(UNIT_STAT_FOLLOW); + //i_owner->ClearUnitState(UNIT_STATE_FOLLOW); if (i_owner->GetTypeId() == TYPEID_PLAYER) { sLog->outStaticDebug("Player (GUID: %u) chase to %s (GUID: %u)", i_owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); - Mutate(new TargetedMovementGenerator<Player>(*target, dist, angle), MOTION_SLOT_ACTIVE); + Mutate(new ChaseMovementGenerator<Player>(*target,dist,angle), MOTION_SLOT_ACTIVE); } else { @@ -246,7 +252,7 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle) i_owner->GetEntry(), i_owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); - Mutate(new TargetedMovementGenerator<Creature>(*target, dist, angle), MOTION_SLOT_ACTIVE); + Mutate(new ChaseMovementGenerator<Creature>(*target,dist,angle), MOTION_SLOT_ACTIVE); } } @@ -256,13 +262,13 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlo if (!target || target == i_owner || i_owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE)) return; - i_owner->AddUnitState(UNIT_STAT_FOLLOW); + //i_owner->AddUnitState(UNIT_STATE_FOLLOW); if (i_owner->GetTypeId() == TYPEID_PLAYER) { sLog->outStaticDebug("Player (GUID: %u) follow to %s (GUID: %u)", i_owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); - Mutate(new TargetedMovementGenerator<Player>(*target, dist, angle), slot); + Mutate(new FollowMovementGenerator<Player>(*target,dist,angle), slot); } else { @@ -270,7 +276,7 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlo i_owner->GetEntry(), i_owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); - Mutate(new TargetedMovementGenerator<Creature>(*target, dist, angle), slot); + Mutate(new FollowMovementGenerator<Creature>(*target,dist,angle), slot); } } @@ -291,54 +297,32 @@ void MotionMaster::MovePoint(uint32 id, float x, float y, float z) void MotionMaster::MoveLand(uint32 id, Position const& pos, float speed) { - if (i_owner->GetTypeId() != TYPEID_UNIT) - return; - - uint32 moveFlag = SPLINEFLAG_FLYING | SPLINEFLAG_ANIMATIONTIER; - uint32 moveTime = uint32(i_owner->GetExactDist(&pos) / speed) * IN_MILLISECONDS; - - // CHARGING state makes the unit use m_TempSpeed and JUMPING prevents sending movement packet in PointMovementGenerator - i_owner->AddUnitState(UNIT_STAT_CHARGING | UNIT_STAT_JUMPING); - i_owner->m_TempSpeed = speed; - float x, y, z; pos.GetPosition(x, y, z); - sLog->outStaticDebug("Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", i_owner->GetEntry(), id, x, y, z); - Mutate(new PointMovementGenerator<Creature>(id, x, y, z), MOTION_SLOT_ACTIVE); - MonsterMoveData data; - data.DestLocation.Relocate(pos); - data.SplineFlag = moveFlag; - data.Time = moveTime; - data.AnimationState = ANIMATION_ON_GROUND; + sLog->outStaticDebug("Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", i_owner->GetEntry(), id, x, y, z); - i_owner->SendMonsterMove(data); + Movement::MoveSplineInit init(*i_owner); + init.MoveTo(x,y,z); + init.SetVelocity(speed); + init.SetAnimation(Movement::ToGround); + init.Launch(); + Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE); } void MotionMaster::MoveTakeoff(uint32 id, Position const& pos, float speed) { - if (i_owner->GetTypeId() != TYPEID_UNIT) - return; - - uint32 moveFlag = SPLINEFLAG_FLYING | SPLINEFLAG_ANIMATIONTIER; - uint32 moveTime = uint32(i_owner->GetExactDist(&pos) / speed) * IN_MILLISECONDS; - - // CHARGING state makes the unit use m_TempSpeed and JUMPING prevents sending movement packet in PointMovementGenerator - i_owner->AddUnitState(UNIT_STAT_CHARGING | UNIT_STAT_JUMPING); - i_owner->m_TempSpeed = speed; - float x, y, z; pos.GetPosition(x, y, z); - sLog->outStaticDebug("Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", i_owner->GetEntry(), id, x, y, z); - Mutate(new PointMovementGenerator<Creature>(id, x, y, z), MOTION_SLOT_ACTIVE); - MonsterMoveData data; - data.DestLocation.Relocate(pos); - data.SplineFlag = moveFlag; - data.Time = moveTime; - data.AnimationState = ANIMATION_FLYING; + sLog->outStaticDebug("Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", i_owner->GetEntry(), id, x, y, z); - i_owner->SendMonsterMove(data); + Movement::MoveSplineInit init(*i_owner); + init.MoveTo(x,y,z); + init.SetVelocity(speed); + init.SetAnimation(Movement::ToFly); + init.Launch(); + Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE); } void MotionMaster::MoveKnockbackFrom(float srcX, float srcY, float speedXY, float speedZ) @@ -348,7 +332,9 @@ void MotionMaster::MoveKnockbackFrom(float srcX, float srcY, float speedXY, floa return; float x, y, z; - float dist = speedXY * speedZ * 0.1f; + float moveTimeHalf = speedZ / Movement::gravity; + float dist = 2 * moveTimeHalf * speedXY; + i_owner->GetNearPoint(i_owner, x, y, z, i_owner->GetObjectSize(), dist, i_owner->GetAngle(srcX, srcY) + M_PI); MoveJump(x, y, z, speedXY, speedZ); } @@ -360,35 +346,51 @@ void MotionMaster::MoveJumpTo(float angle, float speedXY, float speedZ) return; float x, y, z; - float dist = speedXY * speedZ * 0.1f; + + float moveTimeHalf = speedZ / Movement::gravity; + float dist = 2 * moveTimeHalf * speedXY; i_owner->GetClosePoint(x, y, z, i_owner->GetObjectSize(), dist, angle); MoveJump(x, y, z, speedXY, speedZ); } -void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float speedZ) +void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id) { - uint32 moveFlag = SPLINEFLAG_TRAJECTORY | SPLINEFLAG_WALKING; - uint32 time = uint32(speedZ * 100); + sLog->outStaticDebug("Unit (GUID: %u) jump to point (X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), x, y, z); - // Instantly interrupt non melee spells being casted - if (i_owner->IsNonMeleeSpellCasted(true)) - i_owner->InterruptNonMeleeSpells(true); + float moveTimeHalf = speedZ / Movement::gravity; + float max_height = -Movement::computeFallElevation(moveTimeHalf,false,-speedZ); - i_owner->AddUnitState(UNIT_STAT_CHARGING | UNIT_STAT_JUMPING); - i_owner->m_TempSpeed = speedXY; + Movement::MoveSplineInit init(*i_owner); + init.MoveTo(x,y,z); + init.SetParabolic(max_height,0); + init.SetVelocity(speedXY); + init.Launch(); if (i_owner->GetTypeId() == TYPEID_PLAYER) - { - sLog->outStaticDebug("Player (GUID: %u) jump to point (X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), x, y, z); - Mutate(new PointMovementGenerator<Player>(0, x, y, z), MOTION_SLOT_CONTROLLED); - } + Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED); else + Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE); +} + +void MotionMaster::MoveFall(uint32 id/*=0*/) +{ + // use larger distance for vmap height search than in most other cases + float tz = i_owner->GetMap()->GetHeight(i_owner->GetPositionX(), i_owner->GetPositionY(), i_owner->GetPositionZ(), true, MAX_FALL_DISTANCE); + if (tz <= INVALID_HEIGHT) { - sLog->outStaticDebug("Creature (Entry: %u GUID: %u) jump to point (X: %f Y: %f Z: %f)", - i_owner->GetEntry(), i_owner->GetGUIDLow(), x, y, z); - Mutate(new PointMovementGenerator<Creature>(0, x, y, z), MOTION_SLOT_CONTROLLED); + sLog->outStaticDebug("MotionMaster::MoveFall: unable retrive a proper height at map %u (x: %f, y: %f, z: %f).", + i_owner->GetMap()->GetId(), i_owner->GetPositionX(), i_owner->GetPositionX(), i_owner->GetPositionZ()); + return; } - i_owner->SendMonsterMove(x, y, z, moveFlag, time, speedZ); + // Abort too if the ground is very near + if (fabs(i_owner->GetPositionZ() - tz) < 0.1f) + return; + + Movement::MoveSplineInit init(*i_owner); + init.MoveTo(i_owner->GetPositionX(),i_owner->GetPositionY(),tz); + init.SetFall(); + init.Launch(); + Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED); } void MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id) @@ -396,29 +398,19 @@ void MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id) if (Impl[MOTION_SLOT_CONTROLLED] && Impl[MOTION_SLOT_CONTROLLED]->GetMovementGeneratorType() != DISTRACT_MOTION_TYPE) return; - i_owner->AddUnitState(UNIT_STAT_CHARGING); - i_owner->m_TempSpeed = speed; if (i_owner->GetTypeId() == TYPEID_PLAYER) { sLog->outStaticDebug("Player (GUID: %u) charge point (X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), x, y, z); - Mutate(new PointMovementGenerator<Player>(id, x, y, z), MOTION_SLOT_CONTROLLED); + Mutate(new PointMovementGenerator<Player>(id, x, y, z, speed), MOTION_SLOT_CONTROLLED); } else { sLog->outStaticDebug("Creature (Entry: %u GUID: %u) charge point (X: %f Y: %f Z: %f)", i_owner->GetEntry(), i_owner->GetGUIDLow(), x, y, z); - Mutate(new PointMovementGenerator<Creature>(id, x, y, z), MOTION_SLOT_CONTROLLED); + Mutate(new PointMovementGenerator<Creature>(id, x, y, z, speed), MOTION_SLOT_CONTROLLED); } } -void MotionMaster::MoveFall(float z, uint32 id) -{ - i_owner->SetFlying(false); - i_owner->SendMovementFlagUpdate(); - //AddUnitMovementFlag(MOVEMENTFLAG_FALLING); - MoveCharge(i_owner->GetPositionX(), i_owner->GetPositionY(), z, SPEED_CHARGE, id); -} - void MotionMaster::MoveSeekAssistance(float x, float y, float z) { if (i_owner->GetTypeId() == TYPEID_PLAYER) @@ -562,7 +554,7 @@ void MotionMaster::MovePath(uint32 path_id, bool repeatable) //i_owner->GetTypeId() == TYPEID_PLAYER ? //Mutate(new WaypointMovementGenerator<Player>(path_id, repeatable)): - Mutate(new WaypointMovementGenerator<Creature>(path_id, repeatable), MOTION_SLOT_IDLE); + Mutate(new WaypointMovementGenerator<Creature>(path_id, repeatable), MOTION_SLOT_IDLE); sLog->outStaticDebug("%s (GUID: %u) start moving over path(Id:%u, repeatable: %s)", i_owner->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature", @@ -633,8 +625,12 @@ void MotionMaster::DelayedDelete(_Ty curr) bool MotionMaster::GetDestination(float &x, float &y, float &z) { - if (empty()) + if (i_owner->movespline->Finalized()) return false; - return top()->GetDestination(x, y, z); + const G3D::Vector3& dest = i_owner->movespline->FinalDestination(); + x = dest.x; + y = dest.y; + z = dest.z; + return true; } diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h index b6fd3a848ac..a5bd0861b04 100755 --- a/src/server/game/Movement/MotionMaster.h +++ b/src/server/game/Movement/MotionMaster.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -39,7 +39,7 @@ enum MovementGeneratorType MAX_DB_MOTION_TYPE = 3, // *** this and below motion types can't be set in DB. ANIMAL_RANDOM_MOTION_TYPE = MAX_DB_MOTION_TYPE, // AnimalRandomMovementGenerator.h CONFUSED_MOTION_TYPE = 4, // ConfusedMovementGenerator.h - TARGETED_MOTION_TYPE = 5, // TargetedMovementGenerator.h + CHASE_MOTION_TYPE = 5, // TargetedMovementGenerator.h HOME_MOTION_TYPE = 6, // HomeMovementGenerator.h FLIGHT_MOTION_TYPE = 7, // WaypointMovementGenerator.h POINT_MOTION_TYPE = 8, // PointMovementGenerator.h @@ -48,8 +48,10 @@ enum MovementGeneratorType ASSISTANCE_MOTION_TYPE= 11, // PointMovementGenerator.h (first part of flee for assistance) ASSISTANCE_DISTRACT_MOTION_TYPE = 12, // IdleMovementGenerator.h (second part of flee for assistance) TIMED_FLEEING_MOTION_TYPE = 13, // FleeingMovementGenerator.h (alt.second part of flee for assistance) - ROTATE_MOTION_TYPE = 14, - NULL_MOTION_TYPE = 15, + FOLLOW_MOTION_TYPE = 14, + ROTATE_MOTION_TYPE = 15, + EFFECT_MOTION_TYPE = 16, + NULL_MOTION_TYPE = 17, }; enum MovementSlot @@ -86,7 +88,6 @@ class MotionMaster //: private std::stack<MovementGenerator *> typedef std::vector<_Ty> ExpireList; int i_top; - bool empty() const { return (i_top < 0); } void pop() { Impl[i_top] = NULL; --i_top; } void push(_Ty _Val) { ++i_top; Impl[i_top] = _Val; } @@ -107,6 +108,7 @@ class MotionMaster //: private std::stack<MovementGenerator *> void Initialize(); void InitDefault(); + bool empty() const { return (i_top < 0); } int size() const { return i_top + 1; } _Ty top() const { return Impl[i_top]; } _Ty GetMotionSlot(int slot) const { return Impl[slot]; } @@ -142,7 +144,7 @@ class MotionMaster //: private std::stack<MovementGenerator *> DirectExpire(reset); } - void MoveIdle(MovementSlot slot = MOTION_SLOT_ACTIVE); + void MoveIdle(); void MoveTargetedHome(); void MoveRandom(float spawndist = 0.0f); void MoveFollow(Unit* target, float dist, float angle, MovementSlot slot = MOTION_SLOT_ACTIVE); @@ -158,10 +160,11 @@ class MotionMaster //: private std::stack<MovementGenerator *> void MoveTakeoff(uint32 id, Position const& pos, float speed); void MoveCharge(float x, float y, float z, float speed = SPEED_CHARGE, uint32 id = EVENT_CHARGE); - void MoveFall(float z, uint32 id = 0); void MoveKnockbackFrom(float srcX, float srcY, float speedXY, float speedZ); void MoveJumpTo(float angle, float speedXY, float speedZ); - void MoveJump(float x, float y, float z, float speedXY, float speedZ); + void MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id = 0); + void MoveFall(uint32 id = 0); + void MoveSeekAssistance(float x, float y, float z); void MoveSeekAssistanceDistract(uint32 timer); void MoveTaxiFlight(uint32 path, uint32 pathnode); diff --git a/src/server/game/Movement/MovementGenerator.cpp b/src/server/game/Movement/MovementGenerator.cpp index eee874f05ac..73921ea86ff 100755 --- a/src/server/game/Movement/MovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -21,4 +21,3 @@ MovementGenerator::~MovementGenerator() { } - diff --git a/src/server/game/Movement/MovementGenerator.h b/src/server/game/Movement/MovementGenerator.h index 32f5da1db0c..dd9ba32f337 100755 --- a/src/server/game/Movement/MovementGenerator.h +++ b/src/server/game/Movement/MovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -43,8 +43,6 @@ class MovementGenerator virtual MovementGeneratorType GetMovementGeneratorType() = 0; virtual void unitSpeedChanged() { } - - virtual bool GetDestination(float& /*x*/, float& /*y*/, float& /*z*/) const { return false; } }; template<class T, class D> diff --git a/src/server/game/Movement/MovementGeneratorImpl.h b/src/server/game/Movement/MovementGeneratorImpl.h index 6e6bf4b6e62..725b309e3f1 100755 --- a/src/server/game/Movement/MovementGeneratorImpl.h +++ b/src/server/game/Movement/MovementGeneratorImpl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp index 7c3b26c2646..32b960028c2 100755 --- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -18,10 +18,11 @@ #include "Creature.h" #include "MapManager.h" -#include "Opcodes.h" #include "ConfusedMovementGenerator.h" -#include "DestinationHolderImp.h" #include "VMapFactory.h" +#include "MoveSplineInit.h" +#include "MoveSpline.h" +#include "Player.h" #ifdef MAP_BASED_RAND_GEN #define rand_norm() unit.rand_norm() @@ -31,8 +32,8 @@ template<class T> void ConfusedMovementGenerator<T>::Initialize(T &unit) { - float const wanderDistance = 4; - float x, y, z; + const float wander_distance=4; + float x,y,z; x = unit.GetPositionX(); y = unit.GetPositionY(); z = unit.GetPositionZ(); @@ -44,52 +45,33 @@ void ConfusedMovementGenerator<T>::Initialize(T &unit) bool is_water_ok, is_land_ok; _InitSpecific(unit, is_water_ok, is_land_ok); - for (uint8 idx = 0; idx <= MAX_CONF_WAYPOINTS; ++idx) + for (uint8 idx = 0; idx < MAX_CONF_WAYPOINTS + 1; ++idx) { - float wanderX = x + wanderDistance * (float)rand_norm() - wanderDistance/2; - float wanderY = y + wanderDistance * (float)rand_norm() - wanderDistance/2; - Trinity::NormalizeMapCoord(wanderX); - Trinity::NormalizeMapCoord(wanderY); + const float wanderX=wander_distance*(float)rand_norm() - wander_distance/2; + const float wanderY=wander_distance*(float)rand_norm() - wander_distance/2; - float new_z = map->GetHeight(wanderX, wanderY, z, true); - if (new_z > INVALID_HEIGHT && unit.IsWithinLOS(wanderX, wanderY, new_z)) - { - // Don't move in water if we're not already in - // Don't move on land if we're not already on it either - bool is_water_now = map->IsInWater(x, y, z); - bool is_water_next = map->IsInWater(wanderX, wanderY, new_z); - if ((is_water_now && !is_water_next && !is_land_ok) || (!is_water_now && is_water_next && !is_water_ok)) - { - i_waypoints[idx][0] = idx > 0 ? i_waypoints[idx-1][0] : x; // Back to previous location - i_waypoints[idx][1] = idx > 0 ? i_waypoints[idx-1][1] : y; - i_waypoints[idx][2] = idx > 0 ? i_waypoints[idx-1][2] : z; - continue; - } - - // Taken from FleeingMovementGenerator - if (!(new_z - z) || wanderDistance / fabs(new_z - z) > 1.0f) - { - i_waypoints[idx][0] = wanderX; - i_waypoints[idx][1] = wanderY; - i_waypoints[idx][2] = new_z; - continue; - } - } - else // Back to previous location + i_waypoints[idx][0] = x + wanderX; + i_waypoints[idx][1] = y + wanderY; + + // prevent invalid coordinates generation + Trinity::NormalizeMapCoord(i_waypoints[idx][0]); + Trinity::NormalizeMapCoord(i_waypoints[idx][1]); + + bool is_water = map->IsInWater(i_waypoints[idx][0],i_waypoints[idx][1],z); + // if generated wrong path just ignore + if ((is_water && !is_water_ok) || (!is_water && !is_land_ok)) { i_waypoints[idx][0] = idx > 0 ? i_waypoints[idx-1][0] : x; i_waypoints[idx][1] = idx > 0 ? i_waypoints[idx-1][1] : y; - i_waypoints[idx][2] = idx > 0 ? i_waypoints[idx-1][2] : z; - continue; } + + unit.UpdateAllowedPositionZ(i_waypoints[idx][0], i_waypoints[idx][1], z); + i_waypoints[idx][2] = z; } - unit.SetTarget(0); - unit.SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED); - unit.CastStop(); unit.StopMoving(); - unit.AddUnitMovementFlag(MOVEMENTFLAG_WALKING); // Should actually be splineflag - unit.AddUnitState(UNIT_STAT_CONFUSED); + unit.SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED); + unit.AddUnitState(UNIT_STATE_CONFUSED|UNIT_STATE_CONFUSED_MOVE); } template<> @@ -111,69 +93,70 @@ void ConfusedMovementGenerator<T>::Reset(T &unit) { i_nextMove = 1; i_nextMoveTime.Reset(0); - i_destinationHolder.ResetUpdate(); unit.StopMoving(); + unit.AddUnitState(UNIT_STATE_CONFUSED|UNIT_STATE_CONFUSED_MOVE); } template<class T> -bool ConfusedMovementGenerator<T>::Update(T &unit, const uint32 diff) +bool ConfusedMovementGenerator<T>::Update(T &unit, const uint32 &diff) { - if (!&unit) - return true; - - if (unit.HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED)) + if (unit.HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DISTRACTED)) return true; if (i_nextMoveTime.Passed()) { // currently moving, update location - Traveller<T> traveller(unit); - if (i_destinationHolder.UpdateTraveller(traveller, diff)) + unit.AddUnitState(UNIT_STATE_CONFUSED_MOVE); + + if (unit.movespline->Finalized()) { - if (i_destinationHolder.HasArrived()) - { - // arrived, stop and wait a bit - unit.ClearUnitState(UNIT_STAT_MOVE); - - i_nextMove = urand(1, MAX_CONF_WAYPOINTS); - i_nextMoveTime.Reset(urand(100, 1000)); - } + i_nextMove = urand(1,MAX_CONF_WAYPOINTS); + i_nextMoveTime.Reset(urand(0, 1500-1)); // TODO: check the minimum reset time, should be probably higher } } else { // waiting for next move i_nextMoveTime.Update(diff); - if (i_nextMoveTime.Passed()) + if(i_nextMoveTime.Passed() ) { // start moving - ASSERT(i_nextMove <= MAX_CONF_WAYPOINTS); - const float x = i_waypoints[i_nextMove][0]; - const float y = i_waypoints[i_nextMove][1]; - const float z = i_waypoints[i_nextMove][2]; - Traveller<T> traveller(unit); - i_destinationHolder.SetDestination(traveller, x, y, z); + unit.AddUnitState(UNIT_STATE_CONFUSED_MOVE); + + ASSERT( i_nextMove <= MAX_CONF_WAYPOINTS ); + float x = i_waypoints[i_nextMove][0]; + float y = i_waypoints[i_nextMove][1]; + float z = i_waypoints[i_nextMove][2]; + Movement::MoveSplineInit init(unit); + init.MoveTo(x, y, z); + init.SetWalk(true); + init.Launch(); } } + return true; } -template<class T> -void ConfusedMovementGenerator<T>::Finalize(T &unit) +template<> +void ConfusedMovementGenerator<Player>::Finalize(Player &unit) { unit.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED); - unit.ClearUnitState(UNIT_STAT_CONFUSED); + unit.ClearUnitState(UNIT_STATE_CONFUSED|UNIT_STATE_CONFUSED_MOVE); +} - if (unit.GetTypeId() == TYPEID_UNIT && unit.getVictim()) +template<> +void ConfusedMovementGenerator<Creature>::Finalize(Creature &unit) +{ + unit.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED); + unit.ClearUnitState(UNIT_STATE_CONFUSED|UNIT_STATE_CONFUSED_MOVE); + if (unit.getVictim()) unit.SetTarget(unit.getVictim()->GetGUID()); } template void ConfusedMovementGenerator<Player>::Initialize(Player &player); template void ConfusedMovementGenerator<Creature>::Initialize(Creature &creature); -template void ConfusedMovementGenerator<Player>::Finalize(Player &player); -template void ConfusedMovementGenerator<Creature>::Finalize(Creature &creature); template void ConfusedMovementGenerator<Player>::Reset(Player &player); template void ConfusedMovementGenerator<Creature>::Reset(Creature &creature); -template bool ConfusedMovementGenerator<Player>::Update(Player &player, const uint32 diff); -template bool ConfusedMovementGenerator<Creature>::Update(Creature &creature, const uint32 diff); +template bool ConfusedMovementGenerator<Player>::Update(Player &player, const uint32 &diff); +template bool ConfusedMovementGenerator<Creature>::Update(Creature &creature, const uint32 &diff); diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h index 51faab16c27..b9f96bb785d 100755 --- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -20,8 +20,7 @@ #define TRINITY_CONFUSEDGENERATOR_H #include "MovementGenerator.h" -#include "DestinationHolder.h" -#include "Traveller.h" +#include "Timer.h" #define MAX_CONF_WAYPOINTS 24 @@ -35,21 +34,13 @@ class ConfusedMovementGenerator void Initialize(T &); void Finalize(T &); void Reset(T &); - bool Update(T &, const uint32); - - bool GetDestination(float &x, float &y, float &z) const - { - if (i_destinationHolder.HasArrived()) return false; - i_destinationHolder.GetDestination(x, y, z); - return true; - } + bool Update(T &, const uint32 &); MovementGeneratorType GetMovementGeneratorType() { return CONFUSED_MOTION_TYPE; } private: void _InitSpecific(T &, bool &, bool &); TimeTracker i_nextMoveTime; float i_waypoints[MAX_CONF_WAYPOINTS+1][3]; - DestinationHolder< Traveller<T> > i_destinationHolder; uint32 i_nextMove; }; #endif diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp index 5f84d6bc7b0..ed5b73dd378 100755 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -20,8 +20,9 @@ #include "CreatureAI.h" #include "MapManager.h" #include "FleeingMovementGenerator.h" -#include "DestinationHolderImp.h" #include "ObjectAccessor.h" +#include "MoveSplineInit.h" +#include "MoveSpline.h" #define MIN_QUIET_DISTANCE 28.0f #define MAX_QUIET_DISTANCE 43.0f @@ -33,7 +34,7 @@ FleeingMovementGenerator<T>::_setTargetLocation(T &owner) if (!&owner) return; - if (owner.HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED)) + if (owner.HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED)) return; if (!_setMoveData(owner)) @@ -43,25 +44,12 @@ FleeingMovementGenerator<T>::_setTargetLocation(T &owner) if (!_getPoint(owner, x, y, z)) return; - owner.AddUnitState(UNIT_STAT_FLEEING | UNIT_STAT_ROAMING); - Traveller<T> traveller(owner); - i_destinationHolder.SetDestination(traveller, x, y, z); -} - -template<> -bool FleeingMovementGenerator<Creature>::GetDestination(float &x, float &y, float &z) const -{ - if (i_destinationHolder.HasArrived()) - return false; + owner.AddUnitState(UNIT_STATE_FLEEING_MOVE); - i_destinationHolder.GetDestination(x, y, z); - return true; -} - -template<> -bool FleeingMovementGenerator<Player>::GetDestination(float & /*x*/, float & /*y*/, float & /*z*/) const -{ - return false; + Movement::MoveSplineInit init(owner); + init.MoveTo(x,y,z); + init.SetWalk(false); + init.Launch(); } template<class T> @@ -75,10 +63,10 @@ FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z) y = owner.GetPositionY(); z = owner.GetPositionZ(); - float temp_x, temp_y, angle = 0; + float temp_x, temp_y, angle; const Map* _map = owner.GetBaseMap(); //primitive path-finding - for (uint8 i = 0; i < 18; ++i) + for(uint8 i = 0; i < 18; ++i) { if (i_only_forward && i > 2) break; @@ -143,11 +131,11 @@ FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z) distance /= 4; break; case 15: - angle = i_cur_angle + static_cast<float>(M_PI*3/4); + angle = i_cur_angle + static_cast<float>(3*M_PI/4); distance /= 2; break; case 16: - angle = i_cur_angle - static_cast<float>(M_PI*3/4); + angle = i_cur_angle - static_cast<float>(3*M_PI/4); distance /= 2; break; case 17: @@ -161,9 +149,9 @@ FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z) Trinity::NormalizeMapCoord(temp_y); if (owner.IsWithinLOS(temp_x, temp_y, z)) { - bool is_water_now = _map->IsInWater(x, y, z); + bool is_water_now = _map->IsInWater(x,y,z); - if (is_water_now && _map->IsInWater(temp_x, temp_y, z)) + if (is_water_now && _map->IsInWater(temp_x,temp_y,z)) { x = temp_x; y = temp_y; @@ -181,8 +169,8 @@ FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z) if (!(new_z - z) || distance / fabs(new_z - z) > 1.0f) { - float new_z_left = _map->GetHeight(temp_x + (float)(cos(angle+M_PI/2)), temp_y + (float)(sin(angle+M_PI/2)), z, true); - float new_z_right = _map->GetHeight(temp_x + (float)(cos(angle-M_PI/2)), temp_y + (float)(sin(angle-M_PI/2)), z, true); + float new_z_left = _map->GetHeight(temp_x + 1.0f*cos(angle+static_cast<float>(M_PI/2)),temp_y + 1.0f*sin(angle+static_cast<float>(M_PI/2)),z,true); + float new_z_right = _map->GetHeight(temp_x + 1.0f*cos(angle-static_cast<float>(M_PI/2)),temp_y + 1.0f*sin(angle-static_cast<float>(M_PI/2)),z,true); if (fabs(new_z_left - new_z) < 1.2f && fabs(new_z_right - new_z) < 1.2f) { x = temp_x; @@ -194,7 +182,7 @@ FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z) } } i_to_distance_from_caster = 0.0f; - i_nextCheckTime.Reset(urand(500, 1000)); + i_nextCheckTime.Reset( urand(500,1000) ); return false; } @@ -213,12 +201,12 @@ FleeingMovementGenerator<T>::_setMoveData(T &owner) (i_last_distance_from_caster < i_to_distance_from_caster && cur_dist_xyz > i_to_distance_from_caster) || // if we reach bigger distance (cur_dist_xyz > MAX_QUIET_DISTANCE) || // if we are too far - (i_last_distance_from_caster > MIN_QUIET_DISTANCE && cur_dist_xyz < MIN_QUIET_DISTANCE)) + (i_last_distance_from_caster > MIN_QUIET_DISTANCE && cur_dist_xyz < MIN_QUIET_DISTANCE) ) // if we leave 'quiet zone' { // we are very far or too close, stopping i_to_distance_from_caster = 0.0f; - i_nextCheckTime.Reset(urand(500, 1000)); + i_nextCheckTime.Reset( urand(500,1000) ); return false; } else @@ -232,9 +220,7 @@ FleeingMovementGenerator<T>::_setMoveData(T &owner) float cur_dist; float angle_to_caster; - Unit* fright = ObjectAccessor::GetUnit(owner, i_frightGUID); - - if (fright) + if (Unit* fright = ObjectAccessor::GetUnit(owner, i_frightGUID)) { cur_dist = fright->GetDistance(&owner); if (cur_dist < cur_dist_xyz) @@ -284,7 +270,7 @@ FleeingMovementGenerator<T>::_setMoveData(T &owner) i_to_distance_from_caster = MIN_QUIET_DISTANCE + 2.5f + (float)rand_norm()*(MAX_QUIET_DISTANCE - MIN_QUIET_DISTANCE - 2.5f); } - int8 sign = rand_norm() > 0.5f ? 1 : -1; + int8 sign = (float)rand_norm() > 0.5f ? 1 : -1; i_cur_angle = sign*angle + angle_to_caster; // current distance @@ -300,14 +286,12 @@ FleeingMovementGenerator<T>::Initialize(T &owner) if (!&owner) return; - _Init(owner); - owner.CastStop(); - owner.AddUnitState(UNIT_STAT_FLEEING | UNIT_STAT_ROAMING); owner.SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_FLEEING); - owner.SetTarget(0); - owner.RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING); + owner.AddUnitState(UNIT_STATE_FLEEING|UNIT_STATE_FLEEING_MOVE); - if (Unit* fright = ObjectAccessor::GetUnit(owner, i_frightGUID)) + _Init(owner); + + if (Unit *fright = ObjectAccessor::GetUnit(owner, i_frightGUID)) { i_caster_x = fright->GetPositionX(); i_caster_y = fright->GetPositionY(); @@ -334,6 +318,7 @@ FleeingMovementGenerator<Creature>::_Init(Creature &owner) if (!&owner) return; + //owner.SetTargetGuid(ObjectGuid()); is_water_ok = owner.canSwim(); is_land_ok = owner.canWalk(); } @@ -346,51 +331,44 @@ FleeingMovementGenerator<Player>::_Init(Player &) is_land_ok = true; } -template<class T> -void -FleeingMovementGenerator<T>::Finalize(T &owner) +template<> +void FleeingMovementGenerator<Player>::Finalize(Player &owner) +{ + owner.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_FLEEING); + owner.ClearUnitState(UNIT_STATE_FLEEING|UNIT_STATE_FLEEING_MOVE); +} + +template<> +void FleeingMovementGenerator<Creature>::Finalize(Creature &owner) { owner.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_FLEEING); - owner.ClearUnitState(UNIT_STAT_FLEEING | UNIT_STAT_ROAMING); - if (owner.GetTypeId() == TYPEID_UNIT && owner.getVictim()) + owner.ClearUnitState(UNIT_STATE_FLEEING|UNIT_STATE_FLEEING_MOVE); + if (owner.getVictim()) owner.SetTarget(owner.getVictim()->GetGUID()); } template<class T> -void -FleeingMovementGenerator<T>::Reset(T &owner) +void FleeingMovementGenerator<T>::Reset(T &owner) { Initialize(owner); } template<class T> bool -FleeingMovementGenerator<T>::Update(T &owner, const uint32 time_diff) +FleeingMovementGenerator<T>::Update(T &owner, const uint32 &time_diff) { if (!&owner || !owner.isAlive()) return false; - if (owner.HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED)) + if (owner.HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED)) + { + owner.ClearUnitState(UNIT_STATE_FLEEING_MOVE); return true; - - Traveller<T> traveller(owner); + } i_nextCheckTime.Update(time_diff); - - if ((owner.IsStopped() && !i_destinationHolder.HasArrived()) || !i_destinationHolder.HasDestination()) - { + if (i_nextCheckTime.Passed() && owner.movespline->Finalized()) _setTargetLocation(owner); - return true; - } - if (i_destinationHolder.UpdateTraveller(traveller, time_diff)) - { - i_destinationHolder.ResetUpdate(50); - if (i_nextCheckTime.Passed() && i_destinationHolder.HasArrived()) - { - _setTargetLocation(owner); - return true; - } - } return true; } @@ -402,17 +380,15 @@ template bool FleeingMovementGenerator<Player>::_getPoint(Player &, float &, flo template bool FleeingMovementGenerator<Creature>::_getPoint(Creature &, float &, float &, float &); template void FleeingMovementGenerator<Player>::_setTargetLocation(Player &); template void FleeingMovementGenerator<Creature>::_setTargetLocation(Creature &); -template void FleeingMovementGenerator<Player>::Finalize(Player &); -template void FleeingMovementGenerator<Creature>::Finalize(Creature &); template void FleeingMovementGenerator<Player>::Reset(Player &); template void FleeingMovementGenerator<Creature>::Reset(Creature &); -template bool FleeingMovementGenerator<Player>::Update(Player &, const uint32); -template bool FleeingMovementGenerator<Creature>::Update(Creature &, const uint32); +template bool FleeingMovementGenerator<Player>::Update(Player &, const uint32 &); +template bool FleeingMovementGenerator<Creature>::Update(Creature &, const uint32 &); void TimedFleeingMovementGenerator::Finalize(Unit &owner) { owner.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_FLEEING); - owner.ClearUnitState(UNIT_STAT_FLEEING | UNIT_STAT_ROAMING); + owner.ClearUnitState(UNIT_STATE_FLEEING|UNIT_STATE_FLEEING_MOVE); if (Unit* victim = owner.getVictim()) { if (owner.isAlive()) @@ -428,14 +404,21 @@ bool TimedFleeingMovementGenerator::Update(Unit & owner, const uint32 time_diff) if (!owner.isAlive()) return false; - if (owner.HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED)) + if (owner.HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED)) + { + owner.ClearUnitState(UNIT_STATE_FLEEING_MOVE); return true; + } + + i_totalFleeTime.Update(time_diff); + if (i_totalFleeTime.Passed()) + return false; i_totalFleeTime.Update(time_diff); if (i_totalFleeTime.Passed()) return false; - // This calls grant-parent Update method hiden by FleeingMovementGenerator::Update(Creature &, const uint32) version + // This calls grant-parent Update method hiden by FleeingMovementGenerator::Update(Creature &, const uint32 &) version // This is done instead of casting Unit& to Creature& and call parent method, then we can use Unit directly return MovementGeneratorMedium< Creature, FleeingMovementGenerator<Creature> >::Update(owner, time_diff); } diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h index 8ef1478cff2..750db52bb5a 100755 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -20,8 +20,6 @@ #define TRINITY_FLEEINGMOVEMENTGENERATOR_H #include "MovementGenerator.h" -#include "DestinationHolder.h" -#include "Traveller.h" template<class T> class FleeingMovementGenerator @@ -33,8 +31,7 @@ class FleeingMovementGenerator void Initialize(T &); void Finalize(T &); void Reset(T &); - bool Update(T &, const uint32); - bool GetDestination(float &x, float &y, float &z) const; + bool Update(T &, const uint32 &); MovementGeneratorType GetMovementGeneratorType() { return FLEEING_MOTION_TYPE; } @@ -56,8 +53,6 @@ class FleeingMovementGenerator float i_cur_angle; uint64 i_frightGUID; TimeTracker i_nextCheckTime; - - DestinationHolder< Traveller<T> > i_destinationHolder; }; class TimedFleeingMovementGenerator diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp index 9f9172e393d..dc47898352e 100755 --- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -19,22 +19,16 @@ #include "HomeMovementGenerator.h" #include "Creature.h" #include "CreatureAI.h" -#include "Traveller.h" -#include "DestinationHolderImp.h" #include "WorldPacket.h" +#include "MoveSplineInit.h" +#include "MoveSpline.h" void HomeMovementGenerator<Creature>::Initialize(Creature & owner) { - owner.RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING); - owner.AddUnitState(UNIT_STAT_EVADE); + owner.AddUnitState(UNIT_STATE_EVADE); _setTargetLocation(owner); } -void HomeMovementGenerator<Creature>::Finalize(Creature & owner) -{ - owner.ClearUnitState(UNIT_STAT_EVADE); -} - void HomeMovementGenerator<Creature>::Reset(Creature &) { } @@ -44,45 +38,38 @@ void HomeMovementGenerator<Creature>::_setTargetLocation(Creature & owner) if (!&owner) return; - if (owner.HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED)) + if (owner.HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DISTRACTED)) return; - float x, y, z; - owner.GetHomePosition(x, y, z, ori); + Movement::MoveSplineInit init(owner); + float x, y, z, o; + // at apply we can select more nice return points base at current movegen + //if (owner.GetMotionMaster()->empty() || !owner.GetMotionMaster()->top()->GetResetPosition(owner,x,y,z)) + //{ + owner.GetHomePosition(x, y, z, o); + init.SetFacing(o); + //} + init.MoveTo(x,y,z); + init.SetWalk(false); + init.Launch(); - CreatureTraveller traveller(owner); - - uint32 travel_time = i_destinationHolder.SetDestination(traveller, x, y, z); - modifyTravelTime(travel_time); - owner.ClearUnitState(uint32(UNIT_STAT_ALL_STATE & ~UNIT_STAT_EVADE)); + arrived = false; + owner.ClearUnitState(UNIT_STATE_ALL_STATE & ~UNIT_STATE_EVADE); } bool HomeMovementGenerator<Creature>::Update(Creature &owner, const uint32 time_diff) { - CreatureTraveller traveller(owner); - i_destinationHolder.UpdateTraveller(traveller, time_diff); + arrived = owner.movespline->Finalized(); + return !arrived; +} - if (time_diff > i_travel_timer) +void HomeMovementGenerator<Creature>::Finalize(Creature& owner) +{ + if (arrived) { - owner.AddUnitMovementFlag(MOVEMENTFLAG_WALKING); - - // restore orientation of not moving creature at returning to home - if (owner.GetDefaultMovementType() == IDLE_MOTION_TYPE) - { - //sLog->outDebug("Entering HomeMovement::GetDestination(z, y, z)"); - owner.SetOrientation(ori); - WorldPacket packet; - owner.BuildHeartBeatMsg(&packet); - owner.SendMessageToSet(&packet, false); - } - - owner.ClearUnitState(UNIT_STAT_EVADE); + owner.ClearUnitState(UNIT_STATE_EVADE); + owner.SetWalk(true); owner.LoadCreaturesAddon(true); owner.AI()->JustReachedHome(); - return false; } - - i_travel_timer -= time_diff; - - return true; } diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h index 43f52639c4b..c724edc91ff 100755 --- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -20,8 +20,6 @@ #define TRINITY_HOMEMOVEMENTGENERATOR_H #include "MovementGenerator.h" -#include "DestinationHolder.h" -#include "Traveller.h" class Creature; @@ -34,24 +32,18 @@ class HomeMovementGenerator<Creature> { public: - HomeMovementGenerator() {} + HomeMovementGenerator() : arrived(false) {} ~HomeMovementGenerator() {} void Initialize(Creature &); void Finalize(Creature &); void Reset(Creature &); bool Update(Creature &, const uint32); - void modifyTravelTime(uint32 travel_time) { i_travel_timer = travel_time; } MovementGeneratorType GetMovementGeneratorType() { return HOME_MOTION_TYPE; } - bool GetDestination(float& x, float& y, float& z) const { i_destinationHolder.GetDestination(x, y, z); return true; } - private: void _setTargetLocation(Creature &); - DestinationHolder< Traveller<Creature> > i_destinationHolder; - - float ori; - uint32 i_travel_timer; + bool arrived; }; #endif diff --git a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp index 91ac4627679..36561e00b93 100755 --- a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -32,19 +32,19 @@ void IdleMovementGenerator::Initialize(Unit &owner) void IdleMovementGenerator::Reset(Unit& owner) { - if (owner.HasUnitState(UNIT_STAT_MOVE)) + if (owner.HasUnitState(UNIT_STATE_MOVE)) owner.StopMoving(); } void RotateMovementGenerator::Initialize(Unit& owner) { - if (owner.HasUnitState(UNIT_STAT_MOVE)) + if (owner.HasUnitState(UNIT_STATE_MOVE)) owner.StopMoving(); if (owner.getVictim()) owner.SetInFront(owner.getVictim()); - owner.AddUnitState(UNIT_STAT_ROTATING); + owner.AddUnitState(UNIT_STATE_ROTATING); owner.AttackStop(); } @@ -75,7 +75,7 @@ bool RotateMovementGenerator::Update(Unit& owner, const uint32 diff) void RotateMovementGenerator::Finalize(Unit &unit) { - unit.ClearUnitState(UNIT_STAT_ROTATING); + unit.ClearUnitState(UNIT_STATE_ROTATING); if (unit.GetTypeId() == TYPEID_UNIT) unit.ToCreature()->AI()->MovementInform(ROTATE_MOTION_TYPE, 0); } @@ -83,13 +83,13 @@ void RotateMovementGenerator::Finalize(Unit &unit) void DistractMovementGenerator::Initialize(Unit& owner) { - owner.AddUnitState(UNIT_STAT_DISTRACTED); + owner.AddUnitState(UNIT_STATE_DISTRACTED); } void DistractMovementGenerator::Finalize(Unit& owner) { - owner.ClearUnitState(UNIT_STAT_DISTRACTED); + owner.ClearUnitState(UNIT_STATE_DISTRACTED); } bool @@ -105,7 +105,7 @@ DistractMovementGenerator::Update(Unit& /*owner*/, const uint32 time_diff) void AssistanceDistractMovementGenerator::Finalize(Unit &unit) { - unit.ClearUnitState(UNIT_STAT_DISTRACTED); + unit.ClearUnitState(UNIT_STATE_DISTRACTED); unit.ToCreature()->SetReactState(REACT_AGGRESSIVE); } diff --git a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h index 9d8cafd2c4e..8180a86c49b 100755 --- a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp index 6d5c803bea8..02f9ebce847 100755 --- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -20,84 +20,84 @@ #include "Errors.h" #include "Creature.h" #include "CreatureAI.h" -#include "DestinationHolderImp.h" #include "World.h" +#include "MoveSplineInit.h" +#include "MoveSpline.h" +#include "Player.h" //----- Point Movement Generator template<class T> void PointMovementGenerator<T>::Initialize(T &unit) { - unit.StopMoving(); - Traveller<T> traveller(unit); - // OLD: knockback effect has UNIT_STAT_JUMPING set, so if here we disable sentmonstermove there will be creature position sync problem between client and server - // NEW: reactivated this check - UNIT_STAT_JUMPING is only used in MoveJump, which sends its own packet - i_destinationHolder.SetDestination(traveller, i_x, i_y, i_z, /*true*/ !unit.HasUnitState(UNIT_STAT_JUMPING)); + if (!unit.IsStopped()) + unit.StopMoving(); + + unit.AddUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); + Movement::MoveSplineInit init(unit); + init.MoveTo(i_x, i_y, i_z); + if (speed > 0.0f) + init.SetVelocity(speed); + init.Launch(); } template<class T> -bool PointMovementGenerator<T>::Update(T &unit, const uint32 diff) +bool PointMovementGenerator<T>::Update(T &unit, const uint32 &diff) { if (!&unit) return false; - if (unit.HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED)) + if(unit.HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED)) { - if (unit.HasUnitState(UNIT_STAT_CHARGING)) - return false; - else - return true; + unit.ClearUnitState(UNIT_STATE_ROAMING_MOVE); + return true; } - Traveller<T> traveller(unit); - - i_destinationHolder.UpdateTraveller(traveller, diff); - - if (i_destinationHolder.HasArrived()) - { - unit.ClearUnitState(UNIT_STAT_MOVE); - arrived = true; - return false; - } - else if (!unit.HasUnitState(UNIT_STAT_MOVE) && !unit.HasUnitState(UNIT_STAT_JUMPING)) - { - i_destinationHolder.StartTravel(traveller); - } - - return true; + unit.AddUnitState(UNIT_STATE_ROAMING_MOVE); + return !unit.movespline->Finalized(); } template<class T> void PointMovementGenerator<T>:: Finalize(T &unit) { - if (unit.HasUnitState(UNIT_STAT_CHARGING)) - unit.ClearUnitState(UNIT_STAT_CHARGING | UNIT_STAT_JUMPING); - if (arrived) // without this crash! + unit.ClearUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); + + if (unit.movespline->Finalized()) MovementInform(unit); } template<class T> +void PointMovementGenerator<T>::Reset(T &unit) +{ + if (!unit.IsStopped()) + unit.StopMoving(); + + unit.AddUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); +} + +template<class T> void PointMovementGenerator<T>::MovementInform(T & /*unit*/) { } template <> void PointMovementGenerator<Creature>::MovementInform(Creature &unit) { - if (id == EVENT_FALL_GROUND) - { - unit.setDeathState(JUST_DIED); - unit.SetFlying(true); - } - unit.AI()->MovementInform(POINT_MOTION_TYPE, id); + //if (id == EVENT_FALL_GROUND) + //{ + // unit.setDeathState(JUST_DIED); + // unit.SetFlying(true); + //} + if (unit.AI()) + unit.AI()->MovementInform(POINT_MOTION_TYPE, id); } template void PointMovementGenerator<Player>::Initialize(Player&); -template bool PointMovementGenerator<Player>::Update(Player &, const uint32 diff); -template void PointMovementGenerator<Player>::MovementInform(Player&); -template void PointMovementGenerator<Player>::Finalize(Player&); - template void PointMovementGenerator<Creature>::Initialize(Creature&); -template bool PointMovementGenerator<Creature>::Update(Creature&, const uint32 diff); +template void PointMovementGenerator<Player>::Finalize(Player&); template void PointMovementGenerator<Creature>::Finalize(Creature&); +template void PointMovementGenerator<Player>::Reset(Player&); +template void PointMovementGenerator<Creature>::Reset(Creature&); +template bool PointMovementGenerator<Player>::Update(Player &, const uint32 &); +template bool PointMovementGenerator<Creature>::Update(Creature&, const uint32 &); void AssistanceMovementGenerator::Finalize(Unit &unit) { @@ -107,3 +107,24 @@ void AssistanceMovementGenerator::Finalize(Unit &unit) unit.GetMotionMaster()->MoveSeekAssistanceDistract(sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY)); } +bool EffectMovementGenerator::Update(Unit &unit, const uint32) +{ + return !unit.movespline->Finalized(); +} + +void EffectMovementGenerator::Finalize(Unit &unit) +{ + if (unit.GetTypeId() != TYPEID_UNIT) + return; + + if (((Creature&)unit).AI() && unit.movespline->Finalized()) + ((Creature&)unit).AI()->MovementInform(EFFECT_MOTION_TYPE, m_Id); + // Need restore previous movement since we have no proper states system + //if (unit.isAlive() && !unit.HasUnitState(UNIT_STATE_CONFUSED|UNIT_STATE_FLEEING)) + //{ + // if (Unit * victim = unit.getVictim()) + // unit.GetMotionMaster()->MoveChase(victim); + // else + // unit.GetMotionMaster()->Initialize(); + //} +} diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h index 3d936de1ae7..e47f3d93450 100755 --- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -20,8 +20,6 @@ #define TRINITY_POINTMOVEMENTGENERATOR_H #include "MovementGenerator.h" -#include "DestinationHolder.h" -#include "Traveller.h" #include "FollowerReference.h" template<class T> @@ -29,13 +27,13 @@ class PointMovementGenerator : public MovementGeneratorMedium< T, PointMovementGenerator<T> > { public: - PointMovementGenerator(uint32 _id, float _x, float _y, float _z) : id(_id), - i_x(_x), i_y(_y), i_z(_z), i_nextMoveTime(0), arrived(false) {} + PointMovementGenerator(uint32 _id, float _x, float _y, float _z, float _speed = 0.0f) : id(_id), + i_x(_x), i_y(_y), i_z(_z), speed(_speed) {} void Initialize(T &); - void Finalize(T &unit); - void Reset(T &unit){unit.StopMoving();} - bool Update(T &, const uint32 diff); + void Finalize(T &); + void Reset(T &); + bool Update(T &, const uint32 &); void MovementInform(T &); @@ -45,9 +43,7 @@ class PointMovementGenerator private: uint32 id; float i_x, i_y, i_z; - TimeTracker i_nextMoveTime; - DestinationHolder< Traveller<T> > i_destinationHolder; - bool arrived; + float speed; }; class AssistanceMovementGenerator @@ -61,5 +57,19 @@ class AssistanceMovementGenerator void Finalize(Unit &); }; +// Does almost nothing - just doesn't allows previous movegen interrupt current effect. +class EffectMovementGenerator : public MovementGenerator +{ + public: + explicit EffectMovementGenerator(uint32 Id) : m_Id(Id) {} + void Initialize(Unit &) {} + void Finalize(Unit &unit); + void Reset(Unit &) {} + bool Update(Unit &u, const uint32); + MovementGeneratorType GetMovementGeneratorType() { return EFFECT_MOTION_TYPE; } + private: + uint32 m_Id; +}; + #endif diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp index 09af2303397..22adc7be92f 100755 --- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -19,123 +19,103 @@ #include "Creature.h" #include "MapManager.h" #include "RandomMovementGenerator.h" -#include "Traveller.h" #include "ObjectAccessor.h" -#include "DestinationHolderImp.h" #include "Map.h" #include "Util.h" #include "CreatureGroups.h" +#include "MoveSplineInit.h" +#include "MoveSpline.h" #define RUNNING_CHANCE_RANDOMMV 20 //will be "1 / RUNNING_CHANCE_RANDOMMV" -template<> -bool -RandomMovementGenerator<Creature>::GetDestination(float &x, float &y, float &z) const -{ - if (i_destinationHolder.HasArrived()) - return false; - - i_destinationHolder.GetDestination(x, y, z); - return true; -} - #ifdef MAP_BASED_RAND_GEN #define rand_norm() creature.rand_norm() #endif template<> -void -RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature) +void RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature) { - float X, Y, Z, nx, ny, nz, ori, dist; - - creature.GetHomePosition(X, Y, Z, ori); - + float respX, respY, respZ, respO, currZ, destX, destY, destZ, travelDistZ; + creature.GetHomePosition(respX, respY, respZ, respO); + currZ = creature.GetPositionZ(); Map const* map = creature.GetBaseMap(); // For 2D/3D system selection - //bool is_land_ok = creature.canWalk(); - //bool is_water_ok = creature.canSwim(); - bool is_air_ok = creature.canFly(); + //bool is_land_ok = creature.CanWalk(); // not used? + //bool is_water_ok = creature.CanSwim(); // not used? + bool is_air_ok = creature.canFly(); - for (uint32 i = 0; ; ++i) - { - const float angle = (float)rand_norm()*static_cast<float>(M_PI*2); - const float range = (float)rand_norm()*wander_distance; - const float distanceX = range * cos(angle); - const float distanceY = range * sin(angle); + const float angle = float(rand_norm()) * static_cast<float>(M_PI*2.0f); + const float range = float(rand_norm()) * wander_distance; + const float distanceX = range * cos(angle); + const float distanceY = range * sin(angle); - nx = X + distanceX; - ny = Y + distanceY; + destX = respX + distanceX; + destY = respY + distanceY; - // prevent invalid coordinates generation - Trinity::NormalizeMapCoord(nx); - Trinity::NormalizeMapCoord(ny); + // prevent invalid coordinates generation + Trinity::NormalizeMapCoord(destX); + Trinity::NormalizeMapCoord(destY); - dist = (nx - X)*(nx - X) + (ny - Y)*(ny - Y); + travelDistZ = distanceX*distanceX + distanceY*distanceY; - if (i == 5) - { - nz = Z; - break; - } + if (is_air_ok) // 3D system above ground and above water (flying mode) + { + // Limit height change + const float distanceZ = float(rand_norm()) * sqrtf(travelDistZ)/2.0f; + destZ = respZ + distanceZ; + float levelZ = map->GetWaterOrGroundLevel(destX, destY, destZ-2.0f); + + // Problem here, we must fly above the ground and water, not under. Let's try on next tick + if (levelZ >= destZ) + return; + } + //else if (is_water_ok) // 3D system under water and above ground (swimming mode) + else // 2D only + { + // 10.0 is the max that vmap high can check (MAX_CAN_FALL_DISTANCE) + travelDistZ = travelDistZ >= 100.0f ? 10.0f : sqrtf(travelDistZ); - if (is_air_ok) // 3D system above ground and above water (flying mode) - { - const float distanceZ = (float)(rand_norm()) * sqrtf(dist)/2; // Limit height change - nz = Z + distanceZ; - float tz = map->GetHeight(nx, ny, nz-2.0f, false); // Map check only, vmap needed here but need to alter vmaps checks for height. - float wz = map->GetWaterLevel(nx, ny); - if (tz >= nz || wz >= nz) - continue; // Problem here, we must fly above the ground and water, not under. Let's try on next tick - } - //else if (is_water_ok) // 3D system under water and above ground (swimming mode) - else // 2D only + // The fastest way to get an accurate result 90% of the time. + // Better result can be obtained like 99% accuracy with a ray light, but the cost is too high and the code is too long. + destZ = map->GetHeight(destX, destY, respZ+travelDistZ-2.0f, false); + + if (fabs(destZ - respZ) > travelDistZ) // Map check { - dist = dist >= 100.0f ? 10.0f : sqrtf(dist); // 10.0 is the max that vmap high can check (MAX_CAN_FALL_DISTANCE) + // Vmap Horizontal or above + destZ = map->GetHeight(destX, destY, respZ - 2.0f, true); - // The fastest way to get an accurate result 90% of the time. - // Better result can be obtained like 99% accuracy with a ray light, but the cost is too high and the code is too long. - nz = map->GetHeight(nx, ny, Z+dist-2.0f, false); // Map check - if (fabs(nz-Z)>dist) + if (fabs(destZ - respZ) > travelDistZ) { - nz = map->GetHeight(nx, ny, Z-2.0f, true); // Vmap Horizontal or above - if (fabs(nz-Z)>dist) - { - nz = map->GetHeight(nx, ny, Z+dist-2.0f, true); // Vmap Higher - if (fabs(nz-Z)>dist) - continue; // let's forget this bad coords where a z cannot be find and retry at next tick - } + // Vmap Higher + destZ = map->GetHeight(destX, destY, respZ+travelDistZ-2.0f, true); + + // let's forget this bad coords where a z cannot be find and retry at next tick + if (fabs(destZ - respZ) > travelDistZ) + return; } } - break; } - Traveller<Creature> traveller(creature); - creature.SetOrientation(creature.GetAngle(nx, ny)); - i_destinationHolder.SetDestination(traveller, nx, ny, nz); - creature.AddUnitState(UNIT_STAT_ROAMING); if (is_air_ok) - { - i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime()); - } - //else if (is_water_ok) // Swimming mode to be done with more than this check + i_nextMoveTime.Reset(0); else - { - i_nextMoveTime.Reset(urand(500+i_destinationHolder.GetTotalTravelTime(), 5000+i_destinationHolder.GetTotalTravelTime())); - creature.AddUnitMovementFlag(MOVEMENTFLAG_WALKING); - } + i_nextMoveTime.Reset(urand(500, 10000)); + + creature.AddUnitState(UNIT_STATE_ROAMING_MOVE); + + Movement::MoveSplineInit init(creature); + init.MoveTo(destX, destY, destZ); + init.SetWalk(true); + init.Launch(); //Call for creature group update if (creature.GetFormation() && creature.GetFormation()->getLeader() == &creature) - { - creature.GetFormation()->LeaderMoveTo(nx, ny, nz); - } + creature.GetFormation()->LeaderMoveTo(destX, destY, destZ); } template<> -void -RandomMovementGenerator<Creature>::Initialize(Creature &creature) +void RandomMovementGenerator<Creature>::Initialize(Creature &creature) { if (!creature.isAlive()) return; @@ -143,8 +123,7 @@ RandomMovementGenerator<Creature>::Initialize(Creature &creature) if (!wander_distance) wander_distance = creature.GetRespawnRadius(); - if (irand(0, RUNNING_CHANCE_RANDOMMV) > 0) - creature.AddUnitMovementFlag(MOVEMENTFLAG_WALKING); + creature.AddUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); _setRandomLocation(creature); } @@ -156,44 +135,41 @@ RandomMovementGenerator<Creature>::Reset(Creature &creature) } template<> -void -RandomMovementGenerator<Creature>::Finalize(Creature & /*creature*/){} +void RandomMovementGenerator<Creature>::Finalize(Creature &creature) +{ + creature.ClearUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); + creature.SetWalk(false); +} template<> bool RandomMovementGenerator<Creature>::Update(Creature &creature, const uint32 diff) { - if (creature.HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED)) + if (creature.HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DISTRACTED)) { - i_nextMoveTime.Update(i_nextMoveTime.GetExpiry()); // Expire the timer - creature.ClearUnitState(UNIT_STAT_ROAMING); + i_nextMoveTime.Reset(0); // Expire the timer + creature.ClearUnitState(UNIT_STATE_ROAMING_MOVE); return true; } - i_nextMoveTime.Update(diff); - - if (i_destinationHolder.HasArrived() && !creature.IsStopped() && !creature.canFly()) - creature.ClearUnitState(UNIT_STAT_ROAMING | UNIT_STAT_MOVE); - - if (!i_destinationHolder.HasArrived() && creature.IsStopped()) - creature.AddUnitState(UNIT_STAT_ROAMING); - - CreatureTraveller traveller(creature); - - if (i_destinationHolder.UpdateTraveller(traveller, diff, true)) + if (creature.movespline->Finalized()) { + i_nextMoveTime.Update(diff); if (i_nextMoveTime.Passed()) - { - if (irand(0, RUNNING_CHANCE_RANDOMMV) > 0) - creature.AddUnitMovementFlag(MOVEMENTFLAG_WALKING); _setRandomLocation(creature); - } - else if (creature.isPet() && creature.GetOwner() && !creature.IsWithinDist(creature.GetOwner(), PET_FOLLOW_DIST+2.5f)) - { - creature.RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING); - _setRandomLocation(creature); - } } return true; } +template<> +bool RandomMovementGenerator<Creature>::GetResetPosition(Creature &creature, float& x, float& y, float& z) +{ + float radius; + creature.GetRespawnPosition(x, y, z, NULL, &radius); + + // use current if in range + if (creature.IsWithinDist2d(x,y,radius)) + creature.GetPosition(x,y,z); + + return true; +} diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h index cca986ffea7..67161b6fc29 100755 --- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -20,15 +20,12 @@ #define TRINITY_RANDOMMOTIONGENERATOR_H #include "MovementGenerator.h" -#include "DestinationHolder.h" -#include "Traveller.h" template<class T> class RandomMovementGenerator : public MovementGeneratorMedium< T, RandomMovementGenerator<T> > { public: - // Wander dist is related on db spawn dist. So what if we wanna set eandom movement on summoned creature?! RandomMovementGenerator(float spawn_dist = 0.0f) : i_nextMoveTime(0), wander_distance(spawn_dist) {} void _setRandomLocation(T &); @@ -36,18 +33,13 @@ class RandomMovementGenerator void Finalize(T &); void Reset(T &); bool Update(T &, const uint32); - bool GetDestination(float &x, float &y, float &z) const; - void UpdateMapPosition(uint32 mapid, float &x, float &y, float &z) - { - i_destinationHolder.GetLocationNow(mapid, x, y, z); - } + bool GetResetPosition(T&, float& x, float& y, float& z); MovementGeneratorType GetMovementGeneratorType() { return RANDOM_MOTION_TYPE; } private: TimeTrackerSmall i_nextMoveTime; - DestinationHolder< Traveller<T> > i_destinationHolder; - float wander_distance; uint32 i_nextMove; + float wander_distance; }; #endif diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp index af316c82856..964b4402438 100755 --- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -21,106 +21,43 @@ #include "Errors.h" #include "Creature.h" #include "CreatureAI.h" -#include "DestinationHolderImp.h" #include "World.h" - -#define SMALL_ALPHA 0.05f +#include "MoveSplineInit.h" +#include "MoveSpline.h" +#include "Player.h" #include <cmath> -/* -struct StackCleaner -{ - Creature &i_creature; - StackCleaner(Creature &creature) : i_creature(creature) {} - void Done(void) { i_creature.StopMoving(); } - ~StackCleaner() - { - i_creature->Clear(); - } -}; -*/ -template<class T> -TargetedMovementGenerator<T>::TargetedMovementGenerator(Unit &target, float offset, float angle) -: TargetedMovementGeneratorBase(target) -, i_offset(offset), i_angle(angle), i_recalculateTravel(false) -{ - target.GetPosition(i_targetX, i_targetY, i_targetZ); -} - -template<class T> -bool -TargetedMovementGenerator<T>::_setTargetLocation(T &owner) +template<class T, typename D> +void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T &owner) { if (!i_target.isValid() || !i_target->IsInWorld()) - return false; + return; - if (owner.HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED)) - return false; + if (owner.HasUnitState(UNIT_STATE_NOT_MOVE)) + return; float x, y, z; - Traveller<T> traveller(owner); - if (i_destinationHolder.HasDestination()) + + if (i_offset && i_target->IsWithinDistInMap(&owner,2*i_offset)) { - if (i_destinationHolder.HasArrived()) - { - // prevent redundant micro-movement - if (!i_offset) - { - if (i_target->IsWithinMeleeRange(&owner)) - return false; - } - else if (!i_angle && !owner.HasUnitState(UNIT_STAT_FOLLOW)) - { - if (i_target->IsWithinDistInMap(&owner, i_offset)) - return false; - } - else - { - if (i_target->IsWithinDistInMap(&owner, i_offset + 1.0f)) - return false; - } - } - else - { - bool stop = false; - if (!i_offset) - { - if (i_target->IsWithinMeleeRange(&owner, 0)) - stop = true; - } - else if (!i_angle && !owner.HasUnitState(UNIT_STAT_FOLLOW)) - { - if (i_target->IsWithinDist(&owner, i_offset * 0.8f)) - stop = true; - } - - if (stop) - { - owner.GetPosition(x, y, z); - i_destinationHolder.SetDestination(traveller, x, y, z); - i_destinationHolder.StartTravel(traveller, false); - owner.StopMoving(); - return false; - } - } + if (!owner.movespline->Finalized()) + return; - if (i_target->GetExactDistSq(i_targetX, i_targetY, i_targetZ) < 0.01f) - return false; + owner.GetPosition(x, y, z); } - - if (!i_offset) + else if (!i_offset) { + if (i_target->IsWithinMeleeRange(&owner)) + return; + // to nearest random contact position i_target->GetRandomContactPoint(&owner, x, y, z, 0, MELEE_RANGE - 0.5f); } - else if (!i_angle && !owner.HasUnitState(UNIT_STAT_FOLLOW)) - { - // caster chase - i_target->GetContactPoint(&owner, x, y, z, i_offset * urand(80, 95) * 0.01f); - } else { + if (i_target->IsWithinDistInMap(&owner, i_offset + 1.0f)) + return; // to at i_offset distance from target and i_angle from target facing i_target->GetClosePoint(x, y, z, owner.GetObjectSize(), i_offset, i_angle); } @@ -137,55 +74,65 @@ TargetedMovementGenerator<T>::_setTargetLocation(T &owner) ralf //We don't update Mob Movement, if the difference between New destination and last destination is < BothObjectSize - float bothObjectSize = i_target->GetObjectSize() + owner.GetObjectSize() + CONTACT_DISTANCE; - if (i_destinationHolder.HasDestination() && i_destinationHolder.GetDestinationDiff(x, y, z) < bothObjectSize) + float bothObjectSize = i_target->GetObjectBoundingRadius() + owner.GetObjectBoundingRadius() + CONTACT_DISTANCE; + if( i_destinationHolder.HasDestination() && i_destinationHolder.GetDestinationDiff(x,y,z) < bothObjectSize ) return; */ - i_destinationHolder.SetDestination(traveller, x, y, z); - owner.AddUnitState(UNIT_STAT_CHASE); - i_destinationHolder.StartTravel(traveller); - return true; + + + D::_addUnitStateMove(owner); + i_targetReached = false; + i_recalculateTravel = false; + + Movement::MoveSplineInit init(owner); + init.MoveTo(x,y,z); + init.SetWalk(((D*)this)->EnableWalking()); + init.Launch(); } -template<class T> -void -TargetedMovementGenerator<T>::Initialize(T &owner) +template<> +void TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Player> >::UpdateFinalDistance(float /*fDistance*/) { - if (owner.isInCombat()) - owner.RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING); + // nothing to do for Player +} - _setTargetLocation(owner); +template<> +void TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::UpdateFinalDistance(float /*fDistance*/) +{ + // nothing to do for Player } -template<class T> -void -TargetedMovementGenerator<T>::Finalize(T &owner) +template<> +void TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::UpdateFinalDistance(float fDistance) { - owner.ClearUnitState(UNIT_STAT_CHASE); + i_offset = fDistance; + i_recalculateTravel = true; } -template<class T> -void -TargetedMovementGenerator<T>::Reset(T &owner) +template<> +void TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> >::UpdateFinalDistance(float fDistance) { - Initialize(owner); + i_offset = fDistance; + i_recalculateTravel = true; } -template<class T> -bool -TargetedMovementGenerator<T>::Update(T &owner, const uint32 time_diff) +template<class T, typename D> +bool TargetedMovementGeneratorMedium<T,D>::Update(T &owner, const uint32 & time_diff) { if (!i_target.isValid() || !i_target->IsInWorld()) return false; - if (!&owner || !owner.isAlive()) + if (!owner.isAlive()) return true; - if (owner.HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_FLEEING | UNIT_STAT_DISTRACTED)) + if (owner.HasUnitState(UNIT_STATE_NOT_MOVE)) + { + D::_clearUnitStateMove(owner); return true; + } // prevent movement while casting spells with cast time or channel time - if (owner.HasUnitState(UNIT_STAT_CASTING)) + if (owner.IsNonMeleeSpellCasted(false, false, true)) { if (!owner.IsStopped()) owner.StopMoving(); @@ -193,85 +140,184 @@ TargetedMovementGenerator<T>::Update(T &owner, const uint32 time_diff) } // prevent crash after creature killed pet - if (!owner.HasUnitState(UNIT_STAT_FOLLOW) && owner.getVictim() != i_target.getTarget()) + if (static_cast<D*>(this)->_lostTarget(owner)) + { + D::_clearUnitStateMove(owner); return true; + } - Traveller<T> traveller(owner); - - if (!i_destinationHolder.HasDestination()) - _setTargetLocation(owner); - else if (owner.IsStopped() && !i_destinationHolder.HasArrived()) + i_recheckDistance.Update(time_diff); + if (i_recheckDistance.Passed()) { - owner.AddUnitState(UNIT_STAT_CHASE); - i_destinationHolder.StartTravel(traveller); - return true; + i_recheckDistance.Reset(50); + //More distance let have better performance, less distance let have more sensitive reaction at target move. + float allowed_dist = i_target->GetObjectSize() + owner.GetObjectSize() + MELEE_RANGE - 0.5f; + float dist = (owner.movespline->FinalDestination() - G3D::Vector3(i_target->GetPositionX(),i_target->GetPositionY(),i_target->GetPositionZ())).squaredLength(); + if (dist >= allowed_dist * allowed_dist) + _setTargetLocation(owner); } - if (i_destinationHolder.UpdateTraveller(traveller, time_diff)) + if (owner.movespline->Finalized()) { - // put targeted movement generators on a higher priority - //if (owner.GetObjectSize()) - //i_destinationHolder.ResetUpdate(50); + static_cast<D*>(this)->MovementInform(owner); + if (i_angle == 0.f && !owner.HasInArc(0.01f, i_target.getTarget())) + owner.SetInFront(i_target.getTarget()); - // target moved - if (i_targetX != i_target->GetPositionX() || i_targetY != i_target->GetPositionY() - || i_targetZ != i_target->GetPositionZ()) + if (!i_targetReached) { - if (_setTargetLocation(owner) || !owner.HasUnitState(UNIT_STAT_FOLLOW)) - owner.SetInFront(i_target.getTarget()); - i_target->GetPosition(i_targetX, i_targetY, i_targetZ); + i_targetReached = true; + static_cast<D*>(this)->_reachTarget(owner); } + } + else + { + if (i_recalculateTravel) + _setTargetLocation(owner); + } + return true; +} - if ((owner.IsStopped() && !i_destinationHolder.HasArrived()) || i_recalculateTravel) - { - i_recalculateTravel = false; - //Angle update will take place into owner.StopMoving() - owner.SetInFront(i_target.getTarget()); +//-----------------------------------------------// +template<class T> +void ChaseMovementGenerator<T>::_reachTarget(T &owner) +{ + if (owner.IsWithinMeleeRange(this->i_target.getTarget())) + owner.Attack(this->i_target.getTarget(),true); +} - owner.StopMoving(); - if (owner.IsWithinMeleeRange(i_target.getTarget()) && !owner.HasUnitState(UNIT_STAT_FOLLOW)) - owner.Attack(i_target.getTarget(), true); - } - } +template<> +void ChaseMovementGenerator<Player>::Initialize(Player &owner) +{ + owner.AddUnitState(UNIT_STATE_CHASE|UNIT_STATE_CHASE_MOVE); + _setTargetLocation(owner); +} - // Implemented for PetAI to handle resetting flags when pet owner reached - if (i_destinationHolder.HasArrived()) - MovementInform(owner); +template<> +void ChaseMovementGenerator<Creature>::Initialize(Creature &owner) +{ + owner.SetWalk(false); + owner.AddUnitState(UNIT_STATE_CHASE|UNIT_STATE_CHASE_MOVE); + _setTargetLocation(owner); +} - return true; +template<class T> +void ChaseMovementGenerator<T>::Finalize(T &owner) +{ + owner.ClearUnitState(UNIT_STATE_CHASE|UNIT_STATE_CHASE_MOVE); } template<class T> -Unit* -TargetedMovementGenerator<T>::GetTarget() const +void ChaseMovementGenerator<T>::Reset(T &owner) { - return i_target.getTarget(); + Initialize(owner); } template<class T> -void TargetedMovementGenerator<T>::MovementInform(T & /*unit*/) +void ChaseMovementGenerator<T>::MovementInform(T & /*unit*/) { } -template <> void TargetedMovementGenerator<Creature>::MovementInform(Creature &unit) +template<> +void ChaseMovementGenerator<Creature>::MovementInform(Creature &unit) { // Pass back the GUIDLow of the target. If it is pet's owner then PetAI will handle - unit.AI()->MovementInform(TARGETED_MOTION_TYPE, i_target.getTarget()->GetGUIDLow()); + if (unit.AI()) + unit.AI()->MovementInform(CHASE_MOTION_TYPE, i_target.getTarget()->GetGUIDLow()); +} + +//-----------------------------------------------// +template<> +bool FollowMovementGenerator<Creature>::EnableWalking() const +{ + return i_target.isValid() && i_target->IsWalking(); +} + +template<> +bool FollowMovementGenerator<Player>::EnableWalking() const +{ + return false; +} + +template<> +void FollowMovementGenerator<Player>::_updateSpeed(Player &/*u*/) +{ + // nothing to do for Player +} + +template<> +void FollowMovementGenerator<Creature>::_updateSpeed(Creature &u) +{ + // pet only sync speed with owner + if (!((Creature&)u).isPet() || !i_target.isValid() || i_target->GetGUID() != u.GetOwnerGUID()) + return; + + u.UpdateSpeed(MOVE_RUN,true); + u.UpdateSpeed(MOVE_WALK,true); + u.UpdateSpeed(MOVE_SWIM,true); +} + +template<> +void FollowMovementGenerator<Player>::Initialize(Player &owner) +{ + owner.AddUnitState(UNIT_STATE_FOLLOW|UNIT_STATE_FOLLOW_MOVE); + _updateSpeed(owner); + _setTargetLocation(owner); +} + +template<> +void FollowMovementGenerator<Creature>::Initialize(Creature &owner) +{ + owner.AddUnitState(UNIT_STATE_FOLLOW|UNIT_STATE_FOLLOW_MOVE); + _updateSpeed(owner); + _setTargetLocation(owner); +} + +template<class T> +void FollowMovementGenerator<T>::Finalize(T &owner) +{ + owner.ClearUnitState(UNIT_STATE_FOLLOW|UNIT_STATE_FOLLOW_MOVE); + _updateSpeed(owner); } -template void TargetedMovementGenerator<Player>::MovementInform(Player&); // Not implemented for players -template TargetedMovementGenerator<Player>::TargetedMovementGenerator(Unit &target, float offset, float angle); -template TargetedMovementGenerator<Creature>::TargetedMovementGenerator(Unit &target, float offset, float angle); -template bool TargetedMovementGenerator<Player>::_setTargetLocation(Player &); -template bool TargetedMovementGenerator<Creature>::_setTargetLocation(Creature &); -template void TargetedMovementGenerator<Player>::Initialize(Player &); -template void TargetedMovementGenerator<Creature>::Initialize(Creature &); -template void TargetedMovementGenerator<Player>::Finalize(Player &); -template void TargetedMovementGenerator<Creature>::Finalize(Creature &); -template void TargetedMovementGenerator<Player>::Reset(Player &); -template void TargetedMovementGenerator<Creature>::Reset(Creature &); -template bool TargetedMovementGenerator<Player>::Update(Player &, const uint32); -template bool TargetedMovementGenerator<Creature>::Update(Creature &, const uint32); -template Unit* TargetedMovementGenerator<Player>::GetTarget() const; -template Unit* TargetedMovementGenerator<Creature>::GetTarget() const; +template<class T> +void FollowMovementGenerator<T>::Reset(T &owner) +{ + Initialize(owner); +} + +template<class T> +void FollowMovementGenerator<T>::MovementInform(T & /*unit*/) +{ +} + +template<> +void FollowMovementGenerator<Creature>::MovementInform(Creature &unit) +{ + // Pass back the GUIDLow of the target. If it is pet's owner then PetAI will handle + if (unit.AI()) + unit.AI()->MovementInform(FOLLOW_MOTION_TYPE, i_target.getTarget()->GetGUIDLow()); +} +//-----------------------------------------------// +template void TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Player> >::_setTargetLocation(Player &); +template void TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::_setTargetLocation(Player &); +template void TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::_setTargetLocation(Creature &); +template void TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> >::_setTargetLocation(Creature &); +template bool TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Player> >::Update(Player &, const uint32 &); +template bool TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::Update(Player &, const uint32 &); +template bool TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::Update(Creature &, const uint32 &); +template bool TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> >::Update(Creature &, const uint32 &); + +template void ChaseMovementGenerator<Player>::_reachTarget(Player &); +template void ChaseMovementGenerator<Creature>::_reachTarget(Creature &); +template void ChaseMovementGenerator<Player>::Finalize(Player &); +template void ChaseMovementGenerator<Creature>::Finalize(Creature &); +template void ChaseMovementGenerator<Player>::Reset(Player &); +template void ChaseMovementGenerator<Creature>::Reset(Creature &); +template void ChaseMovementGenerator<Player>::MovementInform(Player &unit); + +template void FollowMovementGenerator<Player>::Finalize(Player &); +template void FollowMovementGenerator<Creature>::Finalize(Creature &); +template void FollowMovementGenerator<Player>::Reset(Player &); +template void FollowMovementGenerator<Creature>::Reset(Creature &); +template void FollowMovementGenerator<Player>::MovementInform(Player &unit); diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h index 0c9623192f0..bf2eecc89f6 100755 --- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -20,9 +20,9 @@ #define TRINITY_TARGETEDMOVEMENTGENERATOR_H #include "MovementGenerator.h" -#include "DestinationHolder.h" -#include "Traveller.h" #include "FollowerReference.h" +#include "Timer.h" +#include "Unit.h" class TargetedMovementGeneratorBase { @@ -33,41 +33,84 @@ class TargetedMovementGeneratorBase FollowerReference i_target; }; +template<class T, typename D> +class TargetedMovementGeneratorMedium +: public MovementGeneratorMedium< T, D >, public TargetedMovementGeneratorBase +{ + protected: + TargetedMovementGeneratorMedium(Unit &target, float offset, float angle) : + TargetedMovementGeneratorBase(target), i_offset(offset), i_angle(angle), + i_recalculateTravel(false), i_targetReached(false), i_recheckDistance(0) + { + } + ~TargetedMovementGeneratorMedium() {} + + public: + bool Update(T &, const uint32 &); + Unit* GetTarget() const { return i_target.getTarget(); } + + void unitSpeedChanged() { i_recalculateTravel=true; } + void UpdateFinalDistance(float fDistance); + + protected: + void _setTargetLocation(T &); + + TimeTrackerSmall i_recheckDistance; + float i_offset; + float i_angle; + bool i_recalculateTravel : 1; + bool i_targetReached : 1; +}; + template<class T> -class TargetedMovementGenerator -: public MovementGeneratorMedium< T, TargetedMovementGenerator<T> >, public TargetedMovementGeneratorBase +class ChaseMovementGenerator : public TargetedMovementGeneratorMedium<T, ChaseMovementGenerator<T> > { public: - TargetedMovementGenerator(Unit &target, float offset = 0, float angle = 0); - ~TargetedMovementGenerator() {} + ChaseMovementGenerator(Unit &target) + : TargetedMovementGeneratorMedium<T, ChaseMovementGenerator<T> >(target) {} + ChaseMovementGenerator(Unit &target, float offset, float angle) + : TargetedMovementGeneratorMedium<T, ChaseMovementGenerator<T> >(target, offset, angle) {} + ~ChaseMovementGenerator() {} + + MovementGeneratorType GetMovementGeneratorType() { return CHASE_MOTION_TYPE; } void Initialize(T &); void Finalize(T &); void Reset(T &); - bool Update(T &, const uint32); - MovementGeneratorType GetMovementGeneratorType() { return TARGETED_MOTION_TYPE; } - void MovementInform(T &); - Unit* GetTarget() const; + static void _clearUnitStateMove(T &u) { u.ClearUnitState(UNIT_STATE_CHASE_MOVE); } + static void _addUnitStateMove(T &u) { u.AddUnitState(UNIT_STATE_CHASE_MOVE); } + bool EnableWalking() const { return false;} + bool _lostTarget(T &u) const { return u.getVictim() != this->GetTarget(); } + void _reachTarget(T &); +}; - bool GetDestination(float &x, float &y, float &z) const - { - if (i_destinationHolder.HasArrived() || !i_destinationHolder.HasDestination()) return false; - i_destinationHolder.GetDestination(x, y, z); - return true; - } +template<class T> +class FollowMovementGenerator : public TargetedMovementGeneratorMedium<T, FollowMovementGenerator<T> > +{ + public: + FollowMovementGenerator(Unit &target) + : TargetedMovementGeneratorMedium<T, FollowMovementGenerator<T> >(target){} + FollowMovementGenerator(Unit &target, float offset, float angle) + : TargetedMovementGeneratorMedium<T, FollowMovementGenerator<T> >(target, offset, angle) {} + ~FollowMovementGenerator() {} - void unitSpeedChanged() { i_recalculateTravel=true; } - private: + MovementGeneratorType GetMovementGeneratorType() { return FOLLOW_MOTION_TYPE; } - bool _setTargetLocation(T &); + void Initialize(T &); + void Finalize(T &); + void Reset(T &); + void MovementInform(T &); - float i_offset; - float i_angle; - DestinationHolder< Traveller<T> > i_destinationHolder; - bool i_recalculateTravel; - float i_targetX, i_targetY, i_targetZ; + static void _clearUnitStateMove(T &u) { u.ClearUnitState(UNIT_STATE_FOLLOW_MOVE); } + static void _addUnitStateMove(T &u) { u.AddUnitState(UNIT_STATE_FOLLOW_MOVE); } + bool EnableWalking() const; + bool _lostTarget(T &) const { return false; } + void _reachTarget(T &) {} + private: + void _updateSpeed(T &u); }; + #endif diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index 396b0c489f2..55cf3c28d46 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -17,222 +17,166 @@ */ //Basic headers #include "WaypointMovementGenerator.h" -#include "DestinationHolderImp.h" //Extended headers #include "ObjectMgr.h" #include "World.h" -#include "MapManager.h" // for flightmaster grid preloading +//Flightmaster grid preloading +#include "MapManager.h" //Creature-specific headers #include "Creature.h" #include "CreatureAI.h" #include "CreatureGroups.h" //Player-specific #include "Player.h" +#include "MoveSplineInit.h" +#include "MoveSpline.h" -template<class T> -void -WaypointMovementGenerator<T>::Initialize(T & /*u*/){} - -template<> -void -WaypointMovementGenerator<Creature>::Finalize(Creature & /*u*/){} +void WaypointMovementGenerator<Creature>::LoadPath(Creature &creature) +{ + if (!path_id) + path_id = creature.GetWaypointPath(); -template<> -void -WaypointMovementGenerator<Player>::Finalize(Player & /*u*/){} + i_path = sWaypointMgr->GetPath(path_id); -template<class T> -void -WaypointMovementGenerator<T>::MovementInform(T & /*unit*/){} + if (!i_path) + { + // No movement found for entry + sLog->outErrorDb("WaypointMovementGenerator::LoadPath: creature %s (Entry: %u GUID: %u) doesn't have waypoint path id: %u", creature.GetName(), creature.GetEntry(), creature.GetGUIDLow(), path_id); + return; + } -template<> -void WaypointMovementGenerator<Creature>::MovementInform(Creature &unit) -{ - unit.AI()->MovementInform(WAYPOINT_MOTION_TYPE, i_currentNode); + StartMoveNow(creature); } -template<> -bool WaypointMovementGenerator<Creature>::GetDestination(float &x, float &y, float &z) const +void WaypointMovementGenerator<Creature>::Initialize(Creature &creature) { - if (i_destinationHolder.HasArrived()) - return false; - - i_destinationHolder.GetDestination(x, y, z); - return true; + LoadPath(creature); + creature.AddUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); } -template<> -bool WaypointMovementGenerator<Player>::GetDestination(float & /*x*/, float & /*y*/, float & /*z*/) const +void WaypointMovementGenerator<Creature>::Finalize(Creature &creature) { - return false; + creature.ClearUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); + creature.SetWalk(false); } -template<> -void WaypointMovementGenerator<Creature>::Reset(Creature & /*unit*/) +void WaypointMovementGenerator<Creature>::Reset(Creature &creature) { - StopedByPlayer = true; - i_nextMoveTime.Reset(0); + creature.AddUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); + StartMoveNow(creature); } -template<> -void WaypointMovementGenerator<Player>::Reset(Player & /*unit*/){} - -template<> -void WaypointMovementGenerator<Creature>::InitTraveller(Creature &unit, const WaypointData &node) +void WaypointMovementGenerator<Creature>::OnArrived(Creature& creature) { - node.run ? unit.RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING): - unit.AddUnitMovementFlag(MOVEMENTFLAG_WALKING); + if (!i_path || i_path->empty()) + return; + if (m_isArrivalDone) + return; - unit.SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); - unit.SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + creature.ClearUnitState(UNIT_STATE_ROAMING_MOVE); + m_isArrivalDone = true; - // TODO: make this part of waypoint node, so that creature can walk when desired? - if (unit.canFly()) - unit.SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02); + if (i_path->at(i_currentNode)->event_id && urand(0, 99) < i_path->at(i_currentNode)->event_chance) + { + sLog->outDebug(LOG_FILTER_MAPSCRIPTS, "Creature movement start script %u at point %u for %u.", i_path->at(i_currentNode)->event_id, i_currentNode, creature.GetGUID()); + creature.GetMap()->ScriptsStart(sWaypointScripts, i_path->at(i_currentNode)->event_id, &creature, NULL/*, false*/); + } - unit.AddUnitState(UNIT_STAT_ROAMING); + // Inform script + MovementInform(creature); + creature.UpdateWaypointID(i_currentNode); + Stop(i_path->at(i_currentNode)->delay); } -template<> -void -WaypointMovementGenerator<Creature>::Initialize(Creature &u) +bool WaypointMovementGenerator<Creature>::StartMove(Creature &creature) { - u.StopMoving(); - //i_currentNode = -1; // uint32, become 0 in the first update - //i_nextMoveTime.Reset(0); - StopedByPlayer = false; - if (!path_id) - path_id = u.GetWaypointPath(); - waypoints = sWaypointMgr->GetPath(path_id); - i_currentNode = 0; - if (waypoints && waypoints->size()) + if (!i_path || i_path->empty()) + return false; + if (Stopped()) + return true; + + if (m_isArrivalDone) { - node = waypoints->front(); - Traveller<Creature> traveller(u); - InitTraveller(u, *node); - i_destinationHolder.SetDestination(traveller, node->x, node->y, node->z); - i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime()); - - //Call for creature group update - if (u.GetFormation() && u.GetFormation()->getLeader() == &u) - u.GetFormation()->LeaderMoveTo(node->x, node->y, node->z); + if ((i_currentNode == i_path->size() - 1) && !repeating) // If that's our last waypoint + { + creature.SetHomePosition(i_path->at(i_currentNode)->x, i_path->at(i_currentNode)->y, i_path->at(i_currentNode)->z, creature.GetOrientation()); + creature.GetMotionMaster()->Initialize(); + return false; + } + + i_currentNode = (i_currentNode+1) % i_path->size(); } - else - node = NULL; -} -template<> -void WaypointMovementGenerator<Player>::InitTraveller(Player & /*unit*/, const WaypointData & /*node*/){} + const WaypointData *node = i_path->at(i_currentNode); -template<class T> -bool -WaypointMovementGenerator<T>::Update(T & /*unit*/, const uint32 /*diff*/) -{ - return false; -} + m_isArrivalDone = false; -template<> -bool -WaypointMovementGenerator<Creature>::Update(Creature &unit, const uint32 diff) -{ - if (!&unit) - return true; + creature.AddUnitState(UNIT_STATE_ROAMING_MOVE); + + Movement::MoveSplineInit init(creature); + init.MoveTo(node->x, node->y, node->z); - if (!path_id) - return false; + if (node->orientation != 100 && node->delay != 0) + init.SetFacing(node->orientation); + + init.SetWalk(!node->run); + init.Launch(); + //Call for creature group update + if (creature.GetFormation() && creature.GetFormation()->getLeader() == &creature) + creature.GetFormation()->LeaderMoveTo(node->x, node->y, node->z); + + return true; +} + +bool WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint32 &diff) +{ // Waypoint movement can be switched on/off // This is quite handy for escort quests and other stuff - if (unit.HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED)) + if (creature.HasUnitState(UNIT_STATE_NOT_MOVE)) + { + creature.ClearUnitState(UNIT_STATE_ROAMING_MOVE); return true; - - // Clear the generator if the path doesn't exist - if (!waypoints || !waypoints->size()) + } + // prevent a crash at empty waypoint path. + if (!i_path || i_path->empty()) return false; - Traveller<Creature> traveller(unit); - - i_nextMoveTime.Update(diff); - i_destinationHolder.UpdateTraveller(traveller, diff, true); - - if (i_nextMoveTime.GetExpiry() < TIMEDIFF_NEXT_WP) + if (Stopped()) { - if (unit.IsStopped()) - { - if (StopedByPlayer) - { - ASSERT(node); - InitTraveller(unit, *node); - i_destinationHolder.SetDestination(traveller, node->x, node->y, node->z); - i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime()); - StopedByPlayer = false; - return true; - } - - if (i_currentNode == waypoints->size() - 1) // If that's our last waypoint - { - if (repeating) // If the movement is repeating - i_currentNode = 0; // Start moving all over again - else - { - unit.SetHomePosition(node->x, node->y, node->z, unit.GetOrientation()); - unit.GetMotionMaster()->Initialize(); - return false; // Clear the waypoint movement - } - } - else - ++i_currentNode; - - node = waypoints->at(i_currentNode); - InitTraveller(unit, *node); - i_destinationHolder.SetDestination(traveller, node->x, node->y, node->z); - i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime()); - - //Call for creature group update - if (unit.GetFormation() && unit.GetFormation()->getLeader() == &unit) - unit.GetFormation()->LeaderMoveTo(node->x, node->y, node->z); - } - else - { - //Determine waittime - if (node->delay) - i_nextMoveTime.Reset(node->delay); - - //note: disable "start" for mtmap - if (node->event_id && urand(0, 99) < node->event_chance) - unit.GetMap()->ScriptsStart(sWaypointScripts, node->event_id, &unit, NULL/*, false*/); - - i_destinationHolder.ResetTravelTime(); - MovementInform(unit); - unit.UpdateWaypointID(i_currentNode); - unit.ClearUnitState(UNIT_STAT_ROAMING); - if (node->orientation) - { - unit.Relocate(node->x, node->y, node->z, node->orientation); - unit.SetFacing(node->orientation, NULL); - } - else - unit.Relocate(node->x, node->y, node->z); - } + if (CanMove(diff)) + return StartMove(creature); } - else + else { - if (unit.IsStopped() && !i_destinationHolder.HasArrived()) + if (creature.IsStopped()) + Stop(STOP_TIME_FOR_PLAYER); + else if (creature.movespline->Finalized()) { - if (!StopedByPlayer) - { - i_destinationHolder.IncreaseTravelTime(STOP_TIME_FOR_PLAYER); - i_nextMoveTime.Reset(STOP_TIME_FOR_PLAYER); - StopedByPlayer = true; - } - } + OnArrived(creature); + return StartMove(creature); + } } + return true; + } + +void WaypointMovementGenerator<Creature>::MovementInform(Creature &creature) +{ + if (creature.AI()) + creature.AI()->MovementInform(WAYPOINT_MOTION_TYPE, i_currentNode); +} + +bool WaypointMovementGenerator<Creature>::GetResetPosition(Creature&, float& x, float& y, float& z) +{ + // prevent a crash at empty waypoint path. + if (!i_path || i_path->empty()) + return false; + + const WaypointData* node = i_path->at(i_currentNode); + x = node->x; y = node->y; z = node->z; return true; } -template void WaypointMovementGenerator<Player>::Initialize(Player &); -template bool WaypointMovementGenerator<Player>::Update(Player &, const uint32); -template void WaypointMovementGenerator<Player>::MovementInform(Player &); //----------------------------------------------------// @@ -253,71 +197,72 @@ uint32 FlightPathMovementGenerator::GetPathAtMapEnd() const void FlightPathMovementGenerator::Initialize(Player &player) { - player.getHostileRefManager().setOnlineOfflineState(false); - player.AddUnitState(UNIT_STAT_IN_FLIGHT); - player.SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT); - Traveller<Player> traveller(player); - // do not send movement, it was sent already - i_destinationHolder.SetDestination(traveller, (*i_path)[i_currentNode].x, (*i_path)[i_currentNode].y, (*i_path)[i_currentNode].z, false); - // For preloading end grid + Reset(player); InitEndGridInfo(); - player.SendMonsterMoveByPath(GetPath(), GetCurrentNode(), GetPathAtMapEnd()); } void FlightPathMovementGenerator::Finalize(Player & player) { - player.ClearUnitState(UNIT_STAT_IN_FLIGHT); + // remove flag to prevent send object build movement packets for flight state and crash (movement generator already not at top of stack) + player.ClearUnitState(UNIT_STATE_IN_FLIGHT); - float x = 0; - float y = 0; - float z = 0; - i_destinationHolder.GetLocationNow(player.GetBaseMap(), x, y, z); - player.UpdatePosition(x, y, z, player.GetOrientation()); + player.Dismount(); + player.RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT); + if(player.m_taxi.empty()) + { + player.getHostileRefManager().setOnlineOfflineState(true); + if(player.pvpInfo.inHostileArea) + player.CastSpell(&player, 2479, true); + + // update z position to ground and orientation for landing point + // this prevent cheating with landing point at lags + // when client side flight end early in comparison server side + player.StopMoving(); + } +} + +#define PLAYER_FLIGHT_SPEED 32.0f + +void FlightPathMovementGenerator::Reset(Player & player) +{ + player.getHostileRefManager().setOnlineOfflineState(false); + player.AddUnitState(UNIT_STATE_IN_FLIGHT); + player.SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT); + + Movement::MoveSplineInit init(player); + uint32 end = GetPathAtMapEnd(); + for (uint32 i = GetCurrentNode(); i != end; ++i) + { + G3D::Vector3 vertice((*i_path)[i].x,(*i_path)[i].y,(*i_path)[i].z); + init.Path().push_back(vertice); + } + init.SetFirstPointId(GetCurrentNode()); + init.SetFly(); + init.SetVelocity(PLAYER_FLIGHT_SPEED); + init.Launch(); } bool FlightPathMovementGenerator::Update(Player &player, const uint32 diff) { - if (MovementInProgress()) + uint32 pointId = (uint32)player.movespline->currentPathIdx(); + if (pointId > i_currentNode) { - Traveller<Player> traveller(player); - if (i_destinationHolder.UpdateTraveller(traveller, diff)) + bool departureEvent = true; + do { - i_destinationHolder.ResetUpdate(FLIGHT_TRAVEL_UPDATE); - if (i_destinationHolder.HasArrived()) - { - DoEventIfAny(player, (*i_path)[i_currentNode], false); - - uint32 curMap = (*i_path)[i_currentNode].mapid; - ++i_currentNode; - if (MovementInProgress()) - { - DoEventIfAny(player, (*i_path)[i_currentNode], true); - - sLog->outStaticDebug("loading node %u for player %s", i_currentNode, player.GetName()); - if ((*i_path)[i_currentNode].mapid == curMap) - { - // do not send movement, it was sent already - i_destinationHolder.SetDestination(traveller, (*i_path)[i_currentNode].x, (*i_path)[i_currentNode].y, (*i_path)[i_currentNode].z, false); - } - - // check if it's time to preload the flightmaster grid at path end - if (i_currentNode == m_preloadTargetNode) - PreloadEndGrid(); - - return true; - } - //else HasArrived() - } - else - return true; + DoEventIfAny(player, (*i_path)[i_currentNode], departureEvent); + if (pointId == i_currentNode) + break; + if (i_currentNode == _preloadTargetNode) + PreloadEndGrid(); + i_currentNode += (uint32)departureEvent; + departureEvent = !departureEvent; } - else - return true; + while (true); } - // we have arrived at the end of the path - return false; + return i_currentNode < (i_path->size()-1); } void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport() @@ -336,42 +281,48 @@ void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport() } } +void FlightPathMovementGenerator::DoEventIfAny(Player& player, TaxiPathNodeEntry const& node, bool departure) +{ + if (uint32 eventid = departure ? node.departureEventID : node.arrivalEventID) + { + sLog->outDebug(LOG_FILTER_MAPSCRIPTS, "Taxi %s event %u of node %u of path %u for player %s", departure ? "departure" : "arrival", eventid, node.index, node.path, player.GetName()); + player.GetMap()->ScriptsStart(sEventScripts, eventid, &player, &player); + } +} + +bool FlightPathMovementGenerator::GetResetPosition(Player&, float& x, float& y, float& z) +{ + const TaxiPathNodeEntry& node = (*i_path)[i_currentNode]; + x = node.x; y = node.y; z = node.z; + return true; +} + void FlightPathMovementGenerator::InitEndGridInfo() { - // Storage to preload flightmaster grid at end of flight. For multi-stop flights, this will - // be reinitialized for each flightmaster at the end of each spline (or stop) in the flight. - - uint32 nodeCount = (*i_path).size(); // Get the number of nodes in the path. - m_endMapId = (*i_path)[nodeCount -1].mapid; // Get the map ID from the last node - m_preloadTargetNode = nodeCount - 3; // 2 nodes before the final node, we pre-load the grid - m_endGridX = (*i_path)[nodeCount -1].x; // Get the X position from the last node - m_endGridY = (*i_path)[nodeCount -1].y; // Get the Y position from the last node + /*! Storage to preload flightmaster grid at end of flight. For multi-stop flights, this will + be reinitialized for each flightmaster at the end of each spline (or stop) in the flight. */ + uint32 nodeCount = (*i_path).size(); //! Number of nodes in path. + _endMapId = (*i_path)[nodeCount - 1].mapid; //! MapId of last node + _preloadTargetNode = nodeCount - 3; + _endGridX = (*i_path)[nodeCount - 1].x; + _endGridY = (*i_path)[nodeCount - 1].y; } void FlightPathMovementGenerator::PreloadEndGrid() { // used to preload the final grid where the flightmaster is - Map* endMap = sMapMgr->FindBaseNonInstanceMap(m_endMapId); + Map* endMap = sMapMgr->FindBaseNonInstanceMap(_endMapId); // Load the grid if (endMap) { - sLog->outDetail("Preloading flightmaster at grid (%f, %f) for map %u", m_endGridX, m_endGridY, m_endMapId); - endMap->LoadGrid(m_endGridX, m_endGridY); + sLog->outDetail("Preloading rid (%f, %f) for map %u at node index %u/%u", _endGridX, _endGridY, _endMapId, _preloadTargetNode, (uint32)(i_path->size()-1)); + endMap->LoadGrid(_endGridX, _endGridY); } else sLog->outDetail("Unable to determine map to preload flightmaster grid"); } -void FlightPathMovementGenerator::DoEventIfAny(Player& player, TaxiPathNodeEntry const& node, bool departure) -{ - if (uint32 eventid = departure ? node.departureEventID : node.arrivalEventID) - { - sLog->outDebug(LOG_FILTER_MAPSCRIPTS, "Taxi %s event %u of node %u of path %u for player %s", departure ? "departure" : "arrival", eventid, node.index, node.path, player.GetName()); - player.GetMap()->ScriptsStart(sEventScripts, eventid, &player, &player); - } -} - // // Unique1's ASTAR Pathfinding Code... For future use & reference... diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h index ea277eaafc6..aa6d327db3b 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -26,10 +26,8 @@ */ #include "MovementGenerator.h" -#include "DestinationHolder.h" #include "WaypointManager.h" #include "Path.h" -#include "Traveller.h" #include "Player.h" @@ -44,49 +42,68 @@ template<class T, class P> class PathMovementBase { public: - PathMovementBase() : i_currentNode(0) {} + PathMovementBase() : i_currentNode(0), i_path(NULL) {} virtual ~PathMovementBase() {}; - bool MovementInProgress(void) const { return i_currentNode < i_path->size(); } - + // template pattern, not defined .. override required void LoadPath(T &); - void ReloadPath(T &); uint32 GetCurrentNode() const { return i_currentNode; } - bool GetDestination(float& x, float& y, float& z) const { i_destinationHolder.GetDestination(x, y, z); return true; } - bool GetPosition(float& x, float& y, float& z) const { i_destinationHolder.GetLocationNowNoMicroMovement(x, y, z); return true; } - protected: - uint32 i_currentNode; - DestinationHolder< Traveller<T> > i_destinationHolder; P i_path; + uint32 i_currentNode; }; template<class T> +class WaypointMovementGenerator; -class WaypointMovementGenerator - : public MovementGeneratorMedium< T, WaypointMovementGenerator<T> >, public PathMovementBase<T, WaypointPath const*> +template<> +class WaypointMovementGenerator<Creature> +: public MovementGeneratorMedium< Creature, WaypointMovementGenerator<Creature> >, +public PathMovementBase<Creature, WaypointPath const*> { public: - WaypointMovementGenerator(uint32 _path_id = 0, bool _repeating = true) : - node(NULL), path_id(_path_id), i_nextMoveTime(0), repeating(_repeating), StopedByPlayer(false) {} - - void Initialize(T &); - void Finalize(T &); - void MovementInform(T &); - void InitTraveller(T &, const WaypointData &); - void GeneratePathId(T &); - void Reset(T &unit); - bool Update(T &, const uint32); - bool GetDestination(float &x, float &y, float &z) const; + WaypointMovementGenerator(uint32 _path_id = 0, bool _repeating = true) : i_nextMoveTime(0), path_id(_path_id), m_isArrivalDone(false), repeating(_repeating) {} + ~WaypointMovementGenerator() { i_path = NULL; } + void Initialize(Creature &); + void Finalize(Creature &); + void Reset(Creature &); + bool Update(Creature &, const uint32 &diff); + + void MovementInform(Creature &); + MovementGeneratorType GetMovementGeneratorType() { return WAYPOINT_MOTION_TYPE; } + // now path movement implmementation + void LoadPath(Creature &c); + + bool GetResetPosition(Creature&, float& x, float& y, float& z); + private: - WaypointData* node; - uint32 path_id; + + void Stop(int32 time) { i_nextMoveTime.Reset(time);} + + bool Stopped() { return !i_nextMoveTime.Passed();} + + bool CanMove(int32 diff) + { + i_nextMoveTime.Update(diff); + return i_nextMoveTime.Passed(); + } + + void OnArrived(Creature&); + bool StartMove(Creature&); + + void StartMoveNow(Creature& creature) + { + i_nextMoveTime.Reset(0); + StartMove(creature); + } + TimeTrackerSmall i_nextMoveTime; - WaypointPath const* waypoints; - bool repeating, StopedByPlayer; + bool m_isArrivalDone; + uint32 path_id; + bool repeating; }; /** FlightPathMovementGenerator generates movement of the player for the paths @@ -103,7 +120,7 @@ public PathMovementBase<Player, TaxiPathNodeList const*> i_currentNode = startNode; } void Initialize(Player &); - void Reset(Player & /*u*/){}; + void Reset(Player &); void Finalize(Player &); bool Update(Player &, const uint32); MovementGeneratorType GetMovementGeneratorType() { return FLIGHT_MOTION_TYPE; } @@ -115,17 +132,16 @@ public PathMovementBase<Player, TaxiPathNodeList const*> void SkipCurrentNode() { ++i_currentNode; } void DoEventIfAny(Player& player, TaxiPathNodeEntry const& node, bool departure); - bool GetDestination(float& x, float& y, float& z) const { return PathMovementBase<Player, TaxiPathNodeList const*>::GetDestination(x, y, z); } + bool GetResetPosition(Player&, float& x, float& y, float& z); - void PreloadEndGrid(); void InitEndGridInfo(); + void PreloadEndGrid(); + private: - // storage for preloading the flightmaster grid at end - // before reaching final waypoint - uint32 m_endMapId; - uint32 m_preloadTargetNode; - float m_endGridX; - float m_endGridY; + float _endGridX; //! X coord of last node location + float _endGridY; //! Y coord of last node location + uint32 _endMapId; //! map Id of last node location + uint32 _preloadTargetNode; //! node index where preloading starts }; #endif diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp new file mode 100644 index 00000000000..4eaa6b57b36 --- /dev/null +++ b/src/server/game/Movement/Spline/MoveSpline.cpp @@ -0,0 +1,316 @@ +/* + * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "MoveSpline.h" +#include <sstream> +#include "Log.h" + +namespace Movement{ + +extern float computeFallTime(float path_length, bool isSafeFall); +extern float computeFallElevation(float time_passed, bool isSafeFall, float start_velocy); +extern float computeFallElevation(float time_passed); + +Location MoveSpline::ComputePosition() const +{ + ASSERT(Initialized()); + + float u = 1.f; + int32 seg_time = spline.length(point_Idx,point_Idx+1); + if (seg_time > 0) + u = (time_passed - spline.length(point_Idx)) / (float)seg_time; + Location c; + c.orientation = initialOrientation; + spline.evaluate_percent(point_Idx, u, c); + + if (splineflags.animation) + ;// MoveSplineFlag::Animation disables falling or parabolic movement + else if (splineflags.parabolic) + computeParabolicElevation(c.z); + else if (splineflags.falling) + computeFallElevation(c.z); + + if (splineflags.done && splineflags.isFacing()) + { + if (splineflags.final_angle) + c.orientation = facing.angle; + else if (splineflags.final_point) + c.orientation = atan2(facing.f.y-c.y, facing.f.x-c.x); + //nothing to do for MoveSplineFlag::Final_Target flag + } + else + { + if (!splineflags.hasFlag(MoveSplineFlag::OrientationFixed|MoveSplineFlag::Falling)) + { + Vector3 hermite; + spline.evaluate_derivative(point_Idx,u,hermite); + c.orientation = atan2(hermite.y, hermite.x); + } + + if (splineflags.orientationInversed) + c.orientation = -c.orientation; + } + return c; +} + +void MoveSpline::computeParabolicElevation(float& el) const +{ + if (time_passed > effect_start_time) + { + float t_passedf = MSToSec(time_passed - effect_start_time); + float t_durationf = MSToSec(Duration() - effect_start_time); //client use not modified duration here + + // -a*x*x + bx + c: + //(dur * v3->z_acceleration * dt)/2 - (v3->z_acceleration * dt * dt)/2 + Z; + el += (t_durationf - t_passedf) * 0.5f * vertical_acceleration * t_passedf; + } +} + +void MoveSpline::computeFallElevation(float& el) const +{ + float z_now = spline.getPoint(spline.first()).z - Movement::computeFallElevation(MSToSec(time_passed)); + float final_z = FinalDestination().z; + if (z_now < final_z) + el = final_z; + else + el = z_now; +} + +inline uint32 computeDuration(float length, float velocity) +{ + return SecToMS(length / velocity); +} + +struct FallInitializer +{ + FallInitializer(float _start_elevation) : start_elevation(_start_elevation) {} + float start_elevation; + inline int32 operator()(Spline<int32>& s, int32 i) + { + return Movement::computeFallTime(start_elevation - s.getPoint(i+1).z,false) * 1000.f; + } +}; + +enum{ + minimal_duration = 1, +}; + +struct CommonInitializer +{ + CommonInitializer(float _velocity) : velocityInv(1000.f/_velocity), time(minimal_duration) {} + float velocityInv; + int32 time; + inline int32 operator()(Spline<int32>& s, int32 i) + { + time += (s.SegLength(i) * velocityInv); + return time; + } +}; + +void MoveSpline::init_spline(const MoveSplineInitArgs& args) +{ + const SplineBase::EvaluationMode modes[2] = {SplineBase::ModeLinear,SplineBase::ModeCatmullrom}; + if (args.flags.cyclic) + { + uint32 cyclic_point = 0; + // MoveSplineFlag::Enter_Cycle support dropped + //if (splineflags & SPLINEFLAG_ENTER_CYCLE) + //cyclic_point = 1; // shouldn't be modified, came from client + spline.init_cyclic_spline(&args.path[0], args.path.size(), modes[args.flags.isSmooth()], cyclic_point); + } + else + { + spline.init_spline(&args.path[0], args.path.size(), modes[args.flags.isSmooth()]); + } + + // init spline timestamps + if (splineflags.falling) + { + FallInitializer init(spline.getPoint(spline.first()).z); + spline.initLengths(init); + } + else + { + CommonInitializer init(args.velocity); + spline.initLengths(init); + } + + // TODO: what to do in such cases? problem is in input data (all points are at same coords) + if (spline.length() < minimal_duration) + { + sLog->outError("MoveSpline::init_spline: zero length spline, wrong input data?"); + spline.set_length(spline.last(), spline.isCyclic() ? 1000 : 1); + } + point_Idx = spline.first(); +} + +void MoveSpline::Initialize(const MoveSplineInitArgs& args) +{ + splineflags = args.flags; + facing = args.facing; + m_Id = args.splineId; + point_Idx_offset = args.path_Idx_offset; + initialOrientation = args.initialOrientation; + + time_passed = 0; + vertical_acceleration = 0.f; + effect_start_time = 0; + + init_spline(args); + + // init parabolic / animation + // spline initialized, duration known and i able to compute parabolic acceleration + if (args.flags & (MoveSplineFlag::Parabolic | MoveSplineFlag::Animation)) + { + effect_start_time = Duration() * args.time_perc; + if (args.flags.parabolic && effect_start_time < Duration()) + { + float f_duration = MSToSec(Duration() - effect_start_time); + vertical_acceleration = args.parabolic_amplitude * 8.f / (f_duration * f_duration); + } + } +} + +MoveSpline::MoveSpline() : m_Id(0), time_passed(0), + vertical_acceleration(0.f), effect_start_time(0), point_Idx(0), point_Idx_offset(0), initialOrientation(0.f) +{ + splineflags.done = true; +} + +/// ============================================================================================ + +bool MoveSplineInitArgs::Validate() const +{ +#define CHECK(exp) \ + if (!(exp))\ + {\ + sLog->outError("MoveSplineInitArgs::Validate: expression '%s' failed", #exp);\ + return false;\ + } + CHECK(path.size() > 1); + CHECK(velocity > 0.f); + CHECK(time_perc >= 0.f && time_perc <= 1.f); + //CHECK(_checkPathBounds()); + return true; +#undef CHECK +} + +// MONSTER_MOVE packet format limitation for not CatmullRom movement: +// each vertex offset packed into 11 bytes +bool MoveSplineInitArgs::_checkPathBounds() const +{ + if (!(flags & MoveSplineFlag::Mask_CatmullRom) && path.size() > 2) + { + enum{ + MAX_OFFSET = (1 << 11) / 2, + }; + Vector3 middle = (path.front()+path.back()) / 2; + Vector3 offset; + for (uint32 i = 1; i < path.size()-1; ++i) + { + offset = path[i] - middle; + if (fabs(offset.x) >= MAX_OFFSET || fabs(offset.y) >= MAX_OFFSET || fabs(offset.z) >= MAX_OFFSET) + { + sLog->outError("MoveSplineInitArgs::_checkPathBounds check failed"); + return false; + } + } + } + return true; +} + +/// ============================================================================================ + +MoveSpline::UpdateResult MoveSpline::_updateState(int32& ms_time_diff) +{ + if (Finalized()) + { + ms_time_diff = 0; + return Result_Arrived; + } + + UpdateResult result = Result_None; + + int32 minimal_diff = std::min(ms_time_diff, segment_time_elapsed()); + ASSERT(minimal_diff >= 0); + time_passed += minimal_diff; + ms_time_diff -= minimal_diff; + + if (time_passed >= next_timestamp()) + { + ++point_Idx; + if (point_Idx < spline.last()) + { + result = Result_NextSegment; + } + else + { + if (spline.isCyclic()) + { + point_Idx = spline.first(); + time_passed = time_passed % Duration(); + result = Result_NextSegment; + } + else + { + _Finalize(); + ms_time_diff = 0; + result = Result_Arrived; + } + } + } + + return result; +} + +std::string MoveSpline::ToString() const +{ + std::stringstream str; + str << "MoveSpline" << std::endl; + str << "spline Id: " << GetId() << std::endl; + str << "flags: " << splineflags.ToString() << std::endl; + if (splineflags.final_angle) + str << "facing angle: " << facing.angle; + else if (splineflags.final_target) + str << "facing target: " << facing.target; + else if(splineflags.final_point) + str << "facing point: " << facing.f.x << " " << facing.f.y << " " << facing.f.z; + str << std::endl; + str << "time passed: " << time_passed << std::endl; + str << "total time: " << Duration() << std::endl; + str << "spline point Id: " << point_Idx << std::endl; + str << "path point Id: " << currentPathIdx() << std::endl; + str << spline.ToString(); + return str.str(); +} + +void MoveSpline::_Finalize() +{ + splineflags.done = true; + point_Idx = spline.last() - 1; + time_passed = Duration(); +} + +int32 MoveSpline::currentPathIdx() const +{ + int32 point = point_Idx_offset + point_Idx - spline.first() + (int)Finalized(); + if (isCyclic()) + point = point % (spline.last()-spline.first()); + return point; +} +} diff --git a/src/server/game/Movement/Spline/MoveSpline.h b/src/server/game/Movement/Spline/MoveSpline.h new file mode 100644 index 00000000000..4b8dbcc8ee3 --- /dev/null +++ b/src/server/game/Movement/Spline/MoveSpline.h @@ -0,0 +1,127 @@ +/* + * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef TRINITYSERVER_MOVEPLINE_H +#define TRINITYSERVER_MOVEPLINE_H + +#include "Spline.h" +#include "MoveSplineInitArgs.h" + +namespace Movement +{ + struct Location : public Vector3 + { + Location() : orientation(0) {} + Location(float x, float y, float z, float o) : Vector3(x,y,z), orientation(o) {} + Location(const Vector3& v) : Vector3(v), orientation(0) {} + Location(const Vector3& v, float o) : Vector3(v), orientation(o) {} + + float orientation; + }; + + // MoveSpline represents smooth catmullrom or linear curve and point that moves belong it + // curve can be cyclic - in this case movement will be cyclic + // point can have vertical acceleration motion componemt(used in fall, parabolic movement) + class MoveSpline + { + public: + typedef Spline<int32> MySpline; + enum UpdateResult{ + Result_None = 0x01, + Result_Arrived = 0x02, + Result_NextCycle = 0x04, + Result_NextSegment = 0x08, + }; + #pragma region fields + friend class PacketBuilder; + protected: + MySpline spline; + + FacingInfo facing; + + uint32 m_Id; + + MoveSplineFlag splineflags; + + int32 time_passed; + // currently duration mods are unused, but its _currently_ + //float duration_mod; + //float duration_mod_next; + float vertical_acceleration; + float initialOrientation; + int32 effect_start_time; + int32 point_Idx; + int32 point_Idx_offset; + + void init_spline(const MoveSplineInitArgs& args); + protected: + + const MySpline::ControlArray& getPath() const { return spline.getPoints();} + void computeParabolicElevation(float& el) const; + void computeFallElevation(float& el) const; + + UpdateResult _updateState(int32& ms_time_diff); + int32 next_timestamp() const { return spline.length(point_Idx+1);} + int32 segment_time_elapsed() const { return next_timestamp()-time_passed;} + int32 Duration() const { return spline.length();} + int32 timeElapsed() const { return Duration() - time_passed;} + int32 timePassed() const { return time_passed;} + + public: + const MySpline& _Spline() const { return spline;} + int32 _currentSplineIdx() const { return point_Idx;} + void _Finalize(); + void _Interrupt() { splineflags.done = true;} + + #pragma endregion + public: + + void Initialize(const MoveSplineInitArgs&); + bool Initialized() const { return !spline.empty();} + + explicit MoveSpline(); + + template<class UpdateHandler> + void updateState(int32 difftime, UpdateHandler& handler) + { + ASSERT(Initialized()); + do + handler(_updateState(difftime)); + while(difftime > 0); + } + + void updateState(int32 difftime) + { + ASSERT(Initialized()); + do _updateState(difftime); + while(difftime > 0); + } + + Location ComputePosition() const; + + uint32 GetId() const { return m_Id;} + bool Finalized() const { return splineflags.done; } + bool isCyclic() const { return splineflags.cyclic;} + const Vector3 FinalDestination() const { return Initialized() ? spline.getPoint(spline.last()) : Vector3();} + const Vector3 CurrentDestination() const { return Initialized() ? spline.getPoint(point_Idx+1) : Vector3();} + int32 currentPathIdx() const; + + std::string ToString() const; + }; +} +#endif // TRINITYSERVER_MOVEPLINE_H diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h new file mode 100644 index 00000000000..de91f63c30a --- /dev/null +++ b/src/server/game/Movement/Spline/MoveSplineFlag.h @@ -0,0 +1,143 @@ +/* + * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef TRINITYSERVER_MOVESPLINEFLAG_H +#define TRINITYSERVER_MOVESPLINEFLAG_H +#include "MovementTypedefs.h" + +#include <string> + +namespace Movement +{ +#if defined( __GNUC__ ) +#pragma pack(1) +#else +#pragma pack(push,1) +#endif + + class MoveSplineFlag + { + public: + enum eFlags{ + None = 0x00000000, + // x00-xFF(first byte) used as animation Ids storage in pair with Animation flag + Done = 0x00000100, + Falling = 0x00000200, // Affects elevation computation, can't be combined with Parabolic flag + No_Spline = 0x00000400, + Parabolic = 0x00000800, // Affects elevation computation, can't be combined with Falling flag + Walkmode = 0x00001000, + Flying = 0x00002000, // Smooth movement(Catmullrom interpolation mode), flying animation + OrientationFixed = 0x00004000, // Model orientation fixed + Final_Point = 0x00008000, + Final_Target = 0x00010000, + Final_Angle = 0x00020000, + Catmullrom = 0x00040000, // Used Catmullrom interpolation mode + Cyclic = 0x00080000, // Movement by cycled spline + Enter_Cycle = 0x00100000, // Everytimes appears with cyclic flag in monster move packet, erases first spline vertex after first cycle done + Animation = 0x00200000, // Plays animation after some time passed + Frozen = 0x00400000, // Will never arrive + Unknown5 = 0x00800000, + Unknown6 = 0x01000000, + Unknown7 = 0x02000000, + Unknown8 = 0x04000000, + OrientationInversed = 0x08000000, + Unknown10 = 0x10000000, + Unknown11 = 0x20000000, + Unknown12 = 0x40000000, + Unknown13 = 0x80000000, + + // Masks + Mask_Final_Facing = Final_Point | Final_Target | Final_Angle, + // animation ids stored here, see AnimType enum, used with Animation flag + Mask_Animations = 0xFF, + // flags that shouldn't be appended into SMSG_MONSTER_MOVE\SMSG_MONSTER_MOVE_TRANSPORT packet, should be more probably + Mask_No_Monster_Move = Mask_Final_Facing | Mask_Animations | Done, + // CatmullRom interpolation mode used + Mask_CatmullRom = Flying | Catmullrom, + // Unused, not suported flags + Mask_Unused = No_Spline|Enter_Cycle|Frozen|Unknown5|Unknown6|Unknown7|Unknown8|Unknown10|Unknown11|Unknown12|Unknown13, + }; + + inline uint32& raw() { return (uint32&)*this;} + inline const uint32& raw() const { return (const uint32&)*this;} + + MoveSplineFlag() { raw() = 0; } + MoveSplineFlag(uint32 f) { raw() = f; } + MoveSplineFlag(const MoveSplineFlag& f) { raw() = f.raw(); } + + // Constant interface + + bool isSmooth() const { return raw() & Mask_CatmullRom;} + bool isLinear() const { return !isSmooth();} + bool isFacing() const { return raw() & Mask_Final_Facing;} + + uint8 getAnimationId() const { return animId;} + bool hasAllFlags(uint32 f) const { return (raw() & f) == f;} + bool hasFlag(uint32 f) const { return (raw() & f) != 0;} + uint32 operator & (uint32 f) const { return (raw() & f);} + uint32 operator | (uint32 f) const { return (raw() | f);} + std::string ToString() const; + + // Not constant interface + + void operator &= (uint32 f) { raw() &= f;} + void operator |= (uint32 f) { raw() |= f;} + + void EnableAnimation(uint8 anim) { raw() = raw() & ~(Mask_Animations|Falling|Parabolic) | Animation|anim;} + void EnableParabolic() { raw() = raw() & ~(Mask_Animations|Falling|Animation) | Parabolic;} + void EnableFalling() { raw() = raw() & ~(Mask_Animations|Parabolic|Animation) | Falling;} + void EnableFlying() { raw() = raw() & ~Catmullrom | Flying; } + void EnableCatmullRom() { raw() = raw() & ~Flying | Catmullrom; } + void EnableFacingPoint() { raw() = raw() & ~Mask_Final_Facing | Final_Point;} + void EnableFacingAngle() { raw() = raw() & ~Mask_Final_Facing | Final_Angle;} + void EnableFacingTarget() { raw() = raw() & ~Mask_Final_Facing | Final_Target;} + + uint8 animId : 8; + bool done : 1; + bool falling : 1; + bool no_spline : 1; + bool parabolic : 1; + bool walkmode : 1; + bool flying : 1; + bool orientationFixed : 1; + bool final_point : 1; + bool final_target : 1; + bool final_angle : 1; + bool catmullrom : 1; + bool cyclic : 1; + bool enter_cycle : 1; + bool animation : 1; + bool frozen : 1; + bool unknown5 : 1; + bool unknown6 : 1; + bool unknown7 : 1; + bool unknown8 : 1; + bool orientationInversed : 1; + bool unknown10 : 1; + bool unknown11 : 1; + bool unknown12 : 1; + bool unknown13 : 1; + }; +#if defined( __GNUC__ ) +#pragma pack() +#else +#pragma pack(pop) +#endif +} + +#endif // TRINITYSERVER_MOVESPLINEFLAG_H diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp new file mode 100644 index 00000000000..b5ae923dc32 --- /dev/null +++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "MoveSplineInit.h" +#include "MoveSpline.h" +#include "MovementPacketBuilder.h" +#include "Unit.h" + +namespace Movement +{ + UnitMoveType SelectSpeedType(uint32 moveFlags) + { + if (moveFlags & MOVEMENTFLAG_FLYING) + { + if ( moveFlags & MOVEMENTFLAG_BACKWARD /*&& speed_obj.flight >= speed_obj.flight_back*/ ) + return MOVE_FLIGHT_BACK; + else + return MOVE_FLIGHT; + } + else if (moveFlags & MOVEMENTFLAG_SWIMMING) + { + if (moveFlags & MOVEMENTFLAG_BACKWARD /*&& speed_obj.swim >= speed_obj.swim_back*/) + return MOVE_SWIM_BACK; + else + return MOVE_SWIM; + } + else if (moveFlags & MOVEMENTFLAG_WALKING) + { + //if ( speed_obj.run > speed_obj.walk ) + return MOVE_WALK; + } + else if (moveFlags & MOVEMENTFLAG_BACKWARD /*&& speed_obj.run >= speed_obj.run_back*/) + return MOVE_RUN_BACK; + + return MOVE_RUN; + } + + void MoveSplineInit::Launch() + { + MoveSpline& move_spline = *unit.movespline; + + Location real_position(unit.GetPositionX(),unit.GetPositionY(),unit.GetPositionZ(),unit.GetOrientation()); + // there is a big chane that current position is unknown if current state is not finalized, need compute it + // this also allows calculate spline position and update map position in much greater intervals + if (!move_spline.Finalized()) + real_position = move_spline.ComputePosition(); + + if (args.path.empty()) + { + // should i do the things that user should do? + MoveTo(real_position); + } + + // corrent first vertex + args.path[0] = real_position; + args.initialOrientation = real_position.orientation; + + uint32 moveFlags = unit.m_movementInfo.GetMovementFlags(); + if (args.flags.walkmode) + moveFlags |= MOVEMENTFLAG_WALKING; + else + moveFlags &= ~MOVEMENTFLAG_WALKING; + + moveFlags |= (MOVEMENTFLAG_SPLINE_ENABLED|MOVEMENTFLAG_FORWARD); + + if (args.velocity == 0.f) + args.velocity = unit.GetSpeed(SelectSpeedType(moveFlags)); + + if (!args.Validate()) + return; + + if (moveFlags & MOVEMENTFLAG_ROOT) + moveFlags &= ~MOVEMENTFLAG_MASK_MOVING; + + unit.m_movementInfo.SetMovementFlags((MovementFlags)moveFlags); + move_spline.Initialize(args); + + WorldPacket data(SMSG_MONSTER_MOVE, 64); + data.append(unit.GetPackGUID()); + PacketBuilder::WriteMonsterMove(move_spline, data); + unit.SendMessageToSet(&data,true); + } + + MoveSplineInit::MoveSplineInit(Unit& m) : unit(m) + { + // mix existing state into new + args.flags.walkmode = unit.m_movementInfo.HasMovementFlag(MOVEMENTFLAG_WALKING); + args.flags.flying = unit.m_movementInfo.HasMovementFlag((MovementFlags)(MOVEMENTFLAG_FLYING|MOVEMENTFLAG_LEVITATING)); + } + + void MoveSplineInit::SetFacing(const Unit * target) + { + args.flags.EnableFacingTarget(); + //args.facing.target = target->GetObjectGuid().GetRawValue(); + args.facing.target = target->GetUInt64Value(OBJECT_FIELD_GUID); + } + + void MoveSplineInit::SetFacing(float angle) + { + args.facing.angle = G3D::wrap(angle, 0.f, (float)G3D::twoPi()); + args.flags.EnableFacingAngle(); + } +} diff --git a/src/server/game/Movement/Spline/MoveSplineInit.h b/src/server/game/Movement/Spline/MoveSplineInit.h new file mode 100644 index 00000000000..7ef6cd7a120 --- /dev/null +++ b/src/server/game/Movement/Spline/MoveSplineInit.h @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef TRINITYSERVER_MOVESPLINEINIT_H +#define TRINITYSERVER_MOVESPLINEINIT_H + +#include "MoveSplineInitArgs.h" + +class Unit; + +namespace Movement +{ + enum AnimType + { + ToGround = 0, // 460 = ToGround, index of AnimationData.dbc + FlyToFly = 1, // 461 = FlyToFly? + ToFly = 2, // 458 = ToFly + FlyToGround = 3, // 463 = FlyToGround + }; + + /* Initializes and launches spline movement + */ + class MoveSplineInit + { + public: + + explicit MoveSplineInit(Unit& m); + + /* Final pass of initialization that launches spline movement. + */ + void Launch(); + + /* Adds movement by parabolic trajectory + * @param amplitude - the maximum height of parabola, value could be negative and positive + * @param start_time - delay between movement starting time and beginning to move by parabolic trajectory + * can't be combined with final animation + */ + void SetParabolic(float amplitude, float start_time); + /* Plays animation after movement done + * can't be combined with parabolic movement + */ + void SetAnimation(AnimType anim); + + /* Adds final facing animation + * sets unit's facing to specified point/angle after all path done + * you can have only one final facing: previous will be overriden + */ + void SetFacing(float angle); + void SetFacing(Vector3 const& point); + void SetFacing(const Unit * target); + + /* Initializes movement by path + * @param path - array of points, shouldn't be empty + * @param pointId - Id of fisrt point of the path. Example: when third path point will be done it will notify that pointId + 3 done + */ + void MovebyPath(const PointsArray& path, int32 pointId = 0); + + /* Initializes simple A to B mition, A is current unit's position, B is destination + */ + void MoveTo(const Vector3& destination); + void MoveTo(float x, float y, float z); + + /* Sets Id of fisrt point of the path. When N-th path point will be done ILisener will notify that pointId + N done + * Needed for waypoint movement where path splitten into parts + */ + void SetFirstPointId(int32 pointId) { args.path_Idx_offset = pointId; } + + /* Enables CatmullRom spline interpolation mode(makes path smooth) + * if not enabled linear spline mode will be choosen. Disabled by default + */ + void SetSmooth(); + /* Enables CatmullRom spline interpolation mode, enables flying animation. Disabled by default + */ + void SetFly(); + /* Enables walk mode. Disabled by default + */ + void SetWalk(bool enable); + /* Makes movement cyclic. Disabled by default + */ + void SetCyclic(); + /* Enables falling mode. Disabled by default + */ + void SetFall(); + /* Inverses unit model orientation. Disabled by default + */ + void SetOrientationInversed(); + /* Fixes unit's model rotation. Disabled by default + */ + void SetOrientationFixed(bool enable); + + /* Sets the velocity (in case you want to have custom movement velocity) + * if no set, speed will be selected based on unit's speeds and current movement mode + * Has no effect if falling mode enabled + * velocity shouldn't be negative + */ + void SetVelocity(float velocity); + + PointsArray& Path() { return args.path; } + + protected: + + MoveSplineInitArgs args; + Unit& unit; + }; + + inline void MoveSplineInit::SetFly() { args.flags.EnableFlying();} + inline void MoveSplineInit::SetWalk(bool enable) { args.flags.walkmode = enable;} + inline void MoveSplineInit::SetSmooth() { args.flags.EnableCatmullRom();} + inline void MoveSplineInit::SetCyclic() { args.flags.cyclic = true;} + inline void MoveSplineInit::SetFall() { args.flags.EnableFalling();} + inline void MoveSplineInit::SetVelocity(float vel){ args.velocity = vel;} + inline void MoveSplineInit::SetOrientationInversed() { args.flags.orientationInversed = true;} + inline void MoveSplineInit::SetOrientationFixed(bool enable) { args.flags.orientationFixed = enable;} + + inline void MoveSplineInit::MovebyPath(const PointsArray& controls, int32 path_offset) + { + args.path_Idx_offset = path_offset; + args.path.assign(controls.begin(),controls.end()); + } + + inline void MoveSplineInit::MoveTo(float x, float y, float z) + { + Vector3 v(x,y,z); + MoveTo(v); + } + + inline void MoveSplineInit::MoveTo(const Vector3& dest) + { + args.path_Idx_offset = 0; + args.path.resize(2); + args.path[1] = dest; + } + + inline void MoveSplineInit::SetParabolic(float amplitude, float time_shift) + { + args.time_perc = time_shift; + args.parabolic_amplitude = amplitude; + args.flags.EnableParabolic(); + } + + inline void MoveSplineInit::SetAnimation(AnimType anim) + { + args.time_perc = 0.f; + args.flags.EnableAnimation((uint8)anim); + } + + inline void MoveSplineInit::SetFacing(Vector3 const& spot) + { + args.facing.f.x = spot.x; + args.facing.f.y = spot.y; + args.facing.f.z = spot.z; + args.flags.EnableFacingPoint(); + } +} +#endif // TRINITYSERVER_MOVESPLINEINIT_H diff --git a/src/server/game/Movement/Spline/MoveSplineInitArgs.h b/src/server/game/Movement/Spline/MoveSplineInitArgs.h new file mode 100644 index 00000000000..26fbbdd0fcc --- /dev/null +++ b/src/server/game/Movement/Spline/MoveSplineInitArgs.h @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef TRINITYSERVER_MOVESPLINEINIT_ARGS_H +#define TRINITYSERVER_MOVESPLINEINIT_ARGS_H + +#include "MoveSplineFlag.h" +#include <G3D/Vector3.h> + +namespace Movement +{ + typedef std::vector<Vector3> PointsArray; + + union FacingInfo + { + struct{ + float x,y,z; + }f; + uint64 target; + float angle; + + FacingInfo(float o) : angle(o) {} + FacingInfo(uint64 t) : target(t) {} + FacingInfo() {} + }; + + struct MoveSplineInitArgs + { + MoveSplineInitArgs(size_t path_capacity = 16) : path_Idx_offset(0), + velocity(0.f), parabolic_amplitude(0.f), time_perc(0.f), splineId(0), initialOrientation(0.f) + { + path.reserve(path_capacity); + } + + PointsArray path; + FacingInfo facing; + MoveSplineFlag flags; + int32 path_Idx_offset; + float velocity; + float parabolic_amplitude; + float time_perc; + uint32 splineId; + float initialOrientation; + + /** Returns true to show that the arguments were configured correctly and MoveSpline initialization will succeed. */ + bool Validate() const; + private: + bool _checkPathBounds() const; + }; +} + +#endif // TRINITYSERVER_MOVESPLINEINIT_ARGS_H diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp new file mode 100644 index 00000000000..73fdbf4c2f6 --- /dev/null +++ b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp @@ -0,0 +1,188 @@ +/* + * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "MovementPacketBuilder.h" +#include "MoveSpline.h" +#include "WorldPacket.h" + +namespace Movement +{ + inline void operator << (ByteBuffer& b, const Vector3& v) + { + b << v.x << v.y << v.z; + } + + inline void operator >> (ByteBuffer& b, Vector3& v) + { + b >> v.x >> v.y >> v.z; + } + + enum MonsterMoveType + { + MonsterMoveNormal = 0, + MonsterMoveStop = 1, + MonsterMoveFacingSpot = 2, + MonsterMoveFacingTarget = 3, + MonsterMoveFacingAngle = 4 + }; + + void PacketBuilder::WriteCommonMonsterMovePart(const MoveSpline& move_spline, WorldPacket& data) + { + MoveSplineFlag splineflags = move_spline.splineflags; + /*if (mov.IsBoarded()) + { + data.SetOpcode(SMSG_MONSTER_MOVE_TRANSPORT); + data << mov.GetTransport()->Owner.GetPackGUID(); + data << int8(mov.m_unused.transport_seat); + }*/ + + data << uint8(0); + data << move_spline.spline.getPoint(move_spline.spline.first()); + data << move_spline.GetId(); + + switch(splineflags & MoveSplineFlag::Mask_Final_Facing) + { + default: + data << uint8(MonsterMoveNormal); + break; + case MoveSplineFlag::Final_Target: + data << uint8(MonsterMoveFacingTarget); + data << move_spline.facing.target; + break; + case MoveSplineFlag::Final_Angle: + data << uint8(MonsterMoveFacingAngle); + data << move_spline.facing.angle; + break; + case MoveSplineFlag::Final_Point: + data << uint8(MonsterMoveFacingSpot); + data << move_spline.facing.f.x << move_spline.facing.f.y << move_spline.facing.f.z; + break; + } + + // add fake Enter_Cycle flag - needed for client-side cyclic movement (client will erase first spline vertex after first cycle done) + splineflags.enter_cycle = move_spline.isCyclic(); + data << uint32(splineflags & ~MoveSplineFlag::Mask_No_Monster_Move); + + if (splineflags.animation) + { + data << splineflags.getAnimationId(); + data << move_spline.effect_start_time; + } + + data << move_spline.Duration(); + + if (splineflags.parabolic) + { + data << move_spline.vertical_acceleration; + data << move_spline.effect_start_time; + } + } + + void WriteLinearPath(const Spline<int32>& spline, ByteBuffer& data) + { + uint32 last_idx = spline.getPointCount() - 3; + const Vector3 * real_path = &spline.getPoint(1); + + data << last_idx; + data << real_path[last_idx]; // destination + if (last_idx > 1) + { + Vector3 middle = (real_path[0] + real_path[last_idx]) / 2.f; + Vector3 offset; + // first and last points already appended + for(uint32 i = 1; i < last_idx; ++i) + { + offset = middle - real_path[i]; + data.appendPackXYZ(offset.x, offset.y, offset.z); + } + } + } + + void WriteCatmullRomPath(const Spline<int32>& spline, ByteBuffer& data) + { + uint32 count = spline.getPointCount() - 3; + data << count; + data.append<Vector3>(&spline.getPoint(2), count); + } + + void WriteCatmullRomCyclicPath(const Spline<int32>& spline, ByteBuffer& data) + { + uint32 count = spline.getPointCount() - 3; + data << uint32(count + 1); + data << spline.getPoint(1); // fake point, client will erase it from the spline after first cycle done + data.append<Vector3>(&spline.getPoint(1), count); + } + + void PacketBuilder::WriteMonsterMove(const MoveSpline& move_spline, WorldPacket& data) + { + WriteCommonMonsterMovePart(move_spline, data); + + const Spline<int32>& spline = move_spline.spline; + MoveSplineFlag splineflags = move_spline.splineflags; + if (splineflags & MoveSplineFlag::Mask_CatmullRom) + { + if (splineflags.cyclic) + WriteCatmullRomCyclicPath(spline, data); + else + WriteCatmullRomPath(spline, data); + } + else + WriteLinearPath(spline, data); + } + + void PacketBuilder::WriteCreate(const MoveSpline& move_spline, ByteBuffer& data) + { + //WriteClientStatus(mov,data); + //data.append<float>(&mov.m_float_values[SpeedWalk], SpeedMaxCount); + //if (mov.SplineEnabled()) + { + MoveSplineFlag splineFlags = move_spline.splineflags; + + data << splineFlags.raw(); + + if (splineFlags.final_angle) + { + data << move_spline.facing.angle; + } + else if (splineFlags.final_target) + { + data << move_spline.facing.target; + } + else if(splineFlags.final_point) + { + data << move_spline.facing.f.x << move_spline.facing.f.y << move_spline.facing.f.z; + } + + data << move_spline.timePassed(); + data << move_spline.Duration(); + data << move_spline.GetId(); + + data << float(1.f); // splineInfo.duration_mod; added in 3.1 + data << float(1.f); // splineInfo.duration_mod_next; added in 3.1 + + data << move_spline.vertical_acceleration; // added in 3.1 + data << move_spline.effect_start_time; // added in 3.1 + + uint32 nodes = move_spline.getPath().size(); + data << nodes; + data.append<Vector3>(&move_spline.getPath()[0], nodes); + data << uint8(move_spline.spline.mode()); // added in 3.1 + data << (move_spline.isCyclic() ? Vector3::zero() : move_spline.FinalDestination()); + } + } +} diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.h b/src/server/game/Movement/Spline/MovementPacketBuilder.h new file mode 100644 index 00000000000..92a414e9b3b --- /dev/null +++ b/src/server/game/Movement/Spline/MovementPacketBuilder.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef TRINITYSERVER_PACKET_BUILDER_H +#define TRINITYSERVER_PACKET_BUILDER_H + +class ByteBuffer; +class WorldPacket; + +namespace Movement +{ + class MoveSpline; + class PacketBuilder + { + static void WriteCommonMonsterMovePart(const MoveSpline& mov, WorldPacket& data); + public: + + static void WriteMonsterMove(const MoveSpline& mov, WorldPacket& data); + static void WriteCreate(const MoveSpline& mov, ByteBuffer& data); + }; +} +#endif // TRINITYSERVER_PACKET_BUILDER_H diff --git a/src/server/game/Movement/Spline/MovementTypedefs.h b/src/server/game/Movement/Spline/MovementTypedefs.h new file mode 100644 index 00000000000..01c8a5b7e7b --- /dev/null +++ b/src/server/game/Movement/Spline/MovementTypedefs.h @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef TRINITYSERVER_TYPEDEFS_H +#define TRINITYSERVER_TYPEDEFS_H + +#include "Common.h" + +namespace G3D +{ + class Vector2; + class Vector3; + class Vector4; +} + +namespace Movement +{ + using G3D::Vector2; + using G3D::Vector3; + using G3D::Vector4; + + inline uint32 SecToMS(float sec) + { + return static_cast<uint32>(sec * 1000.f); + } + + inline float MSToSec(uint32 ms) + { + return ms / 1000.f; + } + +#ifndef static_assert + #define CONCAT(x, y) CONCAT1 (x, y) + #define CONCAT1(x, y) x##y + #define static_assert(expr, msg) typedef char CONCAT(static_assert_failed_at_line_, __LINE__) [(expr) ? 1 : -1] +#endif + + template<class T, T limit> + class counter + { + public: + counter() { init();} + + void Increase() + { + if (m_counter == limit) + init(); + else + ++m_counter; + } + + T NewId() { Increase(); return m_counter;} + T getCurrent() const { return m_counter;} + + private: + void init() { m_counter = 0; } + T m_counter; + }; + + typedef counter<uint32, 0xFFFFFFFF> UInt32Counter; + + extern double gravity; + extern float computeFallElevation(float t_passed, bool isSafeFall, float start_velocity); +} + +#endif // TRINITYSERVER_TYPEDEFS_H diff --git a/src/server/game/Movement/Spline/MovementUtil.cpp b/src/server/game/Movement/Spline/MovementUtil.cpp new file mode 100644 index 00000000000..f0ed01c4676 --- /dev/null +++ b/src/server/game/Movement/Spline/MovementUtil.cpp @@ -0,0 +1,208 @@ +/* + * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "MoveSplineFlag.h" +#include <math.h> +#include <string> + +namespace Movement +{ + double gravity = 19.29110527038574; + + /// Velocity bounds that makes fall speed limited + float terminalVelocity = 60.148003f; + float terminalSavefallVelocity = 7.f; + + const float terminal_length = float(terminalVelocity * terminalVelocity) / (2.f * gravity); + const float terminal_savefall_length = (terminalSavefallVelocity * terminalSavefallVelocity) / (2.f * gravity); + const float terminalFallTime = float(terminalVelocity/gravity); // the time that needed to reach terminalVelocity + + float computeFallTime(float path_length, bool isSafeFall) + { + if (path_length < 0.f) + return 0.f; + + float time; + if ( isSafeFall ) + { + if (path_length >= terminal_savefall_length) + time = (path_length - terminal_savefall_length)/terminalSavefallVelocity + terminalSavefallVelocity/gravity; + else + time = sqrtf(2.f * path_length/gravity); + } + else + { + if (path_length >= terminal_length) + time = (path_length - terminal_length)/terminalVelocity + terminalFallTime; + else + time = sqrtf(2.f * path_length/gravity); + } + + return time; + } + + float computeFallElevation(float t_passed, bool isSafeFall, float start_velocity) + { + float termVel; + float result; + + if ( isSafeFall ) + termVel = terminalSavefallVelocity; + else + termVel = terminalVelocity; + + if ( start_velocity > termVel ) + start_velocity = termVel; + + float terminal_time = terminalFallTime - start_velocity / gravity; // the time that needed to reach terminalVelocity + + if ( t_passed > terminal_time ) + { + result = terminalVelocity*(t_passed - terminal_time) + + start_velocity*terminal_time + gravity*terminal_time*terminal_time*0.5f; + } + else + result = t_passed * (start_velocity + t_passed * gravity * 0.5f); + + return result; + } + + float computeFallElevation(float t_passed) + { + float result; + + if (t_passed > terminalFallTime) + { + //result = terminalVelocity * (t_passed - terminal_time) + gravity*terminal_time*terminal_time*0.5f; + // simplified view: + result = terminalVelocity * (t_passed - terminalFallTime) + terminal_length; + } + else + result = t_passed * t_passed * gravity * 0.5f; + + return result; + } + + #define STR(x) #x + + const char * g_MovementFlag_names[]= + { + STR(Forward ),// 0x00000001, + STR(Backward ),// 0x00000002, + STR(Strafe_Left ),// 0x00000004, + STR(Strafe_Right ),// 0x00000008, + STR(Turn_Left ),// 0x00000010, + STR(Turn_Right ),// 0x00000020, + STR(Pitch_Up ),// 0x00000040, + STR(Pitch_Down ),// 0x00000080, + + STR(Walk ),// 0x00000100, // Walking + STR(Ontransport ),// 0x00000200, + STR(Levitation ),// 0x00000400, + STR(Root ),// 0x00000800, + STR(Falling ),// 0x00001000, + STR(Fallingfar ),// 0x00002000, + STR(Pendingstop ),// 0x00004000, + STR(PendingSTRafestop ),// 0x00008000, + STR(Pendingforward ),// 0x00010000, + STR(Pendingbackward ),// 0x00020000, + STR(PendingSTRafeleft ),// 0x00040000, + STR(PendingSTRaferight ),// 0x00080000, + STR(Pendingroot ),// 0x00100000, + STR(Swimming ),// 0x00200000, // Appears With Fly Flag Also + STR(Ascending ),// 0x00400000, // Swim Up Also + STR(Descending ),// 0x00800000, // Swim Down Also + STR(Can_Fly ),// 0x01000000, // Can Fly In 3.3? + STR(Flying ),// 0x02000000, // Actual Flying Mode + STR(Spline_Elevation ),// 0x04000000, // Used For Flight Paths + STR(Spline_Enabled ),// 0x08000000, // Used For Flight Paths + STR(Waterwalking ),// 0x10000000, // Prevent Unit From Falling Through Water + STR(Safe_Fall ),// 0x20000000, // Active Rogue Safe Fall Spell (Passive) + STR(Hover ),// 0x40000000 + STR(Unknown13 ),// 0x80000000 + STR(Unk1 ), + STR(Unk2 ), + STR(Unk3 ), + STR(Fullspeedturning ), + STR(Fullspeedpitching ), + STR(Allow_Pitching ), + STR(Unk4 ), + STR(Unk5 ), + STR(Unk6 ), + STR(Unk7 ), + STR(Interp_Move ), + STR(Interp_Turning ), + STR(Interp_Pitching ), + STR(Unk8 ), + STR(Unk9 ), + STR(Unk10 ), + }; + + const char * g_SplineFlag_names[32]= + { + STR(AnimBit1 ),// 0x00000001, + STR(AnimBit2 ),// 0x00000002, + STR(AnimBit3 ),// 0x00000004, + STR(AnimBit4 ),// 0x00000008, + STR(AnimBit5 ),// 0x00000010, + STR(AnimBit6 ),// 0x00000020, + STR(AnimBit7 ),// 0x00000040, + STR(AnimBit8 ),// 0x00000080, + STR(Done ),// 0x00000100, + STR(Falling ),// 0x00000200, // Not Compartible With Trajectory Movement + STR(No_Spline ),// 0x00000400, + STR(Trajectory ),// 0x00000800, // Not Compartible With Fall Movement + STR(Walkmode ),// 0x00001000, + STR(Flying ),// 0x00002000, // Smooth Movement(Catmullrom Interpolation Mode), Flying Animation + STR(Knockback ),// 0x00004000, // Model Orientation Fixed + STR(Final_Point ),// 0x00008000, + STR(Final_Target ),// 0x00010000, + STR(Final_Angle ),// 0x00020000, + STR(Catmullrom ),// 0x00040000, // Used Catmullrom Interpolation Mode + STR(Cyclic ),// 0x00080000, // Movement By Cycled Spline + STR(Enter_Cycle ),// 0x00100000, // Everytime Appears With Cyclic Flag In Monster Move Packet + STR(Animation ),// 0x00200000, // Animationid (0...3), Uint32 Time, Not Compartible With Trajectory And Fall Movement + STR(Unknown4 ),// 0x00400000, // Disables Movement By Path + STR(Unknown5 ),// 0x00800000, + STR(Unknown6 ),// 0x01000000, + STR(Unknown7 ),// 0x02000000, + STR(Unknown8 ),// 0x04000000, + STR(OrientationInversed ),// 0x08000000, // Appears With Runmode Flag, Nodes ),// 1, Handles Orientation + STR(Unknown10 ),// 0x10000000, + STR(Unknown11 ),// 0x20000000, + STR(Unknown12 ),// 0x40000000, + STR(Unknown13 ),// 0x80000000, + }; + + template<class Flags, int N> + void print_flags(Flags t, const char* (&names)[N], std::string& str) + { + for (int i = 0; i < N; ++i) + { + if ((t & (Flags)(1 << i)) && names[i] != NULL) + str.append(" ").append(names[i]); + } + } + + std::string MoveSplineFlag::ToString() const + { + std::string str; + print_flags(raw(),g_SplineFlag_names,str); + return str; + } +} diff --git a/src/server/game/Movement/Spline/Spline.cpp b/src/server/game/Movement/Spline/Spline.cpp new file mode 100644 index 00000000000..14c1bd0c117 --- /dev/null +++ b/src/server/game/Movement/Spline/Spline.cpp @@ -0,0 +1,307 @@ +/* + * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "Spline.h" +#include <sstream> +#include <G3D/Matrix4.h> + +namespace Movement{ + +SplineBase::EvaluationMethtod SplineBase::evaluators[SplineBase::ModesEnd] = +{ + &SplineBase::EvaluateLinear, + &SplineBase::EvaluateCatmullRom, + &SplineBase::EvaluateBezier3, + (EvaluationMethtod)&SplineBase::UninitializedSpline, +}; + +SplineBase::EvaluationMethtod SplineBase::derivative_evaluators[SplineBase::ModesEnd] = +{ + &SplineBase::EvaluateDerivativeLinear, + &SplineBase::EvaluateDerivativeCatmullRom, + &SplineBase::EvaluateDerivativeBezier3, + (EvaluationMethtod)&SplineBase::UninitializedSpline, +}; + +SplineBase::SegLenghtMethtod SplineBase::seglengths[SplineBase::ModesEnd] = +{ + &SplineBase::SegLengthLinear, + &SplineBase::SegLengthCatmullRom, + &SplineBase::SegLengthBezier3, + (SegLenghtMethtod)&SplineBase::UninitializedSpline, +}; + +SplineBase::InitMethtod SplineBase::initializers[SplineBase::ModesEnd] = +{ + //&SplineBase::InitLinear, + &SplineBase::InitCatmullRom, // we should use catmullrom initializer even for linear mode! (client's internal structure limitation) + &SplineBase::InitCatmullRom, + &SplineBase::InitBezier3, + (InitMethtod)&SplineBase::UninitializedSpline, +}; + +/////////// +#pragma region evaluation methtods + +using G3D::Matrix4; +static const Matrix4 s_catmullRomCoeffs( + -0.5f, 1.5f,-1.5f, 0.5f, + 1.f, -2.5f, 2.f, -0.5f, + -0.5f, 0.f, 0.5f, 0.f, + 0.f, 1.f, 0.f, 0.f); + +static const Matrix4 s_Bezier3Coeffs( + -1.f, 3.f, -3.f, 1.f, + 3.f, -6.f, 3.f, 0.f, + -3.f, 3.f, 0.f, 0.f, + 1.f, 0.f, 0.f, 0.f); + +/* classic view: +inline void C_Evaluate(const Vector3 *vertice, float t, const float (&matrix)[4][4], Vector3 &position) +{ + Vector3 tvec(t*t*t, t*t, t); + int i = 0; + double c; + double x = 0, y = 0, z = 0; + while ( i < 4 ) + { + c = matrix[0][i]*tvec.x + matrix[1][i]*tvec.y + matrix[2][i]*tvec.z + matrix[3][i]; + + x += c * vertice->x; + y += c * vertice->y; + z += c * vertice->z; + + ++i; + ++vertice; + } + + position.x = x; + position.y = y; + position.z = z; +}*/ + +inline void C_Evaluate(const Vector3 *vertice, float t, const Matrix4& matr, Vector3 &result) +{ + Vector4 tvec(t*t*t, t*t, t, 1.f); + Vector4 weights(tvec * matr); + + result = vertice[0] * weights[0] + vertice[1] * weights[1] + + vertice[2] * weights[2] + vertice[3] * weights[3]; +} + +inline void C_Evaluate_Derivative(const Vector3 *vertice, float t, const Matrix4& matr, Vector3 &result) +{ + Vector4 tvec(3.f*t*t, 2.f*t, 1.f, 0.f); + Vector4 weights(tvec * matr); + + result = vertice[0] * weights[0] + vertice[1] * weights[1] + + vertice[2] * weights[2] + vertice[3] * weights[3]; +} + +void SplineBase::EvaluateLinear(index_type index, float u, Vector3& result) const +{ + ASSERT(index >= index_lo && index < index_hi); + result = points[index] + (points[index+1] - points[index]) * u; +} + +void SplineBase::EvaluateCatmullRom( index_type index, float t, Vector3& result) const +{ + ASSERT(index >= index_lo && index < index_hi); + C_Evaluate(&points[index - 1], t, s_catmullRomCoeffs, result); +} + +void SplineBase::EvaluateBezier3(index_type index, float t, Vector3& result) const +{ + index *= 3u; + ASSERT(index >= index_lo && index < index_hi); + C_Evaluate(&points[index], t, s_Bezier3Coeffs, result); +} + +void SplineBase::EvaluateDerivativeLinear(index_type index, float, Vector3& result) const +{ + ASSERT(index >= index_lo && index < index_hi); + result = points[index+1] - points[index]; +} + +void SplineBase::EvaluateDerivativeCatmullRom(index_type index, float t, Vector3& result) const +{ + ASSERT(index >= index_lo && index < index_hi); + C_Evaluate_Derivative(&points[index - 1], t, s_catmullRomCoeffs, result); +} + +void SplineBase::EvaluateDerivativeBezier3(index_type index, float t, Vector3& result) const +{ + index *= 3u; + ASSERT(index >= index_lo && index < index_hi); + C_Evaluate_Derivative(&points[index], t, s_Bezier3Coeffs, result); +} + +float SplineBase::SegLengthLinear(index_type index) const +{ + ASSERT(index >= index_lo && index < index_hi); + return (points[index] - points[index+1]).length(); +} + +float SplineBase::SegLengthCatmullRom( index_type index ) const +{ + ASSERT(index >= index_lo && index < index_hi); + + Vector3 curPos, nextPos; + const Vector3 * p = &points[index - 1]; + curPos = nextPos = p[1]; + + index_type i = 1; + double length = 0; + while (i <= STEPS_PER_SEGMENT) + { + C_Evaluate(p, float(i) / float(STEPS_PER_SEGMENT), s_catmullRomCoeffs, nextPos); + length += (nextPos - curPos).length(); + curPos = nextPos; + ++i; + } + return length; +} + +float SplineBase::SegLengthBezier3(index_type index) const +{ + index *= 3u; + ASSERT(index >= index_lo && index < index_hi); + + Vector3 curPos, nextPos; + const Vector3 * p = &points[index]; + + C_Evaluate(p, 0.f, s_Bezier3Coeffs, nextPos); + curPos = nextPos; + + index_type i = 1; + double length = 0; + while (i <= STEPS_PER_SEGMENT) + { + C_Evaluate(p, float(i) / float(STEPS_PER_SEGMENT), s_Bezier3Coeffs, nextPos); + length += (nextPos - curPos).length(); + curPos = nextPos; + ++i; + } + return length; +} +#pragma endregion + +void SplineBase::init_spline(const Vector3 * controls, index_type count, EvaluationMode m) +{ + m_mode = m; + cyclic = false; + + (this->*initializers[m_mode])(controls, count, cyclic, 0); +} + +void SplineBase::init_cyclic_spline(const Vector3 * controls, index_type count, EvaluationMode m, index_type cyclic_point) +{ + m_mode = m; + cyclic = true; + + (this->*initializers[m_mode])(controls, count, cyclic, cyclic_point); +} + +void SplineBase::InitLinear(const Vector3* controls, index_type count, bool cyclic, index_type cyclic_point) +{ + ASSERT(count >= 2); + const int real_size = count + 1; + + points.resize(real_size); + + memcpy(&points[0],controls, sizeof(Vector3) * count); + + // first and last two indexes are space for special 'virtual points' + // these points are required for proper C_Evaluate and C_Evaluate_Derivative methtod work + if (cyclic) + points[count] = controls[cyclic_point]; + else + points[count] = controls[count-1]; + + index_lo = 0; + index_hi = cyclic ? count : (count - 1); +} + +void SplineBase::InitCatmullRom(const Vector3* controls, index_type count, bool cyclic, index_type cyclic_point) +{ + const int real_size = count + (cyclic ? (1+2) : (1+1)); + + points.resize(real_size); + + int lo_index = 1; + int high_index = lo_index + count - 1; + + memcpy(&points[lo_index],controls, sizeof(Vector3) * count); + + // first and last two indexes are space for special 'virtual points' + // these points are required for proper C_Evaluate and C_Evaluate_Derivative methtod work + if (cyclic) + { + if (cyclic_point == 0) + points[0] = controls[count-1]; + else + points[0] = controls[0].lerp(controls[1], -1); + + points[high_index+1] = controls[cyclic_point]; + points[high_index+2] = controls[cyclic_point+1]; + } + else + { + points[0] = controls[0].lerp(controls[1], -1); + points[high_index+1] = controls[count-1]; + } + + index_lo = lo_index; + index_hi = high_index + (cyclic ? 1 : 0); +} + +void SplineBase::InitBezier3(const Vector3* controls, index_type count, bool /*cyclic*/, index_type /*cyclic_point*/) +{ + index_type c = count / 3u * 3u; + index_type t = c / 3u; + + points.resize(c); + memcpy(&points[0],controls, sizeof(Vector3) * c); + + index_lo = 0; + index_hi = t-1; + //mov_assert(points.size() % 3 == 0); +} + +void SplineBase::clear() +{ + index_lo = 0; + index_hi = 0; + points.clear(); +} + +std::string SplineBase::ToString() const +{ + std::stringstream str; + const char * mode_str[ModesEnd] = {"Linear", "CatmullRom", "Bezier3", "Uninitialized"}; + + index_type count = this->points.size(); + str << "mode: " << mode_str[mode()] << std::endl; + str << "points count: " << count << std::endl; + for (index_type i = 0; i < count; ++i) + str << "point " << i << " : " << points[i].toString() << std::endl; + + return str.str(); +} + +} diff --git a/src/server/game/Movement/Spline/Spline.h b/src/server/game/Movement/Spline/Spline.h new file mode 100644 index 00000000000..28876b220d4 --- /dev/null +++ b/src/server/game/Movement/Spline/Spline.h @@ -0,0 +1,212 @@ +/* + * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef TRINITYSERVER_SPLINE_H +#define TRINITYSERVER_SPLINE_H + +#include "MovementTypedefs.h" +#include <G3D/Vector3.h> + +namespace Movement { + +class SplineBase +{ +public: + typedef int index_type; + typedef std::vector<Vector3> ControlArray; + + enum EvaluationMode + { + ModeLinear, + ModeCatmullrom, + ModeBezier3_Unused, + UninitializedMode, + ModesEnd + }; + + #pragma region fields +protected: + ControlArray points; + + index_type index_lo; + index_type index_hi; + + uint8 m_mode; + bool cyclic; + + enum{ + // could be modified, affects segment length evaluation precision + // lesser value saves more performance in cost of lover precision + // minimal value is 1 + // client's value is 20, blizzs use 2-3 steps to compute length + STEPS_PER_SEGMENT = 3, + }; + static_assert(STEPS_PER_SEGMENT > 0, "shouldn't be lesser than 1"); + +protected: + void EvaluateLinear(index_type, float, Vector3&) const; + void EvaluateCatmullRom(index_type, float, Vector3&) const; + void EvaluateBezier3(index_type, float, Vector3&) const; + typedef void (SplineBase::*EvaluationMethtod)(index_type,float,Vector3&) const; + static EvaluationMethtod evaluators[ModesEnd]; + + void EvaluateDerivativeLinear(index_type, float, Vector3&) const; + void EvaluateDerivativeCatmullRom(index_type, float, Vector3&) const; + void EvaluateDerivativeBezier3(index_type, float, Vector3&) const; + static EvaluationMethtod derivative_evaluators[ModesEnd]; + + float SegLengthLinear(index_type) const; + float SegLengthCatmullRom(index_type) const; + float SegLengthBezier3(index_type) const; + typedef float (SplineBase::*SegLenghtMethtod)(index_type) const; + static SegLenghtMethtod seglengths[ModesEnd]; + + void InitLinear(const Vector3*, index_type, bool, index_type); + void InitCatmullRom(const Vector3*, index_type, bool, index_type); + void InitBezier3(const Vector3*, index_type, bool, index_type); + typedef void (SplineBase::*InitMethtod)(const Vector3*, index_type, bool, index_type); + static InitMethtod initializers[ModesEnd]; + + void UninitializedSpline() const { ASSERT(false);} + + #pragma endregion +public: + + explicit SplineBase() : m_mode(UninitializedMode), index_lo(0), index_hi(0), cyclic(false) {} + + /** Caclulates the position for given segment Idx, and percent of segment length t + @param t - percent of segment length, assumes that t in range [0, 1] + @param Idx - spline segment index, should be in range [first, last) + */ + void evaluate_percent(index_type Idx, float u, Vector3& c) const {(this->*evaluators[m_mode])(Idx,u,c);} + + /** Caclulates derivation in index Idx, and percent of segment length t + @param Idx - spline segment index, should be in range [first, last) + @param t - percent of spline segment length, assumes that t in range [0, 1] + */ + void evaluate_derivative(index_type Idx, float u, Vector3& hermite) const {(this->*derivative_evaluators[m_mode])(Idx,u,hermite);} + + /** Bounds for spline indexes. All indexes should be in range [first, last). */ + index_type first() const { return index_lo;} + index_type last() const { return index_hi;} + + bool empty() const { return index_lo == index_hi;} + EvaluationMode mode() const { return (EvaluationMode)m_mode;} + bool isCyclic() const { return cyclic;} + + const ControlArray& getPoints() const { return points;} + index_type getPointCount() const { return points.size();} + const Vector3& getPoint(index_type i) const { return points[i];} + + /** Initializes spline. Don't call other methods while spline not initialized. */ + void init_spline(const Vector3 * controls, index_type count, EvaluationMode m); + void init_cyclic_spline(const Vector3 * controls, index_type count, EvaluationMode m, index_type cyclic_point); + + /** As i can see there are a lot of ways how spline can be initialized + would be no harm to have some custom initializers. */ + template<class Init> inline void init_spline(Init& initializer) + { + initializer(m_mode,cyclic,points,index_lo,index_hi); + } + + void clear(); + + /** Calculates distance between [i; i+1] points, assumes that index i is in bounds. */ + float SegLength(index_type i) const { return (this->*seglengths[m_mode])(i);} + + std::string ToString() const; +}; + +template<typename length_type> +class Spline : public SplineBase +{ +public: + typedef length_type LengthType; + typedef std::vector<length_type> LengthArray; + #pragma region fields +protected: + + LengthArray lengths; + + index_type computeIndexInBounds(length_type length) const; + #pragma endregion +public: + + explicit Spline(){} + + /** Calculates the position for given t + @param t - percent of spline's length, assumes that t in range [0, 1]. */ + void evaluate_percent(float t, Vector3 & c) const; + + /** Calculates derivation for given t + @param t - percent of spline's length, assumes that t in range [0, 1]. */ + void evaluate_derivative(float t, Vector3& hermite) const; + + /** Calculates the position for given segment Idx, and percent of segment length t + @param t = partial_segment_length / whole_segment_length + @param Idx - spline segment index, should be in range [first, last). */ + void evaluate_percent(index_type Idx, float u, Vector3& c) const { SplineBase::evaluate_percent(Idx,u,c);} + + /** Caclulates derivation for index Idx, and percent of segment length t + @param Idx - spline segment index, should be in range [first, last) + @param t - percent of spline segment length, assumes that t in range [0, 1]. */ + void evaluate_derivative(index_type Idx, float u, Vector3& c) const { SplineBase::evaluate_derivative(Idx,u,c);} + + // Assumes that t in range [0, 1] + index_type computeIndexInBounds(float t) const; + void computeIndex(float t, index_type& out_idx, float& out_u) const; + + /** Initializes spline. Don't call other methods while spline not initialized. */ + void init_spline(const Vector3 * controls, index_type count, EvaluationMode m) { SplineBase::init_spline(controls,count,m);} + void init_cyclic_spline(const Vector3 * controls, index_type count, EvaluationMode m, index_type cyclic_point) { SplineBase::init_cyclic_spline(controls,count,m,cyclic_point);} + + /** Initializes lengths with SplineBase::SegLength method. */ + void initLengths(); + + /** Initializes lengths in some custom way + Note that value returned by cacher must be greater or equal to previous value. */ + template<class T> inline void initLengths(T& cacher) + { + index_type i = index_lo; + lengths.resize(index_hi+1); + length_type prev_length = 0, new_length = 0; + while(i < index_hi) + { + new_length = cacher(*this, i); + lengths[++i] = new_length; + + ASSERT(prev_length <= new_length); + prev_length = new_length; + } + } + + /** Returns length of the whole spline. */ + length_type length() const { return lengths[index_hi];} + /** Returns length between given nodes. */ + length_type length(index_type first, index_type last) const { return lengths[last]-lengths[first];} + length_type length(index_type Idx) const { return lengths[Idx];} + + void set_length(index_type i, length_type length) { lengths[i] = length;} + void clear(); +}; + +} + +#include "SplineImpl.h" + +#endif // TRINITYSERVER_SPLINE_H diff --git a/src/server/game/Movement/Spline/SplineImpl.h b/src/server/game/Movement/Spline/SplineImpl.h new file mode 100644 index 00000000000..eded2d8c903 --- /dev/null +++ b/src/server/game/Movement/Spline/SplineImpl.h @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +namespace Movement +{ +template<typename length_type> void Spline<length_type>::evaluate_percent( float t, Vector3 & c ) const +{ + index_type Index; + float u; + computeIndex(t, Index, u); + evaluate_percent(Index, u, c); +} + +template<typename length_type> void Spline<length_type>::evaluate_derivative(float t, Vector3& hermite) const +{ + index_type Index; + float u; + computeIndex(t, Index, u); + evaluate_derivative(Index, u, hermite); +} + +template<typename length_type> SplineBase::index_type Spline<length_type>::computeIndexInBounds(length_type length_) const +{ +// Temporary disabled: causes infinite loop with t = 1.f +/* + index_type hi = index_hi; + index_type lo = index_lo; + + index_type i = lo + (float)(hi - lo) * t; + + while ((lengths[i] > length) || (lengths[i + 1] <= length)) + { + if (lengths[i] > length) + hi = i - 1; // too big + else if (lengths[i + 1] <= length) + lo = i + 1; // too small + + i = (hi + lo) / 2; + }*/ + + index_type i = index_lo; + index_type N = index_hi; + while (i+1 < N && lengths[i+1] < length_) + ++i; + + return i; +} + +template<typename length_type> void Spline<length_type>::computeIndex(float t, index_type& index, float& u) const +{ + ASSERT(t >= 0.f && t <= 1.f); + length_type length_ = t * length(); + index = computeIndexInBounds(length_); + ASSERT(index < index_hi); + u = (length_ - length(index)) / (float)length(index, index+1); +} + +template<typename length_type> SplineBase::index_type Spline<length_type>::computeIndexInBounds( float t ) const +{ + ASSERT(t >= 0.f && t <= 1.f); + return computeIndexInBounds(t * length()); +} + +template<typename length_type> void Spline<length_type>::initLengths() +{ + index_type i = index_lo; + length_type length = 0; + lengths.resize(index_hi+1); + while(i < index_hi ) + { + length += SegLength(i); + lengths[++i] = length; + } +} + +template<typename length_type> void Spline<length_type>::clear() +{ + SplineBase::clear(); + lengths.clear(); +} + +} diff --git a/src/server/game/Movement/Traveller.h b/src/server/game/Movement/Traveller.h deleted file mode 100755 index 9cd6a6cda17..00000000000 --- a/src/server/game/Movement/Traveller.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> - * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> - * - * 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 TRINITY_TRAVELLER_H -#define TRINITY_TRAVELLER_H - -#include "Creature.h" -#include "Player.h" -#include <cassert> - -/** Traveller is a wrapper for units (creatures or players) that - * travel from point A to point B using the destination holder. - */ -#define PLAYER_FLIGHT_SPEED 32.0f - -template<class T> -struct Traveller -{ - T &i_traveller; - Traveller(T &t) : i_traveller(t) {} - Traveller(const Traveller &obj) : i_traveller(obj) {} - Traveller& operator=(const Traveller &obj) - { - this.i_traveller = obj.i_traveller; - return *this; - } - - operator T&(void) { return i_traveller; } - operator const T&(void) { return i_traveller; } - float GetPositionX() const { return i_traveller.GetPositionX(); } - float GetPositionY() const { return i_traveller.GetPositionY(); } - float GetPositionZ() const { return i_traveller.GetPositionZ(); } - T& GetTraveller(void) { return i_traveller; } - - float Speed(void) { ASSERT(false); return 0.0f; } - float GetMoveDestinationTo(float x, float y, float z); - uint32 GetTotalTrevelTimeTo(float x, float y, float z); - - void Relocation(float x, float y, float z, float orientation) {} - void Relocation(float x, float y, float z) { Relocation(x, y, z, i_traveller.GetOrientation()); } - void MoveTo(float x, float y, float z, uint32 t) {} -}; - -template<class T> -inline uint32 Traveller<T>::GetTotalTrevelTimeTo(float x, float y, float z) -{ - float dist = GetMoveDestinationTo(x, y, z); - float speed = Speed(); - if (speed < 0.0f) - return 0xfffffffe; // almost infinity-unit should stop - else - speed *= 0.001f; // speed is in seconds so convert from second to millisecond - return static_cast<uint32>(dist/speed); -} - -// specialization for creatures -template<> -inline float Traveller<Creature>::Speed() -{ - if (i_traveller.HasUnitState(UNIT_STAT_CHARGING)) - return i_traveller.m_TempSpeed; - else if (i_traveller.HasUnitMovementFlag(MOVEMENTFLAG_WALKING)) - return i_traveller.GetSpeed(MOVE_WALK); - else if (i_traveller.HasUnitMovementFlag(MOVEMENTFLAG_FLYING)) - return i_traveller.GetSpeed(MOVE_FLIGHT); - else - return i_traveller.GetSpeed(MOVE_RUN); -} - -template<> -inline void Traveller<Creature>::Relocation(float x, float y, float z, float orientation) -{ - i_traveller.UpdatePosition(x, y, z, orientation); -} - -template<> -inline float Traveller<Creature>::GetMoveDestinationTo(float x, float y, float z) -{ - float dx = x - GetPositionX(); - float dy = y - GetPositionY(); - float dz = z - GetPositionZ(); - - //if (i_traveller.HasUnitMovementFlag(MOVEMENTFLAG_FLYING)) - return sqrt((dx*dx) + (dy*dy) + (dz*dz)); - //else //Walking on the ground - // return sqrt((dx*dx) + (dy*dy)); -} - -template<> -inline void Traveller<Creature>::MoveTo(float x, float y, float z, uint32 t) -{ - //i_traveller.AI_SendMoveToPacket(x, y, z, t, i_traveller.GetUnitMovementFlags(), 0); - i_traveller.SendMonsterMove(x, y, z, t); -} - -// specialization for players -template<> -inline float Traveller<Player>::Speed() -{ - if (i_traveller.HasUnitState(UNIT_STAT_CHARGING)) - return i_traveller.m_TempSpeed; - else if (i_traveller.isInFlight()) - return PLAYER_FLIGHT_SPEED; - else - return i_traveller.GetSpeed(i_traveller.m_movementInfo.HasMovementFlag(MOVEMENTFLAG_WALKING) ? MOVE_WALK : MOVE_RUN); -} - -template<> -inline float Traveller<Player>::GetMoveDestinationTo(float x, float y, float z) -{ - float dx = x - GetPositionX(); - float dy = y - GetPositionY(); - float dz = z - GetPositionZ(); - - //if (i_traveller.isInFlight()) - return sqrt((dx*dx) + (dy*dy) + (dz*dz)); - //else //Walking on the ground - // return sqrt((dx*dx) + (dy*dy)); -} - -template<> -inline void Traveller<Player>::Relocation(float x, float y, float z, float orientation) -{ - i_traveller.UpdatePosition(x, y, z, orientation); -} - -template<> -inline void Traveller<Player>::MoveTo(float x, float y, float z, uint32 t) -{ - //Only send MOVEMENTFLAG_WALKING, client has strange issues with other move flags - i_traveller.SendMonsterMove(x, y, z, t); -} - -typedef Traveller<Creature> CreatureTraveller; -typedef Traveller<Player> PlayerTraveller; -#endif - diff --git a/src/server/game/Movement/Waypoints/Path.h b/src/server/game/Movement/Waypoints/Path.h index f9a55513d10..b6ddaa9d726 100755 --- a/src/server/game/Movement/Waypoints/Path.h +++ b/src/server/game/Movement/Waypoints/Path.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/Waypoints/WaypointManager.cpp b/src/server/game/Movement/Waypoints/WaypointManager.cpp index 2859fb9227b..b957674151b 100755 --- a/src/server/game/Movement/Waypoints/WaypointManager.cpp +++ b/src/server/game/Movement/Waypoints/WaypointManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/Waypoints/WaypointManager.h b/src/server/game/Movement/Waypoints/WaypointManager.h index be4a0c8f9bf..73d611e0419 100755 --- a/src/server/game/Movement/Waypoints/WaypointManager.h +++ b/src/server/game/Movement/Waypoints/WaypointManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index d641971faa0..9f6ec547342 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h index c57eddc7f86..6ea13d353c5 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvP.h +++ b/src/server/game/OutdoorPvP/OutdoorPvP.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp index 4a0da1d3b55..88e6db971f0 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h index 32639cb692e..3a66a87ecba 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h +++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp index 96bb4a211eb..05ce7a0a50d 100755 --- a/src/server/game/Pools/PoolMgr.cpp +++ b/src/server/game/Pools/PoolMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -807,7 +807,7 @@ void PoolMgr::LoadFromDB() { uint32 oldMSTime = getMSTime(); - PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_LOAD_QUEST_POOLS); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_QUEST_POOLS); PreparedQueryResult result = WorldDatabase.Query(stmt); if (!result) @@ -964,7 +964,7 @@ void PoolMgr::SaveQuestsToDB() { if (IsSpawnedObject<Quest>(itr->first)) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_QUEST_POOL_SAVE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_QUEST_POOL_SAVE); stmt->setUInt32(0, itr->second); stmt->setUInt32(1, itr->first); trans->Append(stmt); diff --git a/src/server/game/Pools/PoolMgr.h b/src/server/game/Pools/PoolMgr.h index 055763480e3..be839bf1566 100755 --- a/src/server/game/Pools/PoolMgr.h +++ b/src/server/game/Pools/PoolMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://www.mangosproject.org/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index feb1c071b6d..0467eaa3253 100755 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -77,7 +77,7 @@ Quest::Quest(Field* questRecord) for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i) RewardChoiceItemCount[i] = questRecord[57+i].GetUInt32(); - + for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) RewardFactionId[i] = questRecord[63+i].GetUInt32(); @@ -86,7 +86,7 @@ Quest::Quest(Field* questRecord) for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) RewardFactionValueIdOverride[i] = questRecord[73+i].GetInt32(); - + PointMapId = questRecord[78].GetUInt32(); PointX = questRecord[79].GetFloat(); PointY = questRecord[80].GetFloat(); @@ -202,7 +202,7 @@ uint32 Quest::XPValue(Player* player) const return 0; } -int32 Quest::GetRewOrReqMoney() const +int32 Quest::GetRewOrReqMoney() const { if (RewardOrRequiredMoney <= 0) return RewardOrRequiredMoney; diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h index 989c63d2a64..973735b84da 100755 --- a/src/server/game/Quests/QuestDef.h +++ b/src/server/game/Quests/QuestDef.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -251,6 +251,7 @@ class Quest uint32 GetFlags() const { return Flags; } bool IsDaily() const { return Flags & QUEST_FLAGS_DAILY; } bool IsWeekly() const { return Flags & QUEST_FLAGS_WEEKLY; } + bool IsSeasonal() const { return (ZoneOrSort == -QUEST_SORT_SEASONAL || ZoneOrSort == -QUEST_SORT_SPECIAL || ZoneOrSort == -QUEST_SORT_LUNAR_FESTIVAL || ZoneOrSort == -QUEST_SORT_MIDSUMMER || ZoneOrSort == -QUEST_SORT_BREWFEST || ZoneOrSort == -QUEST_SORT_LOVE_IS_IN_THE_AIR || ZoneOrSort == -QUEST_SORT_NOBLEGARDEN); } bool IsDailyOrWeekly() const { return Flags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); } bool IsAutoAccept() const { return Flags & QUEST_FLAGS_AUTO_ACCEPT; } bool IsRaidQuest() const { return Type == QUEST_TYPE_RAID || Type == QUEST_TYPE_RAID_10 || Type == QUEST_TYPE_RAID_25; } diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index c4c8dec5500..d988959f890 100755 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h index 59ec826f0c5..b73574d288f 100755 --- a/src/server/game/Reputation/ReputationMgr.h +++ b/src/server/game/Reputation/ReputationMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp index 4236ef49212..7757e1a1a35 100755 --- a/src/server/game/Scripting/MapScripts.cpp +++ b/src/server/game/Scripting/MapScripts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -475,8 +475,14 @@ void Map::ScriptsProcess() // Source or target must be Creature. if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { - cSource->SendMonsterMoveWithSpeed(step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ, step.script->MoveTo.TravelTime); - cSource->GetMap()->CreatureRelocation(cSource, step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ, 0); + Unit * unit = (Unit*)cSource; + if (step.script->MoveTo.TravelTime != 0) + { + float speed = unit->GetDistance(step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ) / ((float)step.script->MoveTo.TravelTime * 0.001f); + unit->MonsterMoveWithSpeed(step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ, speed); + } + else + unit->NearTeleportTo(step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ, unit->GetOrientation()); } break; diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index 26d703458ac..cdec6bb3ffa 100755 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -39,6 +39,7 @@ void AddSC_warrior_spell_scripts(); void AddSC_quest_spell_scripts(); void AddSC_item_spell_scripts(); void AddSC_example_spell_scripts(); +void AddSC_holiday_spell_scripts(); void AddSC_SmartSCripts(); @@ -570,6 +571,7 @@ void AddSC_the_eye(); void AddSC_boss_gatewatcher_iron_hand(); //TK The Mechanar void AddSC_boss_nethermancer_sepethrea(); void AddSC_boss_pathaleon_the_calculator(); +void AddSC_boss_mechano_lord_capacitus(); void AddSC_instance_mechanar(); void AddSC_blades_edge_mountains(); @@ -641,6 +643,7 @@ void AddSpellScripts() AddSC_quest_spell_scripts(); AddSC_item_spell_scripts(); AddSC_example_spell_scripts(); + AddSC_holiday_spell_scripts(); } void AddCommandScripts() @@ -1030,6 +1033,7 @@ void AddOutlandScripts() AddSC_boss_gatewatcher_iron_hand(); //TK The Mechanar AddSC_boss_nethermancer_sepethrea(); AddSC_boss_pathaleon_the_calculator(); + AddSC_boss_mechano_lord_capacitus(); AddSC_instance_mechanar(); AddSC_blades_edge_mountains(); diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 925b352e616..d5e8f71e1fd 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index b3ba7f0a89c..60052bea0ea 100755 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp index d0f9a0380b0..56d3109a6a0 100755 --- a/src/server/game/Scripting/ScriptSystem.cpp +++ b/src/server/game/Scripting/ScriptSystem.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index 311a94d4217..3ea2d6b690d 100755 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h index ef51d1be918..81a37ece4f9 100755 --- a/src/server/game/Server/Protocol/Opcodes.h +++ b/src/server/game/Server/Protocol/Opcodes.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/WorldLog.cpp b/src/server/game/Server/Protocol/WorldLog.cpp index 334c189af81..5b1a3af996f 100755 --- a/src/server/game/Server/Protocol/WorldLog.cpp +++ b/src/server/game/Server/Protocol/WorldLog.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/WorldLog.h b/src/server/game/Server/Protocol/WorldLog.h index a951cba4ab5..fb344f195de 100755 --- a/src/server/game/Server/Protocol/WorldLog.h +++ b/src/server/game/Server/Protocol/WorldLog.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index 3288224e1f2..6bd09f2b3a7 100755 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -94,14 +94,14 @@ m_playerRecentlyLogout(false), m_playerSave(false), m_sessionDbcLocale(sWorld->GetAvailableDbcLocale(locale)), m_sessionDbLocaleIndex(locale), m_latency(0), m_TutorialsChanged(false), recruiterId(recruiter), -isRecruiter(isARecruiter) +isRecruiter(isARecruiter), timeLastWhoCommand(0) { if (sock) { m_Address = sock->GetRemoteAddress(); sock->AddReference(); ResetTimeOutTime(); - LoginDatabase.PExecute("UPDATE account SET online = 1 WHERE id = %u;", GetAccountId()); + LoginDatabase.PExecute("UPDATE account SET online = 1 WHERE id = %u;", GetAccountId()); // One-time query } InitializeQueryCallbackParameters(); @@ -127,7 +127,7 @@ WorldSession::~WorldSession() while (_recvQueue.next(packet)) delete packet; - LoginDatabase.PExecute("UPDATE account SET online = 0 WHERE id = %u;", GetAccountId()); + LoginDatabase.PExecute("UPDATE account SET online = 0 WHERE id = %u;", GetAccountId()); // One-time query } void WorldSession::SizeError(WorldPacket const &packet, uint32 size) const @@ -632,7 +632,7 @@ void WorldSession::SendAuthWaitQue(uint32 position) void WorldSession::LoadGlobalAccountData() { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_ACCOUNT_DATA); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ACCOUNT_DATA); stmt->setUInt32(0, GetAccountId()); LoadAccountData(CharacterDatabase.Query(stmt), GLOBAL_CACHE_MASK); } @@ -675,7 +675,7 @@ void WorldSession::SetAccountData(AccountDataType type, time_t tm, std::string d if ((1 << type) & GLOBAL_CACHE_MASK) { id = GetAccountId(); - index = CHAR_SET_ACCOUNT_DATA; + index = CHAR_REP_ACCOUNT_DATA; } else { @@ -684,7 +684,7 @@ void WorldSession::SetAccountData(AccountDataType type, time_t tm, std::string d return; id = m_GUIDLow; - index = CHAR_SET_PLAYER_ACCOUNT_DATA; + index = CHAR_REP_PLAYER_ACCOUNT_DATA; } PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(index); @@ -714,7 +714,7 @@ void WorldSession::LoadTutorialsData() { memset(m_Tutorials, 0, sizeof(uint32) * MAX_ACCOUNT_TUTORIAL_VALUES); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_TUTORIALS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_TUTORIALS); stmt->setUInt32(0, GetAccountId()); if (PreparedQueryResult result = CharacterDatabase.Query(stmt)) for (uint8 i = 0; i < MAX_ACCOUNT_TUTORIAL_VALUES; ++i) @@ -736,11 +736,11 @@ void WorldSession::SaveTutorialsData(SQLTransaction &trans) if (!m_TutorialsChanged) return; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_HAS_TUTORIALS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_HAS_TUTORIALS); stmt->setUInt32(0, GetAccountId()); bool hasTutorials = !CharacterDatabase.Query(stmt).null(); // Modify data in DB - stmt = CharacterDatabase.GetPreparedStatement(hasTutorials ? CHAR_SET_TUTORIALS : CHAR_ADD_TUTORIALS); + stmt = CharacterDatabase.GetPreparedStatement(hasTutorials ? CHAR_UPD_TUTORIALS : CHAR_INS_TUTORIALS); for (uint8 i = 0; i < MAX_ACCOUNT_TUTORIAL_VALUES; ++i) stmt->setUInt32(i, m_Tutorials[i]); stmt->setUInt32(MAX_ACCOUNT_TUTORIAL_VALUES, GetAccountId()); diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index ebed71c7da3..951f205c1e2 100755 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -949,6 +949,7 @@ class WorldSession uint32 recruiterId; bool isRecruiter; ACE_Based::LockedQueue<WorldPacket*, ACE_Thread_Mutex> _recvQueue; + time_t timeLastWhoCommand; }; #endif /// @} diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index 58f62396ac9..ac6f11660e4 100755 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -890,7 +890,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) { mutetime = time(NULL) + llabs(mutetime); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPDATE_MUTE_TIME); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_MUTE_TIME); stmt->setInt64(0, mutetime); stmt->setUInt32(1, id); @@ -992,7 +992,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) // Update the last_ip in the database - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPDATE_LAST_IP); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_LAST_IP); stmt->setString(0, address); stmt->setString(1, account); diff --git a/src/server/game/Server/WorldSocket.h b/src/server/game/Server/WorldSocket.h index aa7424085f8..3396803ff62 100755 --- a/src/server/game/Server/WorldSocket.h +++ b/src/server/game/Server/WorldSocket.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/WorldSocketAcceptor.h b/src/server/game/Server/WorldSocketAcceptor.h index 1d3155b9e06..a16c5c2189f 100644 --- a/src/server/game/Server/WorldSocketAcceptor.h +++ b/src/server/game/Server/WorldSocketAcceptor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp index 5fb66524976..00a8b263847 100755 --- a/src/server/game/Server/WorldSocketMgr.cpp +++ b/src/server/game/Server/WorldSocketMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/WorldSocketMgr.h b/src/server/game/Server/WorldSocketMgr.h index 25f92042f4e..fd7e28485cf 100755 --- a/src/server/game/Server/WorldSocketMgr.h +++ b/src/server/game/Server/WorldSocketMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Skills/SkillDiscovery.cpp b/src/server/game/Skills/SkillDiscovery.cpp index 1899d75b4cf..466d3ac83a2 100755 --- a/src/server/game/Skills/SkillDiscovery.cpp +++ b/src/server/game/Skills/SkillDiscovery.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Skills/SkillDiscovery.h b/src/server/game/Skills/SkillDiscovery.h index ae4f3494534..110adb91cf2 100755 --- a/src/server/game/Skills/SkillDiscovery.h +++ b/src/server/game/Skills/SkillDiscovery.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Skills/SkillExtraItems.cpp b/src/server/game/Skills/SkillExtraItems.cpp index 600655c4a60..b5b6b5d7b96 100755 --- a/src/server/game/Skills/SkillExtraItems.cpp +++ b/src/server/game/Skills/SkillExtraItems.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Skills/SkillExtraItems.h b/src/server/game/Skills/SkillExtraItems.h index 2b453508c8c..c4e20b9fbef 100755 --- a/src/server/game/Skills/SkillExtraItems.h +++ b/src/server/game/Skills/SkillExtraItems.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Spells/Auras/SpellAuraDefines.h b/src/server/game/Spells/Auras/SpellAuraDefines.h index 7c0be84bf50..ddb230d6773 100755 --- a/src/server/game/Spells/Auras/SpellAuraDefines.h +++ b/src/server/game/Spells/Auras/SpellAuraDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 12c40c15db4..1972b625a9f 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -2417,7 +2417,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const* aurApp, uint8 mode, boo target->VisitNearbyObject(target->GetMap()->GetVisibilityRange(), searcher); for (UnitList::iterator iter = targets.begin(); iter != targets.end(); ++iter) { - if (!(*iter)->HasUnitState(UNIT_STAT_CASTING)) + if (!(*iter)->HasUnitState(UNIT_STATE_CASTING)) continue; for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; i++) @@ -2448,7 +2448,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const* aurApp, uint8 mode, boo // blizz like 2.0.x target->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); - target->AddUnitState(UNIT_STAT_DIED); + target->AddUnitState(UNIT_STATE_DIED); } else { @@ -2465,7 +2465,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const* aurApp, uint8 mode, boo // blizz like 2.0.x target->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); - target->ClearUnitState(UNIT_STAT_DIED); + target->ClearUnitState(UNIT_STATE_DIED); } } @@ -3031,7 +3031,7 @@ void AuraEffect::HandleModConfuse(AuraApplication const* aurApp, uint8 mode, boo Unit* target = aurApp->GetTarget(); - target->SetControlled(apply, UNIT_STAT_CONFUSED); + target->SetControlled(apply, UNIT_STATE_CONFUSED); } void AuraEffect::HandleModFear(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -3041,7 +3041,7 @@ void AuraEffect::HandleModFear(AuraApplication const* aurApp, uint8 mode, bool a Unit* target = aurApp->GetTarget(); - target->SetControlled(apply, UNIT_STAT_FLEEING); + target->SetControlled(apply, UNIT_STATE_FLEEING); } void AuraEffect::HandleAuraModStun(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -3051,7 +3051,7 @@ void AuraEffect::HandleAuraModStun(AuraApplication const* aurApp, uint8 mode, bo Unit* target = aurApp->GetTarget(); - target->SetControlled(apply, UNIT_STAT_STUNNED); + target->SetControlled(apply, UNIT_STATE_STUNNED); } void AuraEffect::HandleAuraModRoot(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -3061,7 +3061,7 @@ void AuraEffect::HandleAuraModRoot(AuraApplication const* aurApp, uint8 mode, bo Unit* target = aurApp->GetTarget(); - target->SetControlled(apply, UNIT_STAT_ROOT); + target->SetControlled(apply, UNIT_STATE_ROOT); } void AuraEffect::HandlePreventFleeing(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -3072,7 +3072,7 @@ void AuraEffect::HandlePreventFleeing(AuraApplication const* aurApp, uint8 mode, Unit* target = aurApp->GetTarget(); if (target->HasAuraType(SPELL_AURA_MOD_FEAR)) - target->SetControlled(!(apply), UNIT_STAT_FLEEING); + target->SetControlled(!(apply), UNIT_STATE_FLEEING); } /***************************/ @@ -3465,7 +3465,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(AuraApplication const* aurApp, uint if (GetSpellInfo()->Mechanic == MECHANIC_BANISH) { if (apply) - target->AddUnitState(UNIT_STAT_ISOLATED); + target->AddUnitState(UNIT_STATE_ISOLATED); else { bool banishFound = false; @@ -3477,7 +3477,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(AuraApplication const* aurApp, uint break; } if (!banishFound) - target->ClearUnitState(UNIT_STAT_ISOLATED); + target->ClearUnitState(UNIT_STATE_ISOLATED); } } @@ -4751,11 +4751,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool break; case 46361: // Reinforced Net if (caster) - { - float currentGroundLevel = target->GetBaseMap()->GetHeight(target->GetPositionX(), target->GetPositionY(), MAX_HEIGHT); - if (target->GetPositionZ() > currentGroundLevel) - target->GetMotionMaster()->MoveFall(currentGroundLevel); - } + target->GetMotionMaster()->MoveFall(); break; case 46699: // Requires No Ammo if (target->GetTypeId() == TYPEID_PLAYER) @@ -4807,7 +4803,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool if (Aura* newAura = target->AddAura(71564, target)) newAura->SetStackAmount(newAura->GetSpellInfo()->StackAmount); break; - case 59628: // Tricks of the Trade + case 59628: // Tricks of the Trade if (caster && caster->GetMisdirectionTarget()) target->SetReducedThreatPercent(100, caster->GetMisdirectionTarget()->GetGUID()); break; @@ -4970,7 +4966,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool target->SetReducedThreatPercent(0,0); else target->SetReducedThreatPercent(0,caster->GetMisdirectionTarget()->GetGUID()); - break; + break; } default: break; @@ -6160,7 +6156,7 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const if (!caster || !target->isAlive()) return; - if (target->HasUnitState(UNIT_STAT_ISOLATED) || target->IsImmunedToDamage(GetSpellInfo())) + if (target->HasUnitState(UNIT_STATE_ISOLATED) || target->IsImmunedToDamage(GetSpellInfo())) { SendTickImmune(target, caster); return; @@ -6301,7 +6297,7 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c if (!caster || !caster->isAlive() || !target->isAlive()) return; - if (target->HasUnitState(UNIT_STAT_ISOLATED) || target->IsImmunedToDamage(GetSpellInfo())) + if (target->HasUnitState(UNIT_STATE_ISOLATED) || target->IsImmunedToDamage(GetSpellInfo())) { SendTickImmune(target, caster); return; @@ -6367,7 +6363,7 @@ void AuraEffect::HandlePeriodicHealthFunnelAuraTick(Unit* target, Unit* caster) if (!caster || !caster->isAlive() || !target->isAlive()) return; - if (target->HasUnitState(UNIT_STAT_ISOLATED)) + if (target->HasUnitState(UNIT_STATE_ISOLATED)) { SendTickImmune(target, caster); return; @@ -6395,7 +6391,7 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const if (!caster || !target->isAlive()) return; - if (target->HasUnitState(UNIT_STAT_ISOLATED)) + if (target->HasUnitState(UNIT_STATE_ISOLATED)) { SendTickImmune(target, caster); return; @@ -6511,7 +6507,7 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con if (!caster || !caster->isAlive() || !target->isAlive() || target->getPowerType() != powerType) return; - if (target->HasUnitState(UNIT_STAT_ISOLATED) || target->IsImmunedToDamage(GetSpellInfo())) + if (target->HasUnitState(UNIT_STATE_ISOLATED) || target->IsImmunedToDamage(GetSpellInfo())) { SendTickImmune(target, caster); return; @@ -6611,7 +6607,7 @@ void AuraEffect::HandleObsModPowerAuraTick(Unit* target, Unit* caster) const if (!target->isAlive() || !target->GetMaxPower(powerType)) return; - if (target->HasUnitState(UNIT_STAT_ISOLATED)) + if (target->HasUnitState(UNIT_STATE_ISOLATED)) { SendTickImmune(target, caster); return; @@ -6642,7 +6638,7 @@ void AuraEffect::HandlePeriodicEnergizeAuraTick(Unit* target, Unit* caster) cons if (!target->isAlive() || !target->GetMaxPower(powerType)) return; - if (target->HasUnitState(UNIT_STAT_ISOLATED)) + if (target->HasUnitState(UNIT_STATE_ISOLATED)) { SendTickImmune(target, caster); return; @@ -6674,7 +6670,7 @@ void AuraEffect::HandlePeriodicPowerBurnAuraTick(Unit* target, Unit* caster) con if (!caster || !target->isAlive() || target->getPowerType() != powerType) return; - if (target->HasUnitState(UNIT_STAT_ISOLATED) || target->IsImmunedToDamage(GetSpellInfo())) + if (target->HasUnitState(UNIT_STATE_ISOLATED) || target->IsImmunedToDamage(GetSpellInfo())) { SendTickImmune(target, caster); return; diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index 7f754253719..31dd3ad7471 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 91ecc328fd8..d49ac829ef9 100755 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -520,7 +520,13 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply) bool addUnit = true; // check target immunities - if (itr->first->IsImmunedToSpell(GetSpellInfo()) + for (uint8 effIndex = 0; effIndex < MAX_SPELL_EFFECTS; ++effIndex) + { + if (itr->first->IsImmunedToSpellEffect(GetSpellInfo(), effIndex)) + itr->second &= ~(1 << effIndex); + } + if (!itr->second + || itr->first->IsImmunedToSpell(GetSpellInfo()) || !CanBeAppliedOn(itr->first)) addUnit = false; @@ -1567,6 +1573,16 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b break; } break; + case SPELLFAMILY_DRUID: + // Enrage + if ((GetSpellInfo()->SpellFamilyFlags[0] & 0x80000) && GetSpellInfo()->SpellIconID == 961) + { + if (target->HasAura(70726)) // Item - Druid T10 Feral 4P Bonus + if (apply) + target->CastSpell(target, 70725, true); + break; + } + break; case SPELLFAMILY_ROGUE: // Stealth if (GetSpellInfo()->SpellFamilyFlags[0] & 0x00400000) @@ -1845,7 +1861,7 @@ bool Aura::CanStackWith(Aura const* existingAura) const case SPELL_AURA_OBS_MOD_HEALTH: case SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE: // periodic auras which target areas are not allowed to stack this way (replenishment for example) - if (m_spellInfo->Effects[i].IsArea() || existingSpellInfo->Effects[i].IsArea()) + if (m_spellInfo->Effects[i].IsTargetingArea() || existingSpellInfo->Effects[i].IsTargetingArea()) break; return true; default: @@ -1953,6 +1969,13 @@ bool Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventI if (!sSpellMgr->CanSpellTriggerProcOnEvent(*procEntry, eventInfo)) return false; + // TODO: + // - do checks using conditions table for eventInfo->GetActor() and eventInfo->GetActionTarget() + // - add DoCheckProc() AuraScript hook + // to allow additional requirements for procs + // this is needed because this is the last moment in which you can prevent aura charge drop on proc + // and possibly a way to prevent default checks (if there're going to be any) + // Check if current equipment meets aura requirements // do that only for passive spells // TODO: this needs to be unified for all kinds of auras @@ -2013,11 +2036,14 @@ float Aura::CalcProcChance(SpellProcEntry const& procEntry, ProcEventInfo& event void Aura::TriggerProcOnEvent(AuraApplication* aurApp, ProcEventInfo& eventInfo) { - // TODO: script hooks here (allowing prevention of selected effects) + // TODO: OnProc hook here for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) if (aurApp->HasEffect(i)) + // TODO: OnEffectProc hook here (allowing prevention of selected effects) GetEffect(i)->HandleProc(aurApp, eventInfo); - // TODO: script hooks here + // TODO: AfterEffectProc hook here + + // TODO: AfterProc hook here // Remove aura if we've used last charge to proc if (IsUsingCharges() && !GetCharges()) @@ -2035,7 +2061,6 @@ void Aura::_DeleteRemovedApplications() void Aura::LoadScripts() { - sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura::LoadScripts"); sScriptMgr->CreateAuraScripts(m_spellInfo->Id, m_loadedScripts); for (std::list<AuraScript*>::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end() ;) { @@ -2046,6 +2071,7 @@ void Aura::LoadScripts() m_loadedScripts.erase(bitr); continue; } + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura::LoadScripts: Script `%s` for aura `%u` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id); (*itr)->Register(); ++itr; } @@ -2065,6 +2091,30 @@ bool Aura::CallScriptCheckAreaTargetHandlers(Unit* target) return true; } +void Aura::CallScriptDispel(DispelInfo* dispelInfo) +{ + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + { + (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_DISPEL); + std::list<AuraScript::AuraDispelHandler>::iterator hookItrEnd = (*scritr)->OnDispel.end(), hookItr = (*scritr)->OnDispel.begin(); + for (; hookItr != hookItrEnd ; ++hookItr) + (*hookItr).Call(*scritr, dispelInfo); + (*scritr)->_FinishScriptCall(); + } +} + +void Aura::CallScriptAfterDispel(DispelInfo* dispelInfo) +{ + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + { + (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_AFTER_DISPEL); + std::list<AuraScript::AuraDispelHandler>::iterator hookItrEnd = (*scritr)->AfterDispel.end(), hookItr = (*scritr)->AfterDispel.begin(); + for (; hookItr != hookItrEnd ; ++hookItr) + (*hookItr).Call(*scritr, dispelInfo); + (*scritr)->_FinishScriptCall(); + } +} + bool Aura::CallScriptEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode) { bool preventDefault = false; @@ -2322,7 +2372,7 @@ void UnitAura::FillTargetMap(std::map<Unit*, uint8> & targets, Unit* caster) { float radius = GetSpellInfo()->Effects[effIndex].CalcRadius(caster); - if (!GetUnitOwner()->HasUnitState(UNIT_STAT_ISOLATED)) + if (!GetUnitOwner()->HasUnitState(UNIT_STATE_ISOLATED)) { switch (GetSpellInfo()->Effects[effIndex].Effect) { diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h index bcf40fe69d7..4d87abccda3 100755 --- a/src/server/game/Spells/Auras/SpellAuras.h +++ b/src/server/game/Spells/Auras/SpellAuras.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -186,6 +186,9 @@ class Aura bool CanStackWith(Aura const* existingAura) const; // Proc system + // this subsystem is not yet in use - the core of it is functional, but still some research has to be done + // and some dependant problems fixed before it can replace old proc system (for example cooldown handling) + // currently proc system functionality is implemented in Unit::ProcDamageAndSpell bool IsProcOnCooldown() const; void AddProcCooldown(uint32 msec); bool IsUsingCharges() const { return m_isUsingCharges; } @@ -198,6 +201,8 @@ class Aura // AuraScript void LoadScripts(); bool CallScriptCheckAreaTargetHandlers(Unit* target); + void CallScriptDispel(DispelInfo* dispelInfo); + void CallScriptAfterDispel(DispelInfo* dispelInfo); bool CallScriptEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode); bool CallScriptEffectRemoveHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode); void CallScriptAfterEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode); diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index de49b2cf579..b1aeb41a126 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -1401,13 +1401,17 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) } } -SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, const uint32 effectMask, bool scaleAura) +SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleAura) { if (!unit || !effectMask) return SPELL_MISS_EVADE; - // Recheck immune (only for delayed spells) - if (m_spellInfo->Speed && (unit->IsImmunedToDamage(m_spellInfo) || unit->IsImmunedToSpell(m_spellInfo))) + // For delayed spells immunity may be applied between missile launch and hit - check immunity for that case + // disable effects to which unit is immune + for (uint32 effectNumber = 0; effectNumber < MAX_SPELL_EFFECTS; ++effectNumber) + if (effectMask & (1 << effectNumber) && unit->IsImmunedToSpellEffect(m_spellInfo, effectNumber)) + effectMask &= ~(1 << effectNumber); + if (!effectMask || (m_spellInfo->Speed && (unit->IsImmunedToDamage(m_spellInfo) || unit->IsImmunedToSpell(m_spellInfo)))) return SPELL_MISS_IMMUNE; PrepareScriptHitHandlers(); @@ -1447,7 +1451,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, const uint32 effectMask, bool return SPELL_MISS_EVADE; // assisting case, healing and resurrection - if (unit->HasUnitState(UNIT_STAT_ATTACK_PLAYER)) + if (unit->HasUnitState(UNIT_STATE_ATTACK_PLAYER)) { m_caster->SetContestedPvP(); if (m_caster->GetTypeId() == TYPEID_PLAYER) @@ -2855,20 +2859,6 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered InitExplicitTargets(*targets); - if (Player* plrCaster = m_caster->GetCharmerOrOwnerPlayerOrPlayerItself()) - { - //check for special spell conditions - ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL, m_spellInfo->Id); - if (!conditions.empty()) - if (!sConditionMgr->IsPlayerMeetToConditions(plrCaster, conditions)) - { - //SendCastResult(SPELL_FAILED_DONT_REPORT); - SendCastResult(plrCaster, m_spellInfo, m_cast_count, SPELL_FAILED_DONT_REPORT); - finish(false); - return; - } - } - // Fill aura scaling information if (m_caster->IsControlledByPlayer() && !m_spellInfo->IsPassive() && m_spellInfo->SpellLevel && !m_spellInfo->IsChanneled() && !(_triggeredCastFlags & TRIGGERED_IGNORE_AURA_SCALING)) { @@ -3091,6 +3081,8 @@ void Spell::cast(bool skipCheck) m_caster->ToPlayer()->SetSpellModTakingSpell(this, true); } + CallScriptBeforeCastHandlers(); + // skip check if done already (for instant cast spells for example) if (!skipCheck) { @@ -3160,6 +3152,8 @@ void Spell::cast(bool skipCheck) PrepareTriggersExecutedOnHit(); + CallScriptOnCastHandlers(); + // traded items have trade slot instead of guid in m_itemTargetGUID // set to real guid to be sent later to the client m_targets.UpdateTradeSlotItem(); @@ -3210,8 +3204,8 @@ void Spell::cast(bool skipCheck) m_spellState = SPELL_STATE_DELAYED; SetDelayStart(0); - if (m_caster->HasUnitState(UNIT_STAT_CASTING) && !m_caster->IsNonMeleeSpellCasted(false, false, true)) - m_caster->ClearUnitState(UNIT_STAT_CASTING); + if (m_caster->HasUnitState(UNIT_STATE_CASTING) && !m_caster->IsNonMeleeSpellCasted(false, false, true)) + m_caster->ClearUnitState(UNIT_STATE_CASTING); } else { @@ -3219,6 +3213,8 @@ void Spell::cast(bool skipCheck) handle_immediate(); } + CallScriptAfterCastHandlers(); + if (const std::vector<int32> *spell_triggered = sSpellMgr->GetSpellLinked(m_spellInfo->Id)) { for (std::vector<int32>::const_iterator i = spell_triggered->begin(); i != spell_triggered->end(); ++i) @@ -3575,8 +3571,8 @@ void Spell::finish(bool ok) if (m_spellInfo->IsChanneled()) m_caster->UpdateInterruptMask(); - if (m_caster->HasUnitState(UNIT_STAT_CASTING) && !m_caster->IsNonMeleeSpellCasted(false, false, true)) - m_caster->ClearUnitState(UNIT_STAT_CASTING); + if (m_caster->HasUnitState(UNIT_STATE_CASTING) && !m_caster->IsNonMeleeSpellCasted(false, false, true)) + m_caster->ClearUnitState(UNIT_STATE_CASTING); // Unsummon summon as possessed creatures on spell cancel if (m_spellInfo->IsChanneled() && m_caster->GetTypeId() == TYPEID_PLAYER) @@ -3823,6 +3819,9 @@ void Spell::SendSpellGo() castFlags |= CAST_FLAG_UNKNOWN_19; // same as in SMSG_SPELL_START } + if (m_targets.HasTraj()) + castFlags |= CAST_FLAG_ADJUST_MISSILE; + WorldPacket data(SMSG_SPELL_GO, 50); // guess size if (m_CastItem) @@ -3865,11 +3864,10 @@ void Spell::SendSpellGo() } } } - - if (castFlags & CAST_FLAG_UNKNOWN_18) + if (castFlags & CAST_FLAG_ADJUST_MISSILE) { - data << float(0); - data << uint32(0); + data << m_targets.GetElevation(); + data << uint32(m_delayMoment); } if (castFlags & CAST_FLAG_AMMO) @@ -4718,6 +4716,14 @@ SpellCastResult Spell::CheckCast(bool strict) return SPELL_FAILED_DONT_REPORT; } + // check spell caster's conditions from database + if (Player* plrCaster = m_caster->GetCharmerOrOwnerPlayerOrPlayerItself()) + { + ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL, m_spellInfo->Id); + if (!conditions.empty() && !sConditionMgr->IsPlayerMeetToConditions(plrCaster, conditions)) + return SPELL_FAILED_DONT_REPORT; + } + // Don't check explicit target for passive spells (workaround) (check should be skipped only for learn case) // those spells may have incorrect target entries or not filled at all (for example 15332) // such spells when learned are not targeting anyone using targeting system, they should apply directly to caster instead @@ -4992,7 +4998,7 @@ SpellCastResult Spell::CheckCast(bool strict) if (strict && m_caster->IsScriptOverriden(m_spellInfo, 6953)) m_caster->RemoveMovementImpairingAuras(); } - if (m_caster->HasUnitState(UNIT_STAT_ROOT)) + if (m_caster->HasUnitState(UNIT_STATE_ROOT)) return SPELL_FAILED_ROOTED; break; } @@ -5220,7 +5226,7 @@ SpellCastResult Spell::CheckCast(bool strict) return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; Unit* target = m_targets.GetUnitTarget(); - if (m_caster == target && m_caster->HasUnitState(UNIT_STAT_ROOT)) + if (m_caster == target && m_caster->HasUnitState(UNIT_STATE_ROOT)) { if (m_caster->GetTypeId() == TYPEID_PLAYER) return SPELL_FAILED_ROOTED; @@ -5393,6 +5399,9 @@ SpellCastResult Spell::CheckCast(bool strict) } case SPELL_AURA_PERIODIC_MANA_LEECH: { + if (m_spellInfo->Effects[i].IsTargetingArea()) + break; + if (!m_targets.GetUnitTarget()) return SPELL_FAILED_BAD_IMPLICIT_TARGETS; @@ -5444,7 +5453,7 @@ SpellCastResult Spell::CheckCast(bool strict) SpellCastResult Spell::CheckPetCast(Unit* target) { - if (m_caster->HasUnitState(UNIT_STAT_CASTING) && !(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_IN_PROGRESS)) //prevent spellcast interruption by another spellcast + if (m_caster->HasUnitState(UNIT_STATE_CASTING) && !(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_IN_PROGRESS)) //prevent spellcast interruption by another spellcast return SPELL_FAILED_SPELL_IN_PROGRESS; // dead owner (pets still alive when owners ressed?) @@ -6619,7 +6628,7 @@ void Spell::HandleLaunchPhase() continue; // do not consume ammo anymore for Hunter's volley spell - if (IsTriggered() && m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellInfo->IsAOE()) + if (IsTriggered() && m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellInfo->IsTargetingArea()) usesAmmo = false; if (usesAmmo) @@ -6670,7 +6679,7 @@ void Spell::DoAllEffectOnLaunchTarget(TargetInfo& targetInfo, float* multiplier) if (m_damage > 0) { - if (m_spellInfo->Effects[i].IsArea()) + if (m_spellInfo->Effects[i].IsTargetingArea()) { m_damage = int32(float(m_damage) * unit->GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE, m_spellInfo->SchoolMask)); if (m_caster->GetTypeId() == TYPEID_UNIT) @@ -6969,7 +6978,6 @@ void Spell::CheckEffectExecuteData() void Spell::LoadScripts() { - sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::LoadScripts"); sScriptMgr->CreateSpellScripts(m_spellInfo->Id, m_loadedScripts); for (std::list<SpellScript*>::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end() ;) { @@ -6980,15 +6988,49 @@ void Spell::LoadScripts() m_loadedScripts.erase(bitr); continue; } + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::LoadScripts: Script `%s` for spell `%u` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id); (*itr)->Register(); ++itr; } } -void Spell::PrepareScriptHitHandlers() +void Spell::CallScriptBeforeCastHandlers() { for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) - (*scritr)->_InitHit(); + { + (*scritr)->_PrepareScriptCall(SPELL_SCRIPT_HOOK_BEFORE_CAST); + std::list<SpellScript::CastHandler>::iterator hookItrEnd = (*scritr)->BeforeCast.end(), hookItr = (*scritr)->BeforeCast.begin(); + for (; hookItr != hookItrEnd ; ++hookItr) + (*hookItr).Call(*scritr); + + (*scritr)->_FinishScriptCall(); + } +} + +void Spell::CallScriptOnCastHandlers() +{ + for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + { + (*scritr)->_PrepareScriptCall(SPELL_SCRIPT_HOOK_ON_CAST); + std::list<SpellScript::CastHandler>::iterator hookItrEnd = (*scritr)->OnCast.end(), hookItr = (*scritr)->OnCast.begin(); + for (; hookItr != hookItrEnd ; ++hookItr) + (*hookItr).Call(*scritr); + + (*scritr)->_FinishScriptCall(); + } +} + +void Spell::CallScriptAfterCastHandlers() +{ + for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + { + (*scritr)->_PrepareScriptCall(SPELL_SCRIPT_HOOK_AFTER_CAST); + std::list<SpellScript::CastHandler>::iterator hookItrEnd = (*scritr)->AfterCast.end(), hookItr = (*scritr)->AfterCast.begin(); + for (; hookItr != hookItrEnd ; ++hookItr) + (*hookItr).Call(*scritr); + + (*scritr)->_FinishScriptCall(); + } } SpellCastResult Spell::CallScriptCheckCastHandlers() @@ -7010,6 +7052,12 @@ SpellCastResult Spell::CallScriptCheckCastHandlers() return retVal; } +void Spell::PrepareScriptHitHandlers() +{ + for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + (*scritr)->_InitHit(); +} + bool Spell::CallScriptEffectHandlers(SpellEffIndex effIndex, SpellEffectHandleMode mode) { // execute script effect handler hooks and check if effects was prevented diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h index f57b3114a70..2bbc04d6a3b 100755 --- a/src/server/game/Spells/Spell.h +++ b/src/server/game/Spells/Spell.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -55,7 +55,7 @@ enum SpellCastFlags CAST_FLAG_UNKNOWN_15 = 0x00004000, CAST_FLAG_UNKNOWN_16 = 0x00008000, CAST_FLAG_UNKNOWN_17 = 0x00010000, - CAST_FLAG_UNKNOWN_18 = 0x00020000, + CAST_FLAG_ADJUST_MISSILE = 0x00020000, CAST_FLAG_UNKNOWN_19 = 0x00040000, CAST_FLAG_UNKNOWN_20 = 0x00080000, CAST_FLAG_UNKNOWN_21 = 0x00100000, @@ -624,6 +624,9 @@ class Spell // Scripting system void LoadScripts(); + void CallScriptBeforeCastHandlers(); + void CallScriptOnCastHandlers(); + void CallScriptAfterCastHandlers(); SpellCastResult CallScriptCheckCastHandlers(); void PrepareScriptHitHandlers(); bool CallScriptEffectHandlers(SpellEffIndex effIndex, SpellEffectHandleMode mode); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 95917070b5d..0dd8eb64654 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -333,38 +333,6 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) switch (m_spellInfo->Id) // better way to check unknown { - // Positive/Negative Charge - case 28062: - case 28085: - case 39090: - case 39093: - if (!m_triggeredByAuraSpell) - break; - if (unitTarget == m_caster) - { - uint8 count = 0; - for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) - if (ihit->targetGUID != m_caster->GetGUID()) - if (Player* target = ObjectAccessor::GetPlayer(*m_caster, ihit->targetGUID)) - if (target->HasAura(m_triggeredByAuraSpell->Id)) - ++count; - if (count) - { - uint32 spellId = 0; - switch (m_spellInfo->Id) - { - case 28062: spellId = 29659; break; - case 28085: spellId = 29660; break; - case 39090: spellId = 39089; break; - case 39093: spellId = 39092; break; - } - m_caster->SetAuraStack(spellId, m_caster, count); - } - } - - if (unitTarget->HasAura(m_triggeredByAuraSpell->Id)) - damage = 0; - break; // Consumption case 28865: damage = (((InstanceMap*)m_caster->GetMap())->GetDifficulty() == REGULAR_DIFFICULTY ? 2750 : 4250); @@ -1145,9 +1113,13 @@ void Spell::EffectDummy(SpellEffIndex effIndex) return; m_caster->CastCustomSpell(unitTarget, 52752, &damage, NULL, NULL, true); return; - case 54171: //Divine Storm + case 54171: // Divine Storm { - m_caster->CastCustomSpell(unitTarget, 54172, &damage, 0, 0, true); + if (m_UniqueTargetInfo.size()) + { + int32 heal = damage / m_UniqueTargetInfo.size(); + m_caster->CastCustomSpell(unitTarget, 54172, &heal, NULL, NULL, true); + } return; } case 58418: // Portal to Orgrimmar @@ -1366,7 +1338,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) } //Any effect which causes you to lose control of your character will supress the starfall effect. - if (m_caster->HasUnitState(UNIT_STAT_CONTROLLED)) + if (m_caster->HasUnitState(UNIT_STATE_CONTROLLED)) return; m_caster->CastSpell(unitTarget, damage, true); @@ -1374,16 +1346,6 @@ void Spell::EffectDummy(SpellEffIndex effIndex) } break; case SPELLFAMILY_PALADIN: - // Divine Storm - if (m_spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_PALADIN_DIVINESTORM && effIndex == 1) - { - int32 dmg = CalculatePctN(m_damage, damage); - if (!unitTarget) - unitTarget = m_caster; - m_caster->CastCustomSpell(unitTarget, 54171, &dmg, 0, 0, true); - return; - } - switch (m_spellInfo->Id) { case 31789: // Righteous Defense (step 1) @@ -2788,14 +2750,13 @@ void Spell::SendLoot(uint64 guid, LootType loottype) { case GAMEOBJECT_TYPE_DOOR: case GAMEOBJECT_TYPE_BUTTON: - gameObjTarget->UseDoorOrButton(); + gameObjTarget->UseDoorOrButton(0, false, player); player->GetMap()->ScriptsStart(sGameObjectScripts, gameObjTarget->GetDBTableGUIDLow(), player, gameObjTarget); return; case GAMEOBJECT_TYPE_QUESTGIVER: - // start or end quest - player->PrepareQuestMenu(guid); - player->SendPreparedQuest(guid); + player->PrepareGossipMenu(gameObjTarget, gameObjTarget->GetGOInfo()->questgiver.gossipID); + player->SendPreparedGossip(gameObjTarget); return; case GAMEOBJECT_TYPE_SPELL_FOCUS: @@ -3132,7 +3093,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) summon->SelectLevel(summon->GetCreatureInfo()); // some summoned creaters have different from 1 DB data for level/hp summon->SetUInt32Value(UNIT_NPC_FLAGS, summon->GetCreatureInfo()->npcflag); - summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); summon->AI()->EnterEvadeMode(); break; @@ -3356,7 +3317,7 @@ void Spell::EffectDispel(SpellEffIndex effIndex) // Send dispelled spell info dataSuccess << uint32(itr->first->GetId()); // Spell Id dataSuccess << uint8(0); // 0 - dispelled !=0 cleansed - unitTarget->RemoveAurasDueToSpellByDispel(itr->first->GetId(), itr->first->GetCasterGUID(), m_caster, itr->second); + unitTarget->RemoveAurasDueToSpellByDispel(itr->first->GetId(), m_spellInfo->Id, itr->first->GetCasterGUID(), m_caster, itr->second); } m_caster->SendMessageToSet(&dataSuccess, true); @@ -3399,25 +3360,14 @@ void Spell::EffectDistract(SpellEffIndex /*effIndex*/) return; // target must be OK to do this - if (unitTarget->HasUnitState(UNIT_STAT_CONFUSED | UNIT_STAT_STUNNED | UNIT_STAT_FLEEING)) + if (unitTarget->HasUnitState(UNIT_STATE_CONFUSED | UNIT_STATE_STUNNED | UNIT_STATE_FLEEING)) return; - float angle = unitTarget->GetAngle(m_targets.GetDst()); + unitTarget->SetFacingTo(unitTarget->GetAngle(m_targets.GetDst())); + unitTarget->ClearUnitState(UNIT_STATE_MOVING); - if (unitTarget->GetTypeId() == TYPEID_PLAYER) - { - // For players just turn them - unitTarget->ToPlayer()->UpdatePosition(unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), angle, false); - unitTarget->ToPlayer()->SendTeleportAckPacket(); - } - else - { - // Set creature Distracted, Stop it, And turn it - unitTarget->SetOrientation(angle); - unitTarget->StopMoving(); + if (unitTarget->GetTypeId() == TYPEID_UNIT) unitTarget->GetMotionMaster()->MoveDistract(damage * IN_MILLISECONDS); - unitTarget->SendMovementFlagUpdate(); - } } void Spell::EffectPickPocket(SpellEffIndex /*effIndex*/) @@ -5657,6 +5607,7 @@ void Spell::EffectDuel(SpellEffIndex effIndex) duel->opponent = target; duel->startTime = 0; duel->startTimer = 0; + duel->isMounted = (GetSpellInfo()->Id == 62875); // Mounted Duel caster->duel = duel; DuelInfo* duel2 = new DuelInfo; @@ -5664,6 +5615,7 @@ void Spell::EffectDuel(SpellEffIndex effIndex) duel2->opponent = caster; duel2->startTime = 0; duel2->startTimer = 0; + duel2->isMounted = (GetSpellInfo()->Id == 62875); // Mounted Duel target->duel = duel2; caster->SetUInt64Value(PLAYER_DUEL_ARBITER, pGameObj->GetGUID()); @@ -5878,7 +5830,10 @@ void Spell::EffectInebriate(SpellEffIndex /*effIndex*/) uint16 currentDrunk = player->GetDrunkValue(); uint16 drunkMod = damage * 256; if (currentDrunk + drunkMod > 0xFFFF) + { currentDrunk = 0xFFFF; + player->CastSpell(player, 67468, false); + } else currentDrunk += drunkMod; player->SetDrunkValue(currentDrunk, m_CastItem ? m_CastItem->GetEntry() : 0); @@ -6471,7 +6426,7 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/) pet->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE); pet->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); pet->setDeathState(ALIVE); - pet->ClearUnitState(uint32(UNIT_STAT_ALL_STATE)); + pet->ClearUnitState(uint32(UNIT_STATE_ALL_STATE)); pet->SetHealth(pet->CountPctFromMaxHealth(damage)); //pet->AIM_Initialize(); @@ -7000,10 +6955,35 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex) { if (player->GetRuneCooldown(j) && player->GetCurrentRune(j) == RuneType(m_spellInfo->Effects[effIndex].MiscValue)) { + if (m_spellInfo->Id == 45529) + if (player->GetBaseRune(j) != RuneType(m_spellInfo->Effects[effIndex].MiscValueB)) + continue; player->SetRuneCooldown(j, 0); --count; } } + + // Blood Tap + if (m_spellInfo->Id == 45529 && count > 0) + { + for (uint32 l = 0; l < MAX_RUNES && count > 0; ++l) + { + // Check if both runes are on cd as that is the only time when this needs to come into effect + if ((player->GetRuneCooldown(l) && player->GetCurrentRune(l) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)) && (player->GetRuneCooldown(l+1) && player->GetCurrentRune(l+1) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB))) + { + // Should always update the rune with the lowest cd + if (player->GetRuneCooldown(l) >= player->GetRuneCooldown(l+1)) + l++; + player->SetRuneCooldown(l, 0); + --count; + // is needed to push through to the client that the rune is active + player->ResyncRunes(MAX_RUNES); + } + else + break; + } + } + // Empower rune weapon if (m_spellInfo->Id == 47568) { diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 463b46972fa..ad465767ab0 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -503,7 +503,7 @@ bool SpellEffectInfo::IsAura(AuraType aura) const return IsAura() && ApplyAuraName == aura; } -bool SpellEffectInfo::IsArea() const +bool SpellEffectInfo::IsTargetingArea() const { return TargetA.IsArea() || TargetB.IsArea(); } @@ -1061,10 +1061,19 @@ bool SpellInfo::IsAbilityOfSkillType(uint32 skillType) const return false; } -bool SpellInfo::IsAOE() const +bool SpellInfo::IsAffectingArea() const { for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) - if (Effects[i].IsEffect() && Effects[i].IsArea()) + if (Effects[i].IsEffect() && (Effects[i].IsTargetingArea() || Effects[i].IsEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA) || Effects[i].IsAreaAuraEffect())) + return true; + return false; +} + +// checks if spell targets are selected from area, doesn't include spell effects in check (like area wide auras for example) +bool SpellInfo::IsTargetingArea() const +{ + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + if (Effects[i].IsEffect() && Effects[i].IsTargetingArea()) return true; return false; } @@ -1604,7 +1613,7 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, Unit const* target, b } // not allow casting on flying player - if (target->HasUnitState(UNIT_STAT_IN_FLIGHT)) + if (target->HasUnitState(UNIT_STATE_IN_FLIGHT)) return SPELL_FAILED_BAD_TARGETS; if (TargetAuraState && !target->HasAuraState(AuraStateType(TargetAuraState), this, caster)) @@ -1755,6 +1764,14 @@ Mechanics SpellInfo::GetEffectMechanic(uint8 effIndex) const return MECHANIC_NONE; } +bool SpellInfo::HasAnyEffectMechanic() const +{ + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + if (Effects[i].Mechanic) + return true; + return false; +} + uint32 SpellInfo::GetDispelMask() const { return GetDispelMask(DispelType(Dispel)); diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h index 7faf0de890d..65be5981c64 100644 --- a/src/server/game/Spells/SpellInfo.h +++ b/src/server/game/Spells/SpellInfo.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -279,7 +279,7 @@ public: bool IsEffect(SpellEffects effectName) const; bool IsAura() const; bool IsAura(AuraType aura) const; - bool IsArea() const; + bool IsTargetingArea() const; bool IsAreaAuraEffect() const; bool IsFarUnitTargetEffect() const; bool IsFarDestTargetEffect() const; @@ -403,7 +403,8 @@ public: bool IsAbilityLearnedWithProfession() const; bool IsAbilityOfSkillType(uint32 skillType) const; - bool IsAOE() const; + bool IsAffectingArea() const; + bool IsTargetingArea() const; bool NeedsExplicitUnitTarget() const; bool NeedsToBeTriggeredByCaster() const; @@ -446,6 +447,7 @@ public: uint32 GetEffectMechanicMask(uint8 effIndex) const; uint32 GetSpellMechanicMaskByEffectMask(uint32 effectMask) const; Mechanics GetEffectMechanic(uint8 effIndex) const; + bool HasAnyEffectMechanic() const; uint32 GetDispelMask() const; static uint32 GetDispelMask(DispelType type); uint32 GetExplicitTargetMask() const; diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 8976f90690c..99961664aa8 100755 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -2889,6 +2889,23 @@ void SpellMgr::LoadSpellCustomAttr() case 69293: // Wing Buffet case 74439: // Machine Gun case 63278: // Mark of the Faceless (General Vezax) + case 62544: // Thrust (Argent Tournament) + case 64588: // Thrust (Argent Tournament) + case 66479: // Thrust (Argent Tournament) + case 68505: // Thrust (Argent Tournament) + case 62709: // Counterattack! (Argent Tournament) + case 62626: // Break-Shield (Argent Tournament, Player) + case 64590: // Break-Shield (Argent Tournament, Player) + case 64342: // Break-Shield (Argent Tournament, NPC) + case 64686: // Break-Shield (Argent Tournament, NPC) + case 65147: // Break-Shield (Argent Tournament, NPC) + case 68504: // Break-Shield (Argent Tournament, NPC) + case 62874: // Charge (Argent Tournament, Player) + case 68498: // Charge (Argent Tournament, Player) + case 64591: // Charge (Argent Tournament, Player) + case 63003: // Charge (Argent Tournament, NPC) + case 63010: // Charge (Argent Tournament, NPC) + case 68321: // Charge (Argent Tournament, NPC) case 72255: // Mark of the Fallen Champion (Deathbringer Saurfang) case 72444: // Mark of the Fallen Champion (Deathbringer Saurfang) case 72445: // Mark of the Fallen Champion (Deathbringer Saurfang) @@ -2960,8 +2977,10 @@ void SpellMgr::LoadDbcDataCorrections() switch (spellInfo->Id) { - case 42835: // Spout - spellInfo->Effect[0] = 0; // remove damage effect, only anim is needed + case 40244: case 40245: // Simon Game Visual + case 40246: case 40247: // Simon Game Visual + case 42835: // Spout, remove damage effect, only anim is needed + spellInfo->Effect[0] = 0; break; case 30657: // Quake spellInfo->EffectTriggerSpell[0] = 30571; @@ -2970,6 +2989,7 @@ void SpellMgr::LoadDbcDataCorrections() spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_TARGET_ENEMY; spellInfo->EffectImplicitTargetB[0] = 0; break; + case 63665: // Charge (Argent Tournament emote on riders) case 31447: // Mark of Kaz'rogal (needs target selection script) case 31298: // Sleep (needs target selection script) case 51904: // Summon Ghouls On Scarlet Crusade (this should use conditions table, script for this spell needs to be fixed) @@ -3039,6 +3059,7 @@ void SpellMgr::LoadDbcDataCorrections() case 42611: // Shoot case 61588: // Blazing Harpoon case 52479: // Gift of the Harvester + case 48246: // Ball of Flame spellInfo->MaxAffectedTargets = 1; break; case 41376: // Spite @@ -3381,6 +3402,7 @@ void SpellMgr::LoadDbcDataCorrections() spellInfo->AreaGroupId = 0; // originally, these require area 4522, which is... outside of Icecrown Citadel break; case 70602: // Corruption + case 48278: // Paralyze spellInfo->AttributesEx3 |= SPELL_ATTR3_STACK_FOR_DIFF_CASTERS; break; case 70715: // Column of Frost (visual marker) @@ -3495,6 +3517,11 @@ void SpellMgr::LoadDbcDataCorrections() case 72405: // Broken Frostmourne spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_200_YARDS; // 200yd break; + case 40055: // Introspection + case 40165: // Introspection + case 40166: // Introspection + case 40167: // Introspection + spellInfo->Attributes |= SPELL_ATTR0_NEGATIVE_1; default: break; } diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index 552519d9940..14137b6a91b 100755 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 53ec7822623..8a58ce3c52a 100755 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -52,6 +52,11 @@ void _SpellScript::_Init(std::string const* scriptname, uint32 spellId) m_scriptSpellId = spellId; } +std::string const* _SpellScript::_GetScriptName() const +{ + return m_scriptName; +} + _SpellScript::EffectHook::EffectHook(uint8 _effIndex) { // effect index must be in range <0;2>, allow use of special effindexes @@ -147,6 +152,16 @@ std::string _SpellScript::EffectAuraNameCheck::ToString() } } +SpellScript::CastHandler::CastHandler(SpellCastFnType _pCastHandlerScript) +{ + pCastHandlerScript = _pCastHandlerScript; +} + +void SpellScript::CastHandler::Call(SpellScript* spellScript) +{ + (spellScript->*pCastHandlerScript)(); +} + SpellScript::CheckCastHandler::CheckCastHandler(SpellCheckCastFnType checkCastHandlerScript) { _checkCastHandlerScript = checkCastHandlerScript; @@ -527,6 +542,14 @@ bool AuraScript::_Validate(SpellInfo const* entry) if (!entry->HasAreaAuraEffect()) sLog->outError("TSCR: Spell `%u` of script `%s` does not have area aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed", entry->Id, m_scriptName->c_str()); + for (std::list<AuraDispelHandler>::iterator itr = OnDispel.begin(); itr != OnDispel.end(); ++itr) + if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect()) + sLog->outError("TSCR: Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `OnDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str()); + + for (std::list<AuraDispelHandler>::iterator itr = AfterDispel.begin(); itr != AfterDispel.end(); ++itr) + if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect()) + sLog->outError("TSCR: Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `AfterDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str()); + for (std::list<EffectApplyHandler>::iterator itr = OnEffectApply.begin(); itr != OnEffectApply.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); @@ -592,6 +615,16 @@ bool AuraScript::CheckAreaTargetHandler::Call(AuraScript* auraScript, Unit* _tar return (auraScript->*pHandlerScript)(_target); } +AuraScript::AuraDispelHandler::AuraDispelHandler(AuraDispelFnType _pHandlerScript) +{ + pHandlerScript = _pHandlerScript; +} + +void AuraScript::AuraDispelHandler::Call(AuraScript* auraScript, DispelInfo* _dispelInfo) +{ + (auraScript->*pHandlerScript)(_dispelInfo); +} + AuraScript::EffectBase::EffectBase(uint8 _effIndex, uint16 _effName) : _SpellScript::EffectAuraNameCheck(_effName), _SpellScript::EffectHook(_effIndex) { diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index dab77f6533d..945a62674d9 100755 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -64,6 +64,7 @@ class _SpellScript virtual void _Register(); virtual void _Unload(); virtual void _Init(std::string const* scriptname, uint32 spellId); + std::string const* _GetScriptName() const; protected: class EffectHook @@ -131,6 +132,9 @@ enum SpellScriptHookType SPELL_SCRIPT_HOOK_AFTER_HIT, SPELL_SCRIPT_HOOK_UNIT_TARGET_SELECT, SPELL_SCRIPT_HOOK_CHECK_CAST, + SPELL_SCRIPT_HOOK_BEFORE_CAST, + SPELL_SCRIPT_HOOK_ON_CAST, + SPELL_SCRIPT_HOOK_AFTER_CAST, }; #define HOOK_SPELL_HIT_START SPELL_SCRIPT_HOOK_EFFECT_HIT @@ -148,10 +152,20 @@ class SpellScript : public _SpellScript typedef SpellCastResult(CLASSNAME::*SpellCheckCastFnType)(); \ typedef void(CLASSNAME::*SpellEffectFnType)(SpellEffIndex); \ typedef void(CLASSNAME::*SpellHitFnType)(); \ + typedef void(CLASSNAME::*SpellCastFnType)(); \ typedef void(CLASSNAME::*SpellUnitTargetFnType)(std::list<Unit*>&); \ SPELLSCRIPT_FUNCTION_TYPE_DEFINES(SpellScript) + class CastHandler + { + public: + CastHandler(SpellCastFnType _pCastHandlerScript); + void Call(SpellScript* spellScript); + private: + SpellCastFnType pCastHandlerScript; + }; + class CheckCastHandler { public: @@ -194,6 +208,7 @@ class SpellScript : public _SpellScript }; #define SPELLSCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME) \ + class CastHandlerFunction : public SpellScript::CastHandler { public: CastHandlerFunction(SpellCastFnType _pCastHandlerScript) : SpellScript::CastHandler((SpellScript::SpellCastFnType)_pCastHandlerScript) {} }; \ class CheckCastHandlerFunction : public SpellScript::CheckCastHandler { public: CheckCastHandlerFunction(SpellCheckCastFnType _checkCastHandlerScript) : SpellScript::CheckCastHandler((SpellScript::SpellCheckCastFnType)_checkCastHandlerScript) {} }; \ class EffectHandlerFunction : public SpellScript::EffectHandler { public: EffectHandlerFunction(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : SpellScript::EffectHandler((SpellScript::SpellEffectFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \ class HitHandlerFunction : public SpellScript::HitHandler { public: HitHandlerFunction(SpellHitFnType _pHitHandlerScript) : SpellScript::HitHandler((SpellScript::SpellHitFnType)_pHitHandlerScript) {} }; \ @@ -221,6 +236,13 @@ class SpellScript : public _SpellScript // SpellScript interface // hooks to which you can attach your functions // + // example: BeforeCast += SpellCastFn(class::function); + HookList<CastHandler> BeforeCast; + // example: OnCast += SpellCastFn(class::function); + HookList<CastHandler> OnCast; + // example: AfterCast += SpellCastFn(class::function); + HookList<CastHandler> AfterCast; + #define SpellCastFn(F) CastHandlerFunction(&F) // example: OnCheckCast += SpellCheckCastFn(); // where function is SpellCastResult function() @@ -250,14 +272,18 @@ class SpellScript : public _SpellScript #define SpellUnitTargetFn(F, I, N) UnitTargetHandlerFunction(&F, I, N) // hooks are executed in following order, at specified event of spell: - // 1. OnUnitTargetSelect - executed just before adding selected targets to final target list - // 2. OnEffectLaunch - executed just before specified effect handler call - when spell missile is launched - // 3. OnEffectLaunchTarget - executed just before specified effect handler call - when spell missile is launched - called for each target from spell target map - // 4. OnEffectHit - executed just before specified effect handler call - when spell missile hits dest - // 5. BeforeHit - executed just before spell hits a target - called for each target from spell target map - // 6. OnEffectHitTarget - executed just before specified effect handler call - called for each target from spell target map - // 7. OnHit - executed just before spell deals damage and procs auras - when spell hits target - called for each target from spell target map - // 8. AfterHit - executed just after spell finishes all it's jobs for target - called for each target from spell target map + // 1. BeforeCast - executed when spell preparation is finished (when cast bar becomes full) before cast is handled + // 2. OnCheckCast - allows to override result of CheckCast function + // 3. OnUnitTargetSelect - executed just before adding selected targets to final target list + // 4. OnCast - executed just before spell is launched (creates missile) or executed + // 5. AfterCast - executed after spell missile is launched and immediate spell actions are done + // 6. OnEffectLaunch - executed just before specified effect handler call - when spell missile is launched + // 7. OnEffectLaunchTarget - executed just before specified effect handler call - when spell missile is launched - called for each target from spell target map + // 8. OnEffectHit - executed just before specified effect handler call - when spell missile hits dest + // 9. BeforeHit - executed just before spell hits a target - called for each target from spell target map + // 10. OnEffectHitTarget - executed just before specified effect handler call - called for each target from spell target map + // 11. OnHit - executed just before spell deals damage and procs auras - when spell hits target - called for each target from spell target map + // 12. AfterHit - executed just after spell finishes all it's jobs for target - called for each target from spell target map // // methods allowing interaction with Spell object @@ -359,6 +385,8 @@ enum AuraScriptHookType AURA_SCRIPT_HOOK_EFFECT_MANASHIELD, AURA_SCRIPT_HOOK_EFFECT_AFTER_MANASHIELD, AURA_SCRIPT_HOOK_CHECK_AREA_TARGET, + AURA_SCRIPT_HOOK_DISPEL, + AURA_SCRIPT_HOOK_AFTER_DISPEL, /*AURA_SCRIPT_HOOK_APPLY, AURA_SCRIPT_HOOK_REMOVE, */ }; @@ -374,6 +402,7 @@ class AuraScript : public _SpellScript #define AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) \ typedef bool(CLASSNAME::*AuraCheckAreaTargetFnType)(Unit* target); \ + typedef void(CLASSNAME::*AuraDispelFnType)(DispelInfo* dispelInfo); \ typedef void(CLASSNAME::*AuraEffectApplicationModeFnType)(AuraEffect const*, AuraEffectHandleModes); \ typedef void(CLASSNAME::*AuraEffectPeriodicFnType)(AuraEffect const*); \ typedef void(CLASSNAME::*AuraEffectUpdatePeriodicFnType)(AuraEffect*); \ @@ -392,6 +421,14 @@ class AuraScript : public _SpellScript private: AuraCheckAreaTargetFnType pHandlerScript; }; + class AuraDispelHandler + { + public: + AuraDispelHandler(AuraDispelFnType pHandlerScript); + void Call(AuraScript* auraScript, DispelInfo* dispelInfo); + private: + AuraDispelFnType pHandlerScript; + }; class EffectBase : public _SpellScript::EffectAuraNameCheck, public _SpellScript::EffectHook { public: @@ -467,6 +504,7 @@ class AuraScript : public _SpellScript #define AURASCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME) \ class CheckAreaTargetFunction : public AuraScript::CheckAreaTargetHandler { public: CheckAreaTargetFunction(AuraCheckAreaTargetFnType _pHandlerScript) : AuraScript::CheckAreaTargetHandler((AuraScript::AuraCheckAreaTargetFnType)_pHandlerScript) {} }; \ + class AuraDispelFunction : public AuraScript::AuraDispelHandler { public: AuraDispelFunction(AuraDispelFnType _pHandlerScript) : AuraScript::AuraDispelHandler((AuraScript::AuraDispelFnType)_pHandlerScript) {} }; \ class EffectPeriodicHandlerFunction : public AuraScript::EffectPeriodicHandler { public: EffectPeriodicHandlerFunction(AuraEffectPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectPeriodicHandler((AuraScript::AuraEffectPeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \ class EffectUpdatePeriodicHandlerFunction : public AuraScript::EffectUpdatePeriodicHandler { public: EffectUpdatePeriodicHandlerFunction(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectUpdatePeriodicHandler((AuraScript::AuraEffectUpdatePeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \ class EffectCalcAmountHandlerFunction : public AuraScript::EffectCalcAmountHandler { public: EffectCalcAmountHandlerFunction(AuraEffectCalcAmountFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcAmountHandler((AuraScript::AuraEffectCalcAmountFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \ @@ -514,6 +552,17 @@ class AuraScript : public _SpellScript // where function is: bool function (Unit* target); HookList<CheckAreaTargetHandler> DoCheckAreaTarget; #define AuraCheckAreaTargetFn(F) CheckAreaTargetFunction(&F) + + // executed when aura is dispelled by a unit + // example: OnDispel += AuraDispelFn(class::function); + // where function is: void function (DispelInfo* dispelInfo); + HookList<AuraDispelHandler> OnDispel; + // executed after aura is dispelled by a unit + // example: AfterDispel += AuraDispelFn(class::function); + // where function is: void function (DispelInfo* dispelInfo); + HookList<AuraDispelHandler> AfterDispel; + #define AuraDispelFn(F) AuraDispelFunction(&F) + // executed when aura effect is applied with specified mode to target // should be used when when effect handler preventing/replacing is needed, do not use this hook for triggering spellcasts/removing auras etc - may be unsafe // example: OnEffectApply += AuraEffectApplyFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier, AuraEffectHandleModes); diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 2915bab4b77..e5a12693aa7 100755 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -27,7 +27,7 @@ void CreatureTextMgr::LoadCreatureTexts() mTextMap.clear(); // for reload case mTextRepeatMap.clear(); //reset all currently used temp texts - PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_LOAD_CRETEXT); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_CREATURE_TEXT); PreparedQueryResult result = WorldDatabase.Query(stmt); if (!result) diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h index 5d4e6357079..0c80e2d568f 100755 --- a/src/server/game/Texts/CreatureTextMgr.h +++ b/src/server/game/Texts/CreatureTextMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp index c657248c595..96f4438544f 100755 --- a/src/server/game/Tickets/TicketMgr.cpp +++ b/src/server/game/Tickets/TicketMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -79,7 +79,7 @@ bool GmTicket::LoadFromDB(Field* fields) void GmTicket::SaveToDB(SQLTransaction& trans) const { uint8 index = 0; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_GM_TICKET); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_GM_TICKET); stmt->setUInt32( index, _id); stmt->setUInt32(++index, GUID_LOPART(_playerGuid)); stmt->setString(++index, _playerName); @@ -226,7 +226,7 @@ void TicketMgr::LoadTickets() _lastTicketId = 0; _openTicketCount = 0; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_GM_TICKETS); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GM_TICKETS); PreparedQueryResult result = CharacterDatabase.Query(stmt); if (!result) { diff --git a/src/server/game/Tickets/TicketMgr.h b/src/server/game/Tickets/TicketMgr.h index 04fb7101ff7..cb0a1bab22b 100755 --- a/src/server/game/Tickets/TicketMgr.h +++ b/src/server/game/Tickets/TicketMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp index e5865cc4f90..b734d90b040 100644 --- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp +++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.h b/src/server/game/Tools/CharacterDatabaseCleaner.h index 1ec52497ce0..d6f541dcfbb 100644 --- a/src/server/game/Tools/CharacterDatabaseCleaner.h +++ b/src/server/game/Tools/CharacterDatabaseCleaner.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp index 0c3fd957165..b076447dd90 100644 --- a/src/server/game/Tools/PlayerDump.cpp +++ b/src/server/game/Tools/PlayerDump.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Tools/PlayerDump.h b/src/server/game/Tools/PlayerDump.h index a6e379a934e..b5655328507 100755 --- a/src/server/game/Tools/PlayerDump.h +++ b/src/server/game/Tools/PlayerDump.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp index 590e6912cc5..2a48ede4c81 100755 --- a/src/server/game/Weather/Weather.cpp +++ b/src/server/game/Weather/Weather.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Weather/Weather.h b/src/server/game/Weather/Weather.h index 4b2d927f690..0c17cfd1efe 100755 --- a/src/server/game/Weather/Weather.h +++ b/src/server/game/Weather/Weather.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp index 938ff46a953..731aba8d197 100755 --- a/src/server/game/Weather/WeatherMgr.cpp +++ b/src/server/game/Weather/WeatherMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Weather/WeatherMgr.h b/src/server/game/Weather/WeatherMgr.h index 4cc64f73533..768cd2dca17 100755 --- a/src/server/game/Weather/WeatherMgr.h +++ b/src/server/game/Weather/WeatherMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index ea3f86c81b3..426a93fda57 100755 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -1246,8 +1246,10 @@ void World::SetInitialWorldSettings() server_type = REALM_TYPE_PVP; else server_type = getIntConfig(CONFIG_GAME_TYPE); + uint32 realm_zone = getIntConfig(CONFIG_REALM_ZONE); - LoginDatabase.PExecute("UPDATE realmlist SET icon = %u, timezone = %u WHERE id = '%d'", server_type, realm_zone, realmID); + + LoginDatabase.PExecute("UPDATE realmlist SET icon = %u, timezone = %u WHERE id = '%d'", server_type, realm_zone, realmID); // One-time query ///- Remove the bones (they should not exist in DB though) and old corpses after a restart PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_OLD_CORPSES); @@ -1650,7 +1652,7 @@ void World::SetInitialWorldSettings() local.tm_year+1900, local.tm_mon+1, local.tm_mday, local.tm_hour, local.tm_min, local.tm_sec); LoginDatabase.PExecute("INSERT INTO uptime (realmid, starttime, startstring, uptime, revision) VALUES('%u', " UI64FMTD ", '%s', 0, '%s')", - realmID, uint64(m_startTime), isoDate, _FULLVERSION); + realmID, uint64(m_startTime), isoDate, _FULLVERSION); // One-time query m_timers[WUPDATE_WEATHERS].SetInterval(1*IN_MILLISECONDS); m_timers[WUPDATE_AUCTIONS].SetInterval(MINUTE*IN_MILLISECONDS); @@ -1928,7 +1930,15 @@ void World::Update(uint32 diff) uint32 maxOnlinePlayers = GetMaxPlayerCount(); m_timers[WUPDATE_UPTIME].Reset(); - LoginDatabase.PExecute("UPDATE uptime SET uptime = %u, maxplayers = %u WHERE realmid = %u AND starttime = " UI64FMTD, tmpDiff, maxOnlinePlayers, realmID, uint64(m_startTime)); + + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_UPTIME_PLAYERS); + + stmt->setUInt64(0, uint64(tmpDiff)); + stmt->setUInt16(1, uint16(maxOnlinePlayers)); + stmt->setUInt32(2, realmID); + stmt->setUInt64(3, uint64(m_startTime)); + + LoginDatabase.Execute(stmt); } /// <li> Clean logs table @@ -1937,14 +1947,21 @@ void World::Update(uint32 diff) if (m_timers[WUPDATE_CLEANDB].Passed()) { m_timers[WUPDATE_CLEANDB].Reset(); - LoginDatabase.PExecute("DELETE FROM logs WHERE (time + %u) < "UI64FMTD";", - sWorld->getIntConfig(CONFIG_LOGDB_CLEARTIME), uint64(time(0))); + + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_OLD_LOGS); + + stmt->setUInt32(0, sWorld->getIntConfig(CONFIG_LOGDB_CLEARTIME)); + stmt->setUInt32(1, uint32(time(0))); + + LoginDatabase.Execute(stmt); } } /// <li> Handle all other objects ///- Update objects when the timer has passed (maps, transport, creatures, ...) + RecordTimeDiff(NULL); sMapMgr->Update(diff); + RecordTimeDiff("UpdateMapMgr"); if (sWorld->getBoolConfig(CONFIG_AUTOBROADCAST)) { @@ -2226,10 +2243,10 @@ BanReturn World::BanAccount(BanMode mode, std::string nameOrIP, std::string dura { case BAN_IP: // No SQL injection with prepared statements - stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_ACCOUNT_BY_IP); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_BY_IP); stmt->setString(0, nameOrIP); resultAccounts = LoginDatabase.Query(stmt); - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SET_IP_BANNED); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_IP_BANNED); stmt->setString(0, nameOrIP); stmt->setUInt32(1, duration_secs); stmt->setString(2, author); @@ -2238,13 +2255,13 @@ BanReturn World::BanAccount(BanMode mode, std::string nameOrIP, std::string dura break; case BAN_ACCOUNT: // No SQL injection with prepared statements - stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_ACCIDBYNAME); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_ID_BY_NAME); stmt->setString(0, nameOrIP); resultAccounts = LoginDatabase.Query(stmt); break; case BAN_CHARACTER: // No SQL injection with prepared statements - stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_ACCOUNT_BY_NAME); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ACCOUNT_BY_NAME); stmt->setString(0, nameOrIP); resultAccounts = CharacterDatabase.Query(stmt); break; @@ -2270,11 +2287,11 @@ BanReturn World::BanAccount(BanMode mode, std::string nameOrIP, std::string dura if (mode != BAN_IP) { // make sure there is only one active ban - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SET_ACCOUNT_NOT_BANNED); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_ACCOUNT_NOT_BANNED); stmt->setUInt32(0, account); trans->Append(stmt); // No SQL injection with prepared statements - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SET_ACCOUNT_BANNED); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ACCOUNT_BANNED); stmt->setUInt32(0, account); stmt->setUInt32(1, duration_secs); stmt->setString(2, author); @@ -2298,7 +2315,7 @@ bool World::RemoveBanAccount(BanMode mode, std::string nameOrIP) PreparedStatement* stmt = NULL; if (mode == BAN_IP) { - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SET_IP_NOT_BANNED); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_IP_NOT_BANNED); stmt->setString(0, nameOrIP); LoginDatabase.Execute(stmt); } @@ -2314,7 +2331,7 @@ bool World::RemoveBanAccount(BanMode mode, std::string nameOrIP) return false; //NO SQL injection as account is uint32 - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SET_ACCOUNT_NOT_BANNED); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_ACCOUNT_NOT_BANNED); stmt->setUInt32(0, account); LoginDatabase.Execute(stmt); } @@ -2332,7 +2349,7 @@ BanReturn World::BanCharacter(std::string name, std::string duration, std::strin /// Pick a player to ban if not online if (!pBanned) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_GUID_BY_NAME); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUID_BY_NAME); stmt->setString(0, name); PreparedQueryResult resultCharacter = CharacterDatabase.Query(stmt); @@ -2345,11 +2362,11 @@ BanReturn World::BanCharacter(std::string name, std::string duration, std::strin guid = pBanned->GetGUIDLow(); // make sure there is only one active ban - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_NOT_BANNED); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHARACTER_BAN); stmt->setUInt32(0, guid); CharacterDatabase.Execute(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_BAN); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHARACTER_BAN); stmt->setUInt32(0, guid); stmt->setUInt32(1, duration_secs); stmt->setString(2, author); @@ -2371,7 +2388,7 @@ bool World::RemoveBanCharacter(std::string name) /// Pick a player to ban if not online if (!pBanned) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_GUID_BY_NAME); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUID_BY_NAME); stmt->setString(0, name); PreparedQueryResult resultCharacter = CharacterDatabase.Query(stmt); @@ -2386,7 +2403,7 @@ bool World::RemoveBanCharacter(std::string name) if (!guid) return false; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_NOT_BANNED); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHARACTER_BAN); stmt->setUInt32(0, guid); CharacterDatabase.Execute(stmt); return true; @@ -2589,7 +2606,7 @@ void World::SendAutoBroadcast() void World::UpdateRealmCharCount(uint32 accountId) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_CHARACTER_COUNT); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_COUNT); stmt->setUInt32(0, accountId); PreparedQueryResultFuture result = CharacterDatabase.AsyncQuery(stmt); m_realmCharCallbacks.insert(result); @@ -2603,12 +2620,12 @@ void World::_UpdateRealmCharCount(PreparedQueryResult resultCharCount) uint32 accountId = fields[0].GetUInt32(); uint32 charCount = fields[1].GetUInt32(); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_REALMCHARACTERS); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_REALM_CHARACTERS); stmt->setUInt32(0, accountId); stmt->setUInt32(1, realmID); LoginDatabase.Execute(stmt); - stmt = LoginDatabase.GetPreparedStatement(LOGIN_ADD_REALMCHARACTERS); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_REALM_CHARACTERS); stmt->setUInt32(0, charCount); stmt->setUInt32(1, accountId); stmt->setUInt32(2, realmID); @@ -2731,6 +2748,17 @@ void World::ResetWeeklyQuests() sPoolMgr->ChangeWeeklyQuests(); } +void World::ResetEventSeasonalQuests(uint16 event_id) +{ + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_STATUS_SEASONAL); + stmt->setUInt16(0,event_id); + CharacterDatabase.Execute(stmt); + + for (SessionMap::const_iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr) + if (itr->second->GetPlayer()) + itr->second->GetPlayer()->ResetSeasonalQuestStatus(event_id); +} + void World::ResetRandomBG() { sLog->outDetail("Random BG status reset for all characters."); @@ -2821,9 +2849,23 @@ void World::setWorldState(uint32 index, uint64 value) { WorldStatesMap::const_iterator it = m_worldstates.find(index); if (it != m_worldstates.end()) - CharacterDatabase.PExecute("UPDATE worldstates SET value="UI64FMTD" where entry=%u", value, index); + { + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_WORLDSTATE); + + stmt->setUInt32(0, uint32(value)); + stmt->setUInt32(1, index); + + CharacterDatabase.Execute(stmt); + } else - CharacterDatabase.PExecute("INSERT INTO worldstates (entry, value) VALUES (%u, "UI64FMTD")", index, value); + { + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_WORLDSTATE); + + stmt->setUInt32(0, index); + stmt->setUInt32(1, uint32(value)); + + CharacterDatabase.Execute(stmt); + } m_worldstates[index] = value; } diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index 9354c14f51c..bedd8a87b20 100755 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -746,6 +746,7 @@ class World uint32 GetCleaningFlags() const { return m_CleaningFlags; } void SetCleaningFlags(uint32 flags) { m_CleaningFlags = flags; } + void ResetEventSeasonalQuests(uint16 event_id); protected: void _UpdateGameTime(); // callback for UpdateRealmCharacters diff --git a/src/server/scripts/CMakeLists.txt b/src/server/scripts/CMakeLists.txt index de660b8f106..56e63af5bbf 100644 --- a/src/server/scripts/CMakeLists.txt +++ b/src/server/scripts/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -61,12 +61,10 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/server/shared/Database ${CMAKE_SOURCE_DIR}/src/server/shared/DataStores ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging - ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/CountedReference ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/LinkedReference ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic ${CMAKE_SOURCE_DIR}/src/server/shared/Logging ${CMAKE_SOURCE_DIR}/src/server/shared/Packets - ${CMAKE_SOURCE_DIR}/src/server/shared/Policies ${CMAKE_SOURCE_DIR}/src/server/shared/Threading ${CMAKE_SOURCE_DIR}/src/server/shared/Utilities ${CMAKE_SOURCE_DIR}/src/server/collision @@ -112,6 +110,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/server/game/Grids/Notifiers ${CMAKE_SOURCE_DIR}/src/server/game/Groups ${CMAKE_SOURCE_DIR}/src/server/game/Guilds + ${CMAKE_SOURCE_DIR}/src/server/game/Handlers ${CMAKE_SOURCE_DIR}/src/server/game/Instances ${CMAKE_SOURCE_DIR}/src/server/game/LookingForGroup ${CMAKE_SOURCE_DIR}/src/server/game/Loot @@ -130,7 +129,6 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/server/game/Scripting ${CMAKE_SOURCE_DIR}/src/server/game/Server ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol - ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol/Handlers ${CMAKE_SOURCE_DIR}/src/server/game/Skills ${CMAKE_SOURCE_DIR}/src/server/game/Spells ${CMAKE_SOURCE_DIR}/src/server/game/Spells/Auras diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index bcef7ac9ba9..7372c92c4dd 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -81,7 +81,7 @@ public: return false; } - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPDATE_EXPANSION); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_EXPANSION); stmt->setUInt8(0, uint8(expansion)); stmt->setUInt32(1, accountId); @@ -109,6 +109,8 @@ public: { case AOR_OK: handler->PSendSysMessage(LANG_ACCOUNT_CREATED, accountName); + if (handler->GetSession()) + sLog->outChar("Account: %d (IP: %s) Character:[%s] (GUID: %u) Change Password.", handler->GetSession()->GetAccountId(),handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUIDLow()); break; case AOR_NAME_TOO_LONG: handler->SendSysMessage(LANG_ACCOUNT_TOO_LONG); @@ -250,7 +252,7 @@ public: if (!param.empty()) { - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPDATE_ACCOUNT_LOCK); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_ACCOUNT_LOCK); if (param == "on") { @@ -388,8 +390,13 @@ public: if (expansion < 0 || uint8(expansion) > sWorld->getIntConfig(CONFIG_EXPANSION)) return false; - // No SQL injection - LoginDatabase.PExecute("UPDATE account SET expansion = '%d' WHERE id = '%u'", expansion, accountId); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_EXPANSION); + + stmt->setUInt8(0, expansion); + stmt->setUInt32(1, accountId); + + LoginDatabase.Execute(stmt); + handler->PSendSysMessage(LANG_ACCOUNT_SETADDON, accountName.c_str(), accountId, expansion); return true; } @@ -480,13 +487,34 @@ public: } // If gmRealmID is -1, delete all values for the account id, else, insert values for the specific realmID + PreparedStatement* stmt; + if (gmRealmID == -1) - LoginDatabase.PExecute("DELETE FROM account_access WHERE id = '%u'", targetAccountId); + { + stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_ACCOUNT_ACCESS); + + stmt->setUInt32(0, targetAccountId); + } else - LoginDatabase.PExecute("DELETE FROM account_access WHERE id = '%u' AND (RealmID = '%d' OR RealmID = '-1')", targetAccountId, realmID); + { + stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_ACCOUNT_ACCESS_BY_REALM); + + stmt->setUInt32(0, targetAccountId); + stmt->setUInt32(1, realmID); + } + LoginDatabase.Execute(stmt); if (gm != 0) - LoginDatabase.PExecute("INSERT INTO account_access VALUES ('%u', '%d', '%d')", targetAccountId, gm, gmRealmID); + { + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ACCOUNT_ACCESS); + + stmt->setUInt32(0, targetAccountId); + stmt->setUInt8(1, uint8(gm)); + stmt->setInt32(2, gmRealmID); + + LoginDatabase.Execute(stmt); + } + handler->PSendSysMessage(LANG_YOU_CHANGE_SECURITY, targetAccountName.c_str(), gm); return true; diff --git a/src/server/scripts/Commands/cs_achievement.cpp b/src/server/scripts/Commands/cs_achievement.cpp index 61ce13f0ecb..f136cba46ab 100644 --- a/src/server/scripts/Commands/cs_achievement.cpp +++ b/src/server/scripts/Commands/cs_achievement.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 9e1d5717f1f..311c6586a0f 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Commands/cs_event.cpp b/src/server/scripts/Commands/cs_event.cpp index 3bd745df4f4..4f6acd7b629 100644 --- a/src/server/scripts/Commands/cs_event.cpp +++ b/src/server/scripts/Commands/cs_event.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp index ab077af0863..9b9d1cfd146 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -26,6 +26,7 @@ EndScriptData */ #include "ObjectMgr.h" #include "Chat.h" #include "AccountMgr.h" +#include "World.h" class gm_commandscript : public CommandScript { @@ -155,7 +156,7 @@ public: static bool HandleGMListFullCommand(ChatHandler* handler, char const* /*args*/) { ///- Get the accounts with GM Level >0 - QueryResult result = LoginDatabase.PQuery("SELECT a.username, aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel >= %u", SEC_MODERATOR); + QueryResult result = LoginDatabase.PQuery("SELECT a.username, aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel >= %u AND (aa.realmid = -1 OR aa.realmid = %u)", SEC_MODERATOR, realmID); if (result) { handler->SendSysMessage(LANG_GMLIST); diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index 5ed2d6a3dd8..3de0d89bac5 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index eb1ccc543f3..74b8272201b 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -97,7 +97,7 @@ public: // Activate object->SetLootState(GO_READY); - object->UseDoorOrButton(10000); + object->UseDoorOrButton(10000, false, handler->GetSession()->GetPlayer()); handler->PSendSysMessage("Object activated!"); diff --git a/src/server/scripts/Commands/cs_gps.cpp b/src/server/scripts/Commands/cs_gps.cpp index bafaae465ef..8f15f8c9ce3 100644 --- a/src/server/scripts/Commands/cs_gps.cpp +++ b/src/server/scripts/Commands/cs_gps.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Commands/cs_honor.cpp b/src/server/scripts/Commands/cs_honor.cpp index f6c6d89c0b7..4edc5f6fea0 100644 --- a/src/server/scripts/Commands/cs_honor.cpp +++ b/src/server/scripts/Commands/cs_honor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index d03291d6d5d..fcabaaa7e5b 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 7c08fe4d297..5f0434e5c55 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1,5 +1,5 @@ /*
- * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2012 TrinityCore <http://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
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index c32abb9537b..358eaacd4f7 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index a5aa2a516f3..57932ef56c6 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -130,7 +130,7 @@ public: { uint32 tguid = chr->GetTransport()->AddNPCPassenger(0, id, chr->GetTransOffsetX(), chr->GetTransOffsetY(), chr->GetTransOffsetZ(), chr->GetTransOffsetO()); if (tguid > 0) - WorldDatabase.PQuery("INSERT INTO creature_transport (guid, npc_entry, transport_entry, TransOffsetX, TransOffsetY, TransOffsetZ, TransOffsetO) values (%u, %u, %f, %f, %f, %f, %u)", tguid, id, chr->GetTransport()->GetEntry(), chr->GetTransOffsetX(), chr->GetTransOffsetY(), chr->GetTransOffsetZ(), chr->GetTransOffsetO()); + WorldDatabase.PExecute("INSERT INTO creature_transport (guid, npc_entry, transport_entry, TransOffsetX, TransOffsetY, TransOffsetZ, TransOffsetO) values (%u, %u, %f, %f, %f, %f, %u)", tguid, id, chr->GetTransport()->GetEntry(), chr->GetTransOffsetX(), chr->GetTransOffsetY(), chr->GetTransOffsetZ(), chr->GetTransOffsetO()); return true; } @@ -219,10 +219,10 @@ public: if (!*args) return false; - char* guid_str = strtok((char*)args, " "); - char* wait_str = strtok((char*)NULL, " "); + char* guidStr = strtok((char*)args, " "); + char* waitStr = strtok((char*)NULL, " "); - uint32 lowguid = atoi((char*)guid_str); + uint32 lowGuid = atoi((char*)guidStr); Creature* creature = NULL; @@ -234,10 +234,10 @@ public: // attempt check creature existence by DB data if (!creature) { - CreatureData const* data = sObjectMgr->GetCreatureData(lowguid); + CreatureData const* data = sObjectMgr->GetCreatureData(lowGuid); if (!data) { - handler->PSendSysMessage(LANG_COMMAND_CREATGUIDNOTFOUND, lowguid); + handler->PSendSysMessage(LANG_COMMAND_CREATGUIDNOTFOUND, lowGuid); handler->SetSentErrorMessage(true); return false; } @@ -245,20 +245,22 @@ public: else { // obtain real GUID for DB operations - lowguid = creature->GetDBTableGUIDLow(); + lowGuid = creature->GetDBTableGUIDLow(); } - int wait = wait_str ? atoi(wait_str) : 0; + int wait = waitStr ? atoi(waitStr) : 0; if (wait < 0) wait = 0; - //Player* player = handler->GetSession()->GetPlayer(); + // Update movement type + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_MOVEMENT_TYPE); - //WaypointMgr.AddLastNode(lowguid, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), wait, 0); + stmt->setUInt8(0, uint8(WAYPOINT_MOTION_TYPE)); + stmt->setUInt32(1, lowGuid); + + WorldDatabase.Execute(stmt); - // update movement type - WorldDatabase.PExecute("UPDATE creature SET MovementType = '%u' WHERE guid = '%u'", WAYPOINT_MOTION_TYPE, lowguid); if (creature && creature->GetWaypointPath()) { creature->SetDefaultMovementType(WAYPOINT_MOTION_TYPE); @@ -457,17 +459,23 @@ public: creature->setFaction(factionId); - // faction is set in creature_template - not inside creature + // Faction is set in creature_template - not inside creature - // update in memory + // Update in memory.. if (CreatureTemplate const* cinfo = creature->GetCreatureInfo()) { const_cast<CreatureTemplate*>(cinfo)->faction_A = factionId; const_cast<CreatureTemplate*>(cinfo)->faction_H = factionId; } - // and DB - WorldDatabase.PExecute("UPDATE creature_template SET faction_A = '%u', faction_H = '%u' WHERE entry = '%u'", factionId, factionId, creature->GetEntry()); + // ..and DB + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_FACTION); + + stmt->setUInt16(0, uint16(factionId)); + stmt->setUInt16(1, uint16(factionId)); + stmt->setUInt32(2, creature->GetEntry()); + + WorldDatabase.Execute(stmt); return true; } @@ -491,7 +499,12 @@ public: creature->SetUInt32Value(UNIT_NPC_FLAGS, npcFlags); - WorldDatabase.PExecute("UPDATE creature_template SET npcflag = '%u' WHERE entry = '%u'", npcFlags, creature->GetEntry()); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_NPCFLAG); + + stmt->setUInt32(0, npcFlags); + stmt->setUInt32(1, creature->GetEntry()); + + WorldDatabase.Execute(stmt); handler->SendSysMessage(LANG_VALUE_SAVED_REJOIN); @@ -637,7 +650,16 @@ public: } } - WorldDatabase.PExecute("UPDATE creature SET position_x = '%f', position_y = '%f', position_z = '%f', orientation = '%f' WHERE guid = '%u'", x, y, z, o, lowguid); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_POSITION); + + stmt->setFloat(0, x); + stmt->setFloat(1, y); + stmt->setFloat(2, z); + stmt->setFloat(3, o); + stmt->setUInt32(4, lowguid); + + WorldDatabase.Execute(stmt); + handler->PSendSysMessage(LANG_COMMAND_CREATUREMOVED); return true; } @@ -657,7 +679,7 @@ public: if (target->GetTransport()) if (target->GetGUIDTransport()) - WorldDatabase.PQuery("UPDATE creature_transport SET emote=%u WHERE transport_entry=%u AND guid=%u", emote, target->GetTransport()->GetEntry(), target->GetGUIDTransport()); + WorldDatabase.PExecute("UPDATE creature_transport SET emote=%u WHERE transport_entry=%u AND guid=%u", emote, target->GetTransport()->GetEntry(), target->GetGUIDTransport()); target->SetUInt32Value(UNIT_NPC_EMOTESTATE, emote); @@ -884,10 +906,10 @@ public: mtype = RANDOM_MOTION_TYPE; Creature* creature = handler->getSelectedCreature(); - uint32 u_guidlow = 0; + uint32 guidLow = 0; if (creature) - u_guidlow = creature->GetDBTableGUIDLow(); + guidLow = creature->GetDBTableGUIDLow(); else return false; @@ -900,7 +922,14 @@ public: creature->Respawn(); } - WorldDatabase.PExecute("UPDATE creature SET spawndist=%f, MovementType=%i WHERE guid=%u", option, mtype, u_guidlow); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_SPAWN_DISTANCE); + + stmt->setFloat(0, option); + stmt->setUInt8(1, uint8(mtype)); + stmt->setUInt32(2, guidLow); + + WorldDatabase.Execute(stmt); + handler->PSendSysMessage(LANG_COMMAND_SPAWNDIST, option); return true; } @@ -916,9 +945,9 @@ public: if (!stime) return false; - int i_stime = atoi((char*)stime); + int spawnTime = atoi((char*)stime); - if (i_stime < 0) + if (spawnTime < 0) { handler->SendSysMessage(LANG_BAD_VALUE); handler->SetSentErrorMessage(true); @@ -926,16 +955,22 @@ public: } Creature* creature = handler->getSelectedCreature(); - uint32 u_guidlow = 0; + uint32 guidLow = 0; if (creature) - u_guidlow = creature->GetDBTableGUIDLow(); + guidLow = creature->GetDBTableGUIDLow(); else return false; - WorldDatabase.PExecute("UPDATE creature SET spawntimesecs=%i WHERE guid=%u", i_stime, u_guidlow); - creature->SetRespawnDelay((uint32)i_stime); - handler->PSendSysMessage(LANG_COMMAND_SPAWNTIME, i_stime); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_SPAWN_TIME_SECS); + + stmt->setUInt32(0, uint32(spawnTime)); + stmt->setUInt32(1, guidLow); + + WorldDatabase.Execute(stmt); + + creature->SetRespawnDelay((uint32)spawnTime); + handler->PSendSysMessage(LANG_COMMAND_SPAWNTIME, spawnTime); return true; } @@ -1001,15 +1036,14 @@ public: } if (/*creature->GetMotionMaster()->empty() ||*/ - creature->GetMotionMaster()->GetCurrentMovementGeneratorType () != TARGETED_MOTION_TYPE) + creature->GetMotionMaster()->GetCurrentMovementGeneratorType () != FOLLOW_MOTION_TYPE) { handler->PSendSysMessage(LANG_CREATURE_NOT_FOLLOW_YOU, creature->GetName()); handler->SetSentErrorMessage(true); return false; } - TargetedMovementGenerator<Creature> const* mgen - = static_cast<TargetedMovementGenerator<Creature> const*>((creature->GetMotionMaster()->top())); + FollowMovementGenerator<Creature> const* mgen = static_cast<FollowMovementGenerator<Creature> const*>((creature->GetMotionMaster()->top())); if (mgen->GetTarget() != player) { @@ -1198,8 +1232,15 @@ public: CreatureGroupMap[lowguid] = group_member; creature->SearchFormation(); - WorldDatabase.PExecute("INSERT INTO creature_formations (leaderGUID, memberGUID, dist, angle, groupAI) VALUES ('%u', '%u', '%f', '%f', '%u')", - leaderGUID, lowguid, group_member->follow_dist, group_member->follow_angle, group_member->groupAI); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_CREATURE_FORMATION); + + stmt->setUInt32(0, leaderGUID); + stmt->setUInt32(1, lowguid); + stmt->setFloat(2, group_member->follow_dist); + stmt->setFloat(3, group_member->follow_angle); + stmt->setUInt32(4, uint32(group_member->groupAI)); + + WorldDatabase.Execute(stmt); handler->PSendSysMessage("Creature %u added to formation with leader %u", lowguid, leaderGUID); diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index 3d437e473f7..2472a29e595 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 7784d495f80..17c819f2f22 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -36,6 +36,7 @@ EndScriptData */ #include "SkillDiscovery.h" #include "SkillExtraItems.h" #include "Chat.h" +#include "WaypointManager.h" class reload_commandscript : public CommandScript { @@ -144,13 +145,14 @@ public: { "spell_linked_spell", SEC_ADMINISTRATOR, true, &HandleReloadSpellLinkedSpellCommand, "", NULL }, { "spell_pet_auras", SEC_ADMINISTRATOR, true, &HandleReloadSpellPetAurasCommand, "", NULL }, { "spell_proc_event", SEC_ADMINISTRATOR, true, &HandleReloadSpellProcEventCommand, "", NULL }, - { "spell_proc", SEC_ADMINISTRATOR, true, &HandleReloadSpellProcsCommand, "", NULL }, + { "spell_proc", SEC_ADMINISTRATOR, true, &HandleReloadSpellProcsCommand, "", NULL }, { "spell_scripts", SEC_ADMINISTRATOR, true, &HandleReloadSpellScriptsCommand, "", NULL }, { "spell_target_position", SEC_ADMINISTRATOR, true, &HandleReloadSpellTargetPositionCommand, "", NULL }, { "spell_threats", SEC_ADMINISTRATOR, true, &HandleReloadSpellThreatsCommand, "", NULL }, { "spell_group_stack_rules", SEC_ADMINISTRATOR, true, &HandleReloadSpellGroupStackRulesCommand, "", NULL }, { "trinity_string", SEC_ADMINISTRATOR, true, &HandleReloadTrinityStringCommand, "", NULL }, { "waypoint_scripts", SEC_ADMINISTRATOR, true, &HandleReloadWpScriptsCommand, "", NULL }, + { "waypoint_data", SEC_ADMINISTRATOR, true, &HandleReloadWpCommand, "", NULL }, { "vehicle_accessory", SEC_ADMINISTRATOR, true, &HandleReloadVehicleAccessoryCommand, "", NULL }, { "vehicle_template_accessory", SEC_ADMINISTRATOR, true, &HandleReloadVehicleTemplateAccessoryCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } @@ -264,6 +266,7 @@ public: handler->SendGlobalGMSysMessage("DB tables `*_scripts` reloaded."); HandleReloadDbScriptStringCommand(handler, "a"); HandleReloadWpScriptsCommand(handler, "a"); + HandleReloadWpCommand(handler, "a"); return true; } @@ -401,113 +404,116 @@ public: if (!*args) return false; - uint32 entry = (uint32) atoi((char*)args); - QueryResult result = WorldDatabase.PQuery("SELECT difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, faction_A, faction_H, npcflag, speed_walk, speed_run, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, Health_mod, Mana_mod, Armor_mod, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, equipment_id, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = %u", entry); - if (!result) - { - handler->PSendSysMessage(LANG_COMMAND_CREATURETEMPLATE_NOTFOUND, entry); - handler->SetSentErrorMessage(true); - return false; - } - - CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(entry); - if (!cInfo) - { - handler->PSendSysMessage(LANG_COMMAND_CREATURESTORAGE_NOTFOUND, entry); - handler->SetSentErrorMessage(true); - return false; - } + Tokens entries(std::string(args), ' '); - sLog->outString("Reloading creature template entry %u", entry); - - Field* fields = result->Fetch(); - - const_cast<CreatureTemplate*>(cInfo)->DifficultyEntry[0] = fields[0].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->DifficultyEntry[1] = fields[1].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->DifficultyEntry[2] = fields[2].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->KillCredit[0] = fields[3].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->KillCredit[1] = fields[4].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->Modelid1 = fields[5].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->Modelid2 = fields[6].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->Modelid3 = fields[7].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->Modelid4 = fields[8].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->Name = fields[9].GetString(); - const_cast<CreatureTemplate*>(cInfo)->SubName = fields[10].GetString(); - const_cast<CreatureTemplate*>(cInfo)->IconName = fields[11].GetString(); - const_cast<CreatureTemplate*>(cInfo)->GossipMenuId = fields[12].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->minlevel = fields[13].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->maxlevel = fields[14].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->expansion = fields[15].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->faction_A = fields[16].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->faction_H = fields[17].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->npcflag = fields[18].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->speed_walk = fields[19].GetFloat(); - const_cast<CreatureTemplate*>(cInfo)->speed_run = fields[20].GetFloat(); - const_cast<CreatureTemplate*>(cInfo)->scale = fields[21].GetFloat(); - const_cast<CreatureTemplate*>(cInfo)->rank = fields[22].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->mindmg = fields[23].GetFloat(); - const_cast<CreatureTemplate*>(cInfo)->maxdmg = fields[24].GetFloat(); - const_cast<CreatureTemplate*>(cInfo)->dmgschool = fields[25].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->attackpower = fields[26].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->dmg_multiplier = fields[27].GetFloat(); - const_cast<CreatureTemplate*>(cInfo)->baseattacktime = fields[28].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->rangeattacktime = fields[29].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->unit_class = fields[30].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->unit_flags = fields[31].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->dynamicflags = fields[32].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->family = fields[33].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->trainer_type = fields[34].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->trainer_spell = fields[35].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->trainer_class = fields[36].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->trainer_race = fields[37].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->minrangedmg = fields[38].GetFloat(); - const_cast<CreatureTemplate*>(cInfo)->maxrangedmg = fields[39].GetFloat(); - const_cast<CreatureTemplate*>(cInfo)->rangedattackpower = fields[40].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->type = fields[41].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->type_flags = fields[42].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->lootid = fields[43].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->pickpocketLootId = fields[44].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->SkinLootId = fields[45].GetUInt32(); - - for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i) + for (Tokens::const_iterator itr = entries.begin(); itr != entries.end(); ++itr) { - const_cast<CreatureTemplate*>(cInfo)->resistance[i] = fields[46 + i -1].GetUInt32(); + uint32 entry = uint32(atoi(*itr)); + QueryResult result = WorldDatabase.PQuery("SELECT difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, faction_A, faction_H, npcflag, speed_walk, speed_run, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, Health_mod, Mana_mod, Armor_mod, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, equipment_id, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = %u", entry); + if (!result) + { + handler->PSendSysMessage(LANG_COMMAND_CREATURETEMPLATE_NOTFOUND, entry); + continue; + } + + CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(entry); + if (!cInfo) + { + handler->PSendSysMessage(LANG_COMMAND_CREATURESTORAGE_NOTFOUND, entry); + continue; + } + + sLog->outString("Reloading creature template entry %u", entry); + + Field* fields = result->Fetch(); + + const_cast<CreatureTemplate*>(cInfo)->DifficultyEntry[0] = fields[0].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->DifficultyEntry[1] = fields[1].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->DifficultyEntry[2] = fields[2].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->KillCredit[0] = fields[3].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->KillCredit[1] = fields[4].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->Modelid1 = fields[5].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->Modelid2 = fields[6].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->Modelid3 = fields[7].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->Modelid4 = fields[8].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->Name = fields[9].GetString(); + const_cast<CreatureTemplate*>(cInfo)->SubName = fields[10].GetString(); + const_cast<CreatureTemplate*>(cInfo)->IconName = fields[11].GetString(); + const_cast<CreatureTemplate*>(cInfo)->GossipMenuId = fields[12].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->minlevel = fields[13].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->maxlevel = fields[14].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->expansion = fields[15].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->faction_A = fields[16].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->faction_H = fields[17].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->npcflag = fields[18].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->speed_walk = fields[19].GetFloat(); + const_cast<CreatureTemplate*>(cInfo)->speed_run = fields[20].GetFloat(); + const_cast<CreatureTemplate*>(cInfo)->scale = fields[21].GetFloat(); + const_cast<CreatureTemplate*>(cInfo)->rank = fields[22].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->mindmg = fields[23].GetFloat(); + const_cast<CreatureTemplate*>(cInfo)->maxdmg = fields[24].GetFloat(); + const_cast<CreatureTemplate*>(cInfo)->dmgschool = fields[25].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->attackpower = fields[26].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->dmg_multiplier = fields[27].GetFloat(); + const_cast<CreatureTemplate*>(cInfo)->baseattacktime = fields[28].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->rangeattacktime = fields[29].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->unit_class = fields[30].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->unit_flags = fields[31].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->dynamicflags = fields[32].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->family = fields[33].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->trainer_type = fields[34].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->trainer_spell = fields[35].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->trainer_class = fields[36].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->trainer_race = fields[37].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->minrangedmg = fields[38].GetFloat(); + const_cast<CreatureTemplate*>(cInfo)->maxrangedmg = fields[39].GetFloat(); + const_cast<CreatureTemplate*>(cInfo)->rangedattackpower = fields[40].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->type = fields[41].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->type_flags = fields[42].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->lootid = fields[43].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->pickpocketLootId = fields[44].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->SkinLootId = fields[45].GetUInt32(); + + for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i) + { + const_cast<CreatureTemplate*>(cInfo)->resistance[i] = fields[46 + i -1].GetUInt32(); + } + + const_cast<CreatureTemplate*>(cInfo)->spells[0] = fields[52].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->spells[1] = fields[53].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->spells[2] = fields[54].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->spells[3] = fields[55].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->spells[4] = fields[56].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->spells[5] = fields[57].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->spells[6] = fields[58].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->spells[7] = fields[59].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->PetSpellDataId = fields[60].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->VehicleId = fields[61].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->mingold = fields[62].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->maxgold = fields[63].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->AIName = fields[64].GetString(); + const_cast<CreatureTemplate*>(cInfo)->MovementType = fields[65].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->InhabitType = fields[66].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->ModHealth = fields[67].GetFloat(); + const_cast<CreatureTemplate*>(cInfo)->ModMana = fields[68].GetFloat(); + const_cast<CreatureTemplate*>(cInfo)->ModArmor = fields[69].GetFloat(); + const_cast<CreatureTemplate*>(cInfo)->RacialLeader = fields[70].GetBool(); + const_cast<CreatureTemplate*>(cInfo)->questItems[0] = fields[71].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->questItems[1] = fields[72].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->questItems[2] = fields[73].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->questItems[3] = fields[74].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->questItems[4] = fields[75].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->questItems[5] = fields[76].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->movementId = fields[77].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->RegenHealth = fields[78].GetBool(); + const_cast<CreatureTemplate*>(cInfo)->equipmentId = fields[79].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->MechanicImmuneMask = fields[80].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->flags_extra = fields[81].GetUInt32(); + const_cast<CreatureTemplate*>(cInfo)->ScriptID = sObjectMgr->GetScriptId(fields[82].GetCString()); + + sObjectMgr->CheckCreatureTemplate(cInfo); } - const_cast<CreatureTemplate*>(cInfo)->spells[0] = fields[52].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->spells[1] = fields[53].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->spells[2] = fields[54].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->spells[3] = fields[55].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->spells[4] = fields[56].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->spells[5] = fields[57].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->spells[6] = fields[58].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->spells[7] = fields[59].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->PetSpellDataId = fields[60].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->VehicleId = fields[61].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->mingold = fields[62].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->maxgold = fields[63].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->AIName = fields[64].GetString(); - const_cast<CreatureTemplate*>(cInfo)->MovementType = fields[65].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->InhabitType = fields[66].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->ModHealth = fields[67].GetFloat(); - const_cast<CreatureTemplate*>(cInfo)->ModMana = fields[68].GetFloat(); - const_cast<CreatureTemplate*>(cInfo)->ModArmor = fields[69].GetFloat(); - const_cast<CreatureTemplate*>(cInfo)->RacialLeader = fields[70].GetBool(); - const_cast<CreatureTemplate*>(cInfo)->questItems[0] = fields[71].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->questItems[1] = fields[72].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->questItems[2] = fields[73].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->questItems[3] = fields[74].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->questItems[4] = fields[75].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->questItems[5] = fields[76].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->movementId = fields[77].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->RegenHealth = fields[78].GetBool(); - const_cast<CreatureTemplate*>(cInfo)->equipmentId = fields[79].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->MechanicImmuneMask = fields[80].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->flags_extra = fields[81].GetUInt32(); - const_cast<CreatureTemplate*>(cInfo)->ScriptID = sObjectMgr->GetScriptId(fields[82].GetCString()); - - sObjectMgr->CheckCreatureTemplate(cInfo); - handler->SendGlobalGMSysMessage("Creature template reloaded."); return true; } @@ -986,6 +992,19 @@ public: return true; } + static bool HandleReloadWpCommand(ChatHandler* handler, const char* args) + { + if (*args != 'a') + sLog->outString("Re-Loading Waypoints data from 'waypoints_data'"); + + sWaypointMgr->Load(); + + if (*args != 'a') + handler->SendGlobalGMSysMessage("DB Table 'waypoint_data' reloaded."); + + return true; + } + static bool HandleReloadEventAITextsCommand(ChatHandler* handler, const char* /*args*/) { diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp index ef4ddf17476..5054bd83f32 100644 --- a/src/server/scripts/Commands/cs_tele.cpp +++ b/src/server/scripts/Commands/cs_tele.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp index 2fb22e0090d..f35f6baca98 100644 --- a/src/server/scripts/Commands/cs_titles.cpp +++ b/src/server/scripts/Commands/cs_titles.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp index d34ee801e50..8f5e862555c 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -117,8 +117,15 @@ public: Player* player = handler->GetSession()->GetPlayer(); //Map* map = player->GetMap(); - WorldDatabase.PExecute("INSERT INTO waypoint_data (id, point, position_x, position_y, position_z) VALUES ('%u', '%u', '%f', '%f', '%f')", - pathid, point+1, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_WAYPOINT_DATA); + + stmt->setUInt32(0, pathid); + stmt->setUInt32(1, point + 1); + stmt->setFloat(2, player->GetPositionX()); + stmt->setFloat(3, player->GetPositionY()); + stmt->setFloat(4, player->GetPositionZ()); + + WorldDatabase.Execute(stmt); handler->PSendSysMessage("%s%s%u%s%u%s|r", "|cff00ff00", "PathID: |r|cff00ffff", pathid, "|r|cff00ff00: Waypoint |r|cff00ffff", point+1, "|r|cff00ff00 created. "); return true; @@ -136,7 +143,7 @@ public: path_number = strtok((char*)args, " "); uint32 pathid = 0; - uint32 guidlow = 0; + uint32 guidLow = 0; Creature* target = handler->getSelectedCreature(); // Did player provide a path_id? @@ -165,15 +172,34 @@ public: return true; } - guidlow = target->GetDBTableGUIDLow(); - QueryResult result = WorldDatabase.PQuery("SELECT guid FROM creature_addon WHERE guid = '%u'", guidlow); + guidLow = target->GetDBTableGUIDLow(); + QueryResult result = WorldDatabase.PQuery("SELECT guid FROM creature_addon WHERE guid = '%u'", guidLow); + + PreparedStatement* stmt; if (result) - WorldDatabase.PExecute("UPDATE creature_addon SET path_id = '%u' WHERE guid = '%u'", pathid, guidlow); + { + stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_ADDON_PATH); + + stmt->setUInt32(0, pathid); + stmt->setUInt32(1, guidLow); + } else - WorldDatabase.PExecute("INSERT INTO creature_addon(guid, path_id) VALUES ('%u', '%u')", guidlow, pathid); + { + stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_CREATURE_ADDON); + + stmt->setUInt32(0, guidLow); + stmt->setUInt32(1, pathid); + } + + WorldDatabase.Execute(stmt); + + stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_MOVEMENT_TYPE); + + stmt->setUInt8(0, uint8(WAYPOINT_MOTION_TYPE)); + stmt->setUInt32(1, guidLow); - WorldDatabase.PExecute("UPDATE creature SET MovementType = '%u' WHERE guid = '%u'", WAYPOINT_MOTION_TYPE, guidlow); + WorldDatabase.Execute(stmt); target->LoadPath(pathid); target->SetDefaultMovementType(WAYPOINT_MOTION_TYPE); @@ -208,15 +234,27 @@ public: return true; } - uint32 guidlow = target->GetDBTableGUIDLow(); + uint32 guildLow = target->GetDBTableGUIDLow(); if (target->GetCreatureAddon()) { if (target->GetCreatureAddon()->path_id != 0) { - WorldDatabase.PExecute("DELETE FROM creature_addon WHERE guid = %u", guidlow); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_CREATURE_ADDON); + + stmt->setUInt32(0, guildLow); + + WorldDatabase.Execute(stmt); + target->UpdateWaypointID(0); - WorldDatabase.PExecute("UPDATE creature SET MovementType = '%u' WHERE guid = '%u'", IDLE_MOTION_TYPE, guidlow); + + stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_MOVEMENT_TYPE); + + stmt->setUInt8(0, uint8(IDLE_MOTION_TYPE)); + stmt->setUInt32(1, guildLow); + + WorldDatabase.Execute(stmt); + target->LoadPath(0); target->SetDefaultMovementType(IDLE_MOTION_TYPE); target->GetMotionMaster()->MoveTargetedHome(); @@ -254,7 +292,12 @@ public: if (!result) { - WorldDatabase.PExecute("INSERT INTO waypoint_scripts(guid)VALUES(%u)", id); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_WAYPOINT_SCRIPT); + + stmt->setUInt32(0, id); + + WorldDatabase.Execute(stmt); + handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: New waypoint event added: ", id); } else @@ -264,7 +307,13 @@ public: { QueryResult result = WorldDatabase.Query("SELECT MAX(guid) FROM waypoint_scripts"); id = result->Fetch()->GetUInt32(); - WorldDatabase.PExecute("INSERT INTO waypoint_scripts(guid)VALUES(%u)", id+1); + + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_WAYPOINT_SCRIPT); + + stmt->setUInt32(0, id + 1); + + WorldDatabase.Execute(stmt); + handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: New waypoint event added: |r|cff00ffff", id+1); } @@ -322,7 +371,12 @@ public: if (result) { - WorldDatabase.PExecute("DELETE FROM waypoint_scripts WHERE guid = %u", id); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_WAYPOINT_SCRIPT); + + stmt->setUInt32(0, id); + + WorldDatabase.Execute(stmt); + handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: Waypoint script removed: ", id); } else @@ -379,8 +433,15 @@ public: { uint32 newid = atoi(arg_3); handler->PSendSysMessage("%s%s|r|cff00ffff%u|r|cff00ff00%s|r|cff00ffff%u|r", "|cff00ff00", "Wp Event: Wypoint scipt guid: ", newid, " id changed: ", id); - WorldDatabase.PExecute("UPDATE waypoint_scripts SET id='%u' WHERE guid='%u'", - newid, id); return true; + + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_SCRIPT_ID); + + stmt->setUInt32(0, newid); + stmt->setUInt32(1, id); + + WorldDatabase.Execute(stmt); + + return true; } else { @@ -394,36 +455,56 @@ public: if (arg_str_2 == "posx") { - WorldDatabase.PExecute("UPDATE waypoint_scripts SET x='%f' WHERE guid='%u'", - (float)(atof(arg_3)), id); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_SCRIPT_X); + + stmt->setFloat(0, float(atof(arg_3))); + stmt->setUInt32(1, id); + + WorldDatabase.Execute(stmt); + handler->PSendSysMessage("|cff00ff00Waypoint script:|r|cff00ffff %u|r|cff00ff00 position_x updated.|r", id); return true; } else if (arg_str_2 == "posy") { - WorldDatabase.PExecute("UPDATE waypoint_scripts SET y='%f' WHERE guid='%u'", - (float)(atof(arg_3)), id); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_SCRIPT_Y); + + stmt->setFloat(0, float(atof(arg_3))); + stmt->setUInt32(1, id); + + WorldDatabase.Execute(stmt); + handler->PSendSysMessage("|cff00ff00Waypoint script: %u position_y updated.|r", id); return true; } else if (arg_str_2 == "posz") { - WorldDatabase.PExecute("UPDATE waypoint_scripts SET z='%f' WHERE guid='%u'", - (float)(atof(arg_3)), id); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_SCRIPT_Z); + + stmt->setFloat(0, float(atof(arg_3))); + stmt->setUInt32(1, id); + + WorldDatabase.Execute(stmt); + handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 position_z updated.|r", id); return true; } else if (arg_str_2 == "orientation") { - WorldDatabase.PExecute("UPDATE waypoint_scripts SET o='%f' WHERE guid='%u'", - (float)(atof(arg_3)), id); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_SCRIPT_O); + + stmt->setFloat(0, float(atof(arg_3))); + stmt->setUInt32(1, id); + + WorldDatabase.Execute(stmt); + handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 orientation updated.|r", id); return true; } else if (arg_str_2 == "dataint") { - WorldDatabase.PExecute("UPDATE waypoint_scripts SET %s='%u' WHERE guid='%u'", - arg_2, atoi(arg_3), id); + WorldDatabase.PExecute("UPDATE waypoint_scripts SET %s='%u' WHERE guid='%u'", arg_2, atoi(arg_3), id); // Query can't be a prepared statement + handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 dataint updated.|r", id); return true; } @@ -431,8 +512,7 @@ public: { std::string arg_str_3 = arg_3; WorldDatabase.EscapeString(arg_str_3); - WorldDatabase.PExecute("UPDATE waypoint_scripts SET %s='%s' WHERE guid='%u'", - arg_2, arg_str_3.c_str(), id); + WorldDatabase.PExecute("UPDATE waypoint_scripts SET %s='%s' WHERE guid='%u'", arg_2, arg_str_3.c_str(), id); // Query can't be a prepared statement } } handler->PSendSysMessage("%s%s|r|cff00ffff%u:|r|cff00ff00 %s %s|r", "|cff00ff00", "Waypoint script:", id, arg_2, "updated."); @@ -540,10 +620,19 @@ public: wpCreature->AddObjectToRemoveList(); } - WorldDatabase.PExecute("DELETE FROM waypoint_data WHERE id='%u' AND point='%u'", - pathid, point); - WorldDatabase.PExecute("UPDATE waypoint_data SET point=point-1 WHERE id='%u' AND point>'%u'", - pathid, point); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_WAYPOINT_DATA); + + stmt->setUInt32(0, pathid); + stmt->setUInt32(1, point); + + WorldDatabase.Execute(stmt); + + stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_DATA_POINT); + + stmt->setUInt32(0, pathid); + stmt->setUInt32(1, point); + + WorldDatabase.Execute(stmt); handler->PSendSysMessage(LANG_WAYPOINT_REMOVED); return true; @@ -588,8 +677,15 @@ public: //sMapMgr->GetMap(npcCreature->GetMapId())->Add(wpCreature2); } - WorldDatabase.PExecute("UPDATE waypoint_data SET position_x = '%f', position_y = '%f', position_z = '%f' where id = '%u' AND point='%u'", - chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), pathid, point); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_DATA_POSITION); + + stmt->setFloat(0, chr->GetPositionX()); + stmt->setFloat(1, chr->GetPositionY()); + stmt->setFloat(2, chr->GetPositionZ()); + stmt->setUInt32(3, pathid); + stmt->setUInt32(4, point); + + WorldDatabase.Execute(stmt); handler->PSendSysMessage(LANG_WAYPOINT_CHANGED); } @@ -601,16 +697,14 @@ public: if (text == 0) { // show_str check for present in list of correct values, no sql injection possible - WorldDatabase.PExecute("UPDATE waypoint_data SET %s=NULL WHERE id='%u' AND point='%u'", - show_str, pathid, point); + WorldDatabase.PExecute("UPDATE waypoint_data SET %s=NULL WHERE id='%u' AND point='%u'", show_str, pathid, point); // Query can't be a prepared statement } else { // show_str check for present in list of correct values, no sql injection possible std::string text2 = text; WorldDatabase.EscapeString(text2); - WorldDatabase.PExecute("UPDATE waypoint_data SET %s='%s' WHERE id='%u' AND point='%u'", - show_str, text2.c_str(), pathid, point); + WorldDatabase.PExecute("UPDATE waypoint_data SET %s='%s' WHERE id='%u' AND point='%u'", show_str, text2.c_str(), pathid, point); // Query can't be a prepared statement } handler->PSendSysMessage(LANG_WAYPOINT_CHANGED_NO, show_str); @@ -735,7 +829,12 @@ public: { handler->PSendSysMessage(LANG_WAYPOINT_NOTREMOVED, wpguid); hasError = true; - WorldDatabase.PExecute("DELETE FROM creature WHERE guid = '%u'", wpguid); + + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_CREATURE); + + stmt->setUInt32(0, wpguid); + + WorldDatabase.Execute(stmt); } else { @@ -777,8 +876,14 @@ public: return false; } - // set "wpguid" column to the visual waypoint - WorldDatabase.PExecute("UPDATE waypoint_data SET wpguid = '%u' WHERE id = '%u' and point = '%u'", wpCreature->GetGUIDLow(), pathid, point); + // Set "wpguid" column to the visual waypoint + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_DATA_WPGUID); + + stmt->setInt32(0, int32(wpCreature->GetGUIDLow())); + stmt->setUInt32(1, pathid); + stmt->setUInt32(2, point); + + WorldDatabase.Execute(stmt); wpCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn()); // To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells(); @@ -920,7 +1025,12 @@ public: { handler->PSendSysMessage(LANG_WAYPOINT_NOTREMOVED, guid); hasError = true; - WorldDatabase.PExecute("DELETE FROM creature WHERE guid = '%u'", guid); + + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_CREATURE); + + stmt->setUInt32(0, guid); + + WorldDatabase.Execute(stmt); } else { @@ -931,7 +1041,9 @@ public: } while (result->NextRow()); // set "wpguid" column to "empty" - no visual waypoint spawned - WorldDatabase.PExecute("UPDATE waypoint_data SET wpguid = '0'"); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_ALL_WAYPOINT_DATA_WPGUID); + + WorldDatabase.Execute(stmt); //WorldDatabase.PExecute("UPDATE creature_movement SET wpguid = '0' WHERE wpguid <> '0'"); if (hasError) diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp index 89a58e93853..75dd99eef97 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp index d66c138ebf2..1292cdaee17 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -27,8 +27,9 @@ enum Spells enum Yells { - YELL_AGGRO = -1810023, - YELL_EVADE = -1810024 + YELL_AGGRO = 0, + YELL_EVADE = 1, + YELL_SALVATION = 2, }; enum Creatures @@ -122,7 +123,7 @@ public: void EnterCombat(Unit* /*who*/) { - DoScriptText(YELL_AGGRO, me); + Talk(YELL_AGGRO); } void JustRespawned() @@ -185,7 +186,7 @@ public: if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50) { EnterEvadeMode(); - DoScriptText(YELL_EVADE, me); + Talk(YELL_EVADE); } resetTimer = 5 * IN_MILLISECONDS; } else resetTimer -= diff; diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp index c72014b96d7..8b2a95be977 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -31,14 +31,10 @@ enum Spells enum Yells { - YELL_AGGRO = -1810000, - YELL_EVADE = -1810001, - YELL_RESPAWN = -1810002, - YELL_RANDOM1 = -1810003, - YELL_RANDOM2 = -1810004, - YELL_RANDOM3 = -1810005, - YELL_RANDOM4 = -1810006, - YELL_RANDOM5 = -1810007 + YELL_AGGRO = 0, + YELL_EVADE = 1, + YELL_RESPAWN = 2, + YELL_RANDOM = 3 }; class boss_drekthar : public CreatureScript @@ -69,13 +65,13 @@ public: void EnterCombat(Unit* /*who*/) { - DoScriptText(YELL_AGGRO, me); + Talk(YELL_AGGRO); } void JustRespawned() { Reset(); - DoScriptText(YELL_RESPAWN, me); + Talk(YELL_RESPAWN); } void UpdateAI(const uint32 diff) @@ -109,7 +105,7 @@ public: if (YellTimer <= diff) { - DoScriptText(RAND(YELL_RANDOM1, YELL_RANDOM2, YELL_RANDOM3, YELL_RANDOM4, YELL_RANDOM5), me); + Talk(YELL_RANDOM); YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); //20 to 30 seconds } else YellTimer -= diff; @@ -119,7 +115,7 @@ public: if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50) { EnterEvadeMode(); - DoScriptText(YELL_EVADE, me); + Talk(YELL_EVADE); } ResetTimer = 5 * IN_MILLISECONDS; } else ResetTimer -= diff; diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp index 2b338833f4b..da53cffc99d 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -28,8 +28,8 @@ enum Spells enum Yells { - YELL_AGGRO = -1810021, - YELL_EVADE = -1810022 + YELL_AGGRO = 0, + YELL_EVADE = 1 }; class boss_galvangar : public CreatureScript @@ -60,7 +60,7 @@ public: void EnterCombat(Unit* /*who*/) { - DoScriptText(YELL_AGGRO, me); + Talk(YELL_AGGRO); } void JustRespawned() @@ -109,7 +109,7 @@ public: if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50) { EnterEvadeMode(); - DoScriptText(YELL_EVADE, me); + Talk(YELL_EVADE); } ResetTimer = 5 * IN_MILLISECONDS; } else ResetTimer -= diff; diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp index c933757c14a..54fcb9d99c2 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -19,17 +19,12 @@ enum Yells { - YELL_AGGRO = -1810008, - YELL_EVADE = -1810009, - YELL_RESPAWN1 = -1810010, - YELL_RESPAWN2 = -1810011, - YELL_RANDOM1 = -1810012, - YELL_RANDOM2 = -1810013, - YELL_RANDOM3 = -1810014, - YELL_RANDOM4 = -1810015, - YELL_RANDOM5 = -1810016, - YELL_RANDOM6 = -1810017, - YELL_RANDOM7 = -1810018 + YELL_AGGRO = 0, + YELL_EVADE = 1, + YELL_RESPAWN1 = -1810010, // no creature_text + YELL_RESPAWN2 = -1810011, // no creature_text + YELL_RANDOM = 2, + YELL_SPELL = 3, }; enum Spells @@ -65,7 +60,7 @@ public: void EnterCombat(Unit* /*who*/) { - DoScriptText(YELL_AGGRO, me); + Talk(YELL_AGGRO); } void JustRespawned() @@ -99,7 +94,7 @@ public: if (YellTimer <= diff) { - DoScriptText(RAND(YELL_RANDOM1, YELL_RANDOM2, YELL_RANDOM3, YELL_RANDOM4, YELL_RANDOM5, YELL_RANDOM6, YELL_RANDOM7), me); + Talk(YELL_RANDOM); YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); //20 to 30 seconds } else YellTimer -= diff; @@ -109,7 +104,7 @@ public: if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50) { EnterEvadeMode(); - DoScriptText(YELL_EVADE, me); + Talk(YELL_EVADE); } ResetTimer = 5 * IN_MILLISECONDS; } else ResetTimer -= diff; diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp index 36a91ab3d51..17cf775603f 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -1238,10 +1238,10 @@ public: me->HandleEmoteCommand(EMOTE_ONESHOT_KICK); break; case 2: - me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED); + me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED); break; case 3: - me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED); + me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED); break; case 4: me->HandleEmoteCommand(EMOTE_ONESHOT_KICK); diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h index 2282acaa233..b18d8720c3b 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp index 86bd0a0b393..2e8dc029d44 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp index 3d37d1885da..b4a4c416693 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp index deda95ff454..e894fd35bd1 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp index d402e70d671..69808386423 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp index 1055e20bddd..883c601709e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp index df850a276b7..7686ece3c2e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp index 28e8b47f680..26e2bc80eb2 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp index 0f767f7bc23..141b8307b7b 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp index 6c10a4a7cce..72a60daea2d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp index b7b453caf60..3c8d5fc4fa8 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -117,7 +117,7 @@ public: player->CLOSE_GOSSIP_MENU(); //start event here creature->setFaction(FACTION_HOSTILE); - creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); creature->AI()->AttackStart(player); InstanceScript* instance = creature->GetInstanceScript(); if (instance) @@ -165,7 +165,7 @@ public: me->setFaction(FACTION_FRIEND); // was set before event start, so set again - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); if (instance) { diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp index ae81c3bed64..2ef3ef48ecb 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -375,7 +375,7 @@ public: if (Creature* boss = instance->GetCreature(TombBossGUIDs[TombEventCounter])) { boss->setFaction(FACTION_HOSTILE); - boss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + boss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); if (Unit* target = boss->SelectNearestTarget(500)) boss->AI()->AttackStart(target); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h index b330e80a294..e51c6b9130d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp index eec118b2972..ff17e989cd9 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -76,7 +76,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp index 88b1bbc49e2..0d8cabcf89c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -105,7 +105,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp index 59c1ea1c9a4..a944ee6daf8 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -82,7 +82,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp index 4c91f79624a..bc9de52d91d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -85,7 +85,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp index a2314518f28..973ffe7e53b 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -77,7 +77,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp index 28680ef5049..b7492998d56 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -101,7 +101,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp index b4d44d85dec..d76d0d7f47c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -74,7 +74,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp index bb8f45082dc..4fb7e513f5d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -72,7 +72,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp index 762de86a82b..ce19a03571a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -73,7 +73,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp index fcd41f97ad0..f93466cbece 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -74,7 +74,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp index f2b3f3ff87b..88a09d57138 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -73,7 +73,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp index 40ead810600..2dc05799e51 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -82,7 +82,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp index cff1c831eee..ff97984fa09 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp index c9b5a172c65..7a4ba5777d1 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -24,14 +24,19 @@ SDCategory: Blackwing Lair EndScriptData */ #include "ScriptPCH.h" +enum Say +{ + SAY_AGGRO = -1469000, + SAY_LEASH = -1469001 +}; -#define SAY_AGGRO -1469000 -#define SAY_LEASH -1469001 - -#define SPELL_CLEAVE 26350 -#define SPELL_BLASTWAVE 23331 -#define SPELL_MORTALSTRIKE 24573 -#define SPELL_KNOCKBACK 25778 +enum Spells +{ + SPELL_CLEAVE = 26350, + SPELL_BLASTWAVE = 23331, + SPELL_MORTALSTRIKE = 24573, + SPELL_KNOCKBACK = 25778 +}; class boss_broodlord : public CreatureScript { @@ -45,7 +50,7 @@ public: struct boss_broodlordAI : public ScriptedAI { - boss_broodlordAI(Creature* c) : ScriptedAI(c) {} + boss_broodlordAI(Creature* creature) : ScriptedAI(creature) {} uint32 Cleave_Timer; uint32 BlastWave_Timer; @@ -54,10 +59,10 @@ public: void Reset() { - Cleave_Timer = 8000; //These times are probably wrong - BlastWave_Timer = 12000; - MortalStrike_Timer = 20000; - KnockBack_Timer = 30000; + Cleave_Timer = 8000; // These times are probably wrong + BlastWave_Timer = 12000; + MortalStrike_Timer = 20000; + KnockBack_Timer = 30000; } void EnterCombat(Unit* /*who*/) @@ -108,7 +113,6 @@ public: DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_broodlord() diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp index 85d80bee062..818dcace078 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ public: struct boss_chromaggusAI : public ScriptedAI { - boss_chromaggusAI(Creature* c) : ScriptedAI(c) + boss_chromaggusAI(Creature* creature) : ScriptedAI(creature) { //Select the 2 breaths that we are going to use until despawned //5 possiblities for the first breath, 4 for the second, 20 total possiblites @@ -197,9 +197,7 @@ public: Enraged = false; } - void EnterCombat(Unit* /*who*/) - { - } + void EnterCombat(Unit* /*who*/) {} void UpdateAI(const uint32 diff) { @@ -297,7 +295,6 @@ public: DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_chromaggus() diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp index 4c57c4336d9..c91e0fb3303 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -42,7 +42,7 @@ public: struct boss_ebonrocAI : public ScriptedAI { - boss_ebonrocAI(Creature* c) : ScriptedAI(c) {} + boss_ebonrocAI(Creature* creature) : ScriptedAI(creature) {} uint32 ShadowFlame_Timer; uint32 WingBuffet_Timer; @@ -100,7 +100,6 @@ public: DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_ebonroc() diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp index 9d53a7a0a95..c2a2350c0e8 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -41,7 +41,7 @@ public: struct boss_firemawAI : public ScriptedAI { - boss_firemawAI(Creature* c) : ScriptedAI(c) {} + boss_firemawAI(Creature* creature) : ScriptedAI(creature) {} uint32 ShadowFlame_Timer; uint32 WingBuffet_Timer; @@ -91,7 +91,6 @@ public: DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_firemaw() diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp index a7c984fa536..41bcb6c5427 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -25,11 +25,17 @@ EndScriptData */ #include "ScriptPCH.h" -#define EMOTE_FRENZY -1469031 +enum Emotes +{ + EMOTE_FRENZY = -1469031 +}; -#define SPELL_SHADOWFLAME 22539 -#define SPELL_WINGBUFFET 23339 -#define SPELL_FRENZY 23342 //This spell periodically triggers fire nova +enum Spells +{ + SPELL_SHADOWFLAME = 22539, + SPELL_WINGBUFFET = 23339, + SPELL_FRENZY = 23342 //This spell periodically triggers fire nova +}; class boss_flamegor : public CreatureScript { @@ -43,7 +49,7 @@ public: struct boss_flamegorAI : public ScriptedAI { - boss_flamegorAI(Creature* c) : ScriptedAI(c) {} + boss_flamegorAI(Creature* creature) : ScriptedAI(creature) {} uint32 ShadowFlame_Timer; uint32 WingBuffet_Timer; @@ -94,7 +100,6 @@ public: DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_flamegor() diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp index 89298862688..c4e0d6ea715 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -25,40 +25,46 @@ EndScriptData */ #include "ScriptPCH.h" -#define SAY_AGGRO -1469007 -#define SAY_XHEALTH -1469008 -#define SAY_SHADOWFLAME -1469009 -#define SAY_RAISE_SKELETONS -1469010 -#define SAY_SLAY -1469011 -#define SAY_DEATH -1469012 - -#define SAY_MAGE -1469013 -#define SAY_WARRIOR -1469014 -#define SAY_DRUID -1469015 -#define SAY_PRIEST -1469016 -#define SAY_PALADIN -1469017 -#define SAY_SHAMAN -1469018 -#define SAY_WARLOCK -1469019 -#define SAY_HUNTER -1469020 -#define SAY_ROGUE -1469021 - -#define SPELL_SHADOWFLAME_INITIAL 22972 -#define SPELL_SHADOWFLAME 22539 -#define SPELL_BELLOWINGROAR 22686 -#define SPELL_VEILOFSHADOW 7068 -#define SPELL_CLEAVE 20691 -#define SPELL_TAILLASH 23364 -#define SPELL_BONECONTRUST 23363 //23362, 23361 - -#define SPELL_MAGE 23410 //wild magic -#define SPELL_WARRIOR 23397 //beserk -#define SPELL_DRUID 23398 // cat form -#define SPELL_PRIEST 23401 // corrupted healing -#define SPELL_PALADIN 23418 //syphon blessing -#define SPELL_SHAMAN 23425 //totems -#define SPELL_WARLOCK 23427 //infernals -#define SPELL_HUNTER 23436 //bow broke -#define SPELL_ROGUE 23414 //Paralise +enum Say +{ + SAY_AGGRO = -1469007, + SAY_XHEALTH = -1469008, + SAY_SHADOWFLAME = -1469009, + SAY_RAISE_SKELETONS = -1469010, + SAY_SLAY = -1469011, + SAY_DEATH = -1469012, + + SAY_MAGE = -1469013, + SAY_WARRIOR = -1469014, + SAY_DRUID = -1469015, + SAY_PRIEST = -1469016, + SAY_PALADIN = -1469017, + SAY_SHAMAN = -1469018, + SAY_WARLOCK = -1469019, + SAY_HUNTER = -1469020, + SAY_ROGUE = -1469021 +}; + +enum Spells +{ + SPELL_SHADOWFLAME_INITIAL = 22972, + SPELL_SHADOWFLAME = 22539, + SPELL_BELLOWINGROAR = 22686, + SPELL_VEILOFSHADOW = 7068, + SPELL_CLEAVE = 20691, + SPELL_TAILLASH = 23364, + SPELL_BONECONTRUST = 23363, //23362, 23361 + + SPELL_MAGE = 23410, //wild magic + SPELL_WARRIOR = 23397, //beserk + SPELL_DRUID = 23398, // cat form + SPELL_PRIEST = 23401, // corrupted healing + SPELL_PALADIN = 23418, //syphon blessing + SPELL_SHAMAN = 23425, //totems + SPELL_WARLOCK = 23427, //infernals + SPELL_HUNTER = 23436, //bow broke + SPELL_ROGUE = 23414 //Paralise +}; class boss_nefarian : public CreatureScript { @@ -72,7 +78,7 @@ public: struct boss_nefarianAI : public ScriptedAI { - boss_nefarianAI(Creature* c) : ScriptedAI(c) {} + boss_nefarianAI(Creature* creature) : ScriptedAI(creature) {} uint32 ShadowFlame_Timer; uint32 BellowingRoar_Timer; @@ -86,15 +92,15 @@ public: void Reset() { - ShadowFlame_Timer = 12000; //These times are probably wrong - BellowingRoar_Timer = 30000; - VeilOfShadow_Timer = 15000; - Cleave_Timer = 7000; - TailLash_Timer = 10000; - ClassCall_Timer = 35000; //35-40 seconds + ShadowFlame_Timer = 12000; // These times are probably wrong + BellowingRoar_Timer = 30000; + VeilOfShadow_Timer = 15000; + Cleave_Timer = 7000; + TailLash_Timer = 10000; + ClassCall_Timer = 35000; // 35-40 seconds Phase3 = false; - DespawnTimer = 5000; + DespawnTimer = 5000; } void KilledUnit(Unit* Victim) @@ -227,7 +233,6 @@ public: DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_nefarian() diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp index b4ccc8544a1..a4fb4ad22a3 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -27,15 +27,21 @@ EndScriptData */ //Razorgore Phase 2 Script -#define SAY_EGGS_BROKEN1 -1469022 -#define SAY_EGGS_BROKEN2 -1469023 -#define SAY_EGGS_BROKEN3 -1469024 -#define SAY_DEATH -1469025 +enum Say +{ + SAY_EGGS_BROKEN1 = -1469022, + SAY_EGGS_BROKEN2 = -1469023, + SAY_EGGS_BROKEN3 = -1469024, + SAY_DEATH = -1469025 +}; -#define SPELL_CLEAVE 22540 -#define SPELL_WARSTOMP 24375 -#define SPELL_FIREBALLVOLLEY 22425 -#define SPELL_CONFLAGRATION 23023 +enum Spells +{ + SPELL_CLEAVE = 22540, + SPELL_WARSTOMP = 24375, + SPELL_FIREBALLVOLLEY = 22425, + SPELL_CONFLAGRATION = 23023 +}; class boss_razorgore : public CreatureScript { @@ -49,7 +55,7 @@ public: struct boss_razorgoreAI : public ScriptedAI { - boss_razorgoreAI(Creature* c) : ScriptedAI(c) {} + boss_razorgoreAI(Creature* creature) : ScriptedAI(creature) {} uint32 Cleave_Timer; uint32 WarStomp_Timer; @@ -120,7 +126,6 @@ public: DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_razorgore() diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp index ba6bc4fa533..4a72bd0ca38 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -25,40 +25,46 @@ EndScriptData */ #include "ScriptPCH.h" -#define SAY_LINE1 -1469026 -#define SAY_LINE2 -1469027 -#define SAY_LINE3 -1469028 -#define SAY_HALFLIFE -1469029 -#define SAY_KILLTARGET -1469030 +enum Says +{ + SAY_LINE1 = -1469026, + SAY_LINE2 = -1469027, + SAY_LINE3 = -1469028, + SAY_HALFLIFE = -1469029, + SAY_KILLTARGET = -1469030 +}; #define GOSSIP_ITEM "Start Event <Needs Gossip Text>" -#define SPELL_ESSENCEOFTHERED 23513 -#define SPELL_FLAMEBREATH 23461 -#define SPELL_FIRENOVA 23462 -#define SPELL_TAILSWIPE 15847 -#define SPELL_BURNINGADRENALINE 23620 -#define SPELL_CLEAVE 20684 //Chain cleave is most likely named something different and contains a dummy effect +enum Spells +{ + SPELL_ESSENCEOFTHERED = 23513, + SPELL_FLAMEBREATH = 23461, + SPELL_FIRENOVA = 23462, + SPELL_TAILSWIPE = 15847, + SPELL_BURNINGADRENALINE = 23620, + SPELL_CLEAVE = 20684 //Chain cleave is most likely named something different and contains a dummy effect +}; class boss_vaelastrasz : public CreatureScript { public: boss_vaelastrasz() : CreatureScript("boss_vaelastrasz") { } - void SendDefaultMenu(Player* player, Creature* creature, uint32 uiAction) + void SendDefaultMenu(Player* player, Creature* creature, uint32 Action) { - if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) //Fight time + if (Action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time { player->CLOSE_GOSSIP_MENU(); CAST_AI(boss_vaelastrasz::boss_vaelAI, creature->AI())->BeginSpeech(player); } } - bool OnGossipSelect(Player* player, Creature* creature, uint32 uiSender, uint32 uiAction) + bool OnGossipSelect(Player* player, Creature* creature, uint32 Sender, uint32 Action) { player->PlayerTalkClass->ClearMenus(); - if (uiSender == GOSSIP_SENDER_MAIN) - SendDefaultMenu(player, creature, uiAction); + if (Sender == GOSSIP_SENDER_MAIN) + SendDefaultMenu(player, creature, Action); return true; } @@ -81,11 +87,11 @@ public: struct boss_vaelAI : public ScriptedAI { - boss_vaelAI(Creature* c) : ScriptedAI(c) + boss_vaelAI(Creature* creature) : ScriptedAI(creature) { - c->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - c->setFaction(35); - c->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + creature->setFaction(35); + creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } uint64 PlayerGUID; @@ -102,17 +108,17 @@ public: void Reset() { - PlayerGUID = 0; - SpeechTimer = 0; - SpeechNum = 0; - Cleave_Timer = 8000; //These times are probably wrong - FlameBreath_Timer = 11000; - BurningAdrenalineCaster_Timer = 15000; - BurningAdrenalineTank_Timer = 45000; - FireNova_Timer = 5000; - TailSwipe_Timer = 20000; - HasYelled = false; - DoingSpeech = false; + PlayerGUID = 0; + SpeechTimer = 0; + SpeechNum = 0; + Cleave_Timer = 8000; //These times are probably wrong + FlameBreath_Timer = 11000; + BurningAdrenalineCaster_Timer = 15000; + BurningAdrenalineTank_Timer = 45000; + FireNova_Timer = 5000; + TailSwipe_Timer = 20000; + HasYelled = false; + DoingSpeech = false; } void BeginSpeech(Unit* target) @@ -213,7 +219,7 @@ public: Unit* target = NULL; uint8 i = 0; - while (i < 3) // max 3 tries to get a random target with power_mana + while (i < 3) // max 3 tries to get a random target with power_mana { ++i; target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true); //not aggro leader @@ -258,7 +264,6 @@ public: DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_vael() diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp index 13574a71b8b..2c7cd73c604 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -25,40 +25,49 @@ EndScriptData */ #include "ScriptPCH.h" -#define SAY_GAMESBEGIN_1 -1469004 -#define SAY_GAMESBEGIN_2 -1469005 -#define SAY_VAEL_INTRO -1469006 //when he corrupts Vaelastrasz +enum Says +{ + SAY_GAMESBEGIN_1 = -1469004, + SAY_GAMESBEGIN_2 = -1469005, + SAY_VAEL_INTRO = -1469006 //when he corrupts Vaelastrasz +}; #define GOSSIP_ITEM_1 "I've made no mistakes." #define GOSSIP_ITEM_2 "You have lost your mind, Nefarius. You speak in riddles." #define GOSSIP_ITEM_3 "Please do." -#define CREATURE_BRONZE_DRAKANOID 14263 -#define CREATURE_BLUE_DRAKANOID 14261 -#define CREATURE_RED_DRAKANOID 14264 -#define CREATURE_GREEN_DRAKANOID 14262 -#define CREATURE_BLACK_DRAKANOID 14265 - -#define CREATURE_CHROMATIC_DRAKANOID 14302 -#define CREATURE_NEFARIAN 11583 +enum Creatures +{ + CREATURE_BRONZE_DRAKANOID = 14263, + CREATURE_BLUE_DRAKANOID = 14261, + CREATURE_RED_DRAKANOID = 14264, + CREATURE_GREEN_DRAKANOID = 14262, + CREATURE_BLACK_DRAKANOID = 14265, + + CREATURE_CHROMATIC_DRAKANOID = 14302, + CREATURE_NEFARIAN = 11583 +}; -#define ADD_X1 -7591.151855f -#define ADD_X2 -7514.598633f -#define ADD_Y1 -1204.051880f -#define ADD_Y2 -1150.448853f -#define ADD_Z1 476.800476f -#define ADD_Z2 476.796570f +#define ADD_X1 -7591.151855f +#define ADD_X2 -7514.598633f +#define ADD_Y1 -1204.051880f +#define ADD_Y2 -1150.448853f +#define ADD_Z1 476.800476f +#define ADD_Z2 476.796570f -#define NEF_X -7445 -#define NEF_Y -1332 -#define NEF_Z 536 +#define NEF_X -7445 +#define NEF_Y -1332 +#define NEF_Z 536 -#define HIDE_X -7592 -#define HIDE_Y -1264 -#define HIDE_Z 481 +#define HIDE_X -7592 +#define HIDE_Y -1264 +#define HIDE_Z 481 -#define SPELL_SHADOWBOLT 21077 -#define SPELL_FEAR 26070 +enum Spells +{ + SPELL_SHADOWBOLT = 21077, + SPELL_FEAR = 26070 +}; //This script is complicated //Instead of morphing Victor Nefarius we will have him control phase 1 @@ -74,10 +83,10 @@ class boss_victor_nefarius : public CreatureScript public: boss_victor_nefarius() : CreatureScript("boss_victor_nefarius") { } - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) + bool OnGossipSelect(Player* player, Creature* creature, uint32 /*Sender*/, uint32 Action) { player->PlayerTalkClass->ClearMenus(); - switch (uiAction) + switch (Action) { case GOSSIP_ACTION_INFO_DEF+1: player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); @@ -110,7 +119,7 @@ public: struct boss_victor_nefariusAI : public ScriptedAI { - boss_victor_nefariusAI(Creature* c) : ScriptedAI(c) + boss_victor_nefariusAI(Creature* creature) : ScriptedAI(creature) { NefarianGUID = 0; switch (urand(0, 19)) @@ -211,13 +220,13 @@ public: void Reset() { - SpawnedAdds = 0; - AddSpawnTimer = 10000; - ShadowBoltTimer = 5000; - FearTimer = 8000; - ResetTimer = 900000; //On official it takes him 15 minutes(900 seconds) to reset. We are only doing 1 minute to make testing easier - NefarianGUID = 0; - NefCheckTime = 2000; + SpawnedAdds = 0; + AddSpawnTimer = 10000; + ShadowBoltTimer = 5000; + FearTimer = 8000; + ResetTimer = 900000; //On official it takes him 15 minutes(900 seconds) to reset. We are only doing 1 minute to make testing easier + NefarianGUID = 0; + NefCheckTime = 2000; me->SetUInt32Value(UNIT_NPC_FLAGS, 1); me->setFaction(35); @@ -342,7 +351,7 @@ public: //Teleport self to a hiding spot (this causes errors in the Trinity log but no real issues) DoTeleportTo(HIDE_X, HIDE_Y, HIDE_Z); - me->AddUnitState(UNIT_STAT_FLEEING); + me->AddUnitState(UNIT_STATE_FLEEING); //Spawn nef and have him attack a random target Creature* Nefarian = me->SummonCreature(CREATURE_NEFARIAN, NEF_X, NEF_Y, NEF_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); @@ -378,7 +387,6 @@ public: } } }; - }; void AddSC_boss_victor_nefarius() diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp index 7e50b507262..8a9b930aa09 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -24,4 +24,3 @@ SDCategory: Blackwing Lair EndScriptData */ #include "ScriptPCH.h" - diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp index cef44bb446a..9830563ac87 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp index 13e2832bfde..fffd8d41264 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h index 627b0b703f8..55726fb2a8e 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp index ae0042dcfa5..76bdfe753c6 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index 1cbe48ae5da..cd5566007ee 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h index 495ac216612..a62cf9f9cae 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp index cf9a3ffc9c1..0bbe787827b 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp index 423b73eed49..b1fa4d54eb6 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp index 8db9221c764..66de84abbc2 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index e804d2b2b61..65b758b55e7 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp index fc2860dad5a..484515be0f8 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index aa0fee873e1..c1fe9c9c56c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp index 63ca3e32e6e..728446aa833 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -186,7 +186,7 @@ public: void MovementInform(uint32 type, uint32 id) { if (type != POINT_MOTION_TYPE) - return; + return; if (Intro) { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 5f8a9ad6f1c..14add92fd16 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -393,7 +393,7 @@ public: EnfeebleResetTimer = 0; } else EnfeebleResetTimer -= diff; - if (me->HasUnitState(UNIT_STAT_STUNNED)) // While shifting to phase 2 malchezaar stuns himself + if (me->HasUnitState(UNIT_STATE_STUNNED)) // While shifting to phase 2 malchezaar stuns himself return; if (me->GetUInt64Value(UNIT_FIELD_TARGET) != me->getVictim()->GetGUID()) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index f97fc49eb7c..119cb7d9de6 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index ea7e3113246..15750c5b9c5 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 389f0d0a959..b15cb7d3da1 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -655,7 +655,7 @@ public: { DoScriptText(RAND(SAY_CRONE_AGGRO, SAY_CRONE_AGGRO2), me); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } void JustDied(Unit* /*killer*/) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 3dd37fc66c7..8e86024f4d8 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index 6a9831655a9..056a2e95448 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h index e9d37958944..08b9a729596 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp index c64fc6f2dab..94c894f7e47 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp index bf58d6f2853..b9d4f600329 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp index 93b0b45a3e3..fa97e4eefc0 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp index 906bbe6f528..5f3716d9dea 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp index 69d8ecbae62..642f7955b2e 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp index b47e9cd1666..679db023b63 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h index 105c975122d..dcea4424bf5 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp index 72f89c4f47d..f792b861c99 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -80,7 +80,7 @@ class boss_baron_geddon : public CreatureScript return; } - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp index 028362f2199..a9d32ebca9a 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ class boss_garr : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp index 92b0e370f9f..7261bbf1fbd 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -68,7 +68,7 @@ class boss_gehennas : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp index 47f192bc55c..84e9957a60c 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -91,7 +91,7 @@ class boss_golemagg : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp index 54bb5bc7880..e3e04002112 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -68,7 +68,7 @@ class boss_lucifron : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp index ebc6bcec24f..65a630a58f7 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -80,7 +80,7 @@ class boss_magmadar : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp index e716e4a7361..862a980394a 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -116,7 +116,7 @@ class boss_majordomo : public CreatureScript return; } - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; if (HealthBelowPct(50)) diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp index 4bc3da16651..47d50925d56 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp index 8928dca0750..f696ec58e1b 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -73,7 +73,7 @@ class boss_shazzrah : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp index 9126df968e2..9f511c1394a 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -84,7 +84,7 @@ class boss_sulfuron : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -169,7 +169,7 @@ class mob_flamewaker_priest : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp index 3c7ec790f40..f6a6e647a1d 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp index 871cef96316..801a11fbfc8 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -30,16 +30,19 @@ EndContentData */ #include "ScriptPCH.h" #include "ScriptedSimpleAI.h" -#define SPELL_CONE_OF_FIRE 19630 -#define SPELL_BITE 19771 +enum Spells +{ + SPELL_CONE_OF_FIRE = 19630, + SPELL_BITE = 19771, -//Random Debuff (each hound has only one of these) -#define SPELL_GROUND_STOMP 19364 -#define SPELL_ANCIENT_DREAD 19365 -#define SPELL_CAUTERIZING_FLAMES 19366 -#define SPELL_WITHERING_HEAT 19367 -#define SPELL_ANCIENT_DESPAIR 19369 -#define SPELL_ANCIENT_HYSTERIA 19372 + //Random Debuff (each hound has only one of these) + SPELL_GROUND_STOMP = 19364, + SPELL_ANCIENT_DREAD = 19365, + SPELL_CAUTERIZING_FLAMES = 19366, + SPELL_WITHERING_HEAT = 19367, + SPELL_ANCIENT_DESPAIR = 19369, + SPELL_ANCIENT_HYSTERIA = 19372 +}; class mob_ancient_core_hound : public CreatureScript { @@ -75,7 +78,6 @@ public: return ai; } - }; void AddSC_molten_core() diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h b/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h index 7bbae236f52..99dd74fb5fe 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h +++ b/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 395f4f3ace4..a2c8a890feb 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -125,7 +125,7 @@ public: phase = PHASE_CHAINED; events.Reset(); me->setFaction(7); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetUInt32Value(UNIT_FIELD_BYTES_1, 8); me->LoadEquipment(0, true); } @@ -230,7 +230,7 @@ public: else { me->setFaction(14); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); phase = PHASE_ATTACKING; if (Player* target = Unit::GetPlayer(*me, playerGUID)) @@ -378,7 +378,7 @@ public: return true; } - creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15); int32 uiSayId = rand()% (sizeof(m_auiRandomSay)/sizeof(int32)); @@ -877,7 +877,7 @@ public: { npc_scarlet_miner_cartAI(Creature* c) : PassiveAI(c), minerGUID(0) { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetDisplayId(me->GetCreatureInfo()->Modelid1); // Modelid2 is a horse. } @@ -1009,7 +1009,7 @@ public: me->SetInFront(car); me->SendMovementFlagUpdate(); car->Relocate(car->GetPositionX(), car->GetPositionY(), me->GetPositionZ() + 1); - car->SendMonsterStop(); + car->StopMoving(); car->RemoveAura(SPELL_CART_DRAG); } me->MonsterSay(SAY_SCARLET_MINER2, LANG_UNIVERSAL, 0); diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index 6d316eff94f..4583a33a196 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -264,7 +264,7 @@ public: m_uiValrothGUID = summoned->GetGUID(); summoned->AddThreat(me, 0.0f); - summoned->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + summoned->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } void SummonAcolyte(uint32 uiAmount) @@ -605,7 +605,7 @@ public: ExecuteSpeech_Counter = 0; PlayerGUID = 0; - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } bool MeetQuestCondition(Unit* player) @@ -702,7 +702,7 @@ public: case 9: DoScriptText(SAY_EXEC_TIME_6, me, player); me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); break; case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 11: @@ -730,7 +730,7 @@ public: case 9: DoScriptText(SAY_EXEC_TIME_8, me, player); me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); break; case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 11: @@ -758,7 +758,7 @@ public: case 9: DoScriptText(SAY_EXEC_TIME_3, me, player); me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); break; case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 11: @@ -786,7 +786,7 @@ public: case 9: DoScriptText(SAY_EXEC_TIME_7, me, player); me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); break; case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 11: @@ -814,7 +814,7 @@ public: case 9: DoScriptText(SAY_EXEC_TIME_4, me, player); me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); break; case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 11: @@ -842,7 +842,7 @@ public: case 9: DoScriptText(SAY_EXEC_TIME_9, me, player); me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); break; case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 11: @@ -870,7 +870,7 @@ public: case 9: DoScriptText(SAY_EXEC_TIME_5, me, player); me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); break; case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 11: @@ -898,7 +898,7 @@ public: case 9: DoScriptText(SAY_EXEC_TIME_10, me, player); me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); break; case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 11: @@ -926,7 +926,7 @@ public: case 9: DoScriptText(SAY_EXEC_TIME_1, me, player); me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); break; case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 11: @@ -954,7 +954,7 @@ public: case 9: DoScriptText(SAY_EXEC_TIME_2, me, player); me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); break; case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 11: diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index 5b89651f2b0..81c4b1261ef 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp index a6bb95995be..9512d66b6eb 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -91,7 +91,7 @@ public: case 2: if (!player->isRessurectRequested()) { - me->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOMSPELL01); + me->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOM_SPELL_01); DoCast(player, SPELL_REVIVE, true); me->MonsterWhisper(VALK_WHISPER, player->GetGUID()); } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp index 25295e62ff3..e5886cc39d4 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -49,7 +49,7 @@ public: struct boss_arcanist_doanAI : public ScriptedAI { - boss_arcanist_doanAI(Creature* c) : ScriptedAI(c) {} + boss_arcanist_doanAI(Creature* creature) : ScriptedAI(creature) {} uint32 Polymorph_Timer; uint32 AoESilence_Timer; @@ -105,26 +105,28 @@ public: DoCast(target, SPELL_POLYMORPH); Polymorph_Timer = 20000; - } else Polymorph_Timer -= diff; + } + else Polymorph_Timer -= diff; //AoESilence_Timer if (AoESilence_Timer <= diff) { DoCast(me->getVictim(), SPELL_AOESILENCE); AoESilence_Timer = urand(15000, 20000); - } else AoESilence_Timer -= diff; + } + else AoESilence_Timer -= diff; //ArcaneExplosion_Timer if (ArcaneExplosion_Timer <= diff) { DoCast(me->getVictim(), SPELL_ARCANEEXPLOSION); ArcaneExplosion_Timer = 8000; - } else ArcaneExplosion_Timer -= diff; + } + else ArcaneExplosion_Timer -= diff; DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_arcanist_doan() diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp index 83a5b5808f4..30105cc7315 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -25,9 +25,12 @@ EndScriptData */ #include "ScriptPCH.h" -#define SPELL_CALLOFTHEGRAVE 17831 -#define SPELL_TERRIFY 7399 -#define SPELL_SOULSIPHON 7290 +enum Spells +{ + SPELL_CALLOFTHEGRAVE = 17831, + SPELL_TERRIFY = 7399, + SPELL_SOULSIPHON = 7290 +}; class boss_azshir_the_sleepless : public CreatureScript { @@ -41,7 +44,7 @@ public: struct boss_azshir_the_sleeplessAI : public ScriptedAI { - boss_azshir_the_sleeplessAI(Creature* c) : ScriptedAI(c) {} + boss_azshir_the_sleeplessAI(Creature* creature) : ScriptedAI(creature) {} uint32 SoulSiphon_Timer; uint32 CallOftheGrave_Timer; @@ -54,9 +57,7 @@ public: Terrify_Timer = 20000; } - void EnterCombat(Unit* /*who*/) - { - } + void EnterCombat(Unit* /*who*/) {} void UpdateAI(const uint32 diff) { @@ -73,7 +74,8 @@ public: return; //SoulSiphon_Timer = 20000; - } else SoulSiphon_Timer -= diff; + } + else SoulSiphon_Timer -= diff; } //CallOfTheGrave_Timer @@ -81,19 +83,20 @@ public: { DoCast(me->getVictim(), SPELL_CALLOFTHEGRAVE); CallOftheGrave_Timer = 30000; - } else CallOftheGrave_Timer -= diff; + } + else CallOftheGrave_Timer -= diff; //Terrify_Timer if (Terrify_Timer <= diff) { DoCast(me->getVictim(), SPELL_TERRIFY); Terrify_Timer = 20000; - } else Terrify_Timer -= diff; + } + else Terrify_Timer -= diff; DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_azshir_the_sleepless() diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp index 733b3a91f93..466f940621d 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -49,7 +49,7 @@ public: struct boss_bloodmage_thalnosAI : public ScriptedAI { - boss_bloodmage_thalnosAI(Creature* c) : ScriptedAI(c) {} + boss_bloodmage_thalnosAI(Creature* creature) : ScriptedAI(creature) {} bool HpYell; uint32 FlameShock_Timer; @@ -93,33 +93,36 @@ public: { DoCast(me->getVictim(), SPELL_FLAMESHOCK); FlameShock_Timer = urand(10000, 15000); - } else FlameShock_Timer -= diff; + } + else FlameShock_Timer -= diff; //FlameSpike_Timer if (FlameSpike_Timer <= diff) { DoCast(me->getVictim(), SPELL_FLAMESPIKE); FlameSpike_Timer = 30000; - } else FlameSpike_Timer -= diff; + } + else FlameSpike_Timer -= diff; //FireNova_Timer if (FireNova_Timer <= diff) { DoCast(me->getVictim(), SPELL_FIRENOVA); FireNova_Timer = 40000; - } else FireNova_Timer -= diff; + } + else FireNova_Timer -= diff; //ShadowBolt_Timer if (ShadowBolt_Timer <= diff) { DoCast(me->getVictim(), SPELL_SHADOWBOLT); ShadowBolt_Timer = 2000; - } else ShadowBolt_Timer -= diff; + } + else ShadowBolt_Timer -= diff; DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_bloodmage_thalnos() diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index c9ab9084d22..77099f2e2d7 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -28,59 +28,66 @@ EndScriptData */ #include "scarlet_monastery.h" //this texts are already used by 3975 and 3976 -#define SAY_ENTRANCE -1189001 -#define SAY_REJOINED -1189002 -#define SAY_LOST_HEAD -1189003 -#define SAY_CONFLAGRATION -1189004 -#define SAY_SPROUTING_PUMPKINS -1189005 -#define SAY_PLAYER_DEATH -1189006 -#define SAY_DEATH -1189007 +enum Says +{ + SAY_ENTRANCE = -1189001, + SAY_REJOINED = -1189002, + SAY_LOST_HEAD = -1189003, + SAY_CONFLAGRATION = -1189004, + SAY_SPROUTING_PUMPKINS = -1189005, + SAY_PLAYER_DEATH = -1189006, + SAY_DEATH = -1189007 +}; uint32 RandomLaugh[] = {11965, 11975, 11976}; - // Entryes -#define HH_MOUNTED 23682 -#define HH_UNHORSED 23800 -#define HEAD 23775 -#define PULSING_PUMPKIN 23694 -#define PUMPKIN_FIEND 23545 -#define HELPER 23686 -#define WISP_INVIS 24034 - - //Spells -#define SPELL_CLEAVE 42587 -#define SPELL_CONFLAGRATION 42380 //Phase 2, can't find real spell(Dim Fire?) -//#define SPELL_CONFL_SPEED 22587 //8% increase speed, value 22587 from SPELL_CONFLAGRATION mains that spell? -#define SPELL_SUMMON_PUMPKIN 42394 - -#define SPELL_WHIRLWIND 43116 -#define SPELL_IMMUNE 42556 -#define SPELL_BODY_REGEN 42403 -#define SPELL_CONFUSE 43105 - -#define SPELL_FLYING_HEAD 42399 //visual flying head -#define SPELL_HEAD 42413 //visual buff, "head" -#define SPELL_HEAD_IS_DEAD 42428 //at killing head, Phase 3 - -#define SPELL_PUMPKIN_AURA 42280 -#define SPELL_PUMPKIN_AURA_GREEN 42294 -#define SPELL_SQUASH_SOUL 42514 -#define SPELL_SPROUTING 42281 -#define SPELL_SPROUT_BODY 42285 +enum Entry +{ + HH_MOUNTED = 23682, + HH_DISMOUNTED = 23800, // unhorsed?? wtf type of engrish was that? + HEAD = 23775, + PULSING_PUMPKIN = 23694, + PUMPKIN_FIEND = 23545, + HELPER = 23686, + WISP_INVIS = 24034 +}; + +enum Spells +{ + SPELL_CLEAVE = 42587, + SPELL_CONFLAGRATION = 42380, //Phase 2, can't find real spell(Dim Fire?) + // SPELL_CONFL_SPEED = 22587, //8% increase speed, value 22587 from SPELL_CONFLAGRATION mains that spell? + SPELL_SUMMON_PUMPKIN = 42394, + + SPELL_WHIRLWIND = 43116, + SPELL_IMMUNE = 42556, + SPELL_BODY_REGEN = 42403, + SPELL_CONFUSE = 43105, + + SPELL_FLYING_HEAD = 42399, //visual flying head + SPELL_HEAD = 42413, //visual buff, "head" + SPELL_HEAD_IS_DEAD = 42428, //at killing head, Phase 3 + + SPELL_PUMPKIN_AURA = 42280, + SPELL_PUMPKIN_AURA_GREEN = 42294, + SPELL_SQUASH_SOUL = 42514, + SPELL_SPROUTING = 42281, + SPELL_SPROUT_BODY = 42285, //Effects -#define SPELL_RHYME_BIG 42909 -//#define SPELL_RHYME_SMALL 42910 -#define SPELL_HEAD_SPEAKS 43129 -#define SPELL_HEAD_LANDS 42400 -#define SPELL_BODY_FLAME 42074 -#define SPELL_HEAD_FLAME 42971 -//#define SPELL_ENRAGE_VISUAL 42438 // he uses this spell? -#define SPELL_WISP_BLUE 42821 -#define SPELL_WISP_FLIGHT_PORT 42818 -//#define SPELL_WISP_INVIS 42823 -#define SPELL_SMOKE 42355 -#define SPELL_DEATH 42566 //not correct spell + SPELL_RHYME_BIG = 42909, + // SPELL_RHYME_SMALL = 42910, + SPELL_HEAD_SPEAKS = 43129, + SPELL_HEAD_LANDS = 42400, + SPELL_BODY_FLAME = 42074, + SPELL_HEAD_FLAME = 42971, + // SPELL_ENRAGE_VISUAL = 42438, // he uses this spell? + SPELL_WISP_BLUE = 42821, + SPELL_WISP_FLIGHT_PORT = 42818, + // SPELL_WISP_INVIS = 42823, + SPELL_SMOKE = 42355, + SPELL_DEATH = 42566 //not correct spell +}; struct Locations { @@ -114,7 +121,7 @@ static Locations FlightPoint[]= static Locations Spawn[]= { - {1776.27f, 1348.74f, 19.20f}, //spawn point for pumpkin shrine mob + {1776.27f, 1348.74f, 19.20f}, //spawn point for pumpkin shrine mob {1765.28f, 1347.46f, 17.55f} //spawn point for smoke }; @@ -126,7 +133,7 @@ static const char* Text[]= "Now, know demise!" }; -#define EMOTE_LAUGHS "Headless Horseman laughs" +#define EMOTE_LAUGHS "Headless Horseman laughs" // needs assigned to db. class mob_wisp_invis : public CreatureScript { @@ -140,7 +147,7 @@ public: struct mob_wisp_invisAI : public ScriptedAI { - mob_wisp_invisAI(Creature* c) : ScriptedAI(c) + mob_wisp_invisAI(Creature* creature) : ScriptedAI(creature) { Creaturetype = delay = spell = spell2 = 0; } @@ -149,8 +156,8 @@ public: uint32 delay; uint32 spell; uint32 spell2; - void Reset(){} - void EnterCombat(Unit* /*who*/){} + void Reset() {} + void EnterCombat(Unit* /*who*/) {} void SetType(uint32 _type) { switch (Creaturetype = _type) @@ -205,7 +212,6 @@ public: } } }; - }; class mob_head : public CreatureScript @@ -220,7 +226,7 @@ public: struct mob_headAI : public ScriptedAI { - mob_headAI(Creature* c) : ScriptedAI(c) {} + mob_headAI(Creature* creature) : ScriptedAI(creature) {} uint64 bodyGUID; @@ -316,7 +322,8 @@ public: if (!me->getVictim()) return; me->GetMotionMaster()->Clear(false); me->GetMotionMaster()->MoveFleeing(me->getVictim()); - } else wait -= diff; + } + else wait -= diff; if (laugh <= diff) { @@ -327,7 +334,8 @@ public: if (speaker) speaker->CastSpell(speaker, SPELL_HEAD_SPEAKS, false); me->MonsterTextEmote(EMOTE_LAUGHS, 0); - } else laugh -= diff; + } + else laugh -= diff; } else { @@ -339,12 +347,12 @@ public: if (Unit* body = Unit::GetUnit((*me), bodyGUID)) body->Kill(body); me->Kill(me); - } else wait -= diff; + } + else wait -= diff; } } } }; - }; class boss_headless_horseman : public CreatureScript @@ -359,9 +367,9 @@ public: struct boss_headless_horsemanAI : public ScriptedAI { - boss_headless_horsemanAI(Creature* c) : ScriptedAI(c) + boss_headless_horsemanAI(Creature* creature) : ScriptedAI(creature) { - instance = c->GetInstanceScript(); + instance = creature->GetInstanceScript(); } InstanceScript* instance; @@ -636,7 +644,8 @@ public: break; } ++count; - } else say_timer -= diff; + } + else say_timer -= diff; } else { @@ -657,7 +666,8 @@ public: if (Creature* flame = me->SummonCreature(HELPER, Spawn[0].x, Spawn[0].y, Spawn[0].z, 0, TEMPSUMMON_TIMED_DESPAWN, 17000)) CAST_AI(mob_wisp_invis::mob_wisp_invisAI, flame->AI())->SetType(2); burned = true; - } else burn -= diff; + } + else burn -= diff; break; case 2: if (conflagrate <= diff) @@ -665,7 +675,8 @@ public: if (Unit* player = SelectRandomPlayer(30.0f)) DoCast(player, SPELL_CONFLAGRATION, false); conflagrate = urand(10000, 16000); - } else conflagrate -= diff; + } + else conflagrate -= diff; break; case 3: if (summonadds <= diff) @@ -674,7 +685,8 @@ public: DoCast(me, SPELL_SUMMON_PUMPKIN); SaySound(SAY_SPROUTING_PUMPKINS); summonadds = urand(25000, 35000); - } else summonadds -= diff; + } + else summonadds -= diff; break; } @@ -683,7 +695,8 @@ public: laugh = urand(11000, 22000); me->MonsterTextEmote(EMOTE_LAUGHS, 0); DoPlaySoundToSet(me, RandomLaugh[rand()%3]); - } else laugh -= diff; + } + else laugh -= diff; if (UpdateVictim()) { @@ -692,7 +705,8 @@ public: { DoCast(me->getVictim(), SPELL_CLEAVE); cleave = urand(2000, 6000); //1 cleave per 2.0f-6.0fsec - } else cleave -= diff; + } + else cleave -= diff; } } else @@ -725,13 +739,14 @@ public: me->RemoveAurasDueToSpell(SPELL_CONFUSE); DoCast(me, SPELL_WHIRLWIND, true); DoCast(me, SPELL_CONFUSE); - } else + } + else me->RemoveAurasDueToSpell(SPELL_WHIRLWIND); - } else whirlwind -= diff; + } + else whirlwind -= diff; } } }; - }; class mob_pulsing_pumpkin : public CreatureScript @@ -746,7 +761,7 @@ public: struct mob_pulsing_pumpkinAI : public ScriptedAI { - mob_pulsing_pumpkinAI(Creature* c) : ScriptedAI(c) {} + mob_pulsing_pumpkinAI(Creature* creature) : ScriptedAI(creature) {} bool sprouted; uint64 debuffGUID; @@ -771,7 +786,7 @@ public: me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); } - void EnterCombat(Unit* /*who*/){} + void EnterCombat(Unit* /*who*/) {} void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { @@ -813,7 +828,6 @@ public: DoMeleeAttackIfReady(); } }; - }; class go_loosely_turned_soil : public GameObjectScript @@ -846,13 +860,13 @@ public: //} return true; } - }; void mob_head::mob_headAI::Disappear() { if (withbody) return; + if (bodyGUID) { Creature* body = Unit::GetCreature((*me), bodyGUID); diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp index bb2fea6a1a7..16b90f89bb5 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -26,19 +26,32 @@ EndScriptData */ #include "ScriptPCH.h" #include "ScriptedEscortAI.h" -#define SAY_AGGRO -1189000 -#define SAY_WHIRLWIND -1189001 -#define SAY_ENRAGE -1189002 -#define SAY_KILL -1189003 -#define EMOTE_ENRAGE -1189004 +enum Says +{ + SAY_AGGRO = -1189000, + SAY_WHIRLWIND = -1189001, + SAY_ENRAGE = -1189002, + SAY_KILL = -1189003 +}; -#define SPELL_RUSHINGCHARGE 8260 -#define SPELL_CLEAVE 15496 -#define SPELL_WHIRLWIND 8989 -#define SPELL_FRENZY 8269 +enum Emotes +{ + EMOTE_ENRAGE = -1189004 +}; -#define ENTRY_SCARLET_TRAINEE 6575 -#define ENTRY_SCARLET_MYRMIDON 4295 +enum Spells +{ + SPELL_RUSHINGCHARGE = 8260, + SPELL_CLEAVE = 15496, + SPELL_WHIRLWIND = 8989, + SPELL_FRENZY = 8269 +}; + +enum Entry +{ + ENTRY_SCARLET_TRAINEE = 6575, + ENTRY_SCARLET_MYRMIDON = 4295 +}; class boss_herod : public CreatureScript { @@ -52,7 +65,7 @@ public: struct boss_herodAI : public ScriptedAI { - boss_herodAI(Creature* c) : ScriptedAI(c) {} + boss_herodAI(Creature* creature) : ScriptedAI(creature) {} bool Enrage; @@ -102,7 +115,8 @@ public: { DoCast(me->getVictim(), SPELL_CLEAVE); Cleave_Timer = 12000; - } else Cleave_Timer -= diff; + } + else Cleave_Timer -= diff; // Whirlwind_Timer if (Whirlwind_Timer <= diff) @@ -110,12 +124,12 @@ public: DoScriptText(SAY_WHIRLWIND, me); DoCast(me->getVictim(), SPELL_WHIRLWIND); Whirlwind_Timer = 30000; - } else Whirlwind_Timer -= diff; + } + else Whirlwind_Timer -= diff; DoMeleeAttackIfReady(); } }; - }; class mob_scarlet_trainee : public CreatureScript @@ -130,7 +144,7 @@ public: struct mob_scarlet_traineeAI : public npc_escortAI { - mob_scarlet_traineeAI(Creature* c) : npc_escortAI(c) + mob_scarlet_traineeAI(Creature* creature) : npc_escortAI(creature) { Start_Timer = urand(1000, 6000); } @@ -138,7 +152,7 @@ public: uint32 Start_Timer; void Reset() {} - void WaypointReached(uint32 /*uiPoint*/) {} + void WaypointReached(uint32 /*point*/) {} void EnterCombat(Unit* /*who*/) {} void UpdateAI(const uint32 diff) @@ -155,7 +169,6 @@ public: npc_escortAI::UpdateAI(diff); } }; - }; void AddSC_boss_herod() diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp index 5c6b31c2ab7..a64636a4223 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -47,7 +47,7 @@ public: struct boss_high_inquisitor_fairbanksAI : public ScriptedAI { - boss_high_inquisitor_fairbanksAI(Creature* c) : ScriptedAI(c) {} + boss_high_inquisitor_fairbanksAI(Creature* creature) : ScriptedAI(creature) {} uint32 CurseOfBlood_Timer; uint32 DispelMagic_Timer; @@ -68,9 +68,7 @@ public: PowerWordShield = false; } - void EnterCombat(Unit* /*who*/) - { - } + void EnterCombat(Unit* /*who*/) {} void UpdateAI(const uint32 diff) { @@ -82,7 +80,8 @@ public: { DoCast(me, SPELL_HEAL); Heal_Timer = 30000; - } else Heal_Timer -= diff; + } + else Heal_Timer -= diff; //Fear_Timer if (Fear_Timer <= diff) @@ -91,7 +90,8 @@ public: DoCast(target, SPELL_FEAR); Fear_Timer = 40000; - } else Fear_Timer -= diff; + } + else Fear_Timer -= diff; //Sleep_Timer if (Sleep_Timer <= diff) @@ -100,7 +100,8 @@ public: DoCast(target, SPELL_SLEEP); Sleep_Timer = 30000; - } else Sleep_Timer -= diff; + } + else Sleep_Timer -= diff; //PowerWordShield_Timer if (!PowerWordShield && !HealthAbovePct(25)) @@ -116,19 +117,20 @@ public: DoCast(target, SPELL_DISPELMAGIC); DispelMagic_Timer = 30000; - } else DispelMagic_Timer -= diff; + } + else DispelMagic_Timer -= diff; //CurseOfBlood_Timer if (CurseOfBlood_Timer <= diff) { DoCast(me->getVictim(), SPELL_CURSEOFBLOOD); CurseOfBlood_Timer = 25000; - } else CurseOfBlood_Timer -= diff; + } + else CurseOfBlood_Timer -= diff; DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_high_inquisitor_fairbanks() diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp index 8b0f793d2df..f311da401d4 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -44,7 +44,7 @@ public: struct boss_houndmaster_lokseyAI : public ScriptedAI { - boss_houndmaster_lokseyAI(Creature* c) : ScriptedAI(c) {} + boss_houndmaster_lokseyAI(Creature* creature) : ScriptedAI(creature) {} uint32 BloodLust_Timer; @@ -67,12 +67,12 @@ public: { DoCast(me, SPELL_BLOODLUST); BloodLust_Timer = 20000; - } else BloodLust_Timer -= diff; + } + else BloodLust_Timer -= diff; DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_houndmaster_loksey() diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp index e66c639896e..058c688641f 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -26,15 +26,18 @@ EndScriptData */ #include "ScriptPCH.h" #include "scarlet_monastery.h" -enum eEnums +enum Says { SAY_AGGRO = -1189011, SAY_HEALTH1 = -1189012, SAY_HEALTH2 = -1189013, SAY_KILL = -1189014, - SAY_TRIGGER_VORREL = -1189015, + SAY_TRIGGER_VORREL = -1189015 +}; - SPELL_SHADOWWORDPAIN = 2767, +enum Spells +{ + SPELL_SHADOWWORDPAIN = 2767 }; class boss_interrogator_vishas : public CreatureScript @@ -49,7 +52,7 @@ public: struct boss_interrogator_vishasAI : public ScriptedAI { - boss_interrogator_vishasAI(Creature* c) : ScriptedAI(c) + boss_interrogator_vishasAI(Creature* creature) : ScriptedAI(creature) { instance = me->GetInstanceScript(); } @@ -108,12 +111,12 @@ public: { DoCast(me->getVictim(), SPELL_SHADOWWORDPAIN); ShadowWordPain_Timer = urand(5000, 15000); - } else ShadowWordPain_Timer -= diff; + } + else ShadowWordPain_Timer -= diff; DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_interrogator_vishas() diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp index d0ea617b734..ec6ac34b0bb 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -26,7 +26,7 @@ EndScriptData */ #include "ScriptPCH.h" #include "scarlet_monastery.h" -enum eEnums +enum Says { //Mograine says SAY_MO_AGGRO = -1189005, @@ -37,7 +37,10 @@ enum eEnums SAY_WH_INTRO = -1189008, SAY_WH_KILL = -1189009, SAY_WH_RESSURECT = -1189010, +}; +enum Spells +{ //Mograine Spells SPELL_CRUSADERSTRIKE = 14518, SPELL_HAMMEROFJUSTICE = 5589, @@ -67,43 +70,43 @@ public: { boss_scarlet_commander_mograineAI(Creature* creature) : ScriptedAI(creature) { - m_instance = creature->GetInstanceScript(); + instance = creature->GetInstanceScript(); } - InstanceScript* m_instance; + InstanceScript* instance; - uint32 m_uiCrusaderStrike_Timer; - uint32 m_uiHammerOfJustice_Timer; + uint32 CrusaderStrike_Timer; + uint32 HammerOfJustice_Timer; - bool m_bHasDied; - bool m_bHeal; - bool m_bFakeDeath; + bool _bHasDied; + bool _bHeal; + bool _bFakeDeath; void Reset() { - m_uiCrusaderStrike_Timer = 10000; - m_uiHammerOfJustice_Timer = 10000; + CrusaderStrike_Timer = 10000; + HammerOfJustice_Timer = 10000; //Incase wipe during phase that mograine fake death me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetStandState(UNIT_STAND_STATE_STAND); - if (m_instance) + if (instance) if (me->isAlive()) - m_instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED); + instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED); - m_bHasDied = false; - m_bHeal = false; - m_bFakeDeath = false; + _bHasDied = false; + _bHeal = false; + _bFakeDeath = false; } void JustReachedHome() { - if (m_instance) + if (instance) { - if (m_instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) != NOT_STARTED) - m_instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, FAIL); + if (instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) != NOT_STARTED) + instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, FAIL); } } @@ -120,18 +123,18 @@ public: DoScriptText(SAY_MO_KILL, me); } - void DamageTaken(Unit* /*pDoneBy*/, uint32 &uiDamage) + void DamageTaken(Unit* /*doneBy*/, uint32 &damage) { - if (uiDamage < me->GetHealth() || m_bHasDied || m_bFakeDeath) + if (damage < me->GetHealth() || _bHasDied || _bFakeDeath) return; - if (!m_instance) + if (!instance) return; //On first death, fake death and open door, as well as initiate whitemane if exist - if (Unit* Whitemane = Unit::GetUnit((*me), m_instance->GetData64(DATA_WHITEMANE))) + if (Unit* Whitemane = Unit::GetUnit((*me), instance->GetData64(DATA_WHITEMANE))) { - m_instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS); + instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS); Whitemane->GetMotionMaster()->MovePoint(1, 1163.113370f, 1398.856812f, 32.527786f); @@ -150,72 +153,73 @@ public: me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetStandState(UNIT_STAND_STATE_DEAD); - m_bHasDied = true; - m_bFakeDeath = true; + _bHasDied = true; + _bFakeDeath = true; - uiDamage = 0; + damage = 0; } } - void SpellHit(Unit* /*who*/, const SpellInfo* pSpell) + void SpellHit(Unit* /*who*/, const SpellInfo* spell) { //When hit with ressurection say text - if (pSpell->Id == SPELL_SCARLETRESURRECTION) + if (spell->Id == SPELL_SCARLETRESURRECTION) { DoScriptText(SAY_MO_RESSURECTED, me); - m_bFakeDeath = false; + _bFakeDeath = false; - if (m_instance) - m_instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, SPECIAL); + if (instance) + instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, SPECIAL); } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; - if (m_bHasDied && !m_bHeal && m_instance && m_instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == SPECIAL) + if (_bHasDied && !_bHeal && instance && instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == SPECIAL) { //On ressurection, stop fake death and heal whitemane and resume fight - if (Unit* Whitemane = Unit::GetUnit((*me), m_instance->GetData64(DATA_WHITEMANE))) + if (Unit* Whitemane = Unit::GetUnit((*me), instance->GetData64(DATA_WHITEMANE))) { me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetStandState(UNIT_STAND_STATE_STAND); DoCast(Whitemane, SPELL_LAYONHANDS); - m_uiCrusaderStrike_Timer = 10000; - m_uiHammerOfJustice_Timer = 10000; + CrusaderStrike_Timer = 10000; + HammerOfJustice_Timer = 10000; if (me->getVictim()) me->GetMotionMaster()->MoveChase(me->getVictim()); - m_bHeal = true; + _bHeal = true; } } //This if-check to make sure mograine does not attack while fake death - if (m_bFakeDeath) + if (_bFakeDeath) return; - //m_uiCrusaderStrike_Timer - if (m_uiCrusaderStrike_Timer <= uiDiff) + //CrusaderStrike_Timer + if (CrusaderStrike_Timer <= diff) { DoCast(me->getVictim(), SPELL_CRUSADERSTRIKE); - m_uiCrusaderStrike_Timer = 10000; - } else m_uiCrusaderStrike_Timer -= uiDiff; + CrusaderStrike_Timer = 10000; + } + else CrusaderStrike_Timer -= diff; - //m_uiHammerOfJustice_Timer - if (m_uiHammerOfJustice_Timer <= uiDiff) + //HammerOfJustice_Timer + if (HammerOfJustice_Timer <= diff) { DoCast(me->getVictim(), SPELL_HAMMEROFJUSTICE); - m_uiHammerOfJustice_Timer = 60000; - } else m_uiHammerOfJustice_Timer -= uiDiff; + HammerOfJustice_Timer = 60000; + } + else HammerOfJustice_Timer -= diff; DoMeleeAttackIfReady(); } }; - }; class boss_high_inquisitor_whitemane : public CreatureScript @@ -232,37 +236,37 @@ public: { boss_high_inquisitor_whitemaneAI(Creature* creature) : ScriptedAI(creature) { - m_instance = creature->GetInstanceScript(); + instance = creature->GetInstanceScript(); } - InstanceScript* m_instance; + InstanceScript* instance; - uint32 m_uiHeal_Timer; - uint32 m_uiPowerWordShield_Timer; - uint32 m_uiHolySmite_Timer; - uint32 m_uiWait_Timer; + uint32 Heal_Timer; + uint32 PowerWordShield_Timer; + uint32 HolySmite_Timer; + uint32 Wait_Timer; - bool m_bCanResurrectCheck; - bool m_bCanResurrect; + bool _bCanResurrectCheck; + bool _bCanResurrect; void Reset() { - m_uiWait_Timer = 7000; - m_uiHeal_Timer = 10000; - m_uiPowerWordShield_Timer = 15000; - m_uiHolySmite_Timer = 6000; + Wait_Timer = 7000; + Heal_Timer = 10000; + PowerWordShield_Timer = 15000; + HolySmite_Timer = 6000; - m_bCanResurrectCheck = false; - m_bCanResurrect = false; + _bCanResurrectCheck = false; + _bCanResurrect = false; - if (m_instance) + if (instance) if (me->isAlive()) - m_instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED); + instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED); } void AttackStart(Unit* who) { - if (m_instance && m_instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == NOT_STARTED) + if (instance && instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == NOT_STARTED) return; ScriptedAI::AttackStart(who); @@ -278,84 +282,86 @@ public: DoScriptText(SAY_WH_KILL, me); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; - if (m_bCanResurrect) + if (_bCanResurrect) { //When casting resuruction make sure to delay so on rez when reinstate battle deepsleep runs out - if (m_instance && m_uiWait_Timer <= uiDiff) + if (instance && Wait_Timer <= diff) { - if (Unit* Mograine = Unit::GetUnit((*me), m_instance->GetData64(DATA_MOGRAINE))) + if (Unit* Mograine = Unit::GetUnit((*me), instance->GetData64(DATA_MOGRAINE))) { DoCast(Mograine, SPELL_SCARLETRESURRECTION); DoScriptText(SAY_WH_RESSURECT, me); - m_bCanResurrect = false; + _bCanResurrect = false; } } - else m_uiWait_Timer -= uiDiff; + else Wait_Timer -= diff; } //Cast Deep sleep when health is less than 50% - if (!m_bCanResurrectCheck && !HealthAbovePct(50)) + if (!_bCanResurrectCheck && !HealthAbovePct(50)) { if (me->IsNonMeleeSpellCasted(false)) me->InterruptNonMeleeSpells(false); DoCast(me->getVictim(), SPELL_DEEPSLEEP); - m_bCanResurrectCheck = true; - m_bCanResurrect = true; + _bCanResurrectCheck = true; + _bCanResurrect = true; return; } //while in "resurrect-mode", don't do anything - if (m_bCanResurrect) + if (_bCanResurrect) return; //If we are <75% hp cast healing spells at self or Mograine - if (m_uiHeal_Timer <= uiDiff) + if (Heal_Timer <= diff) { Creature* target = NULL; if (!HealthAbovePct(75)) target = me; - if (m_instance) + if (instance) { - if (Creature* pMograine = Unit::GetCreature((*me), m_instance->GetData64(DATA_MOGRAINE))) + if (Creature* mograine = Unit::GetCreature((*me), instance->GetData64(DATA_MOGRAINE))) { - // checking m_bCanResurrectCheck prevents her healing Mograine while he is "faking death" - if (m_bCanResurrectCheck && pMograine->isAlive() && !pMograine->HealthAbovePct(75)) - target = pMograine; + // checking _bCanResurrectCheck prevents her healing Mograine while he is "faking death" + if (_bCanResurrectCheck && mograine->isAlive() && !mograine->HealthAbovePct(75)) + target = mograine; } } if (target) DoCast(target, SPELL_HEAL); - m_uiHeal_Timer = 13000; - } else m_uiHeal_Timer -= uiDiff; + Heal_Timer = 13000; + } + else Heal_Timer -= diff; - //m_uiPowerWordShield_Timer - if (m_uiPowerWordShield_Timer <= uiDiff) + //PowerWordShield_Timer + if (PowerWordShield_Timer <= diff) { DoCast(me, SPELL_POWERWORDSHIELD); - m_uiPowerWordShield_Timer = 15000; - } else m_uiPowerWordShield_Timer -= uiDiff; + PowerWordShield_Timer = 15000; + } + else PowerWordShield_Timer -= diff; - //m_uiHolySmite_Timer - if (m_uiHolySmite_Timer <= uiDiff) + //HolySmite_Timer + if (HolySmite_Timer <= diff) { DoCast(me->getVictim(), SPELL_HOLYSMITE); - m_uiHolySmite_Timer = 6000; - } else m_uiHolySmite_Timer -= uiDiff; + HolySmite_Timer = 6000; + } + else HolySmite_Timer -= diff; DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_mograine_and_whitemane() diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp index 7ee479727ed..8035adfc33f 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -25,10 +25,13 @@ EndScriptData */ #include "ScriptPCH.h" -#define SPELL_LICHSLAP 28873 -#define SPELL_FROSTBOLTVOLLEY 8398 -#define SPELL_MINDFLAY 17313 -#define SPELL_FROSTNOVA 15531 +enum Spells +{ + SPELL_LICHSLAP = 28873, + SPELL_FROSTBOLTVOLLEY = 8398, + SPELL_MINDFLAY = 17313, + SPELL_FROSTNOVA = 15531 +}; class boss_scorn : public CreatureScript { @@ -42,7 +45,7 @@ public: struct boss_scornAI : public ScriptedAI { - boss_scornAI(Creature* c) : ScriptedAI(c) {} + boss_scornAI(Creature* creature) : ScriptedAI(creature) {} uint32 LichSlap_Timer; uint32 FrostboltVolley_Timer; @@ -57,9 +60,7 @@ public: FrostNova_Timer = 30000; } - void EnterCombat(Unit* /*who*/) - { - } + void EnterCombat(Unit* /*who*/) {} void UpdateAI(const uint32 diff) { @@ -71,33 +72,36 @@ public: { DoCast(me->getVictim(), SPELL_LICHSLAP); LichSlap_Timer = 45000; - } else LichSlap_Timer -= diff; + } + else LichSlap_Timer -= diff; //FrostboltVolley_Timer if (FrostboltVolley_Timer <= diff) { DoCast(me->getVictim(), SPELL_FROSTBOLTVOLLEY); FrostboltVolley_Timer = 20000; - } else FrostboltVolley_Timer -= diff; + } + else FrostboltVolley_Timer -= diff; //MindFlay_Timer if (MindFlay_Timer <= diff) { DoCast(me->getVictim(), SPELL_MINDFLAY); MindFlay_Timer = 20000; - } else MindFlay_Timer -= diff; + } + else MindFlay_Timer -= diff; //FrostNova_Timer if (FrostNova_Timer <= diff) { DoCast(me->getVictim(), SPELL_FROSTNOVA); FrostNova_Timer = 15000; - } else FrostNova_Timer -= diff; + } + else FrostNova_Timer -= diff; DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_scorn() diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index ba3759e7062..ba0b854754e 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -26,10 +26,13 @@ EndScriptData */ #include "ScriptPCH.h" #include "scarlet_monastery.h" -#define ENTRY_PUMPKIN_SHRINE 186267 -#define ENTRY_HORSEMAN 23682 -#define ENTRY_HEAD 23775 -#define ENTRY_PUMPKIN 23694 +enum Entry +{ + ENTRY_PUMPKIN_SHRINE = 186267, + ENTRY_HORSEMAN = 23682, + ENTRY_HEAD = 23775, + ENTRY_PUMPKIN = 23694 +}; #define MAX_ENCOUNTER 2 @@ -57,11 +60,11 @@ public: uint64 VorrelGUID; uint64 DoorHighInquisitorGUID; - uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint32 encounter[MAX_ENCOUNTER]; void Initialize() { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + memset(&encounter, 0, sizeof(encounter)); PumpkinShrineGUID = 0; HorsemanGUID = 0; @@ -106,13 +109,13 @@ public: if (data == FAIL) DoUseDoorOrButton(DoorHighInquisitorGUID); - m_auiEncounter[0] = data; + encounter[0] = data; break; case GAMEOBJECT_PUMPKIN_SHRINE: HandleGameObject(PumpkinShrineGUID, false); break; case DATA_HORSEMAN_EVENT: - m_auiEncounter[1] = data; + encounter[1] = data; if (data == DONE) { for (std::set<uint64>::const_iterator itr = HorsemanAdds.begin(); itr != HorsemanAdds.end(); ++itr) @@ -146,13 +149,12 @@ public: uint32 GetData(uint32 type) { if (type == TYPE_MOGRAINE_AND_WHITE_EVENT) - return m_auiEncounter[0]; + return encounter[0]; if (type == DATA_HORSEMAN_EVENT) - return m_auiEncounter[1]; + return encounter[1]; return 0; } }; - }; void AddSC_instance_scarlet_monastery() diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h index 4b5cd422198..70b18919704 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -19,14 +19,17 @@ #ifndef DEF_SCARLET_M #define DEF_SCARLET_M -#define TYPE_MOGRAINE_AND_WHITE_EVENT 1 -#define DATA_MOGRAINE 2 -#define DATA_WHITEMANE 3 -#define DATA_DOOR_WHITEMANE 4 +enum eEnums +{ + TYPE_MOGRAINE_AND_WHITE_EVENT = 1, -#define DATA_HORSEMAN_EVENT 5 -#define GAMEOBJECT_PUMPKIN_SHRINE 6 + DATA_MOGRAINE = 2, + DATA_WHITEMANE = 3, + DATA_DOOR_WHITEMANE = 4, -#define DATA_VORREL 7 -#endif + DATA_HORSEMAN_EVENT = 5, + GAMEOBJECT_PUMPKIN_SHRINE = 6, + DATA_VORREL = 7 +}; +#endif diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp index d930dd4a14c..4ddc240a03c 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp index 4c66c129893..693cad06bd5 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp index 4ea79c8332a..05d662c4fe3 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp index a5c1436153b..92f0fcd25c4 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp index e7388503177..295d9440d2e 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp index 2d1d78193ed..48bf000745c 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp index 72685d29181..7c279e726a6 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp index ac9a62f2b27..5109e6e1468 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp index a575d039dfa..754640bff9e 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp index efff8042824..902838da152 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp index 052e950b4e8..13fa450f5ee 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp index 3512e4cd1cf..657b458e148 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp index a96fe8b935b..86023d21eca 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h b/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h index 4c0d2061639..6e8ed21e4bb 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h +++ b/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index d5a641fc0f6..57b902ac6d4 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -252,7 +252,7 @@ public: { case 1: summon = pArchmage->SummonCreature(pArchmage->GetEntry(), SpawnLocation[4], TEMPSUMMON_TIMED_DESPAWN, 10000); - summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); summon->SetReactState(REACT_DEFENSIVE); summon->CastSpell(summon, SPELL_ASHCROMBE_TELEPORT, true); DoScriptText(SAY_ARCHMAGE, summon); diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp index 666bc690f8d..dded75e193c 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h index 9b1ffe5e1b2..0c41239c9b4 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp index 86cd3019fd8..0c659117f5d 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp index 3cd6078eb41..a01846cb862 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp index edf291a7c0e..d84bd489dab 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp index 3cbf00f291d..8a14f1e2401 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp index 1a4acf9be7e..48b1fc2acc7 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp index cb423d9a781..1dc22a20d08 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp index 13ce7631be5..a7c91c3636d 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp index b93d289e0cc..3393b9e5797 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp index f6d6ae377e4..869a82011ad 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp index 5d7e6c9467e..f35bcc05ec2 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp index 96e313dc6a2..405527ab383 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp index 618ac8b7c27..387b6d7b13c 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index 39019c46850..5b2b2fd46c1 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h index b7707899089..b28271f5915 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp index 931fc46a85a..e804fff44f5 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp index 50eb34e6ffb..35d6766872f 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h index 91f62958be5..6b93ef03fa8 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index 75bca682660..1404fd14e91 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index d00f2b8de48..56d7909336c 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index 4e3f3899b35..c65ce2c8f98 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index 747d9e29ec1..d7c90732a80 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index ca853d5684e..337eea13438 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -425,7 +425,7 @@ public: { me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - me->AddUnitState(UNIT_STAT_STUNNED); + me->AddUnitState(UNIT_STATE_STUNNED); ScriptedAI::InitializeAI(); } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index 7c14845f060..9b5d941589b 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -151,7 +151,7 @@ public: summoned->CastSpell(summoned, SPELL_DARKFIEND_VISUAL, false); break; case CREATURE_DARKNESS: - summoned->AddUnitState(UNIT_STAT_STUNNED); + summoned->AddUnitState(UNIT_STATE_STUNNED); float x, y, z, o; summoned->GetHomePosition(x, y, z, o); me->SummonCreature(CREATURE_DARK_FIENDS, x, y, z, o, TEMPSUMMON_CORPSE_DESPAWN, 0); @@ -399,7 +399,7 @@ public: InAction = false; SummonSentinel = false; - me->AddUnitState(UNIT_STAT_STUNNED); + me->AddUnitState(UNIT_STATE_STUNNED); Summons.DespawnAll(); } @@ -472,7 +472,7 @@ public: WaitTimer = 2000; InAction = false; - me->AddUnitState(UNIT_STAT_STUNNED); + me->AddUnitState(UNIT_STATE_STUNNED); } void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) @@ -491,7 +491,7 @@ public: { if (!InAction) { - me->ClearUnitState(UNIT_STAT_STUNNED); + me->ClearUnitState(UNIT_STATE_STUNNED); DoCastAOE(SPELL_DARKFIEND_SKIN, false); AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)); InAction = true; @@ -599,7 +599,7 @@ public: SpellTimer = 5000; Phase = 0; - me->AddUnitState(UNIT_STAT_STUNNED); + me->AddUnitState(UNIT_STATE_STUNNED); DoCastAOE(SPELL_BLACKHOLE_SPAWN, true); } @@ -611,7 +611,7 @@ public: switch (NeedForAHack) { case 0: - me->ClearUnitState(UNIT_STAT_STUNNED); + me->ClearUnitState(UNIT_STATE_STUNNED); DoCastAOE(SPELL_BLACKHOLE_GROW, false); if (Victim) AttackStart(Victim); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index a6d631a5b85..645026c343d 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp index 59be2f2a643..e6349e3497e 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h index efd00ca238f..ed21077cc63 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index 74c9e6b66b4..0872ac9adca 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2007 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp index 0ec25a265fc..8a845dbb7f6 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index 0b97274310a..60d17a7e5d2 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2007 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp index 0a80900edf4..7bcd2598271 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h index af0e9c18311..360a80ac4f3 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h +++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index ffccfbce2b6..eee6b08d834 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -325,7 +325,7 @@ class boss_akilzon : public CreatureScript if (target) { target->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING); - target->SendMonsterMove(x, y, me->GetPositionZ()+15, 0); + target->MonsterMoveWithSpeed(x, y, me->GetPositionZ()+15, 0); } Unit* Cloud = me->SummonTrigger(x, y, me->GetPositionZ()+16, 0, 15000); if (Cloud) diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp index 80c31d42a46..db0e201298c 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index 162c84f1fa7..5efd4af55ea 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2007 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index aea9e322583..21245209e45 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp index 0ae8a9bc5c4..954f232f786 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index 5dbe3fc9409..b5130630d05 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index 2785c61dec5..ac1554bd00e 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index a6eb4c91d4c..bf951dd186c 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h index 844e1c33eca..daad916c0aa 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp index 076545ae9d4..27ddc215543 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp index 5ca43e9268e..a944a857f74 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp index d3922602a17..68ae6dbbf0c 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp index 484499b1567..6a1309983c3 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp index 73fa91dbdd8..69a4f5dbab5 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp index 87dc0e372f6..d2ac4f3bceb 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp index 9c82c3eddfb..132812c932a 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp index 06ae34b79b2..10708cd7f95 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp index 5dafa54a2ba..38d9be78f2a 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp index c3bf09ee28d..f988d0df77a 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp index 743ec211529..4185ba2f3e7 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp index b0bbc0c6c79..bd6f6ec4748 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -173,7 +173,7 @@ class boss_venoxis : public CreatureScript events.Update(diff); // return back to main code if we're still casting - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp index 179935524a8..702a69207ba 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp index e059b7945ee..e3dd5d5933b 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h index 53dfbd9e93d..d127680cec5 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h +++ b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/alterac_mountains.cpp b/src/server/scripts/EasternKingdoms/alterac_mountains.cpp index 36daf41ec78..e4b24dc00ee 100644 --- a/src/server/scripts/EasternKingdoms/alterac_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/alterac_mountains.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp index 0ce940723cb..e2a9717882b 100644 --- a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp +++ b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -36,16 +36,16 @@ EndContentData */ enum eEnums { - SAY_PROGRESS_1 = -1000264, - SAY_PROGRESS_2 = -1000265, - SAY_PROGRESS_3 = -1000266, - EMOTE_PROGRESS_4 = -1000267, - SAY_AGGRO = -1000268, - SAY_PROGRESS_5 = -1000269, - SAY_PROGRESS_6 = -1000270, - SAY_PROGRESS_7 = -1000271, - EMOTE_PROGRESS_8 = -1000272, - SAY_PROGRESS_9 = -1000273, + SAY_PROGRESS_1 = 0, + SAY_PROGRESS_2 = 1, + SAY_PROGRESS_3 = 2, + EMOTE_PROGRESS_4 = 3, + SAY_AGGRO = 4, + SAY_PROGRESS_5 = 5, + SAY_PROGRESS_6 = 6, + SAY_PROGRESS_7 = 7, + EMOTE_PROGRESS_8 = 8, + SAY_PROGRESS_9 = 9, QUEST_SUNKEN_TREASURE = 665, MOB_VENGEFUL_SURGE = 2776 @@ -73,24 +73,24 @@ class npc_professor_phizzlethorpe : public CreatureScript switch (uiPointId) { - case 4:DoScriptText(SAY_PROGRESS_2, me, player);break; - case 5:DoScriptText(SAY_PROGRESS_3, me, player);break; - case 8:DoScriptText(EMOTE_PROGRESS_4, me);break; + case 4:Talk(SAY_PROGRESS_2, player->GetGUID());break; + case 5:Talk(SAY_PROGRESS_3, player->GetGUID());break; + case 8:Talk(EMOTE_PROGRESS_4);break; case 9: { me->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96f, -2142.49f, 20.15f, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); me->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96f, -2142.49f, 20.15f, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); break; } - case 10:DoScriptText(SAY_PROGRESS_5, me, player);break; + case 10:Talk(SAY_PROGRESS_5, player->GetGUID());break; case 11: - DoScriptText(SAY_PROGRESS_6, me, player); + Talk(SAY_PROGRESS_6, player->GetGUID()); SetRun(); break; - case 19:DoScriptText(SAY_PROGRESS_7, me, player); break; + case 19:Talk(SAY_PROGRESS_7, player->GetGUID()); break; case 20: - DoScriptText(EMOTE_PROGRESS_8, me); - DoScriptText(SAY_PROGRESS_9, me, player); + Talk(EMOTE_PROGRESS_8); + Talk(SAY_PROGRESS_9, player->GetGUID()); if (player) CAST_PLR(player)->GroupEventHappens(QUEST_SUNKEN_TREASURE, me); break; @@ -104,7 +104,7 @@ class npc_professor_phizzlethorpe : public CreatureScript void EnterCombat(Unit* /*who*/) { - DoScriptText(SAY_AGGRO, me); + Talk(SAY_AGGRO); } void UpdateAI(const uint32 diff) @@ -122,7 +122,7 @@ class npc_professor_phizzlethorpe : public CreatureScript { if (quest->GetQuestId() == QUEST_SUNKEN_TREASURE) { - DoScriptText(SAY_PROGRESS_1, creature, player); + creature->AI()->Talk(SAY_PROGRESS_1, player->GetGUID()); if (npc_escortAI* pEscortAI = CAST_AI(npc_professor_phizzlethorpeAI, (creature->AI()))) pEscortAI->Start(false, false, player->GetGUID(), quest); diff --git a/src/server/scripts/EasternKingdoms/blasted_lands.cpp b/src/server/scripts/EasternKingdoms/blasted_lands.cpp index 38a577b9ba9..1e34051db28 100644 --- a/src/server/scripts/EasternKingdoms/blasted_lands.cpp +++ b/src/server/scripts/EasternKingdoms/blasted_lands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/boss_kruul.cpp b/src/server/scripts/EasternKingdoms/boss_kruul.cpp index 3167eadc5fe..126f55838b9 100644 --- a/src/server/scripts/EasternKingdoms/boss_kruul.cpp +++ b/src/server/scripts/EasternKingdoms/boss_kruul.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/burning_steppes.cpp b/src/server/scripts/EasternKingdoms/burning_steppes.cpp index 885cd8b00af..1d2725b10ee 100644 --- a/src/server/scripts/EasternKingdoms/burning_steppes.cpp +++ b/src/server/scripts/EasternKingdoms/burning_steppes.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/duskwood.cpp b/src/server/scripts/EasternKingdoms/duskwood.cpp index 7487ddbc548..5d04489bbca 100644 --- a/src/server/scripts/EasternKingdoms/duskwood.cpp +++ b/src/server/scripts/EasternKingdoms/duskwood.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -25,6 +25,14 @@ EndScriptData */ #include "ScriptPCH.h" +enum Yells +{ + YELL_TWILIGHTCORRUPTOR_RESPAWN = 0, + YELL_TWILIGHTCORRUPTOR_AGGRO = 1, + YELL_TWILIGHTCORRUPTOR_KILL = 2, +}; + + /*###### # at_twilight_grove ######*/ @@ -43,11 +51,11 @@ public: TCorrupter->setFaction(14); TCorrupter->SetMaxHealth(832750); } - if (Unit* CorrupterSpeaker = player->SummonCreature(1, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()-1, 0, TEMPSUMMON_TIMED_DESPAWN, 15000)) + if (Creature* CorrupterSpeaker = player->SummonCreature(1, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()-1, 0, TEMPSUMMON_TIMED_DESPAWN, 15000)) { CorrupterSpeaker->SetName("Twilight Corrupter"); CorrupterSpeaker->SetVisible(true); - CorrupterSpeaker->MonsterYell("Come, $N. See what the Nightmare brings...", 0, player->GetGUID()); + CorrupterSpeaker->AI()->Talk(YELL_TWILIGHTCORRUPTOR_RESPAWN, player->GetGUID()); } } return false; @@ -89,7 +97,7 @@ public: } void EnterCombat(Unit* /*who*/) { - me->MonsterYell("The Nightmare cannot be stopped!", 0, me->GetGUID()); + Talk(YELL_TWILIGHTCORRUPTOR_AGGRO); } void KilledUnit(Unit* victim) @@ -97,7 +105,7 @@ public: if (victim->GetTypeId() == TYPEID_PLAYER) { ++KillCount; - me->MonsterTextEmote("Twilight Corrupter squeezes the last bit of life out of $N and swallows their soul.", victim->GetGUID(), true); + Talk(YELL_TWILIGHTCORRUPTOR_KILL, victim->GetGUID()); if (KillCount == 3) { diff --git a/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp b/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp index c30d5db0244..2b4bb61c603 100644 --- a/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp index d9171308ba6..4797774ef49 100644 --- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp +++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -69,10 +69,10 @@ enum eFaction enum eSays { - TEXT_SECOND_TRIAL_1 = -1000637, - TEXT_SECOND_TRIAL_2 = -1000638, - TEXT_SECOND_TRIAL_3 = -1000639, - TEXT_SECOND_TRIAL_4 = -1000640, + TEXT_SECOND_TRIAL_1 = 0, + TEXT_SECOND_TRIAL_2 = 1, + TEXT_SECOND_TRIAL_3 = 2, + TEXT_SECOND_TRIAL_4 = 3, }; struct Locations @@ -335,16 +335,16 @@ public: switch (paladinPhase) { case 0: - DoScriptText(TEXT_SECOND_TRIAL_1, me); + Talk(TEXT_SECOND_TRIAL_1); break; case 1: - DoScriptText(TEXT_SECOND_TRIAL_2, me); + Talk(TEXT_SECOND_TRIAL_2); break; case 2: - DoScriptText(TEXT_SECOND_TRIAL_3, me); + Talk(TEXT_SECOND_TRIAL_3); break; case 3: - DoScriptText(TEXT_SECOND_TRIAL_4, me); + Talk(TEXT_SECOND_TRIAL_4); break; } } diff --git a/src/server/scripts/EasternKingdoms/ghostlands.cpp b/src/server/scripts/EasternKingdoms/ghostlands.cpp index 655ad4514fe..412613572f1 100644 --- a/src/server/scripts/EasternKingdoms/ghostlands.cpp +++ b/src/server/scripts/EasternKingdoms/ghostlands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -34,45 +34,6 @@ EndContentData */ #include "ScriptedEscortAI.h" /*###### -## npc_blood_knight_dawnstar -######*/ - -#define GOSSIP_H_BKD "Take Blood Knight Insignia" - -class npc_blood_knight_dawnstar : public CreatureScript -{ -public: - npc_blood_knight_dawnstar() : CreatureScript("npc_blood_knight_dawnstar") { } - - bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*uiSender*/, uint32 uiAction) - { - player->PlayerTalkClass->ClearMenus(); - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - ItemPosCountVec dest; - uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 24226, 1, NULL); - if (msg == EQUIP_ERR_OK) - { - player->StoreNewItem(dest, 24226, 1, true); - player->PlayerTalkClass->ClearMenus(); - } - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) - { - if (player->GetQuestStatus(9692) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(24226, 1, true)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_H_BKD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - - return true; - } - -}; - -/*###### ## npc_budd_nedreck ######*/ @@ -255,7 +216,6 @@ public: void AddSC_ghostlands() { - new npc_blood_knight_dawnstar(); new npc_budd_nedreck(); new npc_rathis_tomber(); new npc_ranger_lilatha(); diff --git a/src/server/scripts/EasternKingdoms/hinterlands.cpp b/src/server/scripts/EasternKingdoms/hinterlands.cpp index 89adfee87c4..7021deeae75 100644 --- a/src/server/scripts/EasternKingdoms/hinterlands.cpp +++ b/src/server/scripts/EasternKingdoms/hinterlands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ironforge.cpp b/src/server/scripts/EasternKingdoms/ironforge.cpp index 7b37ddb8991..5a0ee3c5630 100644 --- a/src/server/scripts/EasternKingdoms/ironforge.cpp +++ b/src/server/scripts/EasternKingdoms/ironforge.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp index 6b16eb2937b..f2095de49c3 100644 --- a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp +++ b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/loch_modan.cpp b/src/server/scripts/EasternKingdoms/loch_modan.cpp index 25156201e95..9ce9de4381a 100644 --- a/src/server/scripts/EasternKingdoms/loch_modan.cpp +++ b/src/server/scripts/EasternKingdoms/loch_modan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp index 6e5429582e7..d7b00af33e8 100644 --- a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/EasternKingdoms/searing_gorge.cpp b/src/server/scripts/EasternKingdoms/searing_gorge.cpp index eb5b26a94a0..74172dda743 100644 --- a/src/server/scripts/EasternKingdoms/searing_gorge.cpp +++ b/src/server/scripts/EasternKingdoms/searing_gorge.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp index c4e105d3bee..8d04e92b9b8 100644 --- a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp +++ b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp index 68ab0432bb3..4d897c4f3b8 100644 --- a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp +++ b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -19,12 +19,11 @@ /* ScriptData SDName: Silverpine_Forest SD%Complete: 100 -SDComment: Quest support: 1886, 435, 452 +SDComment: Quest support: 435, 452 SDCategory: Silverpine Forest EndScriptData */ /* ContentData -npc_astor_hadren npc_deathstalker_erland pyrewood_ambush EndContentData */ @@ -33,73 +32,6 @@ EndContentData */ #include "ScriptedEscortAI.h" /*###### -## npc_astor_hadren -######*/ - -#define GOSSIP_HAH "You're Astor Hadren, right?" -#define GOSSIP_SAH "You've got something I need, Astor. And I'll be taking it now." - -class npc_astor_hadren : public CreatureScript -{ -public: - npc_astor_hadren() : CreatureScript("npc_astor_hadren") { } - - CreatureAI* GetAI(Creature* creature) const - { - return new npc_astor_hadrenAI(creature); - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) - { - player->PlayerTalkClass->ClearMenus(); - switch (uiAction) - { - case GOSSIP_ACTION_INFO_DEF + 1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SAH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - player->SEND_GOSSIP_MENU(624, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - player->CLOSE_GOSSIP_MENU(); - creature->setFaction(21); - if (player) - CAST_AI(npc_astor_hadren::npc_astor_hadrenAI, creature->AI())->AttackStart(player); - break; - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) - { - if (player->GetQuestStatus(1886) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HAH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - player->SEND_GOSSIP_MENU(623, creature->GetGUID()); - - return true; - } - - struct npc_astor_hadrenAI : public ScriptedAI - { - npc_astor_hadrenAI(Creature* c) : ScriptedAI(c) {} - - void Reset() - { - me->setFaction(68); - } - - void EnterCombat(Unit* /*who*/) - { - } - - void JustDied(Unit* /*who*/) - { - me->setFaction(68); - } - }; - -}; - -/*###### ## npc_deathstalker_erland ######*/ @@ -386,7 +318,6 @@ public: void AddSC_silverpine_forest() { - new npc_astor_hadren(); new npc_deathstalker_erland(); new pyrewood_ambush(); } diff --git a/src/server/scripts/EasternKingdoms/stormwind_city.cpp b/src/server/scripts/EasternKingdoms/stormwind_city.cpp index 09533ab4ccb..a4eca1950f8 100644 --- a/src/server/scripts/EasternKingdoms/stormwind_city.cpp +++ b/src/server/scripts/EasternKingdoms/stormwind_city.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -26,7 +26,6 @@ EndScriptData */ /* ContentData npc_archmage_malin npc_bartleby -npc_dashel_stonefist npc_lady_katrana_prestor npc_tyrion npc_tyrion_spybot @@ -148,78 +147,6 @@ public: }; /*###### -## npc_dashel_stonefist -######*/ - -enum eDashel -{ - QUEST_MISSING_DIPLO_PT8 = 1447, - FACTION_HOSTILE = 168 -}; - -class npc_dashel_stonefist : public CreatureScript -{ -public: - npc_dashel_stonefist() : CreatureScript("npc_dashel_stonefist") { } - - bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) - { - if (quest->GetQuestId() == QUEST_MISSING_DIPLO_PT8) - { - creature->setFaction(FACTION_HOSTILE); - CAST_AI(npc_dashel_stonefist::npc_dashel_stonefistAI, creature->AI())->AttackStart(player); - } - return true; - } - - CreatureAI* GetAI(Creature* creature) const - { - return new npc_dashel_stonefistAI(creature); - } - - struct npc_dashel_stonefistAI : public ScriptedAI - { - npc_dashel_stonefistAI(Creature* c) : ScriptedAI(c) - { - m_uiNormalFaction = c->getFaction(); - } - - uint32 m_uiNormalFaction; - - void Reset() - { - if (me->getFaction() != m_uiNormalFaction) - me->setFaction(m_uiNormalFaction); - } - - void AttackedBy(Unit* pAttacker) - { - if (me->getVictim()) - return; - - if (me->IsFriendlyTo(pAttacker)) - return; - - AttackStart(pAttacker); - } - - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) - { - if (uiDamage > me->GetHealth() || me->HealthBelowPctDamaged(15, uiDamage)) - { - uiDamage = 0; - - if (pDoneBy->GetTypeId() == TYPEID_PLAYER) - CAST_PLR(pDoneBy)->AreaExploredOrEventHappens(QUEST_MISSING_DIPLO_PT8); - - EnterEvadeMode(); - } - } - }; - -}; - -/*###### ## npc_lady_katrana_prestor ######*/ @@ -716,7 +643,6 @@ void AddSC_stormwind_city() { new npc_archmage_malin(); new npc_bartleby(); - new npc_dashel_stonefist(); new npc_lady_katrana_prestor(); new npc_tyrion(); new npc_tyrion_spybot(); diff --git a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp index 4e4a077636b..a6effe29ff7 100644 --- a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp +++ b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp b/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp index 71359a07afa..ef6fccd8bde 100644 --- a/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp +++ b/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp index e6c528e4c89..0d72ab6fb2f 100644 --- a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp +++ b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -53,7 +53,7 @@ public: if (quest->GetQuestId() == QUEST_590) { creature->setFaction(FACTION_HOSTILE); - creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); CAST_AI(npc_calvin_montague::npc_calvin_montagueAI, creature->AI())->AttackStart(player); } return true; @@ -80,8 +80,8 @@ public: me->RestoreFaction(); - if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC)) + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } void EnterCombat(Unit* /*who*/) {} @@ -101,7 +101,7 @@ public: uiDamage = 0; me->RestoreFaction(); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->CombatStop(true); m_uiPhase = 1; diff --git a/src/server/scripts/EasternKingdoms/undercity.cpp b/src/server/scripts/EasternKingdoms/undercity.cpp index b8f2499c4e6..fe9c40e6dbd 100644 --- a/src/server/scripts/EasternKingdoms/undercity.cpp +++ b/src/server/scripts/EasternKingdoms/undercity.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -109,7 +109,7 @@ public: { if (Creature* target = Unit::GetCreature(*summoned, targetGUID)) { - target->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0); + target->MonsterMoveWithSpeed(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0); target->SetPosition(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0.0f); summoned->CastSpell(target, SPELL_RIBBON_OF_SOULS, false); } @@ -186,7 +186,7 @@ public: if (EventMove_Timer <= diff) { me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); - me->SendMonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, 5000); + me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, me->GetDistance(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW) / (5000 * 0.001f)); me->SetPosition(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, me->GetOrientation()); EventMove = false; } else EventMove_Timer -= diff; diff --git a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp index 06c64b76242..a04a94f73b1 100644 --- a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/westfall.cpp b/src/server/scripts/EasternKingdoms/westfall.cpp index e82da353cd0..271e1d99d63 100644 --- a/src/server/scripts/EasternKingdoms/westfall.cpp +++ b/src/server/scripts/EasternKingdoms/westfall.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -110,7 +110,7 @@ public: case 4: SetEquipmentSlots(false, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE, EQUIP_ID_RIFLE); me->SetSheath(SHEATH_STATE_RANGED); - me->HandleEmoteCommand(EMOTE_STATE_USESTANDING_NOSHEATHE); + me->HandleEmoteCommand(EMOTE_STATE_USE_STANDING_NO_SHEATHE); break; case 7: me->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836f, 1569.755f, 54.267f, 4.230f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); @@ -141,7 +141,7 @@ public: case 13: SetEquipmentSlots(true); me->SetSheath(SHEATH_STATE_UNARMED); - me->HandleEmoteCommand(EMOTE_STATE_USESTANDING_NOSHEATHE); + me->HandleEmoteCommand(EMOTE_STATE_USE_STANDING_NO_SHEATHE); break; case 17: player->GroupEventHappens(QUEST_TOME_VALOR, me); diff --git a/src/server/scripts/EasternKingdoms/wetlands.cpp b/src/server/scripts/EasternKingdoms/wetlands.cpp index cb5fa6782ac..3b196720242 100644 --- a/src/server/scripts/EasternKingdoms/wetlands.cpp +++ b/src/server/scripts/EasternKingdoms/wetlands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Examples/example_commandscript.cpp b/src/server/scripts/Examples/example_commandscript.cpp index 8513fbf8cf2..6b7a3d8def7 100644 --- a/src/server/scripts/Examples/example_commandscript.cpp +++ b/src/server/scripts/Examples/example_commandscript.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Examples/example_creature.cpp b/src/server/scripts/Examples/example_creature.cpp index 1a030728218..f1b336f07f9 100644 --- a/src/server/scripts/Examples/example_creature.cpp +++ b/src/server/scripts/Examples/example_creature.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Examples/example_escort.cpp b/src/server/scripts/Examples/example_escort.cpp index dfac4321a23..cae09266b49 100644 --- a/src/server/scripts/Examples/example_escort.cpp +++ b/src/server/scripts/Examples/example_escort.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Examples/example_gossip_codebox.cpp b/src/server/scripts/Examples/example_gossip_codebox.cpp index 13680a8ea9c..c288123f117 100644 --- a/src/server/scripts/Examples/example_gossip_codebox.cpp +++ b/src/server/scripts/Examples/example_gossip_codebox.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Examples/example_misc.cpp b/src/server/scripts/Examples/example_misc.cpp index 8619d03df30..d83a00ed82f 100644 --- a/src/server/scripts/Examples/example_misc.cpp +++ b/src/server/scripts/Examples/example_misc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp index 372abc45268..b1a8f17d16a 100644 --- a/src/server/scripts/Examples/example_spell.cpp +++ b/src/server/scripts/Examples/example_spell.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -76,6 +76,38 @@ class spell_ex_5581 : public SpellScriptLoader delete localVariable2; } + void HandleBeforeCast() + { + // this hook is executed before anything about casting the spell is done + // after this hook is executed all the machinery starts + sLog->outString("Caster just finished preparing the spell (cast bar has expired)"); + } + + void HandleOnCast() + { + // cast is validated and spell targets are selected at this moment + // this is a last place when the spell can be safely interrupted + sLog->outString("Spell is about to do take reagents, power, launch missile, do visuals and instant spell effects"); + } + + void HandleAfterCast() + { + sLog->outString("All immediate actions for the spell are finished now"); + // this is a safe for triggering additional effects for a spell without interfering + // with visuals or with other effects of the spell + //GetCaster()->CastSpell(target, SPELL_TRIGGERED, true); + } + + SpellCastResult CheckRequirement() + { + // in this hook you can add additional requirements for spell caster (and throw a client error if reqs're not passed) + // in this case we're disallowing to select non-player as a target of the spell + //if (!GetTargetUnit() || GetTargetUnit()->ToPlayer()) + //return SPELL_FAILED_BAD_TARGETS; + return SPELL_CAST_OK; + } + + void HandleDummyLaunch(SpellEffIndex /*effIndex*/) { sLog->outString("Spell %u with SPELL_EFFECT_DUMMY is just launched!", GetSpellInfo()->Id); @@ -127,7 +159,11 @@ class spell_ex_5581 : public SpellScriptLoader // register functions used in spell script - names of these functions do not matter void Register() { - // we're registering our function here + // we're registering our functions here + BeforeCast += SpellCastFn(spell_ex_5581SpellScript::HandleBeforeCast); + OnCast += SpellCastFn(spell_ex_5581SpellScript::HandleOnCast); + AfterCast += SpellCastFn(spell_ex_5581SpellScript::HandleAfterCast); + OnCheckCast += SpellCheckCastFn(spell_ex_5581SpellScript::CheckRequirement); // function HandleDummy will be called when spell is launched, independant from targets selected for spell, just before default effect 0 launch handler OnEffectLaunch += SpellEffectFn(spell_ex_5581SpellScript::HandleDummyLaunch, EFFECT_0, SPELL_EFFECT_DUMMY); // function HandleDummy will be called when spell is launched at target, just before default effect 0 launch at target handler diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp index 4aa2cea958b..878116ad476 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -43,7 +43,6 @@ public: player->AddAura(SPELL_BLESSING_OF_BLACKFATHOM, player); return true; } - }; class go_blackfathom_fire : public GameObjectScript @@ -64,7 +63,6 @@ public: } return false; } - }; class npc_blackfathom_deeps_event : public CreatureScript @@ -92,9 +90,9 @@ public: InstanceScript* instance; - uint32 uiRavageTimer; - uint32 uiFrostNovaTimer; - uint32 uiFrostBoltVolleyTimer; + uint32 ravageTimer; + uint32 frostNovaTimer; + uint32 frostBoltVolleyTimer; bool bFlee; @@ -102,9 +100,9 @@ public: { bFlee = false; - uiRavageTimer = urand(5000, 8000); - uiFrostNovaTimer = urand(9000, 12000); - uiFrostBoltVolleyTimer = urand(2000, 4000); + ravageTimer = urand(5000, 8000); + frostNovaTimer = urand(9000, 12000); + frostBoltVolleyTimer = urand(2000, 4000); } void AttackPlayer() @@ -131,7 +129,7 @@ public: } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; @@ -140,11 +138,11 @@ public: { case NPC_AKU_MAI_SNAPJAW: { - if (uiRavageTimer <= uiDiff) + if (ravageTimer <= diff) { DoCast(me->getVictim(), SPELL_RAVAGE); - uiRavageTimer = urand(9000, 14000); - } else uiRavageTimer -= uiDiff; + ravageTimer = urand(9000, 14000); + } else ravageTimer -= diff; break; } case NPC_MURKSHALLOW_SOFTSHELL: @@ -159,20 +157,23 @@ public: } case NPC_AKU_MAI_SERVANT: { - if (uiFrostBoltVolleyTimer <= uiDiff) + if (frostBoltVolleyTimer <= diff) { if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) { if (target) DoCast(target, SPELL_FROST_BOLT_VOLLEY); } - uiFrostBoltVolleyTimer = urand(5000, 8000); - } else uiFrostBoltVolleyTimer -= uiDiff; - if (uiFrostNovaTimer <= uiDiff) + frostBoltVolleyTimer = urand(5000, 8000); + } + else frostBoltVolleyTimer -= diff; + + if (frostNovaTimer <= diff) { DoCastAOE(SPELL_FROST_NOVA, false); - uiFrostNovaTimer = urand(25000, 30000); - } else uiFrostNovaTimer -= uiDiff; + frostNovaTimer = urand(25000, 30000); + } + else frostNovaTimer -= diff; break; } } @@ -187,7 +188,6 @@ public: instance->SetData(DATA_EVENT, instance->GetData(DATA_EVENT) + 1); } }; - }; enum eMorridune @@ -201,12 +201,12 @@ class npc_morridune : public CreatureScript public: npc_morridune() : CreatureScript("npc_morridune") { } - bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*uiSender*/, uint32 uiAction) + bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*Sender*/, uint32 action) { player->PlayerTalkClass->ClearMenus(); - switch (uiAction) + switch (action) { - case GOSSIP_ACTION_INFO_DEF+1: + case GOSSIP_ACTION_INFO_DEF + 1: player->TeleportTo(1, 9952.239f, 2284.277f, 1341.394f, 1.595f); player->CLOSE_GOSSIP_MENU(); break; @@ -216,7 +216,7 @@ public: bool OnGossipHello(Player* player, Creature* creature) { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MORRIDUNE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MORRIDUNE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); return true; @@ -250,7 +250,6 @@ public: } } }; - }; void AddSC_blackfathom_deeps() diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h index 1a14ac38ea4..21768b15895 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp index 8f1d0025c5b..32a6bcbde77 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -36,19 +36,19 @@ public: struct boss_aku_maiAI : public ScriptedAI { - boss_aku_maiAI(Creature* c) : ScriptedAI(c) + boss_aku_maiAI(Creature* creature) : ScriptedAI(creature) { - instance = c->GetInstanceScript(); + instance = creature->GetInstanceScript(); } - uint32 uiPoisonCloudTimer; + uint32 poisonCloudTimer; bool bIsEnraged; InstanceScript* instance; void Reset() { - uiPoisonCloudTimer = urand(5000, 9000); + poisonCloudTimer = urand(5000, 9000); bIsEnraged = false; if (instance) instance->SetData(TYPE_AKU_MAI, NOT_STARTED); @@ -71,11 +71,11 @@ public: if (!UpdateVictim()) return; - if (uiPoisonCloudTimer < diff) + if (poisonCloudTimer < diff) { DoCastVictim(SPELL_POISON_CLOUD); - uiPoisonCloudTimer = urand(25000, 50000); - } else uiPoisonCloudTimer -= diff; + poisonCloudTimer = urand(25000, 50000); + } else poisonCloudTimer -= diff; if (!bIsEnraged && HealthBelowPct(30)) { @@ -86,7 +86,6 @@ public: DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_aku_mai() diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp index a03c0a01d41..5a60a849b75 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -35,18 +35,18 @@ public: struct boss_gelihastAI : public ScriptedAI { - boss_gelihastAI(Creature* c) : ScriptedAI(c) + boss_gelihastAI(Creature* creature) : ScriptedAI(creature) { - instance = c->GetInstanceScript(); + instance = creature->GetInstanceScript(); } - uint32 uiNetTimer; + uint32 netTimer; InstanceScript* instance; void Reset() { - uiNetTimer = urand(2000, 4000); + netTimer = urand(2000, 4000); if (instance) instance->SetData(TYPE_GELIHAST, NOT_STARTED); } @@ -68,16 +68,15 @@ public: if (!UpdateVictim()) return; - if (uiNetTimer < diff) + if (netTimer < diff) { DoCastVictim(SPELL_NET); - uiNetTimer = urand(4000, 7000); - } else uiNetTimer -= diff; + netTimer = urand(4000, 7000); + } else netTimer -= diff; DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_gelihast() diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp index 0a282dafac3..7ee17172102 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -44,20 +44,20 @@ public: struct boss_kelrisAI : public ScriptedAI { - boss_kelrisAI(Creature* c) : ScriptedAI(c) + boss_kelrisAI(Creature* creature) : ScriptedAI(creature) { - instance = c->GetInstanceScript(); + instance = creature->GetInstanceScript(); } - uint32 uiMindBlastTimer; - uint32 uiSleepTimer; + uint32 mindBlastTimer; + uint32 sleepTimer; InstanceScript* instance; void Reset() { - uiMindBlastTimer = urand(2000, 5000); - uiSleepTimer = urand(9000, 12000); + mindBlastTimer = urand(2000, 5000); + sleepTimer = urand(9000, 12000); if (instance) instance->SetData(TYPE_KELRIS, NOT_STARTED); } @@ -81,26 +81,25 @@ public: if (!UpdateVictim()) return; - if (uiMindBlastTimer < diff) + if (mindBlastTimer < diff) { DoCastVictim(SPELL_MIND_BLAST); - uiMindBlastTimer = urand(7000, 9000); - } else uiMindBlastTimer -= diff; + mindBlastTimer = urand(7000, 9000); + } else mindBlastTimer -= diff; - if (uiSleepTimer < diff) + if (sleepTimer < diff) { if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) { DoScriptText(SAY_SLEEP, me); DoCast(target, SPELL_SLEEP); } - uiSleepTimer = urand(15000, 20000); - } else uiSleepTimer -= diff; + sleepTimer = urand(15000, 20000); + } else sleepTimer -= diff; DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_kelris() diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp index abfb91d5d6e..ea33499a960 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -65,33 +65,33 @@ public: { instance_blackfathom_deeps_InstanceMapScript(Map* map) : InstanceScript(map) {} - uint64 m_uiTwilightLordKelrisGUID; - uint64 m_uiShrine1GUID; - uint64 m_uiShrine2GUID; - uint64 m_uiShrine3GUID; - uint64 m_uiShrine4GUID; - uint64 m_uiShrineOfGelihastGUID; - uint64 m_uiAltarOfTheDeepsGUID; - uint64 m_uiMainDoorGUID; + uint64 twilightLordKelrisGUID; + uint64 shrine1GUID; + uint64 shrine2GUID; + uint64 shrine3GUID; + uint64 shrine4GUID; + uint64 shrineOfGelihastGUID; + uint64 altarOfTheDeepsGUID; + uint64 mainDoorGUID; - uint8 m_auiEncounter[MAX_ENCOUNTER]; - uint8 m_uiCountFires; - uint8 uiDeathTimes; + uint8 encounter[MAX_ENCOUNTER]; + uint8 countFires; + uint8 deathTimes; void Initialize() { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + memset(&encounter, 0, sizeof(encounter)); - m_uiTwilightLordKelrisGUID = 0; - m_uiShrine1GUID = 0; - m_uiShrine2GUID = 0; - m_uiShrine3GUID = 0; - m_uiShrine4GUID = 0; - m_uiShrineOfGelihastGUID = 0; - m_uiAltarOfTheDeepsGUID = 0; - m_uiMainDoorGUID = 0; - m_uiCountFires = 0; - uiDeathTimes = 0; + twilightLordKelrisGUID = 0; + shrine1GUID = 0; + shrine2GUID = 0; + shrine3GUID = 0; + shrine4GUID = 0; + shrineOfGelihastGUID = 0; + altarOfTheDeepsGUID = 0; + mainDoorGUID = 0; + countFires = 0; + deathTimes = 0; } void OnCreatureCreate(Creature* creature) @@ -99,7 +99,7 @@ public: switch (creature->GetEntry()) { case NPC_TWILIGHT_LORD_KELRIS: - m_uiTwilightLordKelrisGUID = creature->GetGUID(); + twilightLordKelrisGUID = creature->GetGUID(); break; case NPC_LORGUS_JETT: creature->SetHomePosition(LorgusPosition[urand(0, 3)]); @@ -112,150 +112,149 @@ public: switch (go->GetEntry()) { case GO_FIRE_OF_AKU_MAI_1: - m_uiShrine1GUID = go->GetGUID(); + shrine1GUID = go->GetGUID(); break; case GO_FIRE_OF_AKU_MAI_2: - m_uiShrine2GUID = go->GetGUID(); + shrine2GUID = go->GetGUID(); break; case GO_FIRE_OF_AKU_MAI_3: - m_uiShrine3GUID = go->GetGUID(); + shrine3GUID = go->GetGUID(); break; case GO_FIRE_OF_AKU_MAI_4: - m_uiShrine4GUID = go->GetGUID(); + shrine4GUID = go->GetGUID(); break; case GO_SHRINE_OF_GELIHAST: - m_uiShrineOfGelihastGUID = go->GetGUID(); - if (m_auiEncounter[0] != DONE) + shrineOfGelihastGUID = go->GetGUID(); + if (encounter[0] != DONE) go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); break; case GO_ALTAR_OF_THE_DEEPS: - m_uiAltarOfTheDeepsGUID = go->GetGUID(); - if (m_auiEncounter[3] != DONE) + altarOfTheDeepsGUID = go->GetGUID(); + if (encounter[3] != DONE) go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); break; case GO_AKU_MAI_DOOR: - if (m_auiEncounter[2] == DONE) + if (encounter[2] == DONE) HandleGameObject(0, true, go); - m_uiMainDoorGUID = go->GetGUID(); + mainDoorGUID = go->GetGUID(); break; } } - void SetData(uint32 uiType, uint32 uiData) + void SetData(uint32 type, uint32 data) { - switch (uiType) + switch (type) { case TYPE_GELIHAST: - m_auiEncounter[0] = uiData; - if (uiData == DONE) - if (GameObject* go = instance->GetGameObject(m_uiShrineOfGelihastGUID)) + encounter[0] = data; + if (data == DONE) + if (GameObject* go = instance->GetGameObject(shrineOfGelihastGUID)) go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); break; case TYPE_AKU_MAI: - m_auiEncounter[3] = uiData; - if (uiData == DONE) - if (GameObject* go = instance->GetGameObject(m_uiAltarOfTheDeepsGUID)) + encounter[3] = data; + if (data == DONE) + if (GameObject* go = instance->GetGameObject(altarOfTheDeepsGUID)) { go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); go->SummonCreature(NPC_MORRIDUNE, SpawnsLocation[4], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); } break; case DATA_FIRE: - m_uiCountFires = uiData; - switch (m_uiCountFires) + countFires = data; + switch (countFires) { case 1: - if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID)) + if (GameObject* go = instance->GetGameObject(shrine1GUID)) { - pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); - pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); - pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); - pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + go->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + go->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + go->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + go->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); } break; case 2: - if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID)) + if (GameObject* go = instance->GetGameObject(shrine1GUID)) { for (uint8 i = 0; i < 2; ++i) { - pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); - pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); - pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); - pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + go->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + go->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + go->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + go->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); } } break; case 3: - if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID)) + if (GameObject* go = instance->GetGameObject(shrine1GUID)) { - pGO->SummonCreature(NPC_AKU_MAI_SERVANT, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); - pGO->SummonCreature(NPC_AKU_MAI_SERVANT, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + go->SummonCreature(NPC_AKU_MAI_SERVANT, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + go->SummonCreature(NPC_AKU_MAI_SERVANT, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); } break; case 4: - if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID)) + if (GameObject* go = instance->GetGameObject(shrine1GUID)) { - pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); - pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); - pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); - pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + go->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + go->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + go->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + go->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); } break; } break; case DATA_EVENT: - uiDeathTimes = uiData; - if (uiDeathTimes == 18) - HandleGameObject(m_uiMainDoorGUID, true); + deathTimes = data; + if (deathTimes == 18) + HandleGameObject(mainDoorGUID, true); break; } } - uint32 GetData(uint32 uiType) + uint32 GetData(uint32 type) { - switch (uiType) + switch (type) { case TYPE_GELIHAST: - return m_auiEncounter[0]; + return encounter[0]; case TYPE_KELRIS: - return m_auiEncounter[1]; + return encounter[1]; case TYPE_SHRINE: - return m_auiEncounter[2]; + return encounter[2]; case TYPE_AKU_MAI: - return m_auiEncounter[3]; + return encounter[3]; case DATA_FIRE: - return m_uiCountFires; + return countFires; case DATA_EVENT: - return uiDeathTimes; + return deathTimes; } return 0; } - uint64 GetData64(uint32 uiData) + uint64 GetData64(uint32 data) { - switch (uiData) + switch (data) { case DATA_TWILIGHT_LORD_KELRIS: - return m_uiTwilightLordKelrisGUID; + return twilightLordKelrisGUID; case DATA_SHRINE1: - return m_uiShrine1GUID; + return shrine1GUID; case DATA_SHRINE2: - return m_uiShrine2GUID; + return shrine2GUID; case DATA_SHRINE3: - return m_uiShrine3GUID; + return shrine3GUID; case DATA_SHRINE4: - return m_uiShrine4GUID; + return shrine4GUID; case DATA_SHRINE_OF_GELIHAST: - return m_uiShrineOfGelihastGUID; + return shrineOfGelihastGUID; case DATA_MAINDOOR: - return m_uiMainDoorGUID; + return mainDoorGUID; } return 0; } }; - }; void AddSC_instance_blackfathom_deeps() diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp index 6ea2b21fe65..6bc179bba40 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index f4252ad3d45..a5239e5a649 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index 3f9bca5925b..2885276f2b6 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp index eabfbfc024c..7d1b292fd12 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp index 1537b6eed3b..3f39b61192a 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp index 35de4c70214..12485293650 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h index 278bf9f68cf..e045d3cbf05 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp index 187ff9b9dd7..0caec3c7069 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h index 9f37df3063f..d91c2ead123 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp index 748d0dfa071..65bc8f6a8e6 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -678,7 +678,7 @@ public: } if (i == LastOverronPos && IsOverrun) { - me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACKUNARMED); + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK_UNARMED); if ((faction == 0 && LastOverronPos == 17) || (faction == 1 && LastOverronPos == 21)) { me->setDeathState(DEAD); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h index e2017b1f260..047c0dc308e 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index 338f320dcc2..b87379d599f 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp index 8354f1d873c..35c1848456b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp index 0b8faa71299..7947c9be48d 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp index 798ea3925dc..b61838a253a 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp index 4c00dd5bb2b..c36b98ed510 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp index 246e4bee24e..7a5e0d06158 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp index 7cbb1b91755..9518abd1635 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -234,53 +234,53 @@ public: bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) { player->PlayerTalkClass->ClearMenus(); - npc_arthasAI* pAI = CAST_AI(npc_arthas::npc_arthasAI, creature->AI()); + npc_arthasAI* ai = CAST_AI(npc_arthas::npc_arthasAI, creature->AI()); - if (!pAI) + if (!ai) return false; switch (action) { case GOSSIP_ACTION_INFO_DEF: - pAI->Start(true, true, player->GetGUID(), 0, false, false); - pAI->SetDespawnAtEnd(false); - pAI->bStepping = false; - pAI->uiStep = 1; + ai->Start(true, true, player->GetGUID(), 0, false, false); + ai->SetDespawnAtEnd(false); + ai->bStepping = false; + ai->uiStep = 1; break; case GOSSIP_ACTION_INFO_DEF+1: - pAI->bStepping = true; - pAI->uiStep = 24; + ai->bStepping = true; + ai->uiStep = 24; break; case GOSSIP_ACTION_INFO_DEF+2: - pAI->SetHoldState(false); - pAI->bStepping = false; - pAI->uiStep = 61; + ai->SetHoldState(false); + ai->bStepping = false; + ai->uiStep = 61; break; case GOSSIP_ACTION_INFO_DEF+3: - pAI->SetHoldState(false); + ai->SetHoldState(false); break; case GOSSIP_ACTION_INFO_DEF+4: - pAI->bStepping = true; - pAI->uiStep = 84; + ai->bStepping = true; + ai->uiStep = 84; break; case GOSSIP_ACTION_INFO_DEF+5: - pAI->bStepping = true; - pAI->uiStep = 85; + ai->bStepping = true; + ai->uiStep = 85; break; } player->CLOSE_GOSSIP_MENU(); - pAI->SetDespawnAtFar(true); + ai->SetDespawnAtFar(true); creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); return true; } bool OnGossipHello(Player* player, Creature* creature) { - npc_arthasAI* pAI = CAST_AI(npc_arthas::npc_arthasAI, creature->AI()); + npc_arthasAI* ai = CAST_AI(npc_arthas::npc_arthasAI, creature->AI()); - if (pAI && pAI->bStepping == false) + if (ai && ai->bStepping == false) { - switch (pAI->uiGossipStep) + switch (ai->uiGossipStep) { case 0: //This one is a workaround since the very beggining of the script is wrong. { @@ -414,7 +414,7 @@ public: if (Creature* temp = me->SummonCreature((uint32)RiftAndSpawnsLocations[i][0], RiftAndSpawnsLocations[timeRiftID][1], RiftAndSpawnsLocations[timeRiftID][2], RiftAndSpawnsLocations[timeRiftID][3], RiftAndSpawnsLocations[timeRiftID][4], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000)) { guidVector[i-timeRiftID-1] = temp->GetGUID(); - temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); temp->SetReactState(REACT_PASSIVE); temp->GetMotionMaster()->MovePoint(0, RiftAndSpawnsLocations[i][1], RiftAndSpawnsLocations[i][2], RiftAndSpawnsLocations[i][3]); if ((uint32)RiftAndSpawnsLocations[i][0] == NPC_EPOCH) @@ -1003,7 +1003,7 @@ public: { pDisguised2->UpdateEntry(NPC_INFINITE_HUNTER, 0); //Make them unattackable - pDisguised2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + pDisguised2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); pDisguised2->SetReactState(REACT_PASSIVE); } JumpToNextStep(2000); @@ -1013,7 +1013,7 @@ public: { pDisguised1->UpdateEntry(NPC_INFINITE_AGENT, 0); //Make them unattackable - pDisguised1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + pDisguised1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); pDisguised1->SetReactState(REACT_PASSIVE); } JumpToNextStep(2000); @@ -1023,7 +1023,7 @@ public: { pDisguised0->UpdateEntry(NPC_INFINITE_ADVERSARY, 0); //Make them unattackable - pDisguised0->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + pDisguised0->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); pDisguised0->SetReactState(REACT_PASSIVE); } JumpToNextStep(2000); @@ -1037,7 +1037,7 @@ public: for (uint32 i = 0; i< ENCOUNTER_DRACONIAN_NUMBER; ++i) if (Creature* temp = Unit::GetCreature(*me, uiInfiniteDraconianGUID[i])) { - temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); temp->SetReactState(REACT_AGGRESSIVE); } JumpToNextStep(5000); @@ -1095,7 +1095,7 @@ public: if (Creature* pEpoch = Unit::GetCreature(*me, uiEpochGUID)) { //Make Epoch attackable - pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); pEpoch->SetReactState(REACT_AGGRESSIVE); } @@ -1150,7 +1150,7 @@ public: case 87: if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID)) { - pMalganis->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_UNK_6 | UNIT_FLAG_PASSIVE | UNIT_FLAG_UNK_15); + pMalganis->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_UNK_6 | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_UNK_15); pMalganis->SetReactState(REACT_AGGRESSIVE); } JumpToNextStep(1000); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h index ed0f237d600..86014940b91 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp index 168d78baa87..9a91e1e232b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp index 30f3c4c056c..b895b56379c 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp index aa775e0947d..99e43495c96 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp index 9e62244498f..9b272491717 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp index 653781a1d3f..4ff34fc3349 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.h b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.h index a22f83ae0ed..dc208d8ab09 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp index 659a22178f9..dabf3db13cb 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp index 488c7195534..89877f2cc7b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp index 9e6957a5e0c..8307eb44013 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp index 28f095dbaf8..1f0ba93645f 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp index cdcbbf04c60..b179a15e878 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp index 65ae3287381..b2c4911a20c 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h index a4f3a9a86d2..2a7b4703f14 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp index 8b6b1bc26dc..74e7a919263 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -25,9 +25,12 @@ EndScriptData */ #include "ScriptPCH.h" -#define SPELL_WRATH 21807 -#define SPELL_ENTANGLINGROOTS 12747 -#define SPELL_CORRUPT_FORCES 21968 +enum Spells +{ + SPELL_WRATH = 21807, + SPELL_ENTANGLINGROOTS = 12747, + SPELL_CORRUPT_FORCES = 21968 +}; class celebras_the_cursed : public CreatureScript { @@ -41,7 +44,7 @@ public: struct celebras_the_cursedAI : public ScriptedAI { - celebras_the_cursedAI(Creature* c) : ScriptedAI(c) {} + celebras_the_cursedAI(Creature* creature) : ScriptedAI(creature) {} uint32 Wrath_Timer; uint32 EntanglingRoots_Timer; @@ -74,14 +77,16 @@ public: if (target) DoCast(target, SPELL_WRATH); Wrath_Timer = 8000; - } else Wrath_Timer -= diff; + } + else Wrath_Timer -= diff; //EntanglingRoots if (EntanglingRoots_Timer <= diff) { DoCast(me->getVictim(), SPELL_ENTANGLINGROOTS); EntanglingRoots_Timer = 20000; - } else EntanglingRoots_Timer -= diff; + } + else EntanglingRoots_Timer -= diff; //CorruptForces if (CorruptForces_Timer <= diff) @@ -89,12 +94,12 @@ public: me->InterruptNonMeleeSpells(false); DoCast(me, SPELL_CORRUPT_FORCES); CorruptForces_Timer = 20000; - } else CorruptForces_Timer -= diff; + } + else CorruptForces_Timer -= diff; DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_celebras_the_cursed() diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp index 1f9dbf75dcf..418bf3a09ce 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -25,9 +25,12 @@ EndScriptData */ #include "ScriptPCH.h" -#define SPELL_KNOCKAWAY 18670 -#define SPELL_TRAMPLE 5568 -#define SPELL_LANDSLIDE 21808 +enum Spells +{ + SPELL_KNOCKAWAY = 18670, + SPELL_TRAMPLE = 5568, + SPELL_LANDSLIDE = 21808 +}; class boss_landslide : public CreatureScript { @@ -41,7 +44,7 @@ public: struct boss_landslideAI : public ScriptedAI { - boss_landslideAI(Creature* c) : ScriptedAI(c) {} + boss_landslideAI(Creature* creature) : ScriptedAI(creature) {} uint32 KnockAway_Timer; uint32 Trample_Timer; @@ -68,14 +71,16 @@ public: { DoCast(me->getVictim(), SPELL_KNOCKAWAY); KnockAway_Timer = 15000; - } else KnockAway_Timer -= diff; + } + else KnockAway_Timer -= diff; //Trample_Timer if (Trample_Timer <= diff) { DoCast(me, SPELL_TRAMPLE); Trample_Timer = 8000; - } else Trample_Timer -= diff; + } + else Trample_Timer -= diff; //Landslide if (HealthBelowPct(50)) @@ -85,13 +90,13 @@ public: me->InterruptNonMeleeSpells(false); DoCast(me, SPELL_LANDSLIDE); Landslide_Timer = 60000; - } else Landslide_Timer -= diff; + } + else Landslide_Timer -= diff; } DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_landslide() diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp index 9fc4f76d8e5..0e3ee5dc52b 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -24,9 +24,11 @@ SDCategory: Maraudon EndScriptData */ #include "ScriptPCH.h" - -#define SPELL_TOXICVOLLEY 21687 -#define SPELL_UPPERCUT 22916 +enum Spells +{ + SPELL_TOXICVOLLEY = 21687, + SPELL_UPPERCUT = 22916 +}; class boss_noxxion : public CreatureScript { @@ -40,7 +42,7 @@ public: struct boss_noxxionAI : public ScriptedAI { - boss_noxxionAI(Creature* c) : ScriptedAI(c) {} + boss_noxxionAI(Creature* creature) : ScriptedAI(creature) {} uint32 ToxicVolley_Timer; uint32 Uppercut_Timer; @@ -78,7 +80,8 @@ public: me->SetDisplayId(11172); Invisible = false; //me->m_canMove = true; - } else if (Invisible) + } + else if (Invisible) { Invisible_Timer -= diff; //Do nothing while invisible @@ -94,14 +97,16 @@ public: { DoCast(me->getVictim(), SPELL_TOXICVOLLEY); ToxicVolley_Timer = 9000; - } else ToxicVolley_Timer -= diff; + } + else ToxicVolley_Timer -= diff; //Uppercut_Timer if (Uppercut_Timer <= diff) { DoCast(me->getVictim(), SPELL_UPPERCUT); Uppercut_Timer = 12000; - } else Uppercut_Timer -= diff; + } + else Uppercut_Timer -= diff; //Adds_Timer if (!Invisible && Adds_Timer <= diff) @@ -122,12 +127,12 @@ public: Invisible_Timer = 15000; Adds_Timer = 40000; - } else Adds_Timer -= diff; + } + else Adds_Timer -= diff; DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_noxxion() diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp index caa2327511c..bade5655f36 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -25,10 +25,13 @@ EndScriptData */ #include "ScriptPCH.h" -#define SPELL_DUSTFIELD 21909 -#define SPELL_BOULDER 21832 -#define SPELL_THRASH 3391 -#define SPELL_REPULSIVEGAZE 21869 +enum Spells +{ + SPELL_DUSTFIELD = 21909, + SPELL_BOULDER = 21832, + SPELL_THRASH = 3391, + SPELL_REPULSIVEGAZE = 21869 +}; class boss_princess_theradras : public CreatureScript { @@ -42,7 +45,7 @@ public: struct boss_ptheradrasAI : public ScriptedAI { - boss_ptheradrasAI(Creature* c) : ScriptedAI(c) {} + boss_ptheradrasAI(Creature* creature) : ScriptedAI(creature) {} uint32 Dustfield_Timer; uint32 Boulder_Timer; @@ -57,9 +60,7 @@ public: RepulsiveGaze_Timer = 23000; } - void EnterCombat(Unit* /*who*/) - { - } + void EnterCombat(Unit* /*who*/) {} void JustDied(Unit* /*killer*/) { @@ -76,7 +77,8 @@ public: { DoCast(me, SPELL_DUSTFIELD); Dustfield_Timer = 14000; - } else Dustfield_Timer -= diff; + } + else Dustfield_Timer -= diff; //Boulder_Timer if (Boulder_Timer <= diff) @@ -86,26 +88,28 @@ public: if (target) DoCast(target, SPELL_BOULDER); Boulder_Timer = 10000; - } else Boulder_Timer -= diff; + } + else Boulder_Timer -= diff; //RepulsiveGaze_Timer if (RepulsiveGaze_Timer <= diff) { DoCast(me->getVictim(), SPELL_REPULSIVEGAZE); RepulsiveGaze_Timer = 20000; - } else RepulsiveGaze_Timer -= diff; + } + else RepulsiveGaze_Timer -= diff; //Thrash_Timer if (Thrash_Timer <= diff) { DoCast(me, SPELL_THRASH); Thrash_Timer = 18000; - } else Thrash_Timer -= diff; + } + else Thrash_Timer -= diff; DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_ptheradras() diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp index c76cc790274..3b42fc3ed7b 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp index a727164564a..1c599ce7c6f 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h b/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h index bd163b2d484..eaf6cac43af 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h +++ b/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp index fd1966d106c..d0da864809c 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp index 764b9a1523f..8b138468f4c 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp index 9ad593da2ed..ac9bf524e7a 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h index 8b801c7d5e9..fde1e7b277d 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h +++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp index b747fa31f36..98395305d57 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp +++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp index 496d7d3f3dd..1bc0a3b7a19 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp +++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.h b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.h index 4f54324536b..abc1afb58d8 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.h +++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp index a85dfaa219d..d729764ae01 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp index e49099238ae..459dc87a9b8 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp index 7b084a3b5fc..36a1ff1bade 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -75,7 +75,7 @@ class boss_kurinnaxx : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp index 030da10e515..a290b07e60f 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -127,7 +127,7 @@ class boss_moam : public CreatureScript } // Messing up mana-drain channel - //if (me->HasUnitState(UNIT_STAT_CASTING)) + //if (me->HasUnitState(UNIT_STATE_CASTING)) // return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp index 9e6d0d58392..91c0110abd5 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp index 09972388212..afa8eff5823 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -93,7 +93,7 @@ class boss_rajaxx : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp index 58080d766f5..d4549242a4c 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h index 8386a91a075..14d129a7468 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp index 34b481c97f4..eaeec50ef7b 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index 43265cb4430..a6409ca056f 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp index 505907cd0f5..9ccff0bff48 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp index d6d23cf7426..c0ccd55f219 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp index 4595e4e5095..b0e5112aa6b 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp index 27aa72d3e55..4d5aff16770 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp index c9a9865e36e..7f3c19ac69c 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -38,7 +38,7 @@ EndScriptData */ #define SPELL_ARCANE_EXPLOSION 25679 #define SPELL_EARTH_SHOCK 26194 -#define SPELL_TRUE_FULFILLMENT4 26526 +#define SPELL_TRUE_FULFILLMENT 785 #define SPELL_BLINK 28391 class ov_mycoordinates diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp index b005f9d0953..b03d2dc3a4a 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -90,7 +90,7 @@ struct boss_twinemperorsAI : public ScriptedAI AfterTeleportTimer = 0; Abuse_Bug_Timer = urand(10000, 17000); BugsTimer = 2000; - me->ClearUnitState(UNIT_STAT_STUNNED); + me->ClearUnitState(UNIT_STATE_STUNNED); DontYellWhenDead = false; EnrageTimer = 15*60000; } @@ -234,7 +234,7 @@ struct boss_twinemperorsAI : public ScriptedAI DoStopAttack(); DoResetThreat(); DoCast(me, SPELL_TWIN_TELEPORT_VISUAL); - me->AddUnitState(UNIT_STAT_STUNNED); + me->AddUnitState(UNIT_STATE_STUNNED); AfterTeleport = true; AfterTeleportTimer = 2000; tspellcasted = false; @@ -246,9 +246,9 @@ struct boss_twinemperorsAI : public ScriptedAI { if (!tspellcasted) { - me->ClearUnitState(UNIT_STAT_STUNNED); + me->ClearUnitState(UNIT_STATE_STUNNED); DoCast(me, SPELL_TWIN_TELEPORT); - me->AddUnitState(UNIT_STAT_STUNNED); + me->AddUnitState(UNIT_STATE_STUNNED); } tspellcasted = true; @@ -256,7 +256,7 @@ struct boss_twinemperorsAI : public ScriptedAI if (AfterTeleportTimer <= diff) { AfterTeleport = false; - me->ClearUnitState(UNIT_STAT_STUNNED); + me->ClearUnitState(UNIT_STATE_STUNNED); if (Unit* nearu = me->SelectNearestTarget(100)) { //DoYell(nearu->GetName(), LANG_UNIVERSAL, 0); diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp index dd63128ddfc..7b30200b0b3 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp index 3b0d38fe2d4..38ea8e8748b 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp index 13b4acbca3e..45e9797328e 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h index 571a7be973f..13c3d56d14c 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp index 36864245305..e61e20c35bc 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp index cf72c0305c6..8eb3d20d528 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -98,7 +98,7 @@ public: DoScriptText(SAY_MAKE_PREPARATIONS, creature); creature->setFaction(250); - creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); CAST_AI(npc_escortAI, (creature->AI()))->Start(false, false, player->GetGUID()); CAST_AI(npc_escortAI, (creature->AI()))->SetDespawnAtFar(false); @@ -143,7 +143,7 @@ public: currentEvent = 0; eventProgress = 0; me->setActive(true); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } uint32 eventTimer; diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h index f6cf41ff30f..a39de54ee06 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h +++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp index d48a8fee197..33a2ce73e21 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp index 97ad7cea315..dd90eaa0e7f 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/ashenvale.cpp b/src/server/scripts/Kalimdor/ashenvale.cpp index a33ed68879f..5d26653a1a8 100644 --- a/src/server/scripts/Kalimdor/ashenvale.cpp +++ b/src/server/scripts/Kalimdor/ashenvale.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -35,34 +35,42 @@ EndContentData */ # npc_torek ####*/ -#define SAY_READY -1000106 -#define SAY_MOVE -1000107 -#define SAY_PREPARE -1000108 -#define SAY_WIN -1000109 -#define SAY_END -1000110 +enum TorekSays +{ + SAY_READY = 0, + SAY_MOVE = 1, + SAY_PREPARE = 2, + SAY_WIN = 3, + SAY_END = 4, +}; -#define SPELL_REND 11977 -#define SPELL_THUNDERCLAP 8078 +enum TorekSpells +{ + SPELL_REND = 11977, + SPELL_THUNDERCLAP = 8078, +}; -#define QUEST_TOREK_ASSULT 6544 +enum TorekMisc +{ + QUEST_TOREK_ASSULT = 6544, -#define ENTRY_SPLINTERTREE_RAIDER 12859 -#define ENTRY_DURIEL 12860 -#define ENTRY_SILVERWING_SENTINEL 12896 -#define ENTRY_SILVERWING_WARRIOR 12897 + ENTRY_SPLINTERTREE_RAIDER = 12859, + ENTRY_DURIEL = 12860, + ENTRY_SILVERWING_SENTINEL = 12896, + ENTRY_SILVERWING_WARRIOR = 12897, +}; class npc_torek : public CreatureScript { public: - npc_torek() - : CreatureScript("npc_torek") + npc_torek() : CreatureScript("npc_torek") { } struct npc_torekAI : public npc_escortAI { - npc_torekAI(Creature* c) : npc_escortAI(c) {} + npc_torekAI(Creature* creature) : npc_escortAI(creature) {} uint32 Rend_Timer; uint32 Thunderclap_Timer; @@ -78,10 +86,10 @@ class npc_torek : public CreatureScript switch (i) { case 1: - DoScriptText(SAY_MOVE, me, player); + Talk(SAY_MOVE, player->GetGUID()); break; case 8: - DoScriptText(SAY_PREPARE, me, player); + Talk(SAY_PREPARE, player->GetGUID()); break; case 19: //TODO: verify location and creatures amount. @@ -96,7 +104,7 @@ class npc_torek : public CreatureScript player->GroupEventHappens(QUEST_TOREK_ASSULT, me); break; case 21: - DoScriptText(SAY_END, me, player); + Talk(SAY_END, player->GetGUID()); break; } } @@ -148,7 +156,7 @@ class npc_torek : public CreatureScript if (quest->GetQuestId() == QUEST_TOREK_ASSULT) { //TODO: find companions, make them follow Torek, at any time (possibly done by core/database in future?) - DoScriptText(SAY_READY, creature, player); + creature->AI()->Talk(SAY_READY, player->GetGUID()); creature->setFaction(113); if (npc_escortAI* pEscortAI = CAST_AI(npc_torekAI, creature->AI())) diff --git a/src/server/scripts/Kalimdor/azshara.cpp b/src/server/scripts/Kalimdor/azshara.cpp index 6fbc424f3d4..2e621c4a3ba 100644 --- a/src/server/scripts/Kalimdor/azshara.cpp +++ b/src/server/scripts/Kalimdor/azshara.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp index 1898186f615..09f4b9415a9 100644 --- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp index cf08c4bfef0..c114c02b16d 100644 --- a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp +++ b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp index 19b5e36e113..4c415014eef 100644 --- a/src/server/scripts/Kalimdor/boss_azuregos.cpp +++ b/src/server/scripts/Kalimdor/boss_azuregos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/darkshore.cpp b/src/server/scripts/Kalimdor/darkshore.cpp index a6450fab6ea..a2c10b94ff9 100644 --- a/src/server/scripts/Kalimdor/darkshore.cpp +++ b/src/server/scripts/Kalimdor/darkshore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/desolace.cpp b/src/server/scripts/Kalimdor/desolace.cpp index 5badc7fe725..421a1d7b38a 100644 --- a/src/server/scripts/Kalimdor/desolace.cpp +++ b/src/server/scripts/Kalimdor/desolace.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/durotar.cpp b/src/server/scripts/Kalimdor/durotar.cpp index d6d2d633890..6c91c64f981 100644 --- a/src/server/scripts/Kalimdor/durotar.cpp +++ b/src/server/scripts/Kalimdor/durotar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -84,7 +84,7 @@ public: void UpdateAI(const uint32 uiDiff) { if (work == true) - me->HandleEmoteCommand(466); + me->HandleEmoteCommand(EMOTE_ONESHOT_WORK_CHOPWOOD); if (m_uiRebuffTimer <= uiDiff) { DoCast(me, SPELL_BUFF_SLEEP); diff --git a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp index 5b1c285d7b3..eede1aa069a 100644 --- a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -176,7 +176,7 @@ public: creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); creature->SetSpeed(MOVE_RUN, creature->GetSpeedRate(MOVE_RUN), true); creature->setFaction(35); - creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NON_ATTACKABLE); + creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NON_ATTACKABLE); creature->SetReactState(REACT_PASSIVE); creature->GetMotionMaster()->MovePoint(1, DeserterDisappearPos); break; @@ -198,7 +198,7 @@ public: void Reset() { me->RestoreFaction(); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NON_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NON_ATTACKABLE); me->SetReactState(REACT_AGGRESSIVE); me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } @@ -531,7 +531,7 @@ public: return; me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation()); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); SetCombatMovement(true); if (me->isInCombat()) diff --git a/src/server/scripts/Kalimdor/felwood.cpp b/src/server/scripts/Kalimdor/felwood.cpp index b4cc9972b69..91d8a875f17 100644 --- a/src/server/scripts/Kalimdor/felwood.cpp +++ b/src/server/scripts/Kalimdor/felwood.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/feralas.cpp b/src/server/scripts/Kalimdor/feralas.cpp index ff7ae84c892..37a0e4e8f88 100644 --- a/src/server/scripts/Kalimdor/feralas.cpp +++ b/src/server/scripts/Kalimdor/feralas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp index b8b8b31ba2c..2d6e34ab9ee 100644 --- a/src/server/scripts/Kalimdor/moonglade.cpp +++ b/src/server/scripts/Kalimdor/moonglade.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -573,9 +573,151 @@ public: }; /*#### -# +# npc_omen ####*/ +enum Omen +{ + NPC_OMEN = 15467, + + SPELL_OMEN_CLEAVE = 15284, + SPELL_OMEN_STARFALL = 26540, + SPELL_OMEN_SUMMON_SPOTLIGHT = 26392, + SPELL_ELUNE_CANDLE = 26374, + + GO_ELUNE_TRAP_1 = 180876, + GO_ELUNE_TRAP_2 = 180877, + + EVENT_CAST_CLEAVE = 1, + EVENT_CAST_STARFALL = 2, + EVENT_DESPAWN = 3, +}; + +class npc_omen : public CreatureScript +{ +public: + npc_omen() : CreatureScript("npc_omen") { } + + struct npc_omenAI : public ScriptedAI + { + npc_omenAI(Creature* creature) : ScriptedAI(creature) + { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); + me->GetMotionMaster()->MovePoint(1, 7549.977f, -2855.137f, 456.9678f); + } + + EventMap events; + + void MovementInform(uint32 type, uint32 pointId) + { + if (type != POINT_MOTION_TYPE) + return; + + if (pointId == 1) + { + me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation()); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); + if (Player* player = me->SelectNearestPlayer(40.0f)) + AttackStart(player); + } + } + + void EnterCombat(Unit* /*attacker*/) + { + events.Reset(); + events.ScheduleEvent(EVENT_CAST_CLEAVE, urand(3000, 5000)); + events.ScheduleEvent(EVENT_CAST_STARFALL, urand(8000, 10000)); + } + + void JustDied(Unit* /*killer*/) + { + DoCast(SPELL_OMEN_SUMMON_SPOTLIGHT); + } + + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) + { + if (spell->Id == SPELL_ELUNE_CANDLE) + { + if (me->HasAura(SPELL_OMEN_STARFALL)) + me->RemoveAurasDueToSpell(SPELL_OMEN_STARFALL); + + events.RescheduleEvent(EVENT_CAST_STARFALL, urand(14000, 16000)); + } + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + switch (events.ExecuteEvent()) + { + case EVENT_CAST_CLEAVE: + DoCastVictim(SPELL_OMEN_CLEAVE); + events.ScheduleEvent(EVENT_CAST_CLEAVE, urand(8000, 10000)); + break; + case EVENT_CAST_STARFALL: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_OMEN_STARFALL); + events.ScheduleEvent(EVENT_CAST_STARFALL, urand(14000, 16000)); + break; + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_omenAI(creature); + } +}; + +class npc_giant_spotlight : public CreatureScript +{ +public: + npc_giant_spotlight() : CreatureScript("npc_giant_spotlight") { } + + struct npc_giant_spotlightAI : public ScriptedAI + { + npc_giant_spotlightAI(Creature* creature) : ScriptedAI(creature) {} + + EventMap events; + + void Reset() + { + events.Reset(); + events.ScheduleEvent(EVENT_DESPAWN, 5*MINUTE*IN_MILLISECONDS); + } + + void UpdateAI(const uint32 diff) + { + events.Update(diff); + + if (events.ExecuteEvent() == EVENT_DESPAWN) + { + if (GameObject* trap = me->FindNearestGameObject(GO_ELUNE_TRAP_1, 5.0f)) + trap->RemoveFromWorld(); + + if (GameObject* trap = me->FindNearestGameObject(GO_ELUNE_TRAP_2, 5.0f)) + trap->RemoveFromWorld(); + + if (Creature* omen = me->FindNearestCreature(NPC_OMEN, 5.0f, false)) + omen->DespawnOrUnsummon(); + + me->DespawnOrUnsummon(); + } + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_giant_spotlightAI(creature); + } +}; + void AddSC_moonglade() { new npc_bunthen_plainswind(); @@ -583,4 +725,6 @@ void AddSC_moonglade() new npc_silva_filnaveth(); new npc_clintar_dreamwalker(); new npc_clintar_spirit(); + new npc_omen(); + new npc_giant_spotlight(); } diff --git a/src/server/scripts/Kalimdor/mulgore.cpp b/src/server/scripts/Kalimdor/mulgore.cpp index 4cea827e5e7..c689d6954a4 100644 --- a/src/server/scripts/Kalimdor/mulgore.cpp +++ b/src/server/scripts/Kalimdor/mulgore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -171,7 +171,7 @@ public: break; case 2: DoScriptText(EMOTE_EAT_LUNCH, me); - me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USESTANDING); + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING); break; case 3: if (Player* unit = Unit::GetPlayer(*me, uiPlayerGUID)) diff --git a/src/server/scripts/Kalimdor/orgrimmar.cpp b/src/server/scripts/Kalimdor/orgrimmar.cpp index 96bc2b009ba..629abb84fc1 100644 --- a/src/server/scripts/Kalimdor/orgrimmar.cpp +++ b/src/server/scripts/Kalimdor/orgrimmar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/silithus.cpp b/src/server/scripts/Kalimdor/silithus.cpp index 4fbcef167cc..e6322591bf3 100644 --- a/src/server/scripts/Kalimdor/silithus.cpp +++ b/src/server/scripts/Kalimdor/silithus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp index ff6127f336e..c31a7731865 100644 --- a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp +++ b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -154,7 +154,7 @@ public: DoScriptText(SAY_START, creature); creature->setFaction(113); - creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } return true; } diff --git a/src/server/scripts/Kalimdor/tanaris.cpp b/src/server/scripts/Kalimdor/tanaris.cpp index fa5f6850689..ff6cdccb66a 100644 --- a/src/server/scripts/Kalimdor/tanaris.cpp +++ b/src/server/scripts/Kalimdor/tanaris.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -410,7 +410,7 @@ public: creature->setFaction(113); creature->SetFullHealth(); creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); DoScriptText(SAY_OOX_START, creature); if (npc_escortAI* pEscortAI = CAST_AI(npc_OOX17::npc_OOX17AI, creature->AI())) diff --git a/src/server/scripts/Kalimdor/teldrassil.cpp b/src/server/scripts/Kalimdor/teldrassil.cpp index dc4fab4066e..d7cac99c374 100644 --- a/src/server/scripts/Kalimdor/teldrassil.cpp +++ b/src/server/scripts/Kalimdor/teldrassil.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/the_barrens.cpp b/src/server/scripts/Kalimdor/the_barrens.cpp index 25954d2bf52..e12897c1def 100644 --- a/src/server/scripts/Kalimdor/the_barrens.cpp +++ b/src/server/scripts/Kalimdor/the_barrens.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -512,7 +512,7 @@ public: //creature->GetMotionMaster()->MovePoint(0, -1693, -4343, 4.32f); //creature->GetMotionMaster()->MovePoint(1, -1684, -4333, 2.78f); creature->GetMotionMaster()->MovePoint(2, -1682, -4329, 2.79f); - creature->HandleEmoteCommand(EMOTE_STATE_READYUNARMED); + creature->HandleEmoteCommand(EMOTE_STATE_READY_UNARMED); EventBigWill = true; Wave_Timer = 1000; } diff --git a/src/server/scripts/Kalimdor/thousand_needles.cpp b/src/server/scripts/Kalimdor/thousand_needles.cpp index 041f477a0b2..2349b4493ce 100644 --- a/src/server/scripts/Kalimdor/thousand_needles.cpp +++ b/src/server/scripts/Kalimdor/thousand_needles.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/thunder_bluff.cpp b/src/server/scripts/Kalimdor/thunder_bluff.cpp index 36c81eecb9c..67a876c40b2 100644 --- a/src/server/scripts/Kalimdor/thunder_bluff.cpp +++ b/src/server/scripts/Kalimdor/thunder_bluff.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/ungoro_crater.cpp b/src/server/scripts/Kalimdor/ungoro_crater.cpp index 15d900ef45d..0e2a1b2c4d9 100644 --- a/src/server/scripts/Kalimdor/ungoro_crater.cpp +++ b/src/server/scripts/Kalimdor/ungoro_crater.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/winterspring.cpp b/src/server/scripts/Kalimdor/winterspring.cpp index 897be7bbfa7..00bb250d64d 100644 --- a/src/server/scripts/Kalimdor/winterspring.cpp +++ b/src/server/scripts/Kalimdor/winterspring.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/ahnkahet.h b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/ahnkahet.h index e19054d2f46..92d5c782e27 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/ahnkahet.h +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/ahnkahet.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp index cde97f8d37b..b16ad9934d8 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp index a2371fa0121..85abaa46a5d 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp index bc4d4ba5eea..f1eaa0c87c5 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -115,7 +115,7 @@ public: DoCast(me, INSANITY_VISUAL, true); // Unattackable me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetControlled(true, UNIT_STAT_STUNNED); + me->SetControlled(true, UNIT_STATE_STUNNED); } // phase mask target->CastSpell(target, SPELL_INSANITY_TARGET+insanityHandled, true); @@ -171,7 +171,7 @@ public: // Cleanup Summons.DespawnAll(); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetControlled(false, UNIT_STAT_STUNNED); + me->SetControlled(false, UNIT_STATE_STUNNED); } void EnterCombat(Unit* /*who*/) @@ -271,7 +271,7 @@ public: insanityHandled = 0; me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetControlled(false, UNIT_STAT_STUNNED); + me->SetControlled(false, UNIT_STATE_STUNNED); me->RemoveAurasDueToSpell(INSANITY_VISUAL); } diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp index b2975797a02..4e1b9da0adb 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp index 9a7dc2f2cc9..0f4b046f7d5 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -82,7 +82,7 @@ public: boss_taldaramAI(Creature* c) : ScriptedAI(c) { instance = c->GetInstanceScript(); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } @@ -314,7 +314,7 @@ public: { if (!instance) return; - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->RemoveAurasDueToSpell(SPELL_BEAM_VISUAL); diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp index 5ba11dd5353..3ae78d4053b 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h index fa199651950..6e865860403 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp index e0892ffb009..79a102c803f 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -283,7 +283,7 @@ public: if (((UndergroundPhase == 0 && HealthBelowPct(75)) || (UndergroundPhase == 1 && HealthBelowPct(50)) || (UndergroundPhase == 2 && HealthBelowPct(25))) - && !me->HasUnitState(UNIT_STAT_CASTING)) + && !me->HasUnitState(UNIT_STATE_CASTING)) { GuardianSummoned = false; VenomancerSummoned = false; diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp index 605f3a11c8a..da629fd45e9 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp index 6a734035005..878e1f7555f 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp index 6b8299e6c4b..e00db5d6494 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp index 187d82887e7..d01e2663b12 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp index fa685421141..91d67697ebb 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.h b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.h index b70dfe6bdc3..a363758f953 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.h +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp index f602f41ce11..e848c29c466 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -174,7 +174,7 @@ class boss_baltharus_the_warborn : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING) && !(events.GetPhaseMask() & PHASE_INTRO_MASK)) + if (me->HasUnitState(UNIT_STATE_CASTING) && !(events.GetPhaseMask() & PHASE_INTRO_MASK)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -268,7 +268,7 @@ class npc_baltharus_the_warborn_clone : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp index 107aed734e1..f41522f844d 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -97,7 +97,7 @@ class boss_general_zarithrian : public CreatureScript { _Reset(); if (instance->GetBossState(DATA_SAVIANA_RAGEFIRE) == DONE && instance->GetBossState(DATA_BALTHARUS_THE_WARBORN) == DONE) - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } void EnterCombat(Unit* /*who*/) @@ -148,7 +148,7 @@ class boss_general_zarithrian : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -257,7 +257,7 @@ class npc_onyx_flamecaller : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp index 733af8553e0..78810e27b05 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -137,7 +137,7 @@ class boss_saviana_ragefire : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp index abfaaa0229d..f9e302d7634 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -189,7 +189,7 @@ class instance_ruby_sanctum : public InstanceMapScript { HandleGameObject(FlameWallsGUID, true); if (Creature* zarithrian = instance->GetCreature(GeneralZarithrianGUID)) - zarithrian->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + zarithrian->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); } break; } @@ -199,7 +199,7 @@ class instance_ruby_sanctum : public InstanceMapScript { HandleGameObject(FlameWallsGUID, true); if (Creature* zarithrian = instance->GetCreature(GeneralZarithrianGUID)) - zarithrian->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + zarithrian->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); } break; } diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp index dc41dcaaf11..cfbbb79c5f6 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h index 52a4c67e544..02ade2ff3e7 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp index e46dc3d741a..d5695a0f39d 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp index f73e9779248..0848d1e9524 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -111,7 +111,7 @@ public: { RemoveSummons(); me->SetDisplayId(me->GetNativeDisplayId()); - me->ClearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED); + me->ClearUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED); bEventInProgress = false; bEvent = false; @@ -167,7 +167,7 @@ public: uiPhase++; uiResurrectTimer = 4000; bEventInProgress = false; - me->ClearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED); + me->ClearUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED); } else uiResurrectTimer -= uiDiff; } @@ -211,14 +211,14 @@ public: if (!bSummonArmy) { bSummonArmy = true; - me->AddUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED); + me->AddUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED); DoCast(me, SPELL_ARMY_DEAD); } if (!bDeathArmyDone) { if (uiDeathArmyCheckTimer <= uiDiff) { - me->ClearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED); + me->ClearUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED); uiDeathArmyCheckTimer = 0; bDeathArmyDone = true; } else uiDeathArmyCheckTimer -= uiDiff; @@ -263,7 +263,7 @@ public: } } - if (!me->HasUnitState(UNIT_STAT_ROOT) && !me->HealthBelowPct(1)) + if (!me->HasUnitState(UNIT_STATE_ROOT) && !me->HealthBelowPct(1)) DoMeleeAttackIfReady(); } @@ -273,7 +273,7 @@ public: { uiDamage = 0; me->SetHealth(0); - me->AddUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED); + me->AddUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED); RemoveSummons(); switch (uiPhase) { diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp index 2f6a01e73d7..9fcfcfa47e5 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -107,7 +107,7 @@ void AggroAllPlayers(Creature* temp) if (player->isAlive()) { - temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); temp->SetReactState(REACT_AGGRESSIVE); temp->SetInCombatWith(player); player->SetInCombatWith(temp); @@ -320,7 +320,7 @@ public: me->SetReactState(REACT_PASSIVE); // THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); } InstanceScript* instance; @@ -453,7 +453,7 @@ public: me->SetReactState(REACT_PASSIVE); // THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); } InstanceScript* instance; @@ -592,7 +592,7 @@ public: me->SetReactState(REACT_PASSIVE); // THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); } InstanceScript* instance; @@ -739,7 +739,7 @@ public: me->SetReactState(REACT_PASSIVE); // THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); } InstanceScript* instance; @@ -895,7 +895,7 @@ public: me->SetReactState(REACT_PASSIVE); // THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); } InstanceScript* instance; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp index 1f3db4c4976..9ccd136731a 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp index a1e906e214a..c17ea7411a0 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h index d8ce6b9dca7..cb3a43acdd0 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp index be83c4d326a..a9e41d90899 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -122,6 +122,11 @@ const Position SphereSpawn[6] = { 706.6383f, 161.5266f, 155.6701f, 0 }, }; +enum MovementPoints +{ + POINT_FALL_GROUND = 1 +}; + class boss_anubarak_trial : public CreatureScript { public: @@ -530,7 +535,7 @@ public: { me->RemoveAurasDueToSpell(SPELL_SUBMERGE_EFFECT); DoCast(me, SPELL_EMERGE_EFFECT); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); me->CombatStart(me->SelectNearestTarget()); } else @@ -538,7 +543,7 @@ public: if (!me->HasAura(SPELL_PERMAFROST_HELPER)) { DoCast(me, SPELL_SUBMERGE_EFFECT); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); me->CombatStop(); } } @@ -553,82 +558,68 @@ public: class mob_frost_sphere : public CreatureScript { -public: - mob_frost_sphere() : CreatureScript("mob_frost_sphere") { } - - CreatureAI* GetAI(Creature* creature) const - { - return new mob_frost_sphereAI(creature); - }; + public: + mob_frost_sphere() : CreatureScript("mob_frost_sphere") { } - struct mob_frost_sphereAI : public ScriptedAI - { - mob_frost_sphereAI(Creature* creature) : ScriptedAI(creature) + struct mob_frost_sphereAI : public ScriptedAI { - } - - bool m_bFall; - uint32 m_uiPermafrostTimer; + mob_frost_sphereAI(Creature* creature) : ScriptedAI(creature) + { + } - void Reset() - { - m_bFall = false; - m_uiPermafrostTimer = 0; - me->SetReactState(REACT_PASSIVE); - me->SetFlying(true); - me->SetDisplayId(25144); - me->SetSpeed(MOVE_RUN, 0.5f, false); - me->GetMotionMaster()->MoveRandom(20.0f); - DoCast(SPELL_FROST_SPHERE); - } + void Reset() + { + _isFalling = false; + me->SetReactState(REACT_PASSIVE); + me->SetFlying(true); + me->SetDisplayId(me->GetCreatureInfo()->Modelid2); + me->SetSpeed(MOVE_RUN, 0.5f, false); + me->GetMotionMaster()->MoveRandom(20.0f); + DoCast(SPELL_FROST_SPHERE); + } - void DamageTaken(Unit* /*who*/, uint32& uiDamage) - { - if (me->GetHealth() < uiDamage) + void DamageTaken(Unit* /*who*/, uint32& damage) { - uiDamage = 0; - if (!m_bFall) + if (me->GetHealth() <= damage) { - m_bFall = true; - me->SetFlying(false); - me->GetMotionMaster()->MoveIdle(); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - //At hit the ground - me->GetMotionMaster()->MoveFall(142.2f, 0); - //me->FallGround(); //need correct vmap use (i believe it isn't working properly right now) + damage = 0; + if (!_isFalling) + { + _isFalling = true; + me->GetMotionMaster()->MoveIdle(); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + //At hit the ground + me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH); + me->GetMotionMaster()->MoveFall(POINT_FALL_GROUND); + } } } - } - void MovementInform(uint32 uiType, uint32 uiId) - { - if (uiType != POINT_MOTION_TYPE) return; - - switch (uiId) + void MovementInform(uint32 type, uint32 pointId) { - case 0: - m_uiPermafrostTimer = IN_MILLISECONDS; - break; - } - } + if (type != EFFECT_MOTION_TYPE) + return; - void UpdateAI(const uint32 uiDiff) - { - if (m_uiPermafrostTimer) - { - if (m_uiPermafrostTimer <= uiDiff) + switch (pointId) { - m_uiPermafrostTimer = 0; - me->RemoveAurasDueToSpell(SPELL_FROST_SPHERE); - me->SetDisplayId(11686); - me->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.0f); - DoCast(SPELL_PERMAFROST_VISUAL); - DoCast(SPELL_PERMAFROST); - } else m_uiPermafrostTimer -= uiDiff; + case POINT_FALL_GROUND: + me->RemoveAurasDueToSpell(SPELL_FROST_SPHERE); + me->SetDisplayId(me->GetCreatureInfo()->Modelid1); + DoCast(SPELL_PERMAFROST_VISUAL); + DoCast(SPELL_PERMAFROST); + me->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.0f); + break; + } } - } - }; + private: + bool _isFalling; + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new mob_frost_sphereAI(creature); + }; }; class mob_anubarak_spike : public CreatureScript @@ -656,7 +647,7 @@ public: void Reset() { // For an unknown reason this npc isn't recognize the Aura of Permafrost with this flags =/ - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); m_uiTargetGUID = 0; } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp index 7be6775f705..2fe0bd3f397 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -172,7 +172,7 @@ public: { Summons.Summon(temp); temp->SetReactState(REACT_PASSIVE); - temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); if (playerTeam == ALLIANCE) { temp->SetHomePosition(vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 0); @@ -203,7 +203,7 @@ public: if (Creature* temp = Unit::GetCreature(*me, *i)) { temp->SetReactState(REACT_AGGRESSIVE); - temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); } } break; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp index df166c1bf04..fc01ad2efea 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp index 1ee7bcb4120..1eca7edb590 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -155,15 +155,16 @@ public: ScriptedAI::EnterEvadeMode(); } - void MovementInform(uint32 uiType, uint32 uiId) + void MovementInform(uint32 type, uint32 pointId) { - if (uiType != POINT_MOTION_TYPE) return; + if (type != POINT_MOTION_TYPE) + return; - switch (uiId) + switch (pointId) { case 0: m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR)); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_AGGRESSIVE); me->SetInCombatWithZone(); break; @@ -215,24 +216,24 @@ public: Summons.Despawn(summon); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(uint32 const diff) { if (!UpdateVictim()) return; - if (m_uiImpaleTimer <= uiDiff) + if (m_uiImpaleTimer <= diff) { DoCastVictim(SPELL_IMPALE); m_uiImpaleTimer = urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS); - } else m_uiImpaleTimer -= uiDiff; + } else m_uiImpaleTimer -= diff; - if (m_uiStaggeringStompTimer <= uiDiff) + if (m_uiStaggeringStompTimer <= diff) { DoCastVictim(SPELL_STAGGERING_STOMP); m_uiStaggeringStompTimer = urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS); - } else m_uiStaggeringStompTimer -= uiDiff; + } else m_uiStaggeringStompTimer -= diff; - if (m_uiSummonTimer <= uiDiff) + if (m_uiSummonTimer <= diff) { if (m_uiSummonCount > 0) { @@ -240,7 +241,7 @@ public: DoScriptText(SAY_SNOBOLLED, me); } m_uiSummonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS); - } else m_uiSummonTimer -= uiDiff; + } else m_uiSummonTimer -= diff; DoMeleeAttackIfReady(); } @@ -286,7 +287,7 @@ public: if (m_instance) m_uiBossGUID = m_instance->GetData64(NPC_GORMOK); //Workaround for Snobold - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); } void EnterEvadeMode() @@ -308,11 +309,12 @@ public: uiDamage = 0; } - void MovementInform(uint32 uiType, uint32 uiId) + void MovementInform(uint32 type, uint32 pointId) { - if (uiType != POINT_MOTION_TYPE) return; + if (type != POINT_MOTION_TYPE) + return; - switch (uiId) + switch (pointId) { case 0: if (m_bTargetDied) @@ -330,7 +332,7 @@ public: m_instance->SetData(DATA_SNOBOLD_COUNT, DECREASE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(uint32 const diff) { if (m_bTargetDied || !UpdateVictim()) return; @@ -357,29 +359,29 @@ public: } } - if (m_uiFireBombTimer < uiDiff) + if (m_uiFireBombTimer < diff) { if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) DoCast(target, SPELL_FIRE_BOMB); m_uiFireBombTimer = 20000; } - else m_uiFireBombTimer -= uiDiff; + else m_uiFireBombTimer -= diff; - if (m_uiBatterTimer < uiDiff) + if (m_uiBatterTimer < diff) { if (Unit* target = Unit::GetPlayer(*me, m_uiTargetGUID)) DoCast(target, SPELL_BATTER); m_uiBatterTimer = 10000; } - else m_uiBatterTimer -= uiDiff; + else m_uiBatterTimer -= diff; - if (m_uiHeadCrackTimer < uiDiff) + if (m_uiHeadCrackTimer < diff) { if (Unit* target = Unit::GetPlayer(*me, m_uiTargetGUID)) DoCast(target, SPELL_HEAD_CRACK); m_uiHeadCrackTimer = 35000; } - else m_uiHeadCrackTimer -= uiDiff; + else m_uiHeadCrackTimer -= diff; DoMeleeAttackIfReady(); } @@ -450,7 +452,7 @@ struct boss_jormungarAI : public ScriptedAI instanceScript->SetData(TYPE_NORTHREND_BEASTS, SNAKES_IN_PROGRESS); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(uint32 const diff) { if (!UpdateVictim()) return; @@ -458,7 +460,7 @@ struct boss_jormungarAI : public ScriptedAI { DoScriptText(SAY_EMERGE, me); me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); DoCast(SPELL_ENRAGE); enraged = true; DoScriptText(SAY_BERSERK, me); @@ -478,98 +480,98 @@ struct boss_jormungarAI : public ScriptedAI switch (stage) { case 0: // Mobile - if (biteTimer <= uiDiff) + if (biteTimer <= diff) { DoCastVictim(biteSpell); biteTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS); - } else biteTimer -= uiDiff; + } else biteTimer -= diff; - if (spewTimer <= uiDiff) + if (spewTimer <= diff) { DoCastAOE(spewSpell); spewTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS); - } else spewTimer -= uiDiff; + } else spewTimer -= diff; - if (slimePoolTimer <= uiDiff) + if (slimePoolTimer <= diff) { /* Spell summon has only 30s duration */ DoCast(me, SUMMON_SLIME_POOL); slimePoolTimer = 30*IN_MILLISECONDS; - } else slimePoolTimer -= uiDiff; + } else slimePoolTimer -= diff; - if (submergeTimer <= uiDiff && !enraged) + if (submergeTimer <= diff && !enraged) { stage = 1; submergeTimer = 5*IN_MILLISECONDS; - } else submergeTimer -= uiDiff; + } else submergeTimer -= diff; DoMeleeAttackIfReady(); break; case 1: // Submerge - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); DoCast(me, SPELL_SUBMERGE_0); DoScriptText(SAY_SUBMERGE, me); - me->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX()+urand(0, 80)-40, ToCCommonLoc[1].GetPositionY()+urand(0, 80)-40, ToCCommonLoc[1].GetPositionZ()); + me->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX()+ frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionY() + frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionZ()); stage = 2; case 2: // Wait til emerge - if (submergeTimer <= uiDiff) + if (submergeTimer <= diff) { stage = 3; submergeTimer = 50*IN_MILLISECONDS; - } else submergeTimer -= uiDiff; + } else submergeTimer -= diff; break; case 3: // Emerge me->SetDisplayId(modelStationary); DoScriptText(SAY_EMERGE, me); me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0); DoCast(me, SPELL_EMERGE_0); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); SetCombatMovement(false); me->GetMotionMaster()->MoveIdle(); stage = 4; break; case 4: // Stationary - if (sprayTimer <= uiDiff) + if (sprayTimer <= diff) { if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) DoCast(target, spraySpell); sprayTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS); - } else sprayTimer -= uiDiff; + } else sprayTimer -= diff; - if (sweepTimer <= uiDiff) + if (sweepTimer <= diff) { DoCastAOE(SPELL_SWEEP_0); sweepTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS); - } else sweepTimer -= uiDiff; + } else sweepTimer -= diff; - if (submergeTimer <= uiDiff) + if (submergeTimer <= diff) { stage = 5; submergeTimer = 10*IN_MILLISECONDS; - } else submergeTimer -= uiDiff; + } else submergeTimer -= diff; DoSpellAttackIfReady(spitSpell); break; case 5: // Submerge - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); DoCast(me, SPELL_SUBMERGE_0); DoScriptText(SAY_SUBMERGE, me); - me->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX()+urand(0, 80)-40, ToCCommonLoc[1].GetPositionY()+urand(0, 80)-40, ToCCommonLoc[1].GetPositionZ()); + me->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX() + frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionY() + frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionZ()); stage = 6; case 6: // Wait til emerge - if (submergeTimer <= uiDiff) + if (submergeTimer <= diff) { stage = 7; submergeTimer = 45*IN_MILLISECONDS; - } else submergeTimer -= uiDiff; + } else submergeTimer -= diff; break; case 7: // Emerge me->SetDisplayId(modelMobile); DoScriptText(SAY_EMERGE, me); me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0); DoCast(me, SPELL_EMERGE_0); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); SetCombatMovement(true); me->GetMotionMaster()->MoveChase(me->getVictim()); @@ -662,20 +664,21 @@ public: stage = 0; } - void MovementInform(uint32 uiType, uint32 uiId) + void MovementInform(uint32 type, uint32 pointId) { - if (uiType != POINT_MOTION_TYPE) return; + if (type != POINT_MOTION_TYPE) + return; - switch (uiId) + switch (pointId) { case 0: instanceScript->DoUseDoorOrButton(instanceScript->GetData64(GO_MAIN_GATE_DOOR)); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_AGGRESSIVE); me->SetInCombatWithZone(); if (Creature* otherWorm = Unit::GetCreature(*me, instanceScript->GetData64(otherWormEntry))) { - otherWorm->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + otherWorm->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); otherWorm->SetReactState(REACT_AGGRESSIVE); otherWorm->SetVisible(true); otherWorm->SetInCombatWithZone(); @@ -728,7 +731,7 @@ public: me->SetReactState(REACT_PASSIVE); } - void UpdateAI(const uint32 /*uiDiff*/) + void UpdateAI(uint32 const /*diff*/) { if (!casted) { @@ -795,11 +798,12 @@ public: m_instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE); } - void MovementInform(uint32 uiType, uint32 uiId) + void MovementInform(uint32 type, uint32 pointId) { - if (uiType != POINT_MOTION_TYPE) return; + if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE) + return; - switch (uiId) + switch (pointId) { case 0: if (me->GetDistance2d(ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY()) < 6.0f) @@ -813,7 +817,9 @@ public: if (Unit::GetPlayer(*me, m_uiTrampleTargetGUID)) { m_uiStage = 4; - } else m_uiStage = 6; + } + else + m_uiStage = 6; } break; case 1: // Finish trample @@ -821,7 +827,7 @@ public: break; case 2: m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR)); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_AGGRESSIVE); me->SetInCombatWithZone(); break; @@ -860,7 +866,7 @@ public: me->SetInCombatWithZone(); } - void SpellHitTarget(Unit* target, const SpellInfo* spell) + void SpellHitTarget(Unit* target, SpellInfo const* spell) { if (spell->Id == SPELL_TRAMPLE && target->GetTypeId() == TYPEID_PLAYER) { @@ -872,7 +878,7 @@ public: } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(uint32 const diff) { if (!UpdateVictim()) return; @@ -880,31 +886,31 @@ public: switch (m_uiStage) { case 0: - if (m_uiFerociousButtTimer <= uiDiff) + if (m_uiFerociousButtTimer <= diff) { DoCastVictim(SPELL_FEROCIOUS_BUTT); m_uiFerociousButtTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS); - } else m_uiFerociousButtTimer -= uiDiff; + } else m_uiFerociousButtTimer -= diff; - if (m_uiArticBreathTimer <= uiDiff) + if (m_uiArticBreathTimer <= diff) { if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) DoCast(target, SPELL_ARCTIC_BREATH); m_uiArticBreathTimer = urand(25*IN_MILLISECONDS, 40*IN_MILLISECONDS); - } else m_uiArticBreathTimer -= uiDiff; + } else m_uiArticBreathTimer -= diff; - if (m_uiWhirlTimer <= uiDiff) + if (m_uiWhirlTimer <= diff) { DoCastAOE(SPELL_WHIRL); m_uiWhirlTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS); - } else m_uiWhirlTimer -= uiDiff; + } else m_uiWhirlTimer -= diff; - if (m_uiMassiveCrashTimer <= uiDiff) + if (m_uiMassiveCrashTimer <= diff) { me->GetMotionMaster()->MoveJump(ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 10.0f, 20.0f); // 1: Middle of the room m_uiStage = 7; //Invalid (Do nothing more than move) m_uiMassiveCrashTimer = 30*IN_MILLISECONDS; - } else m_uiMassiveCrashTimer -= uiDiff; + } else m_uiMassiveCrashTimer -= diff; DoMeleeAttackIfReady(); break; @@ -927,7 +933,7 @@ public: } else m_uiStage = 6; break; case 3: - if (m_uiTrampleTimer <= uiDiff) + if (m_uiTrampleTimer <= diff) { if (Unit* target = Unit::GetPlayer(*me, m_uiTrampleTargetGUID)) { @@ -942,7 +948,7 @@ public: 10.0f, 20.0f); // 2: Hop Backwards m_uiStage = 7; //Invalid (Do nothing more than move) } else m_uiStage = 6; - } else m_uiTrampleTimer -= uiDiff; + } else m_uiTrampleTimer -= diff; break; case 4: DoScriptText(SAY_TRAMPLE_START, me); @@ -953,12 +959,12 @@ public: case 5: if (m_bMovementFinish) { - if (m_uiTrampleTimer <= uiDiff) DoCastAOE(SPELL_TRAMPLE); + if (m_uiTrampleTimer <= diff) DoCastAOE(SPELL_TRAMPLE); m_bMovementFinish = false; m_uiStage = 6; return; } - if (m_uiTrampleTimer <= uiDiff) + if (m_uiTrampleTimer <= diff) { Map::PlayerList const &lPlayers = me->GetMap()->GetPlayers(); for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) @@ -971,7 +977,7 @@ public: break; } } - } else m_uiTrampleTimer -= uiDiff; + } else m_uiTrampleTimer -= diff; break; case 6: if (!m_bTrampleCasted) diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp index 495faf6f855..c1009963df0 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -172,7 +172,7 @@ struct boss_twin_baseAI : public ScriptedAI uint32 m_uiTouchSpellId; void Reset() { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_PASSIVE); me->ModifyAuraState(m_uiAuraState, true); /* Uncomment this once that they are flying above the ground @@ -205,7 +205,7 @@ struct boss_twin_baseAI : public ScriptedAI { case 1: m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR)); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_AGGRESSIVE); break; } @@ -572,7 +572,7 @@ struct mob_unleashed_ballAI : public ScriptedAI void Reset() { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_PASSIVE); me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); me->SetFlying(true); diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index 99a6abb91a9..03de3d374ef 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp index 76295f403fa..3831e4824ad 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -429,7 +429,7 @@ class npc_fizzlebang_toc : public CreatureScript case 1130: me->GetMotionMaster()->MovementExpired(); DoScriptText(SAY_STAGE_1_03, me); - me->HandleEmoteCommand(EMOTE_ONESHOT_SPELLCAST_OMNI); + me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST_OMNI); if (Unit* pTrigger = me->SummonCreature(NPC_TRIGGER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 4.69494f, TEMPSUMMON_MANUAL_DESPAWN)) { m_uiTriggerGUID = pTrigger->GetGUID(); @@ -446,7 +446,7 @@ class npc_fizzlebang_toc : public CreatureScript m_uiUpdateTimer = 4000; break; case 1134: - me->HandleEmoteCommand(EMOTE_ONESHOT_SPELLCAST_OMNI); + me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST_OMNI); if (Creature* pPortal = me->SummonCreature(NPC_WILFRED_PORTAL, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 4.71239f, TEMPSUMMON_MANUAL_DESPAWN)) { pPortal->SetReactState(REACT_PASSIVE); @@ -563,7 +563,7 @@ class npc_tirion_toc : public CreatureScript if (Creature* temp = me->SummonCreature(NPC_GORMOK, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*IN_MILLISECONDS)) { temp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ()); - temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); temp->SetReactState(REACT_PASSIVE); } } @@ -591,13 +591,13 @@ class npc_tirion_toc : public CreatureScript if (Creature* temp = me->SummonCreature(NPC_DREADSCALE, ToCSpawnLoc[1].GetPositionX(), ToCSpawnLoc[1].GetPositionY(), ToCSpawnLoc[1].GetPositionZ(), 5, TEMPSUMMON_MANUAL_DESPAWN)) { temp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[8].GetPositionX(), ToCCommonLoc[8].GetPositionY(), ToCCommonLoc[8].GetPositionZ()); - temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); temp->SetReactState(REACT_PASSIVE); } if (Creature* temp = me->SummonCreature(NPC_ACIDMAW, ToCCommonLoc[9].GetPositionX(), ToCCommonLoc[9].GetPositionY(), ToCCommonLoc[9].GetPositionZ(), 5, TEMPSUMMON_MANUAL_DESPAWN)) { temp->SetVisible(true); - temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); temp->SetReactState(REACT_PASSIVE); } } @@ -623,7 +623,7 @@ class npc_tirion_toc : public CreatureScript if (Creature* temp = me->SummonCreature(NPC_ICEHOWL, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5, TEMPSUMMON_DEAD_DESPAWN)) { temp->GetMotionMaster()->MovePoint(2, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ()); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_PASSIVE); } diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp index 48616d8e6e4..e96ef4ff366 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp index e877126364e..5418cf8c4d0 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -100,8 +100,8 @@ public: lSummons.DespawnAll(); crystalHandlerAmount = 0; - if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC)) + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) @@ -136,7 +136,7 @@ public: } instance->SetData(DATA_NOVOS_EVENT, IN_PROGRESS); } - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -227,7 +227,7 @@ public: if (luiCrystals.empty()) { me->CastStop(); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); Phase = PHASE_2; diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp index d877bbd0842..97f2ee4e9a1 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp index fdd27c73171..9fc964000e3 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h b/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h index 816ff0dfba0..46d6414978f 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h +++ b/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp index 865f98a0203..8e5e7c3e185 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp index 1e29ec55dc8..4a28ebe6495 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -67,6 +67,7 @@ class boss_bronjahm : public CreatureScript { boss_bronjahmAI(Creature* creature) : BossAI(creature, DATA_BRONJAHM) { + DoCast(me, SPELL_SOULSTORM_CHANNEL, true); } void InitializeAI() @@ -82,14 +83,17 @@ class boss_bronjahm : public CreatureScript events.Reset(); events.SetPhase(PHASE_1); events.ScheduleEvent(EVENT_SHADOW_BOLT, 2000); - events.ScheduleEvent(EVENT_MAGIC_BANE, urand(8000, 15000)); + events.ScheduleEvent(EVENT_MAGIC_BANE, urand(8000, 20000)); events.ScheduleEvent(EVENT_CORRUPT_SOUL, urand(25000, 35000), 0, PHASE_1); - me->CastSpell(me, SPELL_SOULSTORM_CHANNEL, true); - instance->SetBossState(DATA_BRONJAHM, NOT_STARTED); } + void JustReachedHome() + { + DoCast(me, SPELL_SOULSTORM_CHANNEL, true); + } + void EnterCombat(Unit* /*who*/) { DoScriptText(SAY_AGGRO, me); @@ -118,7 +122,7 @@ class boss_bronjahm : public CreatureScript events.SetPhase(PHASE_2); DoCast(me, SPELL_TELEPORT); events.ScheduleEvent(EVENT_FEAR, urand(12000, 16000), 0, PHASE_2); - events.ScheduleEvent(EVENT_SOULSTORM, 700, 0, PHASE_2); + events.ScheduleEvent(EVENT_SOULSTORM, 100, 0, PHASE_2); } } @@ -138,7 +142,7 @@ class boss_bronjahm : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -147,7 +151,7 @@ class boss_bronjahm : public CreatureScript { case EVENT_MAGIC_BANE: DoCastVictim(SPELL_MAGIC_S_BANE); - events.ScheduleEvent(EVENT_MAGIC_BANE, urand(8000, 15000)); + events.ScheduleEvent(EVENT_MAGIC_BANE, urand(8000, 20000)); break; case EVENT_SHADOW_BOLT: if (!me->IsWithinMeleeRange(me->getVictim())) @@ -201,7 +205,7 @@ class mob_corrupted_soul_fragment : public CreatureScript void MovementInform(uint32 type, uint32 id) { - if (type != TARGETED_MOTION_TYPE) + if (type != CHASE_MOTION_TYPE) return; if (instance) diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp index 68223f170c5..ad49f6cbce8 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -260,7 +260,7 @@ class boss_devourer_of_souls : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -306,6 +306,7 @@ class boss_devourer_of_souls : public CreatureScript if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) { me->SetOrientation(me->GetAngle(target)); + me->SendMovementFlagUpdate(); DoCast(me, SPELL_WAILING_SOULS_BEAM); } @@ -332,6 +333,7 @@ class boss_devourer_of_souls : public CreatureScript case EVENT_WAILING_SOULS_TICK: beamAngle += beamAngleDiff; me->SetOrientation(beamAngle); + me->SendMovementFlagUpdate(); me->StopMoving(); DoCast(me, SPELL_WAILING_SOULS); diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp index f6062951228..c8f18dba1d0 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -441,7 +441,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -497,7 +497,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -555,7 +555,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -612,7 +612,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -672,7 +672,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -738,7 +738,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -811,7 +811,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -878,7 +878,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h index 9f34e412847..ca68314df18 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp index 0425a34d8dc..bad4b8e38b2 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp index 2eab25c51c1..9cfcb78f6f1 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -103,7 +103,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; switch (events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp index eb8b0d06146..a9bfb603794 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -100,7 +100,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; switch (events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp index cd9037d6489..1583bdbdcd4 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -659,7 +659,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -742,7 +742,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -842,7 +842,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -912,7 +912,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -978,7 +978,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h index 2aab61b006c..1557fd1a56b 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp index 655856208cc..3c4d05854bb 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp index d8fddad41dc..0f9495d4928 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -190,7 +190,7 @@ class boss_garfrost : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp index 33ce2ac71fd..8e211cbd2cb 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -215,7 +215,7 @@ class boss_ick : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp index 7a6aefe90fb..d6b2c2e3a97 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp index 29a89328336..24529801564 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp index 034bfafe8b0..25cd292d390 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -72,7 +72,7 @@ class mob_ymirjar_flamebearer : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) @@ -187,7 +187,7 @@ class mob_wrathbone_laborer : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h index e4282dfa5fa..728e0ccd955 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp index 57c14993e2d..b66c3d795f3 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -97,7 +97,7 @@ class boss_drakkari_colossus : public CreatureScript if (GetData(DATA_INTRO_DONE)) { me->SetReactState(REACT_AGGRESSIVE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveAura(SPELL_FREEZE_ANIM); } @@ -149,7 +149,7 @@ class boss_drakkari_colossus : public CreatureScript me->GetMotionMaster()->MoveIdle(); me->SetReactState(REACT_PASSIVE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); DoCast(me, SPELL_FREEZE_ANIM); break; case ACTION_UNFREEZE_COLOSSUS: @@ -158,7 +158,7 @@ class boss_drakkari_colossus : public CreatureScript return; me->SetReactState(REACT_AGGRESSIVE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveAura(SPELL_FREEZE_ANIM); me->SetInCombatWithZone(); @@ -172,7 +172,7 @@ class boss_drakkari_colossus : public CreatureScript void DamageTaken(Unit* /*attacker*/, uint32& damage) { - if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) + if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC)) damage = 0; if (phase == COLOSSUS_PHASE_NORMAL || @@ -212,7 +212,7 @@ class boss_drakkari_colossus : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -289,7 +289,7 @@ class boss_drakkari_elemental : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -335,7 +335,7 @@ class boss_drakkari_elemental : public CreatureScript damage = 0; // to prevent spell spaming - if (me->HasUnitState(UNIT_STAT_CHARGING)) + if (me->HasUnitState(UNIT_STATE_CHARGING)) return; // not sure about this, the idea of this code is to prevent bug the elemental diff --git a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp index 1b40dab2aad..c665d3cdf5a 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp index ea1ac951eb6..daa5ee86483 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -148,7 +148,7 @@ public: DoScriptText(SAY_TRANSFORM_1, me); uiTransformationTimer = 5*IN_MILLISECONDS; bStartOfTransformation = true; - me->ClearUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT); + me->ClearUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT); me->SetReactState(REACT_AGGRESSIVE); } else @@ -158,7 +158,7 @@ public: if (bStartOfTransformation) { bStartOfTransformation = false; - me->AddUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT); + me->AddUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT); me->SetReactState(REACT_PASSIVE); } } @@ -191,7 +191,7 @@ public: DoScriptText(SAY_TRANSFORM_2, me); uiTransformationTimer = 9*IN_MILLISECONDS; bStartOfTransformation = true; - me->ClearUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT); + me->ClearUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT); me->SetReactState(REACT_AGGRESSIVE); } else @@ -201,7 +201,7 @@ public: if (bStartOfTransformation) { bStartOfTransformation = false; - me->AddUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT); + me->AddUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT); me->SetReactState(REACT_PASSIVE); } } diff --git a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp index 07ade9c0201..1085e993322 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp index f2b9fb704d5..5071802f897 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Gundrak/gundrak.h b/src/server/scripts/Northrend/Gundrak/gundrak.h index 08cdd24c724..4c1c04c5559 100644 --- a/src/server/scripts/Northrend/Gundrak/gundrak.h +++ b/src/server/scripts/Northrend/Gundrak/gundrak.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp index d4c55d80dc0..c0fc722385b 100644 --- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp +++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp index 4a5d609eb67..f5e207a9442 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -287,7 +287,7 @@ class boss_blood_council_controller : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -383,7 +383,7 @@ class boss_prince_keleseth_icc : public CreatureScript events.Reset(); summons.DespawnAll(); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); _isEmpowered = false; me->SetHealth(_spawnHealth); instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, uint32(true)); @@ -489,7 +489,7 @@ class boss_prince_keleseth_icc : public CreatureScript { case ACTION_STAND_UP: me->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); me->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH); me->ForceValuesUpdateAtIndex(UNIT_NPC_FLAGS); // was in sniff. don't ask why @@ -535,7 +535,7 @@ class boss_prince_keleseth_icc : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -607,7 +607,7 @@ class boss_prince_taldaram_icc : public CreatureScript events.Reset(); summons.DespawnAll(); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); _isEmpowered = false; me->SetHealth(_spawnHealth); instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, uint32(true)); @@ -707,7 +707,7 @@ class boss_prince_taldaram_icc : public CreatureScript { case ACTION_STAND_UP: me->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); me->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH); me->ForceValuesUpdateAtIndex(UNIT_NPC_FLAGS); // was in sniff. don't ask why @@ -753,7 +753,7 @@ class boss_prince_taldaram_icc : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -830,7 +830,7 @@ class boss_prince_valanar_icc : public CreatureScript events.Reset(); summons.DespawnAll(); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); _isEmpowered = false; me->SetHealth(me->GetMaxHealth()); instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, uint32(true)); @@ -944,7 +944,7 @@ class boss_prince_valanar_icc : public CreatureScript { case ACTION_STAND_UP: me->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); me->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH); me->ForceValuesUpdateAtIndex(UNIT_NPC_FLAGS); // was in sniff. don't ask why @@ -990,7 +990,7 @@ class boss_prince_valanar_icc : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -1159,7 +1159,7 @@ class npc_ball_of_flame : public CreatureScript void MovementInform(uint32 type, uint32 id) { - if (type == TARGETED_MOTION_TYPE && id == GUID_LOPART(_chaseGUID) && _chaseGUID) + if (type == CHASE_MOTION_TYPE && id == GUID_LOPART(_chaseGUID) && _chaseGUID) { me->RemoveAurasDueToSpell(SPELL_BALL_OF_FLAMES_PERIODIC); DoCast(me, SPELL_FLAMES); @@ -1179,7 +1179,7 @@ class npc_ball_of_flame : public CreatureScript if (Player* target = ObjectAccessor::GetPlayer(*me, _chaseGUID)) { // need to clear states now because this call is before AuraEffect is fully removed - me->ClearUnitState(UNIT_STAT_CASTING | UNIT_STAT_STUNNED); + me->ClearUnitState(UNIT_STATE_CASTING | UNIT_STATE_STUNNED); if (target && me->Attack(target, true)) me->GetMotionMaster()->MoveChase(target, 1.0f); } @@ -1316,7 +1316,7 @@ class npc_dark_nucleus : public CreatureScript } DoCast(who, SPELL_SHADOW_RESONANCE_RESIST); - me->ClearUnitState(UNIT_STAT_CASTING); + me->ClearUnitState(UNIT_STATE_CASTING); } void MoveInLineOfSight(Unit* who) @@ -1350,7 +1350,7 @@ class npc_dark_nucleus : public CreatureScript !victim->HasAura(SPELL_SHADOW_RESONANCE_RESIST, me->GetGUID())) { DoCast(victim, SPELL_SHADOW_RESONANCE_RESIST); - me->ClearUnitState(UNIT_STAT_CASTING); + me->ClearUnitState(UNIT_STATE_CASTING); } } else @@ -1369,7 +1369,7 @@ class npc_dark_nucleus : public CreatureScript _lockedTarget = true; AttackStart(victim); DoCast(victim, SPELL_SHADOW_RESONANCE_RESIST); - me->ClearUnitState(UNIT_STAT_CASTING); + me->ClearUnitState(UNIT_STATE_CASTING); } } } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp index 559c9ae6aa9..79a577f6591 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -321,7 +321,7 @@ class boss_blood_queen_lana_thel : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp index 4703e827522..3c795187f43 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -279,7 +279,7 @@ class boss_deathbringer_saurfang : public CreatureScript events.Reset(); events.SetPhase(PHASE_COMBAT); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); if (!_introDone) { DoCast(me, SPELL_GRIP_OF_AGONY); @@ -314,7 +314,7 @@ class boss_deathbringer_saurfang : public CreatureScript void AttackStart(Unit* victim) { - if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) + if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC)) return; ScriptedAI::AttackStart(victim); @@ -324,7 +324,7 @@ class boss_deathbringer_saurfang : public CreatureScript { ScriptedAI::EnterEvadeMode(); if (_introDone) - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } void JustReachedHome() @@ -403,7 +403,7 @@ class boss_deathbringer_saurfang : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -434,7 +434,7 @@ class boss_deathbringer_saurfang : public CreatureScript case EVENT_INTRO_FINISH: events.SetPhase(PHASE_COMBAT); _introDone = true; - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); break; case EVENT_SUMMON_BLOOD_BEAST: for (uint32 i10 = 0; i10 < 2; ++i10) @@ -608,7 +608,7 @@ class npc_high_overlord_saurfang_icc : public CreatureScript me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); me->SendMovementFlagUpdate(); me->Relocate(me->GetPositionX(), me->GetPositionY(), 539.2917f); - me->SendMonsterMove(me->GetPositionX(), me->GetPositionY(), 539.2917f, SPLINEFLAG_FALLING, 0, 0.0f); + me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), 539.2917f, 0.0f); for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr) (*itr)->AI()->DoAction(ACTION_DESPAWN); break; @@ -815,7 +815,7 @@ class npc_muradin_bronzebeard_icc : public CreatureScript me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); me->SendMovementFlagUpdate(); me->Relocate(me->GetPositionX(), me->GetPositionY(), 539.2917f); - me->SendMonsterMove(me->GetPositionX(), me->GetPositionY(), 539.2917f, SPLINEFLAG_FALLING, 0, 0.0f); + me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), 539.2917f, 0.0f); for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr) (*itr)->AI()->DoAction(ACTION_DESPAWN); break; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp index fd693789064..a97c6f7d138 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -169,7 +169,7 @@ class boss_festergut : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -305,7 +305,7 @@ class npc_stinky_icc : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp index ae6f3feb57f..ea2f73e788f 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -410,7 +410,7 @@ class boss_lady_deathwhisper : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING) && !(events.GetPhaseMask() & PHASE_INTRO_MASK)) + if (me->HasUnitState(UNIT_STATE_CASTING) && !(events.GetPhaseMask() & PHASE_INTRO_MASK)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -665,7 +665,7 @@ class npc_cult_fanatic : public CreatureScript Events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = Events.ExecuteEvent()) @@ -743,7 +743,7 @@ class npc_cult_adherent : public CreatureScript Events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = Events.ExecuteEvent()) @@ -888,7 +888,7 @@ class npc_darnavan : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; if (_canShatter && me->getVictim() && me->getVictim()->IsImmunedToDamage(SPELL_SCHOOL_MASK_NORMAL)) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp index a52965f925f..1672d8b2d87 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -106,6 +106,7 @@ class boss_lord_marrowgar : public CreatureScript events.ScheduleEvent(EVENT_COLDFLAME, 5000, EVENT_GROUP_SPECIAL); events.ScheduleEvent(EVENT_WARN_BONE_STORM, urand(45000, 50000)); events.ScheduleEvent(EVENT_ENRAGE, 600000); + _boneSlice = false; } void EnterCombat(Unit* /*who*/) @@ -153,7 +154,7 @@ class boss_lord_marrowgar : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index a84471d132b..28964a28d78 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -75,6 +75,7 @@ enum Spells SPELL_PLAGUE_SICKNESS = 70953, SPELL_UNBOUND_PLAGUE_PROTECTION = 70955, SPELL_MUTATED_PLAGUE = 72451, + SPELL_MUTATED_PLAGUE_CLEAR = 72618, // Slime Puddle SPELL_GROW_STACKER = 70345, @@ -195,7 +196,7 @@ class boss_professor_putricide : public CreatureScript me->GetMotionMaster()->MovementExpired(); if (instance->GetBossState(DATA_ROTFACE) == DONE && instance->GetBossState(DATA_FESTERGUT) == DONE) - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); } void EnterCombat(Unit* who) @@ -244,6 +245,7 @@ class boss_professor_putricide : public CreatureScript { _JustDied(); Talk(SAY_DEATH); + DoCast(SPELL_MUTATED_PLAGUE_CLEAR); } void JustSummoned(Creature* summon) @@ -517,7 +519,7 @@ class boss_professor_putricide : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -794,7 +796,7 @@ class spell_putricide_ooze_channel : public SpellScriptLoader void StartAttack() { - GetCaster()->ClearUnitState(UNIT_STAT_CASTING); + GetCaster()->ClearUnitState(UNIT_STATE_CASTING); GetCaster()->ToCreature()->AI()->AttackStart(GetHitUnit()); } @@ -1427,6 +1429,34 @@ class spell_putricide_regurgitated_ooze : public SpellScriptLoader } }; +class spell_putricide_clear_mutated_plague : public SpellScriptLoader +{ + public: + spell_putricide_clear_mutated_plague() : SpellScriptLoader("spell_putricide_clear_mutated_plague") { } + + class spell_putricide_clear_mutated_plague_SpellScript : public SpellScript + { + PrepareSpellScript(spell_putricide_clear_mutated_plague_SpellScript); + + void HandleScript(SpellEffIndex effIndex) + { + PreventHitDefaultEffect(effIndex); + uint32 auraId = sSpellMgr->GetSpellIdForDifficulty(uint32(GetEffectValue()), GetCaster()); + GetHitUnit()->RemoveAurasDueToSpell(auraId); + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_putricide_clear_mutated_plague_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_putricide_clear_mutated_plague_SpellScript(); + } +}; + // Stinky and Precious spell, it's here because its used for both (Festergut and Rotface "pets") class spell_stinky_precious_decimate : public SpellScriptLoader { @@ -1478,5 +1508,6 @@ void AddSC_boss_professor_putricide() new spell_putricide_mutated_transformation(); new spell_putricide_mutated_transformation_dmg(); new spell_putricide_regurgitated_ooze(); + new spell_putricide_clear_mutated_plague(); new spell_stinky_precious_decimate(); } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp index 58ae5f48797..9649b6c8ef8 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -169,7 +169,7 @@ class boss_rotface : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -384,7 +384,7 @@ class npc_precious_icc : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 25610341a2f..fb04d9ce7a4 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -268,7 +268,7 @@ class boss_sindragosa : public CreatureScript void MovementInform(uint32 type, uint32 point) { - if (type != POINT_MOTION_TYPE) + if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE) return; switch (point) @@ -379,7 +379,7 @@ class boss_sindragosa : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -638,7 +638,7 @@ class npc_spinestalker : public CreatureScript float moveTime = me->GetExactDist(&SpinestalkerFlyPos) / (me->GetSpeed(MOVE_FLIGHT) * 0.001f); me->m_Events.AddEvent(new FrostwyrmLandEvent(*me, SpinestalkerLandPos), me->m_Events.CalculateTime(uint64(moveTime) + 250)); me->SetDefaultMovementType(IDLE_MOTION_TYPE); - me->GetMotionMaster()->MoveIdle(MOTION_SLOT_IDLE); + me->GetMotionMaster()->MoveIdle(); me->StopMoving(); me->GetMotionMaster()->MovePoint(POINT_FROSTWYRM_FLY_IN, SpinestalkerFlyPos); } @@ -646,7 +646,7 @@ class npc_spinestalker : public CreatureScript void MovementInform(uint32 type, uint32 point) { - if (type != POINT_MOTION_TYPE || point != POINT_FROSTWYRM_LAND) + if (type != EFFECT_MOTION_TYPE || point != POINT_FROSTWYRM_LAND) return; me->setActive(false); @@ -663,7 +663,7 @@ class npc_spinestalker : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) @@ -749,11 +749,11 @@ class npc_rimefang : public CreatureScript me->setActive(true); me->SetSpeed(MOVE_FLIGHT, 2.0f); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); float moveTime = me->GetExactDist(&RimefangFlyPos) / (me->GetSpeed(MOVE_FLIGHT) * 0.001f); me->m_Events.AddEvent(new FrostwyrmLandEvent(*me, RimefangLandPos), me->m_Events.CalculateTime(uint64(moveTime) + 250)); me->SetDefaultMovementType(IDLE_MOTION_TYPE); - me->GetMotionMaster()->MoveIdle(MOTION_SLOT_IDLE); + me->GetMotionMaster()->MoveIdle(); me->StopMoving(); me->GetMotionMaster()->MovePoint(POINT_FROSTWYRM_FLY_IN, RimefangFlyPos); } @@ -761,14 +761,14 @@ class npc_rimefang : public CreatureScript void MovementInform(uint32 type, uint32 point) { - if (type != POINT_MOTION_TYPE || point != POINT_FROSTWYRM_LAND) + if (type != EFFECT_MOTION_TYPE || point != POINT_FROSTWYRM_LAND) return; me->setActive(false); me->SetFlying(false); me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); me->SetHomePosition(RimefangLandPos); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } void EnterCombat(Unit* /*victim*/) @@ -783,7 +783,7 @@ class npc_rimefang : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) @@ -911,7 +911,7 @@ class npc_sindragosa_trash : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index 2f4f225561c..2acd014e063 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -508,7 +508,7 @@ class boss_the_lich_king : public CreatureScript if (fabs(ground_Z - z) < 0.1f) return; - me->GetMotionMaster()->MoveFall(ground_Z); + me->GetMotionMaster()->MoveFall(); } void EnterCombat(Unit* target) @@ -701,7 +701,7 @@ class boss_the_lich_king : public CreatureScript summon->CastSpell(summon, SPELL_ICE_SPHERE, false); summon->CastSpell(summon, SPELL_ICE_BURST_TARGET_SEARCH, false); summon->CastSpell(target, SPELL_ICE_PULSE, false); - summon->ClearUnitState(UNIT_STAT_CASTING); + summon->ClearUnitState(UNIT_STATE_CASTING); summon->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f); } else @@ -801,7 +801,7 @@ class boss_the_lich_king : public CreatureScript events.ScheduleEvent(EVENT_INTRO_TALK_1, 9000, 0, PHASE_INTRO); break; case POINT_CENTER_1: - me->SetFacing(0.0f); + me->SetFacingTo(0.0f); Talk(SAY_LK_REMORSELESS_WINTER); SendMusicToPlayers(MUSIC_SPECIAL); me->SetReactState(REACT_PASSIVE); @@ -818,7 +818,7 @@ class boss_the_lich_king : public CreatureScript events.ScheduleEvent(EVENT_SOUL_REAPER, 94000, 0, PHASE_TWO); break; case POINT_CENTER_2: - me->SetFacing(0.0f); + me->SetFacingTo(0.0f); Talk(SAY_LK_REMORSELESS_WINTER); SendMusicToPlayers(MUSIC_SPECIAL); me->SetReactState(REACT_PASSIVE); @@ -861,7 +861,7 @@ class boss_the_lich_king : public CreatureScript events.Update(diff); // during Remorseless Winter phases The Lich King is channeling a spell, but we must continue casting other spells - if (me->HasUnitState(UNIT_STAT_CASTING) && !(events.GetPhaseMask() & PHASE_MASK_NO_CAST_CHECK)) + if (me->HasUnitState(UNIT_STATE_CASTING) && !(events.GetPhaseMask() & PHASE_MASK_NO_CAST_CHECK)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -883,7 +883,7 @@ class boss_the_lich_king : public CreatureScript case EVENT_INTRO_TALK_1: Talk(SAY_LK_INTRO_2); // for some reason blizz sends 2 emotes in row here so (we handle one in Talk) - me->HandleEmoteCommand(EMOTE_ONESHOT_TALK_NOSHEATHE); + me->HandleEmoteCommand(EMOTE_ONESHOT_TALK_NO_SHEATHE); events.ScheduleEvent(EVENT_EMOTE_CAST_SHOUT, 7000, 0, PHASE_INTRO); events.ScheduleEvent(EVENT_INTRO_EMOTE_1, 13000, 0, PHASE_INTRO); events.ScheduleEvent(EVENT_EMOTE_CAST_SHOUT, 18000, 0, PHASE_INTRO); @@ -893,7 +893,7 @@ class boss_the_lich_king : public CreatureScript DoCast(me, SPELL_EMOTE_SHOUT_NO_SHEATH, false); break; case EVENT_INTRO_EMOTE_1: - me->HandleEmoteCommand(EMOTE_ONESHOT_POINT_NOSHEATHE); + me->HandleEmoteCommand(EMOTE_ONESHOT_POINT_NO_SHEATHE); break; case EVENT_INTRO_CAST_FREEZE: Talk(SAY_LK_INTRO_3); @@ -902,7 +902,7 @@ class boss_the_lich_king : public CreatureScript break; case EVENT_FINISH_INTRO: me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_AGGRESSIVE); events.SetPhase(PHASE_ONE); break; @@ -966,14 +966,14 @@ class boss_the_lich_king : public CreatureScript break; case EVENT_QUAKE: events.SetPhase(PHASE_TWO); - me->ClearUnitState(UNIT_STAT_CASTING); // clear state to ensure check in DoCastAOE passes + me->ClearUnitState(UNIT_STATE_CASTING); // clear state to ensure check in DoCastAOE passes DoCastAOE(SPELL_QUAKE); SendMusicToPlayers(MUSIC_SPECIAL); Talk(SAY_LK_QUAKE); break; case EVENT_QUAKE_2: events.SetPhase(PHASE_THREE); - me->ClearUnitState(UNIT_STAT_CASTING); // clear state to ensure check in DoCastAOE passes + me->ClearUnitState(UNIT_STATE_CASTING); // clear state to ensure check in DoCastAOE passes DoCastAOE(SPELL_QUAKE); SendMusicToPlayers(MUSIC_SPECIAL); Talk(SAY_LK_QUAKE); @@ -1043,23 +1043,23 @@ class boss_the_lich_king : public CreatureScript DoCastAOE(SPELL_EMOTE_QUESTION_NO_SHEATH); break; case EVENT_OUTRO_EMOTE_TALK: - me->HandleEmoteCommand(EMOTE_ONESHOT_TALK_NOSHEATHE); + me->HandleEmoteCommand(EMOTE_ONESHOT_TALK_NO_SHEATHE); break; case EVENT_OUTRO_TALK_3: if (Creature* tirion = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_HIGHLORD_TIRION_FORDRING))) - me->SetFacing(0.0f, tirion); + me->SetFacingToObject(tirion); Talk(SAY_LK_OUTRO_3); break; case EVENT_OUTRO_MOVE_CENTER: me->GetMotionMaster()->MovePoint(POINT_LK_OUTRO_1, CenterPosition); break; case EVENT_OUTRO_TALK_4: - me->SetFacing(0.01745329f); + me->SetFacingTo(0.01745329f); Talk(SAY_LK_OUTRO_4); break; case EVENT_OUTRO_RAISE_DEAD: DoCastAOE(SPELL_RAISE_DEAD); - me->ClearUnitState(UNIT_STAT_CASTING); + me->ClearUnitState(UNIT_STATE_CASTING); SendMusicToPlayers(MUSIC_FINAL); break; case EVENT_OUTRO_TALK_5: @@ -1070,8 +1070,8 @@ class boss_the_lich_king : public CreatureScript case EVENT_OUTRO_TALK_6: Talk(SAY_LK_OUTRO_6); if (Creature* tirion = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_HIGHLORD_TIRION_FORDRING))) - tirion->SetFacing(0.0f, me); - me->ClearUnitState(UNIT_STAT_CASTING); + tirion->SetFacingToObject(me); + me->ClearUnitState(UNIT_STATE_CASTING); DoCastAOE(SPELL_SUMMON_BROKEN_FROSTMOURNE_3); SetEquipmentSlots(false, EQUIP_UNEQUIP); break; @@ -1222,7 +1222,7 @@ class npc_tirion_fordring_tft : public CreatureScript void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { if (spell->Id == SPELL_ICE_LOCK) - me->SetFacing(3.085098f); + me->SetFacingTo(3.085098f); else if (spell->Id == SPELL_BROKEN_FROSTMOURNE_KNOCK) SetEquipmentSlots(true); // remove glow on ashbringer } @@ -1255,7 +1255,7 @@ class npc_tirion_fordring_tft : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) @@ -1268,7 +1268,7 @@ class npc_tirion_fordring_tft : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_CHARGE, 5000, 0, PHASE_INTRO); break; case EVENT_INTRO_EMOTE_1: - me->HandleEmoteCommand(EMOTE_ONESHOT_POINT_NOSHEATHE); + me->HandleEmoteCommand(EMOTE_ONESHOT_POINT_NO_SHEATHE); break; case EVENT_INTRO_CHARGE: me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING); @@ -1285,7 +1285,7 @@ class npc_tirion_fordring_tft : public CreatureScript SetEquipmentSlots(false, EQUIP_ASHBRINGER_GLOWING); if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_THE_LICH_KING))) { - me->SetFacing(0.0f, lichKing); + me->SetFacingToObject(lichKing); lichKing->AI()->DoAction(ACTION_PLAY_MUSIC); } break; @@ -1349,7 +1349,7 @@ class npc_shambling_horror_icc : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) @@ -1429,7 +1429,7 @@ class npc_raging_spirit : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) @@ -1498,7 +1498,7 @@ class npc_valkyr_shadowguard : public CreatureScript _events.Reset(); DoCastAOE(SPELL_EJECT_ALL_PASSENGERS); me->GetMotionMaster()->MoveTargetedHome(); - me->ClearUnitState(UNIT_STAT_EVADE); + me->ClearUnitState(UNIT_STATE_EVADE); } } @@ -1564,7 +1564,7 @@ class npc_valkyr_shadowguard : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) @@ -1621,7 +1621,7 @@ class npc_strangulate_vehicle : public CreatureScript void IsSummonedBy(Unit* summoner) { - me->SetFacing(0.0f, summoner); + me->SetFacingToObject(summoner); DoCast(summoner, SPELL_HARVEST_SOUL_VEHICLE); _events.Reset(); _events.ScheduleEvent(EVENT_MOVE_TO_LICH_KING, 2000); @@ -1656,7 +1656,8 @@ class npc_strangulate_vehicle : public CreatureScript switch (eventId) { case EVENT_TELEPORT: - me->GetMotionMaster()->MoveIdle(MOTION_SLOT_ACTIVE); + me->GetMotionMaster()->Clear(false); + me->GetMotionMaster()->MoveIdle(); if (TempSummon* summ = me->ToTempSummon()) { if (Unit* summoner = summ->GetSummoner()) @@ -1788,7 +1789,7 @@ class npc_terenas_menethil : public CreatureScript _events.Reset(); _events.SetPhase(PHASE_OUTRO); if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_THE_LICH_KING))) - me->SetFacing(0.0f, lichKing); + me->SetFacingToObject(lichKing); _events.ScheduleEvent(EVENT_OUTRO_TERENAS_TALK_1, 2000, 0, PHASE_OUTRO); _events.ScheduleEvent(EVENT_OUTRO_TERENAS_TALK_2, 14000, 0, PHASE_OUTRO); @@ -1824,7 +1825,7 @@ class npc_terenas_menethil : public CreatureScript if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_THE_LICH_KING))) { lichKing->AI()->DoAction(ACTION_FINISH_OUTRO); - lichKing->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + lichKing->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC); if (Creature* tirion = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_HIGHLORD_TIRION_FORDRING))) tirion->AI()->AttackStart(lichKing); } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp index 5f62c2b5424..e0993178890 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -426,7 +426,7 @@ class boss_valithria_dreamwalker : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) @@ -626,7 +626,7 @@ class npc_the_lich_king_controller : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) @@ -741,7 +741,7 @@ class npc_risen_archmage : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) @@ -807,7 +807,7 @@ class npc_blazing_skeleton : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) @@ -873,7 +873,7 @@ class npc_suppresser : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; // this code will never be reached while channeling @@ -967,7 +967,7 @@ class npc_gluttonous_abomination : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp index ab3046806db..00a6a02f2da 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp @@ -477,7 +477,7 @@ class npc_highlord_tirion_fordring_lh : public CreatureScript Talk(SAY_TIRION_INTRO_3); break; case EVENT_LK_INTRO_1: - me->HandleEmoteCommand(EMOTE_ONESHOT_POINT_NOSHEATHE); + me->HandleEmoteCommand(EMOTE_ONESHOT_POINT_NO_SHEATHE); if (Creature* theLichKing = ObjectAccessor::GetCreature(*me, _theLichKing)) theLichKing->AI()->Talk(SAY_LK_INTRO_1); break; @@ -611,7 +611,7 @@ class npc_rotting_frost_giant : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) @@ -809,7 +809,7 @@ class boss_sister_svalna : public CreatureScript case ACTION_START_GAUNTLET: me->setActive(true); _isEventInProgress = true; - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); events.ScheduleEvent(EVENT_SVALNA_START, 25000); break; case ACTION_RESURRECT_CAPTAINS: @@ -843,7 +843,7 @@ class boss_sister_svalna : public CreatureScript _isEventInProgress = false; me->setActive(false); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); me->SetFlying(false); } @@ -874,7 +874,7 @@ class boss_sister_svalna : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -1130,7 +1130,7 @@ class npc_crok_scourgebane : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) @@ -1264,7 +1264,7 @@ struct npc_argent_captainAI : public ScriptedAI void EnterEvadeMode() { // not yet following - if (me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_IDLE) != TARGETED_MOTION_TYPE || IsUndead) + if (me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_IDLE) != CHASE_MOTION_TYPE || IsUndead) { ScriptedAI::EnterEvadeMode(); return; @@ -1353,7 +1353,7 @@ class npc_captain_arnath : public CreatureScript Events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = Events.ExecuteEvent()) @@ -1434,7 +1434,7 @@ class npc_captain_brandon : public CreatureScript Events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = Events.ExecuteEvent()) @@ -1502,7 +1502,7 @@ class npc_captain_grondel : public CreatureScript Events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = Events.ExecuteEvent()) @@ -1567,7 +1567,7 @@ class npc_captain_rupert : public CreatureScript Events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = Events.ExecuteEvent()) @@ -1680,7 +1680,7 @@ class spell_icc_stoneform : public SpellScriptLoader if (Creature* target = GetTarget()->ToCreature()) { target->SetReactState(REACT_PASSIVE); - target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC); target->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_CUSTOM_SPELL_02); } } @@ -1690,7 +1690,7 @@ class spell_icc_stoneform : public SpellScriptLoader if (Creature* target = GetTarget()->ToCreature()) { target->SetReactState(REACT_AGGRESSIVE); - target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC); target->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); } } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h index ece966fcda5..085aea139a3 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp index 1242e90c2f3..0266db5f26b 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index a7235e34f3a..2a61d00d119 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -335,8 +335,12 @@ class instance_icecrown_citadel : public InstanceMapScript return entry; } - void OnCreatureDeath(Creature* creature) + void OnUnitDeath(Unit* unit) { + Creature* creature = unit->ToCreature(); + if (!creature) + return; + switch (creature->GetEntry()) { case NPC_YMIRJAR_BATTLE_MAIDEN: diff --git a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp index 9096282c3f6..942cfd7c5a8 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp index 97594c168ef..058c5b35e3a 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -137,7 +137,7 @@ class boss_faerlina : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp index 0462f669d88..47151ef6d80 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -342,7 +342,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp index 1849849d907..0ef4e3d74c2 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index bbf5b669494..8c6afba18fd 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -354,7 +354,7 @@ class boss_gothik : public CreatureScript } if (spellId && me->isInCombat()) { - me->HandleEmoteCommand(EMOTE_ONESHOT_SPELLCAST); + me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST); if (Creature* pRandomDeadTrigger = Unit::GetCreature(*me, DeadTriggerGUID[rand() % POS_DEAD])) me->CastSpell(pRandomDeadTrigger, spellId, true); } @@ -400,7 +400,7 @@ class boss_gothik : public CreatureScript instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); } - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp index 3badccd3a80..e353a71b0b9 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp index bb8a0909df4..7a2d3ec55ab 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index 96c061f4c98..161c9160293 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -486,7 +486,7 @@ public: else uiGuardiansOfIcecrownTimer -= diff; } - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; if (uint32 eventId = events.GetEvent()) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp index 6db29be8fbd..58d3a4240b2 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -20,79 +20,185 @@ enum Spells { - SPELL_NECROTIC_AURA = 55593, - SPELL_SUMMON_SPORE = 29234, - SPELL_DEATHBLOOM = 29865, - H_SPELL_DEATHBLOOM = 55053, - SPELL_INEVITABLE_DOOM = 29204, - H_SPELL_INEVITABLE_DOOM = 55052 + SPELL_NECROTIC_AURA = 55593, + SPELL_WARN_NECROTIC_AURA = 59481, + SPELL_SUMMON_SPORE = 29234, + SPELL_DEATHBLOOM = 29865, + H_SPELL_DEATHBLOOM = 55053, + SPELL_INEVITABLE_DOOM = 29204, + H_SPELL_INEVITABLE_DOOM = 55052 +}; + +enum Texts +{ + SAY_NECROTIC_AURA_APPLIED = 0, + SAY_NECROTIC_AURA_REMOVED = 1, + SAY_NECROTIC_AURA_FADING = 2, }; enum Events { - EVENT_NONE, - EVENT_AURA, - EVENT_BLOOM, - EVENT_DOOM, + EVENT_NECROTIC_AURA = 1, + EVENT_DEATHBLOOM = 2, + EVENT_INEVITABLE_DOOM = 3, + EVENT_SPORE = 4, + EVENT_NECROTIC_AURA_FADING = 5, +}; + +enum Achievement +{ + DATA_ACHIEVEMENT_SPORE_LOSER = 21822183, }; class boss_loatheb : public CreatureScript { -public: - boss_loatheb() : CreatureScript("boss_loatheb") { } + public: + boss_loatheb() : CreatureScript("boss_loatheb") { } - CreatureAI* GetAI(Creature* creature) const - { - return new boss_loathebAI (creature); - } + struct boss_loathebAI : public BossAI + { + boss_loathebAI(Creature* creature) : BossAI(creature, BOSS_LOATHEB) + { + } - struct boss_loathebAI : public BossAI - { - boss_loathebAI(Creature* c) : BossAI(c, BOSS_LOATHEB) {} + void Reset() + { + _Reset(); + _doomCounter = 0; + _sporeLoserData = true; + } - void EnterCombat(Unit* /*who*/) - { - _EnterCombat(); - events.ScheduleEvent(EVENT_AURA, 10000); - events.ScheduleEvent(EVENT_BLOOM, 5000); - events.ScheduleEvent(EVENT_DOOM, 120000); - } + void EnterCombat(Unit* /*who*/) + { + _EnterCombat(); + events.ScheduleEvent(EVENT_NECROTIC_AURA, 17000); + events.ScheduleEvent(EVENT_DEATHBLOOM, 5000); + events.ScheduleEvent(EVENT_SPORE, IsHeroic() ? 18000 : 36000); + events.ScheduleEvent(EVENT_INEVITABLE_DOOM, 120000); + } - void UpdateAI(const uint32 diff) - { - if (!UpdateVictim()) - return; + void SummonedCreatureDies(Creature* /*summon*/, Unit* /*killer*/) + { + _sporeLoserData = false; + } - events.Update(diff); + uint32 GetData(uint32 id) + { + if (id != DATA_ACHIEVEMENT_SPORE_LOSER) + return 0; - while (uint32 eventId = events.ExecuteEvent()) + return uint32(_sporeLoserData); + } + + void UpdateAI(uint32 const diff) { - switch (eventId) + if (!UpdateVictim()) + return; + + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) { - case EVENT_AURA: - DoCastAOE(SPELL_NECROTIC_AURA); - events.ScheduleEvent(EVENT_AURA, 20000); - break; - case EVENT_BLOOM: - // TODO : Add missing text - DoCastAOE(SPELL_SUMMON_SPORE, true); - DoCastAOE(RAID_MODE(SPELL_DEATHBLOOM, H_SPELL_DEATHBLOOM)); - events.ScheduleEvent(EVENT_BLOOM, 30000); - break; - case EVENT_DOOM: - DoCastAOE(RAID_MODE(SPELL_INEVITABLE_DOOM, H_SPELL_INEVITABLE_DOOM)); - events.ScheduleEvent(EVENT_DOOM, events.GetTimer() < 5*60000 ? 30000 : 15000); - break; + switch (eventId) + { + case EVENT_NECROTIC_AURA: + DoCastAOE(SPELL_NECROTIC_AURA); + DoCast(me, SPELL_WARN_NECROTIC_AURA); + events.ScheduleEvent(EVENT_NECROTIC_AURA, 20000); + events.ScheduleEvent(EVENT_NECROTIC_AURA_FADING, 14000); + break; + case EVENT_DEATHBLOOM: + DoCastAOE(RAID_MODE(SPELL_DEATHBLOOM, H_SPELL_DEATHBLOOM)); + events.ScheduleEvent(EVENT_DEATHBLOOM, 30000); + break; + case EVENT_INEVITABLE_DOOM: + _doomCounter++; + DoCastAOE(RAID_MODE(SPELL_INEVITABLE_DOOM, H_SPELL_INEVITABLE_DOOM)); + events.ScheduleEvent(EVENT_INEVITABLE_DOOM, std::max(120000 - _doomCounter * 15000, 15000)); // needs to be confirmed + break; + case EVENT_SPORE: + DoCast(me, SPELL_SUMMON_SPORE, false); + events.ScheduleEvent(EVENT_SPORE, IsHeroic() ? 18000 : 36000); + break; + case EVENT_NECROTIC_AURA_FADING: + Talk(SAY_NECROTIC_AURA_FADING); + break; + default: + break; + } } + + DoMeleeAttackIfReady(); } - DoMeleeAttackIfReady(); + private: + bool _sporeLoserData; + uint8 _doomCounter; + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_loathebAI(creature); + } +}; + +class achievement_spore_loser : public AchievementCriteriaScript +{ + public: + achievement_spore_loser() : AchievementCriteriaScript("achievement_spore_loser") { } + + bool OnCheck(Player* /*source*/, Unit* target) + { + return target && target->GetAI()->GetData(DATA_ACHIEVEMENT_SPORE_LOSER); } - }; +}; + +typedef boss_loatheb::boss_loathebAI LoathebAI; + +class spell_loatheb_necrotic_aura_warning : public SpellScriptLoader +{ + public: + spell_loatheb_necrotic_aura_warning() : SpellScriptLoader("spell_loatheb_necrotic_aura_warning") { } + + class spell_loatheb_necrotic_aura_warning_AuraScript : public AuraScript + { + PrepareAuraScript(spell_loatheb_necrotic_aura_warning_AuraScript); + + bool Validate(SpellInfo const* /*spell*/) + { + if (!sSpellStore.LookupEntry(SPELL_WARN_NECROTIC_AURA)) + return false; + return true; + } + void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (GetTarget()->IsAIEnabled) + CAST_AI(LoathebAI, GetTarget()->GetAI())->Talk(SAY_NECROTIC_AURA_APPLIED); + } + + void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (GetTarget()->IsAIEnabled) + CAST_AI(LoathebAI, GetTarget()->GetAI())->Talk(SAY_NECROTIC_AURA_REMOVED); + } + + void Register() + { + AfterEffectApply += AuraEffectApplyFn(spell_loatheb_necrotic_aura_warning_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + AfterEffectRemove += AuraEffectRemoveFn(spell_loatheb_necrotic_aura_warning_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_loatheb_necrotic_aura_warning_AuraScript(); + } }; void AddSC_boss_loatheb() { new boss_loatheb(); + new achievement_spore_loser(); + new spell_loatheb_necrotic_aura_warning(); } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp index e98b004f9e9..0163101b8ed 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp index b7d74c02dd8..7143b940916 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp index 3b87dea025c..a9ed499c5e5 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp index 7adc17cc852..b27ab3730da 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp index ed1bbd1971a..16b1e7ac996 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp index c2099b1346b..7977fa4df8a 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -83,7 +83,11 @@ enum ThaddiusSpells SPELL_BALL_LIGHTNING = 28299, SPELL_CHAIN_LIGHTNING = 28167, H_SPELL_CHAIN_LIGHTNING = 54531, - SPELL_BERSERK = 27680 + SPELL_BERSERK = 27680, + SPELL_POSITIVE_CHARGE = 28062, + SPELL_POSITIVE_CHARGE_STACK = 29659, + SPELL_NEGATIVE_CHARGE = 28085, + SPELL_NEGATIVE_CHARGE_STACK = 29660 }; enum Events @@ -94,6 +98,11 @@ enum Events EVENT_BERSERK, }; +enum Achievement +{ + DATA_POLARITY_SWITCH = 76047605, +}; + class boss_thaddius : public CreatureScript { public: @@ -123,18 +132,19 @@ public: if (!checkFeugenAlive && !checkStalaggAlive) { - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED); me->SetReactState(REACT_AGGRESSIVE); } else { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED); me->SetReactState(REACT_PASSIVE); } } bool checkStalaggAlive; bool checkFeugenAlive; + bool polaritySwitch; uint32 uiAddsTimer; void KilledUnit(Unit* /*victim*/) @@ -169,13 +179,13 @@ public: if (!checkFeugenAlive && !checkStalaggAlive) { - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED); // REACT_AGGRESSIVE only reset when he takes damage. DoZoneInCombat(); } else { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED); me->SetReactState(REACT_PASSIVE); } } @@ -194,6 +204,20 @@ public: me->SetReactState(REACT_AGGRESSIVE); } + void SetData(uint32 id, uint32 data) + { + if (id == DATA_POLARITY_SWITCH) + polaritySwitch = data ? true : false; + } + + uint32 GetData(uint32 id) + { + if (id != DATA_POLARITY_SWITCH) + return 0; + + return uint32(polaritySwitch); + } + void UpdateAI(const uint32 diff) { if (checkFeugenAlive && checkStalaggAlive) @@ -224,7 +248,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -400,9 +424,101 @@ public: }; +class spell_thaddius_pos_neg_charge : public SpellScriptLoader +{ + public: + spell_thaddius_pos_neg_charge() : SpellScriptLoader("spell_thaddius_pos_neg_charge") { } + + class spell_thaddius_pos_neg_charge_SpellScript : public SpellScript + { + PrepareSpellScript(spell_thaddius_pos_neg_charge_SpellScript); + + bool Validate(SpellInfo const* /*spell*/) + { + if (!sSpellMgr->GetSpellInfo(SPELL_POSITIVE_CHARGE)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_POSITIVE_CHARGE_STACK)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_NEGATIVE_CHARGE)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_NEGATIVE_CHARGE_STACK)) + return false; + return true; + } + + bool Load() + { + return GetCaster()->GetTypeId() == TYPEID_UNIT; + } + + void HandleTargets(std::list<Unit*>& targetList) + { + uint8 count = 0; + for (std::list<Unit*>::iterator ihit = targetList.begin(); ihit != targetList.end(); ++ihit) + if ((*ihit)->GetGUID() != GetCaster()->GetGUID()) + if (Player* target = (*ihit)->ToPlayer()) + if (target->HasAura(GetTriggeringSpell()->Id)) + ++count; + + if (count) + { + uint32 spellId = 0; + + if (GetSpellInfo()->Id == SPELL_POSITIVE_CHARGE) + spellId = SPELL_POSITIVE_CHARGE_STACK; + else // if (GetSpellInfo()->Id == SPELL_NEGATIVE_CHARGE) + spellId = SPELL_NEGATIVE_CHARGE_STACK; + + GetCaster()->SetAuraStack(spellId, GetCaster(), count); + } + } + + void HandleDamage(SpellEffIndex /*effIndex*/) + { + if (!GetTriggeringSpell()) + return; + + Unit* target = GetHitUnit(); + Unit* caster = GetCaster(); + + if (target->HasAura(GetTriggeringSpell()->Id)) + SetHitDamage(0); + else + { + if (target->GetTypeId() == TYPEID_PLAYER && caster->IsAIEnabled) + caster->ToCreature()->AI()->SetData(DATA_POLARITY_SWITCH, 1); + } + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_thaddius_pos_neg_charge_SpellScript::HandleDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); + OnUnitTargetSelect += SpellUnitTargetFn(spell_thaddius_pos_neg_charge_SpellScript::HandleTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_thaddius_pos_neg_charge_SpellScript(); + } +}; + +class achievement_polarity_switch : public AchievementCriteriaScript +{ + public: + achievement_polarity_switch() : AchievementCriteriaScript("achievement_polarity_switch") { } + + bool OnCheck(Player* /*source*/, Unit* target) + { + return target && target->GetAI()->GetData(DATA_POLARITY_SWITCH); + } +}; + void AddSC_boss_thaddius() { new boss_thaddius(); new mob_stalagg(); new mob_feugen(); + new spell_thaddius_pos_neg_charge(); + new achievement_polarity_switch(); } diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp index 077aa708e14..c05d9a21850 100644 --- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp +++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -121,24 +121,24 @@ public: LoadMinionData(minionData); } - std::set<uint64> HeiganEruptionGUID[4]; - uint64 GothikGateGUID; - uint64 HorsemenChestGUID; - uint64 SapphironGUID; - uint64 uiFaerlina; - uint64 uiThane; - uint64 uiLady; - uint64 uiBaron; - uint64 uiSir; - - uint64 uiThaddius; - uint64 uiHeigan; - uint64 uiFeugen; - uint64 uiStalagg; - - uint64 uiKelthuzad; - uint64 uiKelthuzadTrigger; - uint64 uiPortals[4]; + std::set<uint64> heiganEruptionGUID[4]; + uint64 gothikGateGUID; + uint64 horsemenChestGUID; + uint64 sapphironGUID; + uint64 faerlinaGUID; + uint64 thaneGUID; + uint64 ladyGUID; + uint64 baronGUID; + uint64 sirGUID; + + uint64 thaddiusGUID; + uint64 heiganGUID; + uint64 feugenGUID; + uint64 stalaggGUID; + + uint64 kelthuzadGUID; + uint64 kelthuzadTriggerGUID; + uint64 portalsGUID[4]; uint32 AbominationCount; @@ -147,41 +147,46 @@ public: time_t minHorsemenDiedTime; time_t maxHorsemenDiedTime; + uint32 playerDied; + void Initialize() { - GothikGateGUID = 0; - HorsemenChestGUID = 0; - SapphironGUID = 0; - uiFaerlina = 0; - uiThane = 0; - uiLady = 0; - uiBaron = 0; - uiSir = 0; - uiThaddius = 0; - uiHeigan = 0; - uiFeugen = 0; - uiStalagg = 0; - uiKelthuzad = 0; - uiKelthuzadTrigger = 0; - - memset(uiPortals, 0, sizeof(uiPortals)); + gothikGateGUID = 0; + horsemenChestGUID = 0; + sapphironGUID = 0; + faerlinaGUID = 0; + thaneGUID = 0; + ladyGUID = 0; + baronGUID = 0; + sirGUID = 0; + thaddiusGUID = 0; + heiganGUID = 0; + feugenGUID = 0; + stalaggGUID = 0; + kelthuzadGUID = 0; + kelthuzadTriggerGUID = 0; + + playerDied = 0; + gothikDoorState = GO_STATE_ACTIVE; + + memset(portalsGUID, 0, sizeof(portalsGUID)); } void OnCreatureCreate(Creature* creature) { switch (creature->GetEntry()) { - case 15989: SapphironGUID = creature->GetGUID(); return; - case 15953: uiFaerlina = creature->GetGUID(); return; - case 16064: uiThane = creature->GetGUID(); return; - case 16065: uiLady = creature->GetGUID(); return; - case 30549: uiBaron = creature->GetGUID(); return; - case 16063: uiSir = creature->GetGUID(); return; - case 15928: uiThaddius = creature->GetGUID(); return; - case 15936: uiHeigan = creature->GetGUID(); return; - case 15930: uiFeugen = creature->GetGUID(); return; - case 15929: uiStalagg = creature->GetGUID(); return; - case 15990: uiKelthuzad = creature->GetGUID(); return; + case 15989: sapphironGUID = creature->GetGUID(); return; + case 15953: faerlinaGUID = creature->GetGUID(); return; + case 16064: thaneGUID = creature->GetGUID(); return; + case 16065: ladyGUID = creature->GetGUID(); return; + case 30549: baronGUID = creature->GetGUID(); return; + case 16063: sirGUID = creature->GetGUID(); return; + case 15928: thaddiusGUID = creature->GetGUID(); return; + case 15936: heiganGUID = creature->GetGUID(); return; + case 15930: feugenGUID = creature->GetGUID(); return; + case 15929: stalaggGUID = creature->GetGUID(); return; + case 15990: kelthuzadGUID = creature->GetGUID(); return; } AddMinion(creature, true); @@ -197,7 +202,7 @@ public: if (go->GetGOInfo()->displayId == 6785 || go->GetGOInfo()->displayId == 1287) { uint32 section = GetEruptionSection(go->GetPositionX(), go->GetPositionY()); - HeiganEruptionGUID[section].insert(go->GetGUID()); + heiganEruptionGUID[section].insert(go->GetGUID()); return; } @@ -205,29 +210,29 @@ public: switch (go->GetEntry()) { case GO_GOTHIK_GATE: - GothikGateGUID = go->GetGUID(); + gothikGateGUID = go->GetGUID(); go->SetGoState(gothikDoorState); break; case GO_HORSEMEN_CHEST: - HorsemenChestGUID = go->GetGUID(); + horsemenChestGUID = go->GetGUID(); break; case GO_HORSEMEN_CHEST_HERO: - HorsemenChestGUID = go->GetGUID(); + horsemenChestGUID = go->GetGUID(); break; case GO_KELTHUZAD_PORTAL01: - uiPortals[0] = go->GetGUID(); + portalsGUID[0] = go->GetGUID(); break; case GO_KELTHUZAD_PORTAL02: - uiPortals[1] = go->GetGUID(); + portalsGUID[1] = go->GetGUID(); break; case GO_KELTHUZAD_PORTAL03: - uiPortals[2] = go->GetGUID(); + portalsGUID[2] = go->GetGUID(); break; case GO_KELTHUZAD_PORTAL04: - uiPortals[3] = go->GetGUID(); + portalsGUID[3] = go->GetGUID(); break; case GO_KELTHUZAD_TRIGGER: - uiKelthuzadTrigger = go->GetGUID(); + kelthuzadTriggerGUID = go->GetGUID(); break; default: break; @@ -242,16 +247,16 @@ public: { uint32 section = GetEruptionSection(go->GetPositionX(), go->GetPositionY()); - HeiganEruptionGUID[section].erase(go->GetGUID()); + heiganEruptionGUID[section].erase(go->GetGUID()); return; } switch (go->GetEntry()) { case GO_BIRTH: - if (SapphironGUID) + if (sapphironGUID) { - if (Creature* pSapphiron = instance->GetCreature(SapphironGUID)) + if (Creature* pSapphiron = instance->GetCreature(sapphironGUID)) pSapphiron->AI()->DoAction(DATA_SAPPHIRON_BIRTH); return; } @@ -263,6 +268,15 @@ public: AddDoor(go, false); } + void OnUnitDeath(Unit* unit) + { + if (unit->GetTypeId() == TYPEID_PLAYER && IsEncounterInProgress()) + { + playerDied = 1; + SaveToDB(); + } + } + void SetData(uint32 id, uint32 value) { switch (id) @@ -271,11 +285,10 @@ public: HeiganErupt(value); break; case DATA_GOTHIK_GATE: - if (GameObject* gothikGate = instance->GetGameObject(GothikGateGUID)) + if (GameObject* gothikGate = instance->GetGameObject(gothikGateGUID)) gothikGate->SetGoState(GOState(value)); gothikDoorState = GOState(value); break; - case DATA_HORSEMEN0: case DATA_HORSEMEN1: case DATA_HORSEMEN2: @@ -319,35 +332,35 @@ public: switch (id) { case DATA_FAERLINA: - return uiFaerlina; + return faerlinaGUID; case DATA_THANE: - return uiThane; + return thaneGUID; case DATA_LADY: - return uiLady; + return ladyGUID; case DATA_BARON: - return uiBaron; + return baronGUID; case DATA_SIR: - return uiSir; + return sirGUID; case DATA_THADDIUS: - return uiThaddius; + return thaddiusGUID; case DATA_HEIGAN: - return uiHeigan; + return heiganGUID; case DATA_FEUGEN: - return uiFeugen; + return feugenGUID; case DATA_STALAGG: - return uiStalagg; + return stalaggGUID; case DATA_KELTHUZAD: - return uiKelthuzad; + return kelthuzadGUID; case DATA_KELTHUZAD_PORTAL01: - return uiPortals[0]; + return portalsGUID[0]; case DATA_KELTHUZAD_PORTAL02: - return uiPortals[1]; + return portalsGUID[1]; case DATA_KELTHUZAD_PORTAL03: - return uiPortals[2]; + return portalsGUID[2]; case DATA_KELTHUZAD_PORTAL04: - return uiPortals[3]; + return portalsGUID[3]; case DATA_KELTHUZAD_TRIGGER: - return uiKelthuzadTrigger; + return kelthuzadTriggerGUID; } return 0; } @@ -359,7 +372,7 @@ public: if (id == BOSS_HORSEMEN && state == DONE) { - if (GameObject* pHorsemenChest = instance->GetGameObject(HorsemenChestGUID)) + if (GameObject* pHorsemenChest = instance->GetGameObject(horsemenChestGUID)) pHorsemenChest->SetRespawnTime(pHorsemenChest->GetRespawnDelay()); } @@ -373,7 +386,7 @@ public: if (i == section) continue; - for (std::set<uint64>::const_iterator itr = HeiganEruptionGUID[i].begin(); itr != HeiganEruptionGUID[i].end(); ++itr) + for (std::set<uint64>::const_iterator itr = heiganEruptionGUID[i].begin(); itr != heiganEruptionGUID[i].end(); ++itr) { if (GameObject* pHeiganEruption = instance->GetGameObject(*itr)) { @@ -384,6 +397,21 @@ public: } } + // This Function is called in CheckAchievementCriteriaMeet and CheckAchievementCriteriaMeet is called before SetBossState(bossId, DONE), + // so to check if all bosses are done the checker must exclude 1 boss, the last done, if there is at most 1 encouter in progress when is + // called this function then all bosses are done. The one boss that check is the boss that calls this function, so it is dead. + bool AreAllEncoutersDone() + { + uint32 numBossAlive = 0; + for (uint32 i = 0; i < MAX_BOSS_NUMBER; ++i) + if (GetBossState(i) != DONE) + numBossAlive++; + + if (numBossAlive > 1) + return false; + return true; + } + bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target = NULL*/, uint32 /*miscvalue1 = 0*/) { switch (criteria_id) @@ -396,12 +424,22 @@ public: if (Difficulty(instance->GetSpawnMode()) == RAID_DIFFICULTY_25MAN_NORMAL && (maxHorsemenDiedTime - minHorsemenDiedTime) < 15) return true; return false; - case 13233: // Criteria for achievement 2186: The Immortal (25-man) - // TODO. - break; - case 13237: // Criteria for achievement 2187: The Undying (10-man) - // TODO. - break; + // Difficulty checks are done on DB. + // Criteria for achievement 2186: The Immortal (25-man) + case 13233: // The Four Horsemen + case 13234: // Maexxna + case 13235: // Thaddius + case 13236: // Loatheb + case 7616: // Kel'Thuzad + // Criteria for achievement 2187: The Undying (10-man) + case 13237: // The Four Horsemen + case 13238: // Maexxna + case 13239: // Loatheb + case 13240: // Thaddius + case 7617: // Kel'Thuzad + if (AreAllEncoutersDone() && !playerDied) + return true; + return false; } return false; } @@ -409,16 +447,22 @@ public: std::string GetSaveData() { std::ostringstream saveStream; - saveStream << GetBossSaveData() << ' ' << gothikDoorState; + saveStream << GetBossSaveData() << gothikDoorState << ' ' << playerDied; return saveStream.str(); } void Load(const char * data) { std::istringstream loadStream(LoadBossState(data)); - uint32 buff; + uint32 temp, buff, buff2; + + for (uint32 i = 0; i < MAX_BOSS_NUMBER; ++i) + loadStream >> temp; + loadStream >> buff; gothikDoorState = GOState(buff); + loadStream >> buff2; + playerDied = buff2; } }; diff --git a/src/server/scripts/Northrend/Naxxramas/naxxramas.h b/src/server/scripts/Northrend/Naxxramas/naxxramas.h index bb25ad691e0..43393aff844 100644 --- a/src/server/scripts/Northrend/Naxxramas/naxxramas.h +++ b/src/server/scripts/Northrend/Naxxramas/naxxramas.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index f28cd537e03..6dfa62df2d1 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -523,7 +523,7 @@ public: return; // We can't cast if we are casting already. - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -838,7 +838,7 @@ public: return; } - if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) me->GetMotionMaster()->MoveFollow(malygos, 0.0f, 0.0f); } } diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h b/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h index cc74ce9b8bc..b16cbffcd1c 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp index 4d4b8e90e7b..fcb54985357 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp index 0568bb13a8e..5e87ffb8973 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp index caf6b64eea7..44c6c25fa3e 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -144,14 +144,14 @@ public: { if (remove) { - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); if (me->HasAura(SPELL_FROZEN_PRISON)) me->RemoveAurasDueToSpell(SPELL_FROZEN_PRISON); } else { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); DoCast(me, SPELL_FROZEN_PRISON, false); } diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp index a8edd40d6b5..03f467ce180 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp index afbe3a123a8..4453ec94494 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp b/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp index 0d537955ec5..6d07ac960b5 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp index 1804c75987f..71a153c802a 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp index cb81c5d54fe..5af982bb694 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/Nexus/Nexus/nexus.h b/src/server/scripts/Northrend/Nexus/Nexus/nexus.h index 58efd78dcee..cb88be89afd 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/nexus.h +++ b/src/server/scripts/Northrend/Nexus/Nexus/nexus.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp index bb62b921289..bb75b789fff 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -95,7 +95,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp index df606f61d57..ab814a2ca22 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -200,7 +200,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp index e63d50b0133..aef959aad70 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp index 4dcd2618895..8852338c362 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -101,7 +101,7 @@ public: events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -256,10 +256,10 @@ class spell_varos_centrifuge_shield : public SpellScriptLoader { // flags taken from sniffs // UNIT_FLAG_UNK_9 -> means passive but it is not yet implemented in core - if (caster->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_PASSIVE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_UNK_6)) + if (caster->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_IMMUNE_TO_NPC|UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_UNK_6)) { caster->ToCreature()->SetReactState(REACT_PASSIVE); - caster->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_PASSIVE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_UNK_6); + caster->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_IMMUNE_TO_NPC|UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_UNK_6); } } } @@ -269,7 +269,7 @@ class spell_varos_centrifuge_shield : public SpellScriptLoader if (Unit* caster = GetCaster()) { caster->ToCreature()->SetReactState(REACT_AGGRESSIVE); - caster->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_PASSIVE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_UNK_6); + caster->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_IMMUNE_TO_NPC|UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_UNK_6); } } diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp index e6b3416b89c..46498a69c6f 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -58,8 +58,12 @@ public: gameObjectList.clear(); } - void OnCreatureDeath(Creature* creature) + void OnUnitDeath(Unit* unit) { + Creature* creature = unit->ToCreature(); + if (!creature) + return; + if (creature->GetEntry() != NPC_CENTRIFUGE_CONSTRUCT) return; diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp index b9799103214..c687aad8bd2 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h index dab2821b5e5..81d1e9f9ea8 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp index 5e2b6551f84..c6f72890d1f 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -61,7 +61,7 @@ enum eEnums //OTHER SPELLS //SPELL_CHARGE_UP = 52098, // only used when starting walk from one platform to the other - //SPELL_TEMPORARY_ELECTRICAL_CHARGE = 52092, // triggered part of above + SPELL_TEMPORARY_ELECTRICAL_CHARGE = 52092, // triggered part of above NPC_STORMFORGED_LIEUTENANT = 29240, SPELL_ARC_WELD = 59085, @@ -98,11 +98,13 @@ public: m_instance = creature->GetInstanceScript(); m_uiStance = STANCE_DEFENSIVE; memset(&m_auiStormforgedLieutenantGUID, 0, sizeof(m_auiStormforgedLieutenantGUID)); + canBuff = true; } InstanceScript* m_instance; bool m_bIsChangingStance; + bool canBuff; uint8 m_uiChargingStatus; uint8 m_uiStance; @@ -126,6 +128,10 @@ public: void Reset() { + if (canBuff) + if (!me->HasAura(SPELL_TEMPORARY_ELECTRICAL_CHARGE)) + me->AddAura(SPELL_TEMPORARY_ELECTRICAL_CHARGE, me); + m_bIsChangingStance = false; m_uiChargingStatus = 0; @@ -167,6 +173,16 @@ public: m_instance->SetData(TYPE_BJARNGRIM, NOT_STARTED); } + void EnterEvadeMode() + { + if (me->HasAura(SPELL_TEMPORARY_ELECTRICAL_CHARGE)) + canBuff = true; + else + canBuff = false; + + ScriptedAI::EnterEvadeMode(); + } + void EnterCombat(Unit* /*who*/) { DoScriptText(SAY_AGGRO, me); @@ -211,7 +227,7 @@ public: void UpdateAI(const uint32 uiDiff) { //Return since we have no target - if (!UpdateVictim()) + if (!UpdateVictim()) return; // Change stance diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp index e7f8ad4e5e8..016c4d27cfa 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp index d90704dd352..171215c605a 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp index 719d74a3bde..1fc724c8b6c 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -243,7 +243,7 @@ public: { if (m_uiPause_Timer <= uiDiff) { - if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) if (me->getVictim()) me->GetMotionMaster()->MoveChase(me->getVictim()); @@ -421,7 +421,7 @@ public: // me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //Set in DB if (me->IsNonMeleeSpellCasted(false)) me->InterruptNonMeleeSpells(false); - if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) me->GetMotionMaster()->MovementExpired(); m_bIsFrozen = true; } diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h index 598af7efc98..d5bca9c257d 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp index c5c7f9546ba..f25be6dae0d 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp index 65b5d3eaad1..d1aba800094 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -174,7 +174,7 @@ public: bIsSlam = false; //and correct movement, if not already - if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) { if (me->getVictim()) me->GetMotionMaster()->MoveChase(me->getVictim()); diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp index 4f512089119..cd4d7ae94a1 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp index dd61fe549c3..2c7026207e5 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp index 273a0bf6f8e..1c8d9380a2b 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h index 37ef4e458b4..a6f1eb86178 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp index ffd3706a7e5..ee5cb87dd85 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon.cpp index 1892702d336..e54d8a898de 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp index a8a4fad5e4e..eadc524348b 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -283,7 +283,7 @@ class boss_steelbreaker : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -404,7 +404,7 @@ class boss_runemaster_molgeim : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -634,7 +634,7 @@ class boss_stormcaller_brundir : public CreatureScript // Prevent to have Brundir somewhere in the air when he die in Air phase if (me->GetPositionZ() > FLOOR_Z) - me->GetMotionMaster()->MoveFall(FLOOR_Z); + me->GetMotionMaster()->MoveFall(); } void KilledUnit(Unit* /*who*/) @@ -649,7 +649,7 @@ class boss_stormcaller_brundir : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp index bcc417c50cd..1c478cd83e9 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -217,7 +217,7 @@ class boss_auriaya : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -348,7 +348,7 @@ class npc_sanctum_sentry : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -418,7 +418,7 @@ class npc_feral_defender : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp index ad79d1b56cc..47f74b1ddba 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -384,7 +384,7 @@ class boss_flame_leviathan : public CreatureScript return; } - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -425,7 +425,7 @@ class boss_flame_leviathan : public CreatureScript break; case EVENT_REPAIR: me->MonsterTextEmote(EMOTE_REPAIR, 0, true); - me->ClearUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT); + me->ClearUnitState(UNIT_STATE_STUNNED | UNIT_STATE_ROOT); events.ScheduleEvent(EVENT_SHUTDOWN, 150*IN_MILLISECONDS); events.CancelEvent(EVENT_REPAIR); break; @@ -1576,7 +1576,7 @@ class spell_systems_shutdown : public SpellScriptLoader return; //! This could probably in the SPELL_EFFECT_SEND_EVENT handler too: - owner->AddUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT); + owner->AddUnitState(UNIT_STATE_STUNNED | UNIT_STATE_ROOT); owner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); owner->RemoveAurasDueToSpell(SPELL_GATHERING_SPEED); } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp index 13c174a9607..12d953a07b4 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -401,7 +401,7 @@ class boss_freya : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -436,7 +436,7 @@ class boss_freya : public CreatureScript break; case EVENT_WAVE: SpawnWave(); - if (waveCount < 6) + if (waveCount <= 6) // If set to 6 The Bombs appear during the Final Add wave events.ScheduleEvent(EVENT_WAVE, WAVE_TIME); else events.ScheduleEvent(EVENT_NATURE_BOMB, urand(10000, 20000)); @@ -739,7 +739,7 @@ class boss_elder_brightleaf : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -872,7 +872,7 @@ class boss_elder_stonebark : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -985,7 +985,7 @@ class boss_elder_ironbranch : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -1372,7 +1372,7 @@ class npc_healthy_spore : public CreatureScript { npc_healthy_sporeAI(Creature* creature) : Scripted_NoMovementAI(creature) { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_PASSIVE); DoCast(me, SPELL_HEALTHY_SPORE_VISUAL); DoCast(me, SPELL_POTENT_PHEROMONES); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp index 7d00c0e59fc..c7918f85245 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -138,7 +138,7 @@ class boss_general_vezax : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -336,7 +336,7 @@ class boss_saronite_animus : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp index bb21da94bc5..33f50d0b3de 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -370,7 +370,7 @@ class boss_hodir : public CreatureScript me->StopMoving(); me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveIdle(); - me->SetControlled(true, UNIT_STAT_STUNNED); + me->SetControlled(true, UNIT_STATE_STUNNED); me->CombatStop(true); me->setFaction(35); @@ -387,7 +387,7 @@ class boss_hodir : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -612,12 +612,12 @@ class npc_hodir_priest : public CreatureScript void UpdateAI(uint32 const diff) { - if (!UpdateVictim() || me->HasUnitState(UNIT_STAT_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED)) + if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED)) return; events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; if (HealthBelowPct(30)) @@ -688,12 +688,12 @@ class npc_hodir_shaman : public CreatureScript void UpdateAI(uint32 const diff) { - if (!UpdateVictim() || me->HasUnitState(UNIT_STAT_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED)) + if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED)) return; events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -750,12 +750,12 @@ class npc_hodir_druid : public CreatureScript void UpdateAI(uint32 const diff) { - if (!UpdateVictim() || me->HasUnitState(UNIT_STAT_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED)) + if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED)) return; events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -825,12 +825,12 @@ class npc_hodir_mage : public CreatureScript void UpdateAI(uint32 const diff) { - if (!UpdateVictim() || me->HasUnitState(UNIT_STAT_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED)) + if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED)) return; events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp index b8876ae577a..d8a3ef0b8df 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -202,7 +202,7 @@ class boss_ignis : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp index 5da1c485986..a156e6ef08b 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -224,7 +224,7 @@ class boss_kologarn : public CreatureScript summon->CastSpell(summon, SPELL_FOCUSED_EYEBEAM_VISUAL, true); summon->SetReactState(REACT_PASSIVE); // One of the above spells is a channeled spell, we need to clear this unit state for MoveChase to work - summon->ClearUnitState(UNIT_STAT_CASTING); + summon->ClearUnitState(UNIT_STATE_CASTING); // Victim gets 67351 if (eyebeamTarget) @@ -244,7 +244,7 @@ class boss_kologarn : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp index 11b7c54975e..98b3a6b658b 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp index 0e3a8926203..45f9a1fa012 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp @@ -1,5 +1,5 @@ /* -* Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +* Copyright (C) 2008-2012 TrinityCore <http://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 @@ -668,7 +668,7 @@ class npc_expedition_commander : public CreatureScript break; case 4: for (uint8 n = 0; n < RAID_MODE(2, 4); n++) - Engineer[n]->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USESTANDING); + Engineer[n]->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING); for (uint8 n = 0; n < 4; ++n) Defender[n]->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H); me->MonsterYell(SAY_AGGRO_2, LANG_UNIVERSAL, 0); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp index f993c419b8c..72741ee0679 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp index ae803b24642..724eb45d586 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -263,7 +263,7 @@ class boss_xt002 : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp index e4b21e1f66e..3f01f21b189 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp index 3c5697a7995..e12393f047f 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -358,8 +358,12 @@ class instance_ulduar : public InstanceMapScript } } - void OnCreatureDeath(Creature* creature) + void OnUnitDeath(Unit* unit) { + Creature* creature = unit->ToCreature(); + if (!creature) + return; + switch (creature->GetEntry()) { case NPC_CORRUPTED_SERVITOR: diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h index f11212d535e..a31954b8a16 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp index 05b1e395d1e..29eb5ad3367 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp index 3712bd748a5..a11f88fc6af 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -18,7 +18,7 @@ /* ScriptData SDName: Boss_Ingvar_The_Plunderer SD%Complete: 95 -SDComment: Some Problems with Annhylde Movement, Blizzlike Timers +SDComment: Some Problems with Annhylde Movement, Blizzlike Timers (just shadow axe summon needs a new timer) SDCategory: Udgarde Keep EndScriptData */ @@ -45,16 +45,32 @@ enum Creatures MOB_INGVAR_UNDEAD = 23980, }; +enum Events +{ + EVENT_CLEAVE = 1, + EVENT_SMASH, + EVENT_STAGGERING_ROAR, + EVENT_ENRAGE, + + EVENT_DARK_SMASH, + EVENT_DREADFUL_ROAR, + EVENT_WOE_STRIKE, + EVENT_SHADOW_AXE +}; + +enum Phases +{ + PHASE_HUMAN = 1, + PHASE_UNDEAD, +}; + enum Spells { //Ingvar Spells human form SPELL_CLEAVE = 42724, SPELL_SMASH = 42669, - H_SPELL_SMASH = 59706, SPELL_STAGGERING_ROAR = 42708, - H_SPELL_STAGGERING_ROAR = 59708, SPELL_ENRAGE = 42705, - H_SPELL_ENRAGE = 59707, SPELL_INGVAR_FEIGN_DEATH = 42795, SPELL_SUMMON_BANSHEE = 42912, @@ -63,9 +79,7 @@ enum Spells //Ingvar Spells undead form SPELL_DARK_SMASH = 42723, SPELL_DREADFUL_ROAR = 42729, - H_SPELL_DREADFUL_ROAR = 59734, SPELL_WOE_STRIKE = 42730, - H_SPELL_WOE_STRIKE = 59735, ENTRY_THROW_TARGET = 23996, SPELL_SHADOW_AXE_SUMMON = 42749 @@ -83,9 +97,9 @@ public: struct boss_ingvar_the_plundererAI : public ScriptedAI { - boss_ingvar_the_plundererAI(Creature* c) : ScriptedAI(c) + boss_ingvar_the_plundererAI(Creature* creature) : ScriptedAI(creature) { - instance = c->GetInstanceScript(); + instance = creature->GetInstanceScript(); } InstanceScript* instance; @@ -93,10 +107,6 @@ public: bool bIsUndead; bool bEventInProgress; - uint32 uiCleaveTimer; - uint32 uiSmashTimer; - uint32 uiEnrageTimer; - uint32 uiRoarTimer; uint32 uiSpawnResTimer; void Reset() @@ -107,13 +117,21 @@ public: bIsUndead = false; bEventInProgress = false; - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetStandState(UNIT_STAND_STATE_STAND); - uiCleaveTimer = 2000; - uiSmashTimer = 5000; - uiEnrageTimer = 10000; - uiRoarTimer = 15000; + events.Reset(); + events.SetPhase(PHASE_HUMAN); + + events.ScheduleEvent(EVENT_CLEAVE, urand(6,12)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_STAGGERING_ROAR, urand(18,21)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_ENRAGE, urand(7,14)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_SMASH, urand(12,17)*IN_MILLISECONDS, 0, PHASE_HUMAN); + + events.ScheduleEvent(EVENT_DARK_SMASH, urand(14,22)*IN_MILLISECONDS, 0, PHASE_UNDEAD); + events.ScheduleEvent(EVENT_DREADFUL_ROAR, urand(18,21)*IN_MILLISECONDS, 0, PHASE_UNDEAD); + events.ScheduleEvent(EVENT_WOE_STRIKE, urand(10,14)*IN_MILLISECONDS, 0, PHASE_UNDEAD); + events.ScheduleEvent(EVENT_SHADOW_AXE, 30*IN_MILLISECONDS, 0, PHASE_UNDEAD); uiSpawnResTimer = 3000; @@ -138,6 +156,7 @@ public: bEventInProgress = true; bIsUndead = true; + events.SetPhase(PHASE_UNDEAD); DoScriptText(YELL_DEAD_1, me); } @@ -208,70 +227,60 @@ public: return; } - if (uiCleaveTimer <= diff) - { - if (!me->HasUnitState(UNIT_STAT_CASTING)) - { - if (bIsUndead) - DoCast(me->getVictim(), SPELL_WOE_STRIKE); - else - DoCast(me->getVictim(), SPELL_CLEAVE); - uiCleaveTimer = rand()%5000 + 2000; - } - } else uiCleaveTimer -= diff; + events.Update(diff); - if (uiSmashTimer <= diff) - { - if (!me->HasUnitState(UNIT_STAT_CASTING)) - { - if (bIsUndead) - DoCast(me->getVictim(), SPELL_DARK_SMASH); - else - DoCast(me->getVictim(), SPELL_SMASH); - uiSmashTimer = 10000; - } - } else uiSmashTimer -= diff; + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; - if (!bIsUndead) - { - if (uiEnrageTimer <= diff) - { - DoCast(me, SPELL_ENRAGE); - uiEnrageTimer = 10000; - } else uiEnrageTimer -= diff; - } else // In Undead form used to summon weapon + while (uint32 eventId = events.ExecuteEvent()) { - if (uiEnrageTimer <= diff) + switch (eventId) { - if (!me->HasUnitState(UNIT_STAT_CASTING)) - { - // Spawn target for Axe - Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1); - if (target) + // PHASE ONE + case EVENT_CLEAVE: + DoCastVictim(SPELL_CLEAVE); + events.ScheduleEvent(EVENT_CLEAVE, urand(6,12)*IN_MILLISECONDS, 0, PHASE_HUMAN); + break; + case EVENT_STAGGERING_ROAR: + DoCast(me, SPELL_STAGGERING_ROAR); + events.ScheduleEvent(EVENT_STAGGERING_ROAR, urand(18,21)*IN_MILLISECONDS, 0, PHASE_HUMAN); + break; + case EVENT_ENRAGE: + DoCast(me, SPELL_ENRAGE); + events.ScheduleEvent(EVENT_ENRAGE, urand(7,14)*IN_MILLISECONDS, 0, PHASE_HUMAN); + break; + case EVENT_SMASH: + DoCastVictim(SPELL_SMASH); + events.ScheduleEvent(EVENT_SMASH, urand(12,17)*IN_MILLISECONDS, 0, PHASE_HUMAN); + break; + // PHASE TWO + case EVENT_DARK_SMASH: + DoCastVictim(SPELL_DARK_SMASH); + events.ScheduleEvent(EVENT_DARK_SMASH, urand(14,22)*IN_MILLISECONDS, 0, PHASE_UNDEAD); + break; + case EVENT_DREADFUL_ROAR: + DoCast(me, SPELL_DREADFUL_ROAR); + events.ScheduleEvent(EVENT_DREADFUL_ROAR, urand(18,21)*IN_MILLISECONDS, 0, PHASE_UNDEAD); + break; + case EVENT_WOE_STRIKE: + DoCastVictim(SPELL_WOE_STRIKE); + events.ScheduleEvent(EVENT_WOE_STRIKE, urand(10,14)*IN_MILLISECONDS, 0, PHASE_UNDEAD); + break; + case EVENT_SHADOW_AXE: + if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1)) { me->SummonCreature(ENTRY_THROW_TARGET, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 2000); - DoCast(me, SPELL_SHADOW_AXE_SUMMON); } - uiEnrageTimer = 30000; - } - } else uiEnrageTimer -= diff; - } - - if (uiRoarTimer <= diff) - { - if (!me->HasUnitState(UNIT_STAT_CASTING)) - { - if (bIsUndead) - DoCast(me, SPELL_DREADFUL_ROAR); - else - DoCast(me, SPELL_STAGGERING_ROAR); - uiRoarTimer = 10000; + events.ScheduleEvent(EVENT_SHADOW_AXE, 30*IN_MILLISECONDS, 0, PHASE_UNDEAD); + break; } - } else uiRoarTimer -= diff; + } DoMeleeAttackIfReady(); } + private: + EventMap events; }; }; @@ -381,8 +390,9 @@ public: { ingvar->RemoveAurasDueToSpell(SPELL_SCOURG_RESURRECTION_DUMMY); - if (boss_ingvar_the_plunderer::boss_ingvar_the_plundererAI* pAI = CAST_AI(boss_ingvar_the_plunderer::boss_ingvar_the_plundererAI, ingvar->AI())) - pAI->StartZombiePhase(); + if (ingvar->getVictim()) + if (boss_ingvar_the_plunderer::boss_ingvar_the_plundererAI* ai = CAST_AI(boss_ingvar_the_plunderer::boss_ingvar_the_plundererAI, ingvar->AI())) + ai->StartZombiePhase(); me->GetMotionMaster()->MovePoint(2, x+1, y, z+30); ++uiResurectPhase; diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp index 0a3f2dc3078..8a6d7f80818 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -17,354 +17,323 @@ /* ScriptData SDName: Boss_Prince_Keleseth -SD%Complete: 90 -SDComment: Needs Prince Movements, Needs adjustments to blizzlike timers, Needs Shadowbolt castbar, Needs right Ressurect Visual, Needs Some Heroic Spells +SD%Complete: 100 +SDComment: SDCategory: Utgarde Keep EndScriptData */ #include "ScriptPCH.h" #include "utgarde_keep.h" -enum eEnums +enum KelsethEncounter { - ACHIEVEMENT_ON_THE_ROCKS = 1919, - SPELL_SHADOWBOLT = 43667, - SPELL_SHADOWBOLT_HEROIC = 59389, SPELL_FROST_TOMB = 48400, + SPELL_FROST_TOMB_STUN = 42672, SPELL_FROST_TOMB_SUMMON = 42714, + + SPELL_SHADOW_FISSURE = 50657, + SPELL_FULL_HEAL = 17683, SPELL_DECREPIFY = 42702, - SPELL_SCOURGE_RESSURRECTION = 42704, - CREATURE_FROSTTOMB = 23965, - CREATURE_SKELETON = 23970, - - SAY_AGGRO = -1574000, - SAY_FROST_TOMB = -1574001, - SAY_SKELETONS = -1574002, - SAY_KILL = -1574003, - SAY_DEATH = -1574004 + SPELL_BONE_ARMOR = 59386, + + NPC_FROSTTOMB = 23965, + NPC_SKELETON = 23970, + + SAY_START_COMBAT = 1, + SAY_SUMMON_SKELETONS, + SAY_FROST_TOMB, + SAY_FROST_TOMB_EMOTE, + SAY_DEATH, + + EVENT_SHADOWBOLT = 1, + EVENT_FROST_TOMB, + EVENT_SUMMON_SKELETONS, + + EVENT_DECREPIFY, + EVENT_FULL_HEAL, + EVENT_SHADOW_FISSURE, + EVENT_RESURRECT, + + DATA_ON_THE_ROCKS }; #define SKELETONSPAWN_Z 42.8668f -float SkeletonSpawnPoint[5][5]= +float const SkeletonSpawnPoint[1][2] = { {156.2559f, 259.2093f}, - {156.2559f, 259.2093f}, - {156.2559f, 259.2093f}, - {156.2559f, 259.2093f}, - {156.2559f, 259.2093f}, }; -float AttackLoc[3]={197.636f, 194.046f, 40.8164f}; +float AttackLoc[3]= {197.636f, 194.046f, 40.8164f}; -bool ShatterFrostTomb; // needed for achievement: On The Rocks(1919) - -class mob_frost_tomb : public CreatureScript +class npc_frost_tomb : public CreatureScript { public: - mob_frost_tomb() : CreatureScript("mob_frost_tomb") { } + npc_frost_tomb() : CreatureScript("npc_frost_tomb") {} CreatureAI* GetAI(Creature* creature) const { - return new mob_frost_tombAI(creature); + return new npc_frost_tombAI(creature); } - struct mob_frost_tombAI : public ScriptedAI + struct npc_frost_tombAI : public ScriptedAI { - mob_frost_tombAI(Creature* c) : ScriptedAI(c) + npc_frost_tombAI(Creature* creature) : ScriptedAI(creature) { - FrostTombGUID = 0; - } - - uint64 FrostTombGUID; + if (me->isSummon()) + if (Unit* summon = me->ToTempSummon()->GetSummoner()) + DoCast(summon, SPELL_FROST_TOMB, true); - void SetPrisoner(Unit* uPrisoner) - { - FrostTombGUID = uPrisoner->GetGUID(); + instance = creature->GetInstanceScript(); } - void Reset(){ FrostTombGUID = 0; } - void EnterCombat(Unit* /*who*/) {} - void AttackStart(Unit* /*who*/) {} - void MoveInLineOfSight(Unit* /*who*/) {} + void UpdateAI(const uint32 /*diff*/) {} - void JustDied(Unit* killer) + void JustDied(Unit* /*killer*/) { - if (killer->GetGUID() != me->GetGUID()) - ShatterFrostTomb = true; - - if (FrostTombGUID) - { - Unit* FrostTomb = Unit::GetUnit((*me), FrostTombGUID); - if (FrostTomb) - FrostTomb->RemoveAurasDueToSpell(SPELL_FROST_TOMB); - } + if (instance) + if (Unit* boss = me->GetUnit(*me, instance->GetData64(DATA_PRINCEKELESETH))) + if (boss->ToCreature() && boss->ToCreature()->AI()) + boss->ToCreature()->AI()->SetData(DATA_ON_THE_ROCKS, false); } - void UpdateAI(const uint32 /*diff*/) - { - Unit* temp = Unit::GetUnit((*me), FrostTombGUID); - if ((temp && temp->isAlive() && !temp->HasAura(SPELL_FROST_TOMB)) || !temp) - me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } + private: + InstanceScript* instance; }; - }; class boss_keleseth : public CreatureScript { public: - boss_keleseth() : CreatureScript("boss_keleseth") { } + boss_keleseth() : CreatureScript("boss_keleseth") {} CreatureAI* GetAI(Creature* creature) const { return new boss_kelesethAI (creature); } - struct boss_kelesethAI : public ScriptedAI + struct boss_kelesethAI : public BossAI { - boss_kelesethAI(Creature* c) : ScriptedAI(c) + boss_kelesethAI(Creature* creature) : BossAI(creature, DATA_PRINCEKELESETH_EVENT) { - instance = c->GetInstanceScript(); + creature->SetReactState(REACT_DEFENSIVE); } - InstanceScript* instance; - - uint32 FrostTombTimer; - uint32 SummonSkeletonsTimer; - uint32 RespawnSkeletonsTimer; - uint32 ShadowboltTimer; - uint64 SkeletonGUID[5]; - bool Skeletons; - bool RespawnSkeletons; - void Reset() { - ShadowboltTimer = 0; - Skeletons = false; + instance->SetData(DATA_PRINCEKELESETH_EVENT, NOT_STARTED); - ShatterFrostTomb = false; + events.Reset(); + events.ScheduleEvent(EVENT_SHADOWBOLT, urand(2,3)*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_FROST_TOMB, urand(14,19)*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_SUMMON_SKELETONS, 6*IN_MILLISECONDS); - ResetTimer(); + summons.DespawnAll(); - if (instance) - instance->SetData(DATA_PRINCEKELESETH_EVENT, NOT_STARTED); + onTheRocks = true; } - void KilledUnit(Unit* victim) + void EnterCombat(Unit* /*who*/) { - if (victim == me) - return; - - DoScriptText(SAY_KILL, me); + me->SetInCombatWithZone(); + instance->SetData(DATA_PRINCEKELESETH_EVENT, IN_PROGRESS); + Talk(SAY_START_COMBAT); } void JustDied(Unit* /*killer*/) { - DoScriptText(SAY_DEATH, me); - - if (IsHeroic() && !ShatterFrostTomb) - { - AchievementEntry const* AchievOnTheRocks = GetAchievementStore()->LookupEntry(ACHIEVEMENT_ON_THE_ROCKS); - if (AchievOnTheRocks) - { - Map* map = me->GetMap(); - if (map && map->IsDungeon()) - { - Map::PlayerList const &players = map->GetPlayers(); - for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - itr->getSource()->CompletedAchievement(AchievOnTheRocks); - } - } - } - - if (instance) - instance->SetData(DATA_PRINCEKELESETH_EVENT, DONE); + instance->SetData(DATA_PRINCEKELESETH_EVENT, DONE); + summons.DespawnAll(); + Talk(SAY_DEATH); } - void EnterCombat(Unit* /*who*/) + void SetData(uint32 data, uint32 value) { - DoScriptText(SAY_AGGRO, me); - DoZoneInCombat(); - - if (instance) - instance->SetData(DATA_PRINCEKELESETH_EVENT, IN_PROGRESS); + if (data == DATA_ON_THE_ROCKS) + onTheRocks = value; } - void ResetTimer(uint32 inc = 0) + uint32 GetData(uint32 data) { - SummonSkeletonsTimer = 5000 + inc; - FrostTombTimer = 28000 + inc; + if (data == DATA_ON_THE_ROCKS) + return onTheRocks; + + return 0; } - void UpdateAI(const uint32 diff) + void ExecuteEvent(uint32 const eventId) { - if (!UpdateVictim()) - return; - - if (ShadowboltTimer <= diff) + switch (eventId) { - Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 0); - if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER) - me->CastSpell(target, DUNGEON_MODE(SPELL_SHADOWBOLT, SPELL_SHADOWBOLT_HEROIC), true); - ShadowboltTimer = 10000; - } else ShadowboltTimer -= diff; - - if (!Skeletons) - { - if ((SummonSkeletonsTimer <= diff)) - { - Creature* Skeleton; - DoScriptText(SAY_SKELETONS, me); - for (uint8 i = 0; i < 5; ++i) + case EVENT_SUMMON_SKELETONS: + Talk(SAY_SUMMON_SKELETONS); + SummonSkeletons(); + break; + case EVENT_SHADOWBOLT: + DoCastVictim(SPELL_SHADOWBOLT); + events.ScheduleEvent(EVENT_SHADOWBOLT, urand(2,3)*IN_MILLISECONDS); + break; + case EVENT_FROST_TOMB: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true, -SPELL_FROST_TOMB)) { - Skeleton = me->SummonCreature(CREATURE_SKELETON, SkeletonSpawnPoint[i][0], SkeletonSpawnPoint[i][1], SKELETONSPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000); - if (Skeleton) - { - Skeleton->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING); - Skeleton->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()); - Skeleton->AddThreat(me->getVictim(), 0.0f); - DoZoneInCombat(Skeleton); - } - } - Skeletons = true; - } else SummonSkeletonsTimer -= diff; - } + Talk(SAY_FROST_TOMB); + Talk(SAY_FROST_TOMB_EMOTE, target->GetGUID()); - if (FrostTombTimer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - if (target->isAlive()) - { - //DoCast(target, SPELL_FROST_TOMB_SUMMON, true); - if (Creature* pChains = me->SummonCreature(CREATURE_FROSTTOMB, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 20000)) - { - CAST_AI(mob_frost_tomb::mob_frost_tombAI, pChains->AI())->SetPrisoner(target); - pChains->CastSpell(target, SPELL_FROST_TOMB, true); - - DoScriptText(SAY_FROST_TOMB, me); - } + DoCast(target, SPELL_FROST_TOMB_STUN, true); + // checked from sniffs - the player casts the spell + target->CastSpell(target, SPELL_FROST_TOMB_SUMMON, true); } - FrostTombTimer = 15000; - } else FrostTombTimer -= diff; + events.ScheduleEvent(EVENT_FROST_TOMB, urand(14,19)*IN_MILLISECONDS); + break; + } + } - DoMeleeAttackIfReady(); + void SummonSkeletons() + { + // I could not found any spell casted for this + for (uint8 i = 0; i < 4; ++i) + me->SummonCreature(NPC_SKELETON, SkeletonSpawnPoint[0][0], SkeletonSpawnPoint[0][1], SKELETONSPAWN_Z, 0); } + private: + bool onTheRocks; }; - }; -class mob_vrykul_skeleton : public CreatureScript +class npc_vrykul_skeleton : public CreatureScript { public: - mob_vrykul_skeleton() : CreatureScript("mob_vrykul_skeleton") { } + npc_vrykul_skeleton() : CreatureScript("npc_vrykul_skeleton") {} CreatureAI* GetAI(Creature* creature) const { - return new mob_vrykul_skeletonAI (creature); + return new npc_vrykul_skeletonAI (creature); } - struct mob_vrykul_skeletonAI : public ScriptedAI + struct npc_vrykul_skeletonAI : public ScriptedAI { - mob_vrykul_skeletonAI(Creature* c) : ScriptedAI(c) - { - instance = c->GetInstanceScript(); - } - - InstanceScript* instance; - uint32 Respawn_Time; - uint64 Target_Guid; - uint32 Decrepify_Timer; - - bool isDead; + npc_vrykul_skeletonAI(Creature* creature) : ScriptedAI(creature) {} void Reset() { - Respawn_Time = 12000; - Decrepify_Timer = urand(10000, 20000); - isDead = false; + events.Reset(); + events.ScheduleEvent(EVENT_DECREPIFY, urand(4,6)*IN_MILLISECONDS); + + DoCast(SPELL_BONE_ARMOR); } - void EnterCombat(Unit* /*who*/){} - void DamageTaken(Unit* done_by, uint32 &damage) + void DamageTaken(Unit* /*done_by*/, uint32 &damage) { - if (done_by->GetGUID() == me->GetGUID()) - return; - if (damage >= me->GetHealth()) { - PretendToDie(); damage = 0; - } - } - void PretendToDie() - { - isDead = true; - me->InterruptNonMeleeSpells(true); - me->RemoveAllAuras(); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - me->GetMotionMaster()->MovementExpired(false); - me->GetMotionMaster()->MoveIdle(); - me->SetStandState(UNIT_STAND_STATE_DEAD); - }; + // There are some issues with pets + // they will still attack. I would say it is a PetAI bug + if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) + { + // from sniffs + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD); - void Resurrect() - { - isDead = false; - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - me->SetStandState(UNIT_STAND_STATE_STAND); - DoCast(me, SPELL_SCOURGE_RESSURRECTION, true); + events.Reset(); + events.ScheduleEvent(EVENT_RESURRECT, urand(18,22)*IN_MILLISECONDS); - if (me->getVictim()) - { - me->GetMotionMaster()->MoveChase(me->getVictim()); - me->AI()->AttackStart(me->getVictim()); + me->GetMotionMaster()->MovementExpired(false); + me->GetMotionMaster()->MoveIdle(); + } } - else - me->GetMotionMaster()->Initialize(); - }; + } void UpdateAI(const uint32 diff) { - if (instance && instance->GetData(DATA_PRINCEKELESETH_EVENT) == IN_PROGRESS) + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) { - if (isDead) + switch (eventId) { - if (Respawn_Time <= diff) - { - Resurrect(); - Respawn_Time = 12000; - } else Respawn_Time -= diff; + case EVENT_DECREPIFY: + DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_DECREPIFY), SPELL_DECREPIFY); + events.ScheduleEvent(EVENT_DECREPIFY, urand(1,5)*IN_MILLISECONDS); + break; + case EVENT_RESURRECT: + events.ScheduleEvent(EVENT_FULL_HEAL, 1*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_SHADOW_FISSURE, 1*IN_MILLISECONDS); + break; + case EVENT_FULL_HEAL: + DoCast(me, SPELL_FULL_HEAL, true); + break; + case EVENT_SHADOW_FISSURE: + DoCast(me, SPELL_SHADOW_FISSURE, true); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD); + me->GetMotionMaster()->MoveChase(me->getVictim()); + events.ScheduleEvent(EVENT_DECREPIFY, urand(4,6)*IN_MILLISECONDS); + break; } - else - { - if (!UpdateVictim()) - return; + } - if (Decrepify_Timer <= diff) - { - DoCast(me->getVictim(), SPELL_DECREPIFY); - Decrepify_Timer = 30000; - } else Decrepify_Timer -= diff; + if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) + DoMeleeAttackIfReady(); + } - DoMeleeAttackIfReady(); - } - }else + private: + EventMap events; + }; +}; + +class spell_frost_tomb : public SpellScriptLoader +{ + public: + spell_frost_tomb() : SpellScriptLoader("spell_frost_tomb") {} + + class spell_frost_tomb_AuraScript : public AuraScript + { + PrepareAuraScript(spell_frost_tomb_AuraScript); + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - if (me->isAlive()) - me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEATH) + if (Unit* caster = GetCaster()) + if (caster->ToCreature() && caster->isAlive()) + caster->ToCreature()->DespawnOrUnsummon(1000); } + void Register() + { + AfterEffectRemove += AuraEffectRemoveFn(spell_frost_tomb_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_frost_tomb_AuraScript(); } - }; +}; + + +class achievement_on_the_rocks : public AchievementCriteriaScript +{ + public: + achievement_on_the_rocks() : AchievementCriteriaScript("achievement_on_the_rocks") {} + bool OnCheck(Player* /*source*/, Unit* target) + { + return target && target->IsAIEnabled && target->GetAI()->GetData(DATA_ON_THE_ROCKS); + } }; void AddSC_boss_keleseth() { new boss_keleseth(); - new mob_frost_tomb(); - new mob_vrykul_skeleton(); + new npc_frost_tomb(); + new npc_vrykul_skeleton(); + new spell_frost_tomb(); + new achievement_on_the_rocks(); } diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp index e828d81e05a..333278daa10 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp index 488c38f5a6e..6ecc1883afc 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp index 45ceb85a640..d660b1516b3 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h index 275ffa659e8..971dab98f4d 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp index 9fa9c7c9d4f..656b2931abb 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -268,7 +268,7 @@ public: void JustReachedHome() { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NOT_ATTACKABLE_1|UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NOT_ATTACKABLE_1|UNIT_FLAG_IMMUNE_TO_PC); me->SetStandState(UNIT_STAND_STATE_STAND); DoCast(me, SPELL_FREEZE); } @@ -381,7 +381,7 @@ public: void JustReachedHome() { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC); me->SetStandState(UNIT_STAND_STATE_STAND); DoCast(me, SPELL_FREEZE); } @@ -496,7 +496,7 @@ public: void JustReachedHome() { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC); me->SetStandState(UNIT_STAND_STATE_STAND); DoCast(me, SPELL_FREEZE); } @@ -611,7 +611,7 @@ public: void JustReachedHome() { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC); me->SetStandState(UNIT_STAND_STATE_STAND); DoCast(me, SPELL_FREEZE); } @@ -732,7 +732,7 @@ public: void JustReachedHome() { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC); me->SetStandState(UNIT_STAND_STATE_STAND); DoCast(me, SPELL_FREEZE); } @@ -793,7 +793,7 @@ public: if (pNext) { pNext->RemoveAurasDueToSpell(SPELL_FREEZE); - pNext->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE); + pNext->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC); pNext->SetStandState(UNIT_STAND_STATE_STAND); pNext->SetInCombatWithZone(); pNext->Attack(pNext->SelectNearestTarget(100), true); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index f31271b825e..d5cd79b25f1 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -288,7 +288,7 @@ public: me->Dismount(); if (Creature* pGrauf = me->SummonCreature(CREATURE_GRAUF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3*IN_MILLISECONDS)) { - pGrauf->GetMotionMaster()->MoveFall(0); + pGrauf->GetMotionMaster()->MoveFall(); pGrauf->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH); } me->GetMotionMaster()->MoveJump(Location[4].GetPositionX(), Location[4].GetPositionY(), Location[4].GetPositionZ(), 5.0f, 10.0f); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp index 45534824860..989e1e57453 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -20,69 +20,94 @@ enum Spells { - SPELL_CALL_FLAMES = 48258, - SPELL_RITUAL_OF_THE_SWORD = 48276, //Effect #1 Teleport, Effect #2 Dummy + SPELL_SVALA_TRANSFORMING1 = 54140, + SPELL_SVALA_TRANSFORMING2 = 54205, + SPELL_TRANSFORMING_CHANNEL = 54142, + + SPELL_CALL_FLAMES = 48258, // caster effect only, triggers event 17841 SPELL_SINSTER_STRIKE = 15667, H_SPELL_SINSTER_STRIKE = 59409, - SPELL_SVALA_TRANSFORMING1 = 54140, - SPELL_SVALA_TRANSFORMING2 = 54205 + + SPELL_RITUAL_PREPARATION = 48267, + SPELL_RITUAL_OF_THE_SWORD = 48276, + SPELL_RITUAL_STRIKE_TRIGGER = 48331, // triggers 48277 & 59930, needs NPC_RITUAL_TARGET as spell_script_target + SPELL_RITUAL_DISARM = 54159, + SPELL_RITUAL_STRIKE_EFF_1 = 48277, + SPELL_RITUAL_STRIKE_EFF_2 = 59930, + + SPELL_SUMMONED_VIS = 64446, + SPELL_RITUAL_CHANNELER_1 = 48271, + SPELL_RITUAL_CHANNELER_2 = 48274, + SPELL_RITUAL_CHANNELER_3 = 48275, + + // Ritual Channeler spells + SPELL_PARALYZE = 48278, + SPELL_SHADOWS_IN_THE_DARK = 59407, + + // Scourge Hulk spells + SPELL_MIGHTY_BLOW = 48697, + SPELL_VOLATILE_INFECTION = 56785, + H_SPELL_VOLATILE_INFECTION = 59228 }; -//not in db + enum Yells { - SAY_DIALOG_WITH_ARTHAS_1 = -1575015, - SAY_DIALOG_WITH_ARTHAS_2 = -1575016, - SAY_DIALOG_WITH_ARTHAS_3 = -1575017, - SAY_AGGRO = -1575018, - SAY_SLAY_1 = -1575019, - SAY_SLAY_2 = -1575020, - SAY_SLAY_3 = -1575021, - SAY_DEATH = -1575022, - SAY_SACRIFICE_PLAYER_1 = -1575023, - SAY_SACRIFICE_PLAYER_2 = -1575024, - SAY_SACRIFICE_PLAYER_3 = -1575025, - SAY_SACRIFICE_PLAYER_4 = -1575026, - SAY_SACRIFICE_PLAYER_5 = -1575027, - SAY_DIALOG_OF_ARTHAS_1 = -1575028, - SAY_DIALOG_OF_ARTHAS_2 = -1575029 + // Svala + SAY_SVALA_INTRO_0 = 0, + + // Svala Sorrowgrave + SAY_SVALA_INTRO_1 = 0, + SAY_SVALA_INTRO_2 = 1, + SAY_AGGRO = 2, + SAY_SLAY = 3, + SAY_DEATH = 4, + SAY_SACRIFICE_PLAYER = 5, + + // Image of Arthas + SAY_DIALOG_OF_ARTHAS_1 = 0, + SAY_DIALOG_OF_ARTHAS_2 = 1 }; + enum Creatures { CREATURE_ARTHAS = 29280, // Image of Arthas CREATURE_SVALA_SORROWGRAVE = 26668, // Svala after transformation CREATURE_SVALA = 29281, // Svala before transformation - CREATURE_RITUAL_CHANNELER = 27281 + CREATURE_RITUAL_CHANNELER = 27281, + CREATURE_SPECTATOR = 26667, + CREATURE_RITUAL_TARGET = 27327, + CREATURE_FLAME_BRAZIER = 27273, + CREATURE_SCOURGE_HULK = 26555 }; -enum ChannelerSpells -{ - //ritual channeler's spells - SPELL_PARALYZE = 48278, - SPELL_SHADOWS_IN_THE_DARK = 59407 -}; -enum Misc + +enum Objects { - DATA_SVALA_DISPLAY_ID = 25944 + OBJECT_UTGARDE_MIRROR = 191745 }; -enum IntroPhase + +enum SvalaPhase { IDLE, INTRO, - FINISHED + NORMAL, + SACRIFICING, + SVALADEAD }; -enum CombatPhase + +enum SvalaPoint { - NORMAL, - SACRIFICING + POINT_FALL_GROUND = 1, }; -static Position RitualChannelerPos[]= +#define DATA_INCREDIBLE_HULK 2043 + +static const float spectatorWP[2][3] = { - {296.42f, -355.01f, 90.94f, 0.0f}, - {302.36f, -352.01f, 90.54f, 0.0f}, - {291.39f, -350.89f, 90.54f, 0.0f} + {296.95f,-312.76f,86.36f}, + {297.69f,-275.81f,86.36f} }; + static Position ArthasPos = { 295.81f, -366.16f, 92.57f, 1.58f }; -static Position SvalaPos = { 296.632f, -346.075f, 90.6307f, 1.58f }; class boss_svala : public CreatureScript { @@ -96,31 +121,96 @@ public: struct boss_svalaAI : public ScriptedAI { - boss_svalaAI(Creature* c) : ScriptedAI(c) + boss_svalaAI(Creature* creature) : ScriptedAI(creature), summons(creature) { - instance = c->GetInstanceScript(); + instance = creature->GetInstanceScript(); + Phase = IDLE; + + me->ApplySpellImmune(0, IMMUNITY_ID, SPELL_RITUAL_STRIKE_EFF_1, true); + me->ApplySpellImmune(0, IMMUNITY_ID, SPELL_RITUAL_STRIKE_EFF_2, true); } - uint32 uiIntroTimer; + InstanceScript* instance; + SummonList summons; + SvalaPhase Phase; + + Position pos; + float x, y, z; - uint8 uiIntroPhase; + uint32 introTimer; + uint8 introPhase; + uint8 sacrePhase; - IntroPhase Phase; + TempSummon* arthas; + uint64 arthasGUID; - TempSummon* pArthas; - uint64 uiArthasGUID; + uint32 sinsterStrikeTimer; + uint32 callFlamesTimer; + uint32 sacrificeTimer; - InstanceScript* instance; + bool sacrificed; void Reset() { - Phase = IDLE; - uiIntroTimer = 1 * IN_MILLISECONDS; - uiIntroPhase = 0; - uiArthasGUID = 0; + sacrificed = false; + SetCombatMovement(true); + + summons.DespawnAll(); + me->RemoveAllAuras(); + + if (Phase > INTRO) + { + me->SetFlying(true); + me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); + } + + if (Phase > NORMAL) + Phase = NORMAL; + + introTimer = 1 * IN_MILLISECONDS; + introPhase = 0; + arthasGUID = 0; if (instance) + { instance->SetData(DATA_SVALA_SORROWGRAVE_EVENT, NOT_STARTED); + instance->SetData64(DATA_SACRIFICED_PLAYER, 0); + } + } + + void JustReachedHome() + { + if (Phase > INTRO) + { + me->SetFlying(false); + me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); + me->SetOrientation(1.58f); + me->SendMovementFlagUpdate(); + } + } + + void EnterCombat(Unit* /*who*/) + { + Talk(SAY_AGGRO); + + sinsterStrikeTimer = 7 * IN_MILLISECONDS; + callFlamesTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS); + + if (instance) + instance->SetData(DATA_SVALA_SORROWGRAVE_EVENT, IN_PROGRESS); + } + + void JustSummoned(Creature* summon) + { + if (summon->GetEntry() == CREATURE_RITUAL_CHANNELER) + summon->CastSpell(summon, SPELL_SUMMONED_VIS, true); + + summons.Summon(summon); + } + + void SummonedCreatureDespawn(Creature* summon) + { + summons.Despawn(summon); } void MoveInLineOfSight(Unit* who) @@ -132,287 +222,492 @@ public: { Phase = INTRO; me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + if (GameObject* mirror = GetClosestGameObjectWithEntry(me, OBJECT_UTGARDE_MIRROR, 100.0f)) + mirror->SetGoState(GO_STATE_READY); - if (Creature* pArthas = me->SummonCreature(CREATURE_ARTHAS, ArthasPos, TEMPSUMMON_MANUAL_DESPAWN)) + if (Creature* arthas = me->SummonCreature(CREATURE_ARTHAS, ArthasPos, TEMPSUMMON_MANUAL_DESPAWN)) { - pArthas->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); - uiArthasGUID = pArthas->GetGUID(); + arthas->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + arthasGUID = arthas->GetGUID(); } } } + + void KilledUnit(Unit* victim) + { + if (victim != me) + Talk(SAY_SLAY); + } + + void DamageTaken(Unit* attacker, uint32 &damage) + { + if (Phase == SVALADEAD) + { + if (attacker != me) + damage = 0; + return; + } - void AttackStart(Unit* /*who*/) {} + if (damage >= me->GetHealth()) + { + if (Phase == SACRIFICING) + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + + damage = 0; + Phase = SVALADEAD; + me->InterruptNonMeleeSpells(true); + me->RemoveAllAuras(); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + me->SetHealth(1); + + SetCombatMovement(false); + me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH); + me->GetMotionMaster()->MoveFall(POINT_FALL_GROUND); + } + } + + void MovementInform(uint32 motionType, uint32 pointId) + { + if (motionType != EFFECT_MOTION_TYPE) + return; + + if (pointId == POINT_FALL_GROUND) + me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + + void JustDied(Unit* /*killer*/) + { + summons.DespawnAll(); + + if (instance) + instance->SetData(DATA_SVALA_SORROWGRAVE_EVENT, DONE); + + Talk(SAY_DEATH); + } + + void SpellHitTarget(Unit* /*target*/, const SpellInfo* spell) + { + if (spell->Id == SPELL_RITUAL_STRIKE_EFF_1 && Phase != NORMAL && Phase != SVALADEAD) + { + Phase = NORMAL; + SetCombatMovement(true); + + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 300.0f, true)) + me->GetMotionMaster()->MoveChase(target); + } + } void UpdateAI(const uint32 diff) { - if (Phase != INTRO) + if (Phase == IDLE) return; - if (uiIntroTimer <= diff) + if (Phase == INTRO) { - Creature* pArthas = Unit::GetCreature(*me, uiArthasGUID); - if (!pArthas) + if (introTimer <= diff) + { + Creature* arthas = Unit::GetCreature(*me, arthasGUID); + if (!arthas) + return; + + switch (introPhase) + { + case 0: + Talk(SAY_SVALA_INTRO_0); + ++introPhase; + introTimer = 8100; + break; + case 1: + arthas->AI()->Talk(SAY_DIALOG_OF_ARTHAS_1); + ++introPhase; + introTimer = 10000; + break; + case 2: + arthas->CastSpell(me, SPELL_TRANSFORMING_CHANNEL, false); + me->SetFlying(true); + me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); + pos.Relocate(me); + pos.m_positionZ += 8.0f; + me->GetMotionMaster()->MoveTakeoff(0, pos, 3.30078125f); + // spectators flee event + if (instance) + { + std::list<Creature*> lspectatorList; + GetCreatureListWithEntryInGrid(lspectatorList, me, CREATURE_SPECTATOR, 100.0f); + for (std::list<Creature*>::iterator itr = lspectatorList.begin(); itr != lspectatorList.end(); ++itr) + { + if ((*itr)->isAlive()) + { + (*itr)->SetStandState(UNIT_STAND_STATE_STAND); + (*itr)->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING); + (*itr)->GetMotionMaster()->MovePoint(1, spectatorWP[0][0], spectatorWP[0][1], spectatorWP[0][2]); + } + } + } + ++introPhase; + introTimer = 4200; + break; + case 3: + me->CastSpell(me, SPELL_SVALA_TRANSFORMING1, false); + ++introPhase; + introTimer = 6200; + break; + case 4: + me->CastSpell(me, SPELL_SVALA_TRANSFORMING2, false); + arthas->InterruptNonMeleeSpells(true); + me->RemoveAllAuras(); + me->UpdateEntry(CREATURE_SVALA_SORROWGRAVE); + me->SetFacingToObject(arthas); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + ++introPhase; + introTimer = 3200; + break; + case 5: + Talk(SAY_SVALA_INTRO_1); + ++introPhase; + introTimer = 10000; + break; + case 6: + arthas->AI()->Talk(SAY_DIALOG_OF_ARTHAS_2); + ++introPhase; + introTimer = 7200; + break; + case 7: + Talk(SAY_SVALA_INTRO_2); + me->SetOrientation(1.58f); + me->SendMovementFlagUpdate(); + arthas->SetVisible(false); + ++introPhase; + introTimer = 13800; + break; + case 8: + me->SetFlying(false); + me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); + me->SendMovementFlagUpdate(); + pos.Relocate(me); + pos.m_positionX = me->GetHomePosition().GetPositionX(); + pos.m_positionY = me->GetHomePosition().GetPositionY(); + pos.m_positionZ = 90.6065f; + me->GetMotionMaster()->MoveLand(0, pos, 6.247422f); + ++introPhase; + introTimer = 3000; + break; + case 9: + if (GameObject* mirror = GetClosestGameObjectWithEntry(me, OBJECT_UTGARDE_MIRROR, 100.0f)) + mirror->SetGoState(GO_STATE_ACTIVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + arthas->DespawnOrUnsummon(); + arthasGUID = 0; + Phase = NORMAL; + break; + } + } + else introTimer -= diff; + + return; + } + + if (Phase == NORMAL) + { + //Return since we have no target + if (!UpdateVictim()) return; - switch (uiIntroPhase) + if (me->IsWithinMeleeRange(me->getVictim()) && me->HasUnitMovementFlag(MOVEMENTFLAG_LEVITATING)) + { + me->SetFlying(false); + me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); + me->SendMovementFlagUpdate(); + } + + if (sinsterStrikeTimer <= diff) + { + DoCast(me->getVictim(), SPELL_SINSTER_STRIKE); + sinsterStrikeTimer = urand(5 * IN_MILLISECONDS, 9 * IN_MILLISECONDS); + } else sinsterStrikeTimer -= diff; + + if (callFlamesTimer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + { + DoCast(target, SPELL_CALL_FLAMES); + callFlamesTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS); + } + } else callFlamesTimer -= diff; + + if (!sacrificed) { - case 0: - DoScriptText(SAY_DIALOG_WITH_ARTHAS_1, me); - ++uiIntroPhase; - uiIntroTimer = 3500; - break; - case 1: - DoScriptText(SAY_DIALOG_OF_ARTHAS_1, pArthas); - ++uiIntroPhase; - uiIntroTimer = 3500; - break; - case 2: - DoScriptText(SAY_DIALOG_WITH_ARTHAS_2, me); - ++uiIntroPhase; - uiIntroTimer = 3500; - break; - case 3: - DoScriptText(SAY_DIALOG_OF_ARTHAS_2, pArthas); - ++uiIntroPhase; - uiIntroTimer = 3500; - break; - case 4: - DoScriptText(SAY_DIALOG_WITH_ARTHAS_3, me); - DoCast(me, SPELL_SVALA_TRANSFORMING1); - ++uiIntroPhase; - uiIntroTimer = 2800; - break; - case 5: - DoCast(me, SPELL_SVALA_TRANSFORMING2); - ++uiIntroPhase; - uiIntroTimer = 200; - break; - case 6: - if (me->SummonCreature(CREATURE_SVALA_SORROWGRAVE, SvalaPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60*IN_MILLISECONDS)) + if (HealthBelowPct(50)) + { + if (Unit* sacrificeTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 80, true)) { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); - me->SetDisplayId(DATA_SVALA_DISPLAY_ID); - pArthas->DespawnOrUnsummon(); - uiArthasGUID = 0; - Phase = FINISHED; + if (instance) + instance->SetData64(DATA_SACRIFICED_PLAYER, sacrificeTarget->GetGUID()); + + Talk(SAY_SACRIFICE_PLAYER); + + DoCast(sacrificeTarget, SPELL_RITUAL_PREPARATION); + + SetCombatMovement(false); + me->SetFlying(true); + me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); + + Phase = SACRIFICING; + sacrePhase = 0; + sacrificeTimer = 1 * IN_MILLISECONDS; + + DoCast(me, SPELL_RITUAL_OF_THE_SWORD); + sacrificed = true; } - else - Reset(); - break; + } } - } else uiIntroTimer -= diff; + + DoMeleeAttackIfReady(); + } + else //SACRIFICING + { + if (sacrificeTimer <= diff) + { + switch (sacrePhase) + { + case 0: + // spawn ritual channelers + if (instance) + { + DoCast(me, SPELL_RITUAL_CHANNELER_1, true); + DoCast(me, SPELL_RITUAL_CHANNELER_2, true); + DoCast(me, SPELL_RITUAL_CHANNELER_3, true); + } + ++sacrePhase; + sacrificeTimer = 2 * IN_MILLISECONDS; + break; + case 1: + me->StopMoving(); + me->GetMotionMaster()->MoveIdle(); + me->InterruptNonMeleeSpells(true); + DoCast(me, SPELL_RITUAL_STRIKE_TRIGGER, true); + ++sacrePhase; + sacrificeTimer = 200; + break; + case 2: + DoCast(me, SPELL_RITUAL_DISARM); + ++sacrePhase; + break; + case 3: + break; + } + } + else sacrificeTimer -= diff; + } } }; }; -class mob_ritual_channeler : public CreatureScript +class npc_ritual_channeler : public CreatureScript { public: - mob_ritual_channeler() : CreatureScript("mob_ritual_channeler") { } + npc_ritual_channeler() : CreatureScript("npc_ritual_channeler") { } CreatureAI* GetAI(Creature* creature) const { - return new mob_ritual_channelerAI(creature); + return new npc_ritual_channelerAI(creature); } - struct mob_ritual_channelerAI : public Scripted_NoMovementAI + struct npc_ritual_channelerAI : public Scripted_NoMovementAI { - mob_ritual_channelerAI(Creature* c) :Scripted_NoMovementAI(c) + npc_ritual_channelerAI(Creature* creature) :Scripted_NoMovementAI(creature) { - instance = c->GetInstanceScript(); + instance = creature->GetInstanceScript(); } InstanceScript* instance; + uint32 paralyzeTimer; void Reset() { - DoCast(me, SPELL_SHADOWS_IN_THE_DARK); - } - - // called by svala sorrowgrave to set guid of victim - void DoAction(const int32 /*action*/) - { + paralyzeTimer = 1600; if (instance) - if (Unit* victim = me->GetUnit(*me, instance->GetData64(DATA_SACRIFICED_PLAYER))) - DoCast(victim, SPELL_PARALYZE); + if (IsHeroic()) + DoCast(me, SPELL_SHADOWS_IN_THE_DARK); } - - void EnterCombat(Unit* /*who*/) + + void UpdateAI(const uint32 diff) { + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + if (paralyzeTimer <= diff) + { + if (instance) + if (Unit* victim = me->GetUnit(*me, instance->GetData64(DATA_SACRIFICED_PLAYER))) + DoCast(victim, SPELL_PARALYZE, false); + + paralyzeTimer = 200; + } + else + paralyzeTimer -= diff; } }; - }; -class boss_svala_sorrowgrave : public CreatureScript +class npc_spectator : public CreatureScript { public: - boss_svala_sorrowgrave() : CreatureScript("boss_svala_sorrowgrave") { } + npc_spectator() : CreatureScript("npc_spectator") { } CreatureAI* GetAI(Creature* creature) const { - return new boss_svala_sorrowgraveAI(creature); + return new npc_spectatorAI(creature); } - struct boss_svala_sorrowgraveAI : public ScriptedAI + struct npc_spectatorAI : public ScriptedAI { - boss_svala_sorrowgraveAI(Creature* c) : ScriptedAI(c), summons(c) + npc_spectatorAI(Creature* creature) : ScriptedAI(creature) { } + + void Reset() { } + + void MovementInform(uint32 motionType, uint32 pointId) { - instance = c->GetInstanceScript(); + if (motionType == POINT_MOTION_TYPE) + { + if (pointId == 1) + me->GetMotionMaster()->MovePoint(2,spectatorWP[1][0],spectatorWP[1][1],spectatorWP[1][2]); + else if (pointId == 2) + me->DespawnOrUnsummon(1000); + } } + }; +}; - uint32 uiSinsterStrikeTimer; - uint32 uiCallFlamesTimer; - uint32 uiRitualOfSwordTimer; - uint32 uiSacrificeTimer; +class checkRitualTarget +{ + public: + explicit checkRitualTarget(Unit* _caster) : caster(_caster) { } - CombatPhase Phase; + bool operator() (Unit* unit) + { + if (InstanceScript* instance = caster->GetInstanceScript()) + if (instance->GetData64(DATA_SACRIFICED_PLAYER) == unit->GetGUID()) + return false; - SummonList summons; + return true; + } - bool bSacrificed; + private: + Unit* caster; +}; - InstanceScript* instance; +class spell_paralyze_pinnacle : public SpellScriptLoader +{ + public: + spell_paralyze_pinnacle() : SpellScriptLoader("spell_paralyze_pinnacle") { } - void Reset() + class spell_paralyze_pinnacle_SpellScript : public SpellScript { - uiSinsterStrikeTimer = 7 * IN_MILLISECONDS; - uiCallFlamesTimer = 10 * IN_MILLISECONDS; - uiRitualOfSwordTimer = 20 * IN_MILLISECONDS; - uiSacrificeTimer = 8 * IN_MILLISECONDS; - - bSacrificed = false; - - Phase = NORMAL; - - DoTeleportTo(296.632f, -346.075f, 90.6307f); - me->SetUnitMovementFlags(MOVEMENTFLAG_WALKING); + PrepareSpellScript(spell_paralyze_pinnacle_SpellScript); - summons.DespawnAll(); + void FilterTargets(std::list<Unit*>& unitList) + { + unitList.remove_if(checkRitualTarget(GetCaster())); + } - if (instance) + void Register() { - instance->SetData(DATA_SVALA_SORROWGRAVE_EVENT, NOT_STARTED); - instance->SetData64(DATA_SACRIFICED_PLAYER, 0); + OnUnitTargetSelect += SpellUnitTargetFn(spell_paralyze_pinnacle_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); } - } + }; - void EnterCombat(Unit* /*who*/) + SpellScript* GetSpellScript() const { - DoScriptText(SAY_AGGRO, me); - - if (instance) - instance->SetData(DATA_SVALA_SORROWGRAVE_EVENT, IN_PROGRESS); + return new spell_paralyze_pinnacle_SpellScript(); } +}; - void JustSummoned(Creature* summon) - { - summons.Summon(summon); - } +class npc_scourge_hulk : public CreatureScript +{ + public: + npc_scourge_hulk() : CreatureScript("npc_scourge_hulk") { } - void SummonedCreatureDespawn(Creature* summon) + struct npc_scourge_hulkAI : public ScriptedAI { - summons.Despawn(summon); - } + npc_scourge_hulkAI(Creature* creature) : ScriptedAI(creature) { } - void UpdateAI(const uint32 diff) - { - if (Phase == NORMAL) + uint32 mightyBlow; + uint32 volatileInfection; + + void Reset() + { + mightyBlow = urand(4000, 9000); + volatileInfection = urand(10000, 14000); + killedByRitualStrike = false; + } + + uint32 GetData(uint32 type) + { + return type == DATA_INCREDIBLE_HULK ? killedByRitualStrike : 0; + } + + void DamageTaken(Unit* attacker, uint32 &damage) + { + if (damage >= me->GetHealth() && attacker->GetEntry() == CREATURE_SVALA_SORROWGRAVE) + killedByRitualStrike = true; + } + + void UpdateAI(uint32 const diff) { - //Return since we have no target if (!UpdateVictim()) return; - if (uiSinsterStrikeTimer <= diff) - { - DoCast(me->getVictim(), SPELL_SINSTER_STRIKE); - uiSinsterStrikeTimer = urand(5 * IN_MILLISECONDS, 9 * IN_MILLISECONDS); - } else uiSinsterStrikeTimer -= diff; - - if (uiCallFlamesTimer <= diff) + if (mightyBlow <= diff) { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - { - DoCast(target, SPELL_CALL_FLAMES); - uiCallFlamesTimer = urand(8 * IN_MILLISECONDS, 12 * IN_MILLISECONDS); - } - } else uiCallFlamesTimer -= diff; + if (Unit* victim = me->getVictim()) + if (!victim->HasUnitState(UNIT_STATE_STUNNED)) // Prevent knocking back a ritual player + DoCast(victim, SPELL_MIGHTY_BLOW); + mightyBlow = urand(12000, 17000); + } + else + mightyBlow -= diff; - if (!bSacrificed) + if (volatileInfection <= diff) { - if (uiRitualOfSwordTimer <= diff) - { - if (Unit* pSacrificeTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - { - DoScriptText(RAND(SAY_SACRIFICE_PLAYER_1, SAY_SACRIFICE_PLAYER_2, SAY_SACRIFICE_PLAYER_3, SAY_SACRIFICE_PLAYER_4, SAY_SACRIFICE_PLAYER_5), me); - DoCast(pSacrificeTarget, SPELL_RITUAL_OF_THE_SWORD); - //Spell doesn't teleport - DoTeleportPlayer(pSacrificeTarget, 296.632f, -346.075f, 90.63f, 4.6f); - me->SetUnitMovementFlags(MOVEMENTFLAG_CAN_FLY); - DoTeleportTo(296.632f, -346.075f, 120.85f); - Phase = SACRIFICING; - if (instance) - { - instance->SetData64(DATA_SACRIFICED_PLAYER, pSacrificeTarget->GetGUID()); - - for (uint8 i = 0; i < 3; ++i) - if (Creature* summon = me->SummonCreature(CREATURE_RITUAL_CHANNELER, RitualChannelerPos[i], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000)) - summon->AI()->DoAction(0); - } - - bSacrificed = true; - } - } else uiRitualOfSwordTimer -= diff; + DoCastVictim(SPELL_VOLATILE_INFECTION); + volatileInfection = urand(13000, 17000); } + else + volatileInfection -= diff; DoMeleeAttackIfReady(); } - else //SACRIFICING - { - if (uiSacrificeTimer <= diff) - { - Unit* pSacrificeTarget = instance ? Unit::GetUnit(*me, instance->GetData64(DATA_SACRIFICED_PLAYER)) : NULL; - if (instance && !summons.empty() && pSacrificeTarget && pSacrificeTarget->isAlive()) - me->Kill(pSacrificeTarget, false); // durability damage? - - //go down - Phase = NORMAL; - pSacrificeTarget = NULL; - me->SetUnitMovementFlags(MOVEMENTFLAG_WALKING); - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - me->GetMotionMaster()->MoveChase(target); - uiSacrificeTimer = 8 * IN_MILLISECONDS; - } - else uiSacrificeTimer -= diff; - } - } + private: + bool killedByRitualStrike; + }; - void KilledUnit(Unit* /*victim*/) + CreatureAI* GetAI(Creature* creature) const { - DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me); + return new npc_scourge_hulkAI(creature); } +}; - void JustDied(Unit* killer) - { - if (instance) - { - Creature* pSvala = Unit::GetCreature((*me), instance->GetData64(DATA_SVALA)); - if (pSvala && pSvala->isAlive()) - killer->Kill(pSvala); +class achievement_incredible_hulk : public AchievementCriteriaScript +{ + public: + achievement_incredible_hulk() : AchievementCriteriaScript("achievement_incredible_hulk") { } - instance->SetData(DATA_SVALA_SORROWGRAVE_EVENT, DONE); - } - DoScriptText(SAY_DEATH, me); + bool OnCheck(Player* /*player*/, Unit* target) + { + return target && target->IsAIEnabled && target->GetAI()->GetData(DATA_INCREDIBLE_HULK); } - }; - }; void AddSC_boss_svala() { new boss_svala(); - new mob_ritual_channeler(); - new boss_svala_sorrowgrave(); + new npc_ritual_channeler(); + new npc_spectator(); + new spell_paralyze_pinnacle(); + new npc_scourge_hulk(); + new achievement_incredible_hulk(); } diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp index 911be1815b3..29d6278124f 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp index 5dbd431fe21..cb596f284c5 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -170,8 +170,12 @@ public: void SetData64(uint32 type, uint64 data) { - if (type == DATA_SACRIFICED_PLAYER) - uiSacrificedPlayer = data; + switch (type) + { + case DATA_SACRIFICED_PLAYER: + uiSacrificedPlayer = data; + break; + } } uint32 GetData(uint32 type) @@ -201,6 +205,7 @@ public: case DATA_MOB_ORB: return uiPalehoofOrb; case DATA_SVALA: return uiSvala; case DATA_GORTOK_PALEHOOF_SPHERE: return uiGortokPalehoofSphere; + case DATA_SACRIFICED_PLAYER: return uiSacrificedPlayer; } return 0; diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h index 76dfd0ebec4..872314ee25e 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -53,7 +53,7 @@ enum eCreatures MOB_MASSIVE_JORMUNGAR = 26685, MOB_FEROCIOUS_RHINO = 26686, MOB_SVALA = 29281, - MOB_PALEHOOF_ORB = 26688, + MOB_PALEHOOF_ORB = 26688 }; #endif diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp index 66487c6f6f9..bffc6af2a3a 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -81,7 +81,7 @@ class boss_archavon : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -161,7 +161,7 @@ class mob_archavon_warder : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp index bb9302c911d..2f4079d4e3c 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -120,7 +120,7 @@ class boss_emalon : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -221,7 +221,7 @@ class mob_tempest_minion : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; if (Aura const* overchargedAura = me->GetAura(SPELL_OVERCHARGED)) diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp index 3c752ae6ae0..dd9db1c0a99 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -79,7 +79,7 @@ class boss_koralon : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp index 41e80b1b777..162f59fa5b7 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -80,7 +80,7 @@ class boss_toravon : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) @@ -148,7 +148,7 @@ class mob_frost_warder : public CreatureScript events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; if (events.ExecuteEvent() == EVENT_FROST_BLAST) diff --git a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp index 8d668011f9a..ec0de41ed6d 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h b/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h index 04f50d3adeb..9242a5df1eb 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h +++ b/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp index 25233eb92ef..74fc2505969 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp index 584e5b8979a..63f0cd39893 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -97,7 +97,7 @@ public: void AttackStart(Unit* who) { - if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; if (me->Attack(who, true)) @@ -109,13 +109,13 @@ public: if (Creature* pGuard1 = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_EREKEM_GUARD_1) : 0)) { - pGuard1->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pGuard1->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE); if (!pGuard1->getVictim() && pGuard1->AI()) pGuard1->AI()->AttackStart(who); } if (Creature* pGuard2 = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_EREKEM_GUARD_2) : 0)) { - pGuard2->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pGuard2->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE); if (!pGuard2->getVictim() && pGuard2->AI()) pGuard2->AI()->AttackStart(who); } @@ -290,7 +290,7 @@ public: void AttackStart(Unit* who) { - if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; if (me->Attack(who, true)) diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp index 622fc2355fa..a191d9349f2 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -140,7 +140,7 @@ public: void AttackStart(Unit* who) { - if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; if (me->Attack(who, true)) diff --git a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp index 648c4a71762..c5b2cb3c327 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -87,7 +87,7 @@ public: void AttackStart(Unit* who) { - if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; if (me->Attack(who, true)) diff --git a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp index 42ce12ec903..84b04579681 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -80,7 +80,7 @@ public: void AttackStart(Unit* who) { - if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; if (me->Attack(who, true)) diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp index d61b81e6ba7..ac165ac39ef 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -123,7 +123,7 @@ public: void AttackStart(Unit* who) { - if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; if (me->Attack(who, true)) diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp index d0f29422912..ff2009c2a17 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -91,7 +91,7 @@ public: void AttackStart(Unit* who) { - if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; if (me->Attack(who, true)) diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index 4df44f1c851..5980c534595 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -249,7 +249,7 @@ public: if (uiCountErekemGuards < 2) { uiErekemGuard[uiCountErekemGuards++] = creature->GetGUID(); - creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE); } break; case CREATURE_MORAGG: @@ -257,7 +257,7 @@ public: break; case CREATURE_CYANIGOSA: uiCyanigosa = creature->GetGUID(); - creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE); break; case CREATURE_SINCLARI: uiSinclari = creature->GetGUID(); @@ -499,18 +499,18 @@ public: if (Creature* pGuard1 = instance->GetCreature(uiErekemGuard[0])) { if (bForceRespawn) - pGuard1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pGuard1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE); else - pGuard1->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pGuard1->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE); pGuard1->GetMotionMaster()->MovePoint(0, BossStartMove21); } if (Creature* pGuard2 = instance->GetCreature(uiErekemGuard[1])) { if (bForceRespawn) - pGuard2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pGuard2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE); else - pGuard2->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pGuard2->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE); pGuard2->GetMotionMaster()->MovePoint(0, BossStartMove22); } break; @@ -543,7 +543,7 @@ public: // generic boss state changes if (pBoss) { - pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE); pBoss->SetReactState(REACT_AGGRESSIVE); if (!bForceRespawn) @@ -554,7 +554,7 @@ public: pBoss->Respawn(); pBoss->RemoveLootMode(1); } - pBoss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pBoss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE); uiWaveCount = 0; } } @@ -750,7 +750,7 @@ public: case 3: pCyanigosa->RemoveAurasDueToSpell(CYANIGOSA_BLUE_AURA); pCyanigosa->CastSpell(pCyanigosa, CYANIGOSA_SPELL_TRANSFORM, 0); - pCyanigosa->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pCyanigosa->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE); pCyanigosa->SetReactState(REACT_AGGRESSIVE); uiCyanigosaEventTimer = 2*IN_MILLISECONDS; ++uiCyanigosaEventPhase; diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index 801ab408685..8b77cb250da 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -443,7 +443,7 @@ public: if (instance && !uiBoss) uiBoss = instance->GetData(DATA_WAVE_COUNT) == 6 ? instance->GetData(DATA_FIRST_BOSS) : instance->GetData(DATA_SECOND_BOSS); me->SetReactState(REACT_PASSIVE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.h b/src/server/scripts/Northrend/VioletHold/violet_hold.h index ff663efe275..2a0032bac95 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.h +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp index 96f1cb49b84..11fb0933b9b 100644 --- a/src/server/scripts/Northrend/borean_tundra.cpp +++ b/src/server/scripts/Northrend/borean_tundra.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -1328,7 +1328,7 @@ public: if (uiType != POINT_MOTION_TYPE) return; - me->AddUnitState(UNIT_STAT_STUNNED); + me->AddUnitState(UNIT_STATE_STUNNED); me->CastSpell(me, SPELL_STUN, true); if (me->isSummon()) if (Unit* summoner = me->ToTempSummon()->GetSummoner()) @@ -1445,7 +1445,7 @@ public: DoScriptText(SAY_LERYSSA_1, pLeryssa); pArlos->Kill(pArlos, false); pLeryssa->RemoveAura(SPELL_STUN); - pLeryssa->ClearUnitState(UNIT_STAT_STUNNED); + pLeryssa->ClearUnitState(UNIT_STATE_STUNNED); pLeryssa->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING); pLeryssa->GetMotionMaster()->MovePoint(0, 3722.114502f, 3564.201660f, 477.441437f); @@ -1495,7 +1495,7 @@ public: if (Creature* pTalbot = me->FindNearestCreature(NPC_PRINCE_VALANAR, 50.0f, true)) CAST_AI(npc_counselor_talbot::npc_counselor_talbotAI, pTalbot->GetAI())->bCheck = true; - me->AddUnitState(UNIT_STAT_STUNNED); + me->AddUnitState(UNIT_STATE_STUNNED); me->CastSpell(me, SPELL_STUN, true); if (me->isSummon()) diff --git a/src/server/scripts/Northrend/crystalsong_forest.cpp b/src/server/scripts/Northrend/crystalsong_forest.cpp index 22b72586e37..d48903696ec 100644 --- a/src/server/scripts/Northrend/crystalsong_forest.cpp +++ b/src/server/scripts/Northrend/crystalsong_forest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/dalaran.cpp b/src/server/scripts/Northrend/dalaran.cpp index 8ff5a314dcc..cd3cbf29d0d 100644 --- a/src/server/scripts/Northrend/dalaran.cpp +++ b/src/server/scripts/Northrend/dalaran.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -32,7 +32,12 @@ Script Data End */ enum Spells { SPELL_TRESPASSER_A = 54028, - SPELL_TRESPASSER_H = 54029 + SPELL_TRESPASSER_H = 54029, + + SPELL_SUNREAVER_DISGUISE_FEMALE = 70973, + SPELL_SUNREAVER_DISGUISE_MALE = 70974, + SPELL_SILVER_COVENANT_DISGUISE_FEMALE = 70971, + SPELL_SILVER_COVENANT_DISGUISE_MALE = 70972, }; enum NPCs // All outdoor guards are within 35.0f of these NPCs @@ -71,8 +76,10 @@ public: Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself(); - // If player has Disguise aura for quest A Meeting With The Magister or An Audience With The Arcanist, do not teleport it away but let it pass - if (!player || player->isGameMaster() || player->IsBeingTeleported() || player->HasAura(70973) || player->HasAura(70971)) + if (!player || player->isGameMaster() || player->IsBeingTeleported() || + // If player has Disguise aura for quest A Meeting With The Magister or An Audience With The Arcanist, do not teleport it away but let it pass + player->HasAura(SPELL_SUNREAVER_DISGUISE_FEMALE) || player->HasAura(SPELL_SUNREAVER_DISGUISE_MALE) || + player->HasAura(SPELL_SILVER_COVENANT_DISGUISE_FEMALE) || player->HasAura(SPELL_SILVER_COVENANT_DISGUISE_MALE)) return; switch (me->GetEntry()) diff --git a/src/server/scripts/Northrend/dragonblight.cpp b/src/server/scripts/Northrend/dragonblight.cpp index 7606ecd81c1..0c1837ec37d 100644 --- a/src/server/scripts/Northrend/dragonblight.cpp +++ b/src/server/scripts/Northrend/dragonblight.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/grizzly_hills.cpp b/src/server/scripts/Northrend/grizzly_hills.cpp index 6ed452857aa..ccb31c869a4 100644 --- a/src/server/scripts/Northrend/grizzly_hills.cpp +++ b/src/server/scripts/Northrend/grizzly_hills.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -16,115 +16,9 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Grizzly_Hills -SD%Complete: 80 -SDComment: Quest support: 12231, 12247 -SDCategory: Grizzly Hills -EndScriptData */ - -/* ContentData -npc_orsonn_and_kodian -EndContentData */ - #include "ScriptPCH.h" #include "ScriptedEscortAI.h" -#define GOSSIP_ITEM1 "You're free to go Orsonn, but first tell me what's wrong with the furbolg." -#define GOSSIP_ITEM2 "What happened then?" -#define GOSSIP_ITEM3 "Thank you, Son of Ursoc. I'll see what can be done." -#define GOSSIP_ITEM4 "Who was this stranger?" -#define GOSSIP_ITEM5 "Thank you, Kodian. I'll do what I can." - -enum eEnums -{ - GOSSIP_TEXTID_ORSONN1 = 12793, - GOSSIP_TEXTID_ORSONN2 = 12794, - GOSSIP_TEXTID_ORSONN3 = 12796, - - GOSSIP_TEXTID_KODIAN1 = 12797, - GOSSIP_TEXTID_KODIAN2 = 12798, - - NPC_ORSONN = 27274, - NPC_KODIAN = 27275, - - //trigger creatures - NPC_ORSONN_CREDIT = 27322, - NPC_KODIAN_CREDIT = 27321, - - QUEST_CHILDREN_OF_URSOC = 12247, - QUEST_THE_BEAR_GODS_OFFSPRING = 12231 -}; - -class npc_orsonn_and_kodian : public CreatureScript -{ -public: - npc_orsonn_and_kodian() : CreatureScript("npc_orsonn_and_kodian") { } - - bool OnGossipHello(Player* player, Creature* creature) - { - if (creature->isQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(QUEST_CHILDREN_OF_URSOC) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(QUEST_THE_BEAR_GODS_OFFSPRING) == QUEST_STATUS_INCOMPLETE) - { - switch (creature->GetEntry()) - { - case NPC_ORSONN: - if (!player->GetReqKillOrCastCurrentCount(QUEST_CHILDREN_OF_URSOC, NPC_ORSONN_CREDIT) || !player->GetReqKillOrCastCurrentCount(QUEST_THE_BEAR_GODS_OFFSPRING, NPC_ORSONN_CREDIT)) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ORSONN1, creature->GetGUID()); - return true; - } - break; - case NPC_KODIAN: - if (!player->GetReqKillOrCastCurrentCount(QUEST_CHILDREN_OF_URSOC, NPC_KODIAN_CREDIT) || !player->GetReqKillOrCastCurrentCount(QUEST_THE_BEAR_GODS_OFFSPRING, NPC_KODIAN_CREDIT)) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_KODIAN1, creature->GetGUID()); - return true; - } - break; - } - } - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) - { - player->PlayerTalkClass->ClearMenus(); - switch (uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ORSONN2, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ORSONN3, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - player->CLOSE_GOSSIP_MENU(); - player->TalkedToCreature(NPC_ORSONN_CREDIT, creature->GetGUID()); - break; - - case GOSSIP_ACTION_INFO_DEF+4: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_KODIAN2, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - player->CLOSE_GOSSIP_MENU(); - player->TalkedToCreature(NPC_KODIAN_CREDIT, creature->GetGUID()); - break; - } - - return true; - } -}; - /*###### ## Quest 12027: Mr. Floppy's Perilous Adventure ######*/ @@ -476,7 +370,7 @@ public: if (me->FindNearestGameObject(OBJECT_HAUNCH, 2.0f)) { me->SetStandState(UNIT_STAND_STATE_DEAD); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); } m_uiPhase = 0; @@ -521,7 +415,7 @@ public: // call this each update tick? if (me->FindNearestCreature(TALLHORN_STAG, 0.2f)) { - me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USESTANDING); + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING); } else if (m_uiPhase) @@ -730,7 +624,7 @@ public: uiPlayerGUID = 0; uiTimer = 0; uiChopTimer = urand(10000, 12500); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_AGGRESSIVE); } @@ -789,7 +683,7 @@ public: { if (pCaster && pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_SMOKE_BOMB) { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_PASSIVE); me->CombatStop(false); uiPlayerGUID = pCaster->GetGUID(); @@ -801,7 +695,6 @@ public: void AddSC_grizzly_hills() { - new npc_orsonn_and_kodian; new npc_emily; new npc_mrfloppy; new npc_outhouse_bunny; diff --git a/src/server/scripts/Northrend/howling_fjord.cpp b/src/server/scripts/Northrend/howling_fjord.cpp index f76ac69ab7a..3c44fa0eb44 100644 --- a/src/server/scripts/Northrend/howling_fjord.cpp +++ b/src/server/scripts/Northrend/howling_fjord.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp index 27054b5755a..8da992af8fb 100644 --- a/src/server/scripts/Northrend/icecrown.cpp +++ b/src/server/scripts/Northrend/icecrown.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -115,38 +115,6 @@ public: }; /*###### -## npc_dame_evniki_kapsalis -######*/ - -enum eDameEnvikiKapsalis -{ - TITLE_CRUSADER = 123 -}; - -class npc_dame_evniki_kapsalis : public CreatureScript -{ -public: - npc_dame_evniki_kapsalis() : CreatureScript("npc_dame_evniki_kapsalis") { } - - bool OnGossipHello(Player* player, Creature* creature) - { - if (player->HasTitle(TITLE_CRUSADER)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) - { - player->PlayerTalkClass->ClearMenus(); - if (uiAction == GOSSIP_ACTION_TRADE) - player->GetSession()->SendListInventory(creature->GetGUID()); - return true; - } -}; - -/*###### ## npc_squire_david ######*/ @@ -276,65 +244,6 @@ public: }; /*###### -## npc_alorah_and_grimmin -######*/ - -enum ealorah_and_grimmin -{ - SPELL_CHAIN = 68341, - NPC_FJOLA_LIGHTBANE = 36065, - NPC_EYDIS_DARKBANE = 36066, - NPC_PRIESTESS_ALORAH = 36101, - NPC_PRIEST_GRIMMIN = 36102 -}; - -class npc_alorah_and_grimmin : public CreatureScript -{ -public: - npc_alorah_and_grimmin() : CreatureScript("npc_alorah_and_grimmin") { } - - struct npc_alorah_and_grimminAI : public ScriptedAI - { - npc_alorah_and_grimminAI(Creature* creature) : ScriptedAI(creature) {} - - bool uiCast; - - void Reset() - { - uiCast = false; - } - - void UpdateAI(const uint32 /*uiDiff*/) - { - if (uiCast) - return; - uiCast = true; - Creature* target = NULL; - - switch (me->GetEntry()) - { - case NPC_PRIESTESS_ALORAH: - target = me->FindNearestCreature(NPC_EYDIS_DARKBANE, 10.0f); - break; - case NPC_PRIEST_GRIMMIN: - target = me->FindNearestCreature(NPC_FJOLA_LIGHTBANE, 10.0f); - break; - } - if (target) - DoCast(target, SPELL_CHAIN); - - if (!UpdateVictim()) - return; - } - }; - - CreatureAI* GetAI(Creature* creature) const - { - return new npc_alorah_and_grimminAI(creature); - } -}; - -/*###### ## npc_guardian_pavilion ######*/ @@ -426,13 +335,168 @@ public: } }; +/*###### +* npc_tournament_training_dummy +######*/ +enum TournamentDummy +{ + NPC_CHARGE_TARGET = 33272, + NPC_MELEE_TARGET = 33229, + NPC_RANGED_TARGET = 33243, + + SPELL_CHARGE_CREDIT = 62658, + SPELL_MELEE_CREDIT = 62672, + SPELL_RANGED_CREDIT = 62673, + + SPELL_PLAYER_THRUST = 62544, + SPELL_PLAYER_BREAK_SHIELD = 62626, + SPELL_PLAYER_CHARGE = 62874, + + SPELL_RANGED_DEFEND = 62719, + SPELL_CHARGE_DEFEND = 64100, + SPELL_VULNERABLE = 62665, + + SPELL_COUNTERATTACK = 62709, + + EVENT_DUMMY_RECAST_DEFEND = 1, + EVENT_DUMMY_RESET = 2, +}; + +class npc_tournament_training_dummy : public CreatureScript +{ + public: + npc_tournament_training_dummy(): CreatureScript("npc_tournament_training_dummy"){} + + struct npc_tournament_training_dummyAI : Scripted_NoMovementAI + { + npc_tournament_training_dummyAI(Creature* creature) : Scripted_NoMovementAI(creature) {} + + EventMap events; + bool isVulnerable; + + void Reset() + { + me->SetControlled(true, UNIT_STATE_STUNNED); + me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); + isVulnerable = false; + + // Cast Defend spells to max stack size + switch (me->GetEntry()) + { + case NPC_CHARGE_TARGET: + DoCast(SPELL_CHARGE_DEFEND); + break; + case NPC_RANGED_TARGET: + me->CastCustomSpell(SPELL_RANGED_DEFEND, SPELLVALUE_AURA_STACK, 3, me); + break; + } + + events.Reset(); + events.ScheduleEvent(EVENT_DUMMY_RECAST_DEFEND, 5000); + } + + void EnterEvadeMode() + { + if (!_EnterEvadeMode()) + return; + + Reset(); + } + + void DamageTaken(Unit* /*attacker*/, uint32& damage) + { + damage = 0; + events.RescheduleEvent(EVENT_DUMMY_RESET, 10000); + } + + void SpellHit(Unit* caster, SpellInfo const* spell) + { + switch (me->GetEntry()) + { + case NPC_CHARGE_TARGET: + if (spell->Id == SPELL_PLAYER_CHARGE) + if (isVulnerable) + DoCast(caster, SPELL_CHARGE_CREDIT, true); + break; + case NPC_MELEE_TARGET: + if (spell->Id == SPELL_PLAYER_THRUST) + { + DoCast(caster, SPELL_MELEE_CREDIT, true); + + if (Unit* target = caster->GetVehicleBase()) + DoCast(target, SPELL_COUNTERATTACK, true); + } + break; + case NPC_RANGED_TARGET: + if (spell->Id == SPELL_PLAYER_BREAK_SHIELD) + if (isVulnerable) + DoCast(caster, SPELL_RANGED_CREDIT, true); + break; + } + + if (spell->Id == SPELL_PLAYER_BREAK_SHIELD) + if (!me->HasAura(SPELL_CHARGE_DEFEND) && !me->HasAura(SPELL_RANGED_DEFEND)) + isVulnerable = true; + } + + void UpdateAI(uint32 const diff) + { + events.Update(diff); + + switch (events.ExecuteEvent()) + { + case EVENT_DUMMY_RECAST_DEFEND: + switch (me->GetEntry()) + { + case NPC_CHARGE_TARGET: + { + if (!me->HasAura(SPELL_CHARGE_DEFEND)) + DoCast(SPELL_CHARGE_DEFEND); + break; + } + case NPC_RANGED_TARGET: + { + Aura* defend = me->GetAura(SPELL_RANGED_DEFEND); + if (!defend || defend->GetStackAmount() < 3 || defend->GetDuration() <= 8000) + DoCast(SPELL_RANGED_DEFEND); + break; + } + } + isVulnerable = false; + events.ScheduleEvent(EVENT_DUMMY_RECAST_DEFEND, 5000); + break; + case EVENT_DUMMY_RESET: + if (UpdateVictim()) + { + EnterEvadeMode(); + events.ScheduleEvent(EVENT_DUMMY_RESET, 10000); + } + break; + } + + if (!UpdateVictim()) + return; + + if (!me->HasUnitState(UNIT_STATE_STUNNED)) + me->SetControlled(true, UNIT_STATE_STUNNED); + } + + void MoveInLineOfSight(Unit* /*who*/){} + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_tournament_training_dummyAI(creature); + } + +}; + void AddSC_icecrown() { new npc_arete; - new npc_dame_evniki_kapsalis; new npc_squire_david; new npc_argent_valiant; - new npc_alorah_and_grimmin; new npc_guardian_pavilion; new npc_vereth_the_cunning; + new npc_tournament_training_dummy; } diff --git a/src/server/scripts/Northrend/isle_of_conquest.cpp b/src/server/scripts/Northrend/isle_of_conquest.cpp index 269ff05090e..6d76e348980 100644 --- a/src/server/scripts/Northrend/isle_of_conquest.cpp +++ b/src/server/scripts/Northrend/isle_of_conquest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp index 6f9481ec226..40e1051f218 100644 --- a/src/server/scripts/Northrend/sholazar_basin.cpp +++ b/src/server/scripts/Northrend/sholazar_basin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -665,6 +665,86 @@ public: } }; +/*###### +## Quest The Lifewarden's Wrath +######*/ + +enum MiscLifewarden +{ + NPC_PRESENCE = 28563, // Freya's Presence + NPC_SABOTEUR = 28538, // Cultist Saboteur + NPC_SERVANT = 28320, // Servant of Freya + + WHISPER_ACTIVATE = 0, + + SPELL_FREYA_DUMMY = 51318, + SPELL_LIFEFORCE = 51395, + SPELL_FREYA_DUMMY_TRIGGER = 51335, + SPELL_LASHER_EMERGE = 48195, + SPELL_WILD_GROWTH = 52948, +}; + +class spell_q12620_the_lifewarden_wrath : public SpellScriptLoader +{ +public: + spell_q12620_the_lifewarden_wrath() : SpellScriptLoader("spell_q12620_the_lifewarden_wrath") { } + + class spell_q12620_the_lifewarden_wrath_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q12620_the_lifewarden_wrath_SpellScript); + + void HandleSendEvent(SpellEffIndex effIndex) + { + PreventHitDefaultEffect(effIndex); + + if (Unit* caster = GetCaster()) + { + if (Creature* presence = caster->FindNearestCreature(NPC_PRESENCE, 50.0f)) + { + presence->AI()->Talk(WHISPER_ACTIVATE, caster->GetGUID()); + presence->CastSpell(presence, SPELL_FREYA_DUMMY, true); // will target plants + // Freya Dummy could be scripted with the following code + + // Revive plants + std::list<Creature*> servants; + GetCaster()->GetCreatureListWithEntryInGrid(servants, NPC_SERVANT, 200.0f); + for (std::list<Creature*>::iterator itr = servants.begin(); itr != servants.end(); ++itr) + { + // Couldn't find a spell that does this + if ((*itr)->isDead()) + (*itr)->Respawn(true); + + (*itr)->CastSpell(*itr, SPELL_FREYA_DUMMY_TRIGGER, true); + (*itr)->CastSpell(*itr, SPELL_LASHER_EMERGE, false); + (*itr)->CastSpell(*itr, SPELL_WILD_GROWTH, false); + + if (Unit* target = (*itr)->SelectNearestTarget(150.0f)) + (*itr)->AI()->AttackStart(target); + } + + // Kill nearby enemies + std::list<Creature*> saboteurs; + caster->GetCreatureListWithEntryInGrid(saboteurs, NPC_SABOTEUR, 200.0f); + for (std::list<Creature*>::iterator itr = saboteurs.begin(); itr != saboteurs.end(); ++itr) + if ((*itr)->isAlive()) + // Lifeforce has a cast duration, it should be cast at all saboteurs one by one + presence->CastSpell((*itr), SPELL_LIFEFORCE, false); + } + } + } + + void Register() + { + OnEffectHit += SpellEffectFn(spell_q12620_the_lifewarden_wrath_SpellScript::HandleSendEvent, EFFECT_0, SPELL_EFFECT_SEND_EVENT); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_q12620_the_lifewarden_wrath_SpellScript(); + } +}; + void AddSC_sholazar_basin() { new npc_injured_rainspeaker_oracle(); @@ -674,4 +754,5 @@ void AddSC_sholazar_basin() new npc_engineer_helice(); new npc_adventurous_dwarf(); new npc_jungle_punch_target(); + new spell_q12620_the_lifewarden_wrath(); } diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp index 687f7945e4c..7bd59b92b7f 100644 --- a/src/server/scripts/Northrend/storm_peaks.cpp +++ b/src/server/scripts/Northrend/storm_peaks.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp index aa3b696f5fd..0af82345dce 100644 --- a/src/server/scripts/Northrend/zuldrak.cpp +++ b/src/server/scripts/Northrend/zuldrak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -586,7 +586,7 @@ public: { npc_orinoko_tuskbreakerAI(Creature* creature) : ScriptedAI(creature) { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_PASSIVE); } @@ -622,7 +622,7 @@ public: if (uiType != POINT_MOTION_TYPE) return; - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_AGGRESSIVE); me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation()); uiBattleShoutTimer = 7000; @@ -734,7 +734,7 @@ public: void Reset() { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_PASSIVE); uiChargeTimer = 15000; uiUppercutTimer = 12000; @@ -747,7 +747,7 @@ public: { case 6: me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_AGGRESSIVE); break; } @@ -914,7 +914,7 @@ public: { npc_stinkbeardAI(Creature* creature) : npc_escortAI(creature) { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_PASSIVE); Start(true, true, 0, NULL); SetDespawnAtEnd(false); @@ -940,7 +940,7 @@ public: switch (uiI) { case 7: - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_AGGRESSIVE); me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation()); break; diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp index b78811ce6a0..6eb306b52af 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h index 01da001a990..e019ba7ed7b 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp index a868e46b890..06c1813d1dc 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h index 9f494b748be..59bce7be298 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp index 9b0a4a469ae..f912f25d87f 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h index 3a322bbaba0..ace68034dfc 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp index bcdcc69181a..a69dd3ed874 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h index fe696dea7e4..c4975d142f0 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp index 56895951665..ec0c10f4afe 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h index 642f45090a9..dfab6d12cb8 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp index 7d15f1edc40..5b3468de203 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h index 048ba04dc57..2a11139a701 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp index 71de7177e2b..ef160a3a5c5 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp index ab1057f042a..d359917ab28 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -82,7 +82,7 @@ public: summoned->CastSpell(summoned, SPELL_FOCUS_FIRE_VISUAL, false); summoned->setFaction(me->getFaction()); summoned->SetLevel(me->getLevel()); - summoned->AddUnitState(UNIT_STAT_ROOT); + summoned->AddUnitState(UNIT_STATE_ROOT); if (Unit* pFocusedTarget = Unit::GetUnit(*me, FocusedTargetGUID)) summoned->AI()->AttackStart(pFocusedTarget); diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp index 8a7eefbf633..aa63f1adf18 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -187,7 +187,7 @@ public: //expire movement, will prevent from running right back to victim after cast //(but should MoveChase be used again at a certain time or should he not move?) - if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) me->GetMotionMaster()->MovementExpired(); DoCast(me, SPELL_BLINK); diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp index ca8557b22af..d9ba99fcf24 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp index e744cd0f8fb..2fd7498ea82 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp index ffe3e6081e7..c3c53416a9b 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp index eaa64cd9e16..02c5a035375 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h b/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h index 1972809ee15..706862ac301 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp index 7ffc203f694..d3ea73c5ba0 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp index dd5df358d53..f7032d78bb6 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp index 8cf8d61b845..81a7750d512 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp index ebb279f74ac..5fd908c44e8 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp index 4c6aaadfec6..1a9155dacb2 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h index 0f746555c98..0dfe9d01de5 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.cpp b/src/server/scripts/Outland/BlackTemple/black_temple.cpp index 5e126d4c6f7..a934d5587c2 100644 --- a/src/server/scripts/Outland/BlackTemple/black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/black_temple.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.h b/src/server/scripts/Outland/BlackTemple/black_temple.h index c1aa8fa1b83..813070d837c 100644 --- a/src/server/scripts/Outland/BlackTemple/black_temple.h +++ b/src/server/scripts/Outland/BlackTemple/black_temple.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp index 8f37778b948..3227e685fc4 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index c28fe68d9e0..58f0e10c950 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -1865,7 +1865,7 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::Reset() TransformCount = 0; me->SetDisplayId(21135); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); @@ -1982,7 +1982,7 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::HandleTalkSequence() Akama->GetMotionMaster()->Clear(false); // Akama->GetMotionMaster()->MoveIdle(); Akama->SetPosition(x, y, z, 0.0f); - Akama->SendMonsterMove(x, y, z, 0, MOVEMENTFLAG_NONE, 0); // Illidan must not die until Akama arrives. + Akama->MonsterMoveWithSpeed(x, y, z, 0); // Illidan must not die until Akama arrives. Akama->GetMotionMaster()->MoveChase(me); } diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp index 645a9fe7978..3c7f0d3b89c 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index 8b39fe8a8f7..b0c29afda34 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp index 58585d0028e..5ca3189ebca 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp index 6941a175698..5a02ffc891f 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp index d6510db0cbb..15c7cdb187d 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp index 6bf26e795ca..47f82447a80 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp index 6fe24378f79..b0c6dcdda41 100644 --- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index 3663372d751..d4184a0b145 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CMakeLists.txt b/src/server/scripts/Outland/CMakeLists.txt index ffd9332c8aa..229f7de72ec 100644 --- a/src/server/scripts/Outland/CMakeLists.txt +++ b/src/server/scripts/Outland/CMakeLists.txt @@ -45,6 +45,7 @@ set(scripts_STAT_SRCS Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp Outland/shattrath_city.cpp + Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp Outland/TempestKeep/Mechanar/mechanar.h diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index 3f6afc9c76e..9edc7179d5e 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp index a5e0f60fb6c..6f020c16402 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index fcb4b58a1ad..33ce04e45e3 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index a29fafe4edb..5111a8eaa8e 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index f8ed96632df..0ed9d8e7833 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -136,7 +136,7 @@ public: DoCast(me, SPELL_SUBMERGE);//submerge anim me->SetVisible(false);//we start invis under water, submerged me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } void JustDied(Unit* /*Killer*/) @@ -205,7 +205,7 @@ public: { WaitTimer = 3000; CanStartEvent = true;//fresh fished from pool - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } else @@ -325,7 +325,7 @@ public: Submerged = false; me->InterruptNonMeleeSpells(false);//shouldn't be any me->RemoveAllAuras(); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED); DoCast(me, SPELL_EMERGE, true); Spawned = false; @@ -344,7 +344,7 @@ public: if (!Spawned) { - me->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); //spawn adds for (uint8 i = 0; i < 9; ++i) { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp index 745aa162139..eeef50e3f9c 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp index 7a8973c4f0a..6c4019c7989 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h index dd7405c7b26..786db3cb86b 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp index 4ca3ef7891d..c3203621dbb 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp index 5be2c99f362..ce73e467c0c 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp index 36161d05473..bfbeff81d3e 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp index 9719a1e19db..51032fd70ed 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h index 9eccbb60c68..b2b25d960ed 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp index e570537c71c..aebd71bbd47 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp index c00a365057a..fb3be660b5e 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp index 5265dff16e2..b7604c41794 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -151,7 +151,7 @@ public: m_bPerformingGroundSlam = false; //and correct movement, if not already - if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) { if (me->getVictim()) me->GetMotionMaster()->MoveChase(me->getVictim()); diff --git a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp index b941e3bc581..4636334e668 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/GruulsLair/gruuls_lair.h b/src/server/scripts/Outland/GruulsLair/gruuls_lair.h index fd78dd945a8..163ab97ed5f 100644 --- a/src/server/scripts/Outland/GruulsLair/gruuls_lair.h +++ b/src/server/scripts/Outland/GruulsLair/gruuls_lair.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp index 1666e9adb9c..bd4f91e8e39 100644 --- a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp +++ b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h index 892b74ff341..e34e86c16a7 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp index 75de303a3d8..7fa417cacb2 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp index 4bc273ece8f..b847500fc36 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp index 49054f51241..f056ccd40ee 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp index 7754cb1339d..d9f6b7e303e 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp index 0a60a1584dc..a6adb6b952e 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index 1fd1094494d..ecea5e6abb4 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -337,7 +337,7 @@ class boss_vazruden_the_herald : public CreatureScript VazrudenGUID = 0; } summoned = false; - me->ClearUnitState(UNIT_STAT_ROOT); + me->ClearUnitState(UNIT_STATE_ROOT); me->SetVisible(true); } } @@ -352,7 +352,7 @@ class boss_vazruden_the_herald : public CreatureScript NazanGUID = Nazan->GetGUID(); summoned = true; me->SetVisible(false); - me->AddUnitState(UNIT_STAT_ROOT); + me->AddUnitState(UNIT_STATE_ROOT); } } diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp index f01f01b5bf8..b2f8af2c80d 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h index e34e466368d..571071c724a 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp index b25b3806823..3dab24eab1b 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index 755106f7092..c355079e0e8 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -252,8 +252,8 @@ class boss_magtheridon : public CreatureScript me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); - me->AddUnitState(UNIT_STAT_STUNNED); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); + me->AddUnitState(UNIT_STATE_STUNNED); DoCast(me, SPELL_SHADOW_CAGE_C, true); } @@ -334,7 +334,7 @@ class boss_magtheridon : public CreatureScript void AttackStart(Unit* who) { - if (!me->HasUnitState(UNIT_STAT_STUNNED)) + if (!me->HasUnitState(UNIT_STATE_STUNNED)) ScriptedAI::AttackStart(who); } @@ -388,7 +388,7 @@ class boss_magtheridon : public CreatureScript if (BlastNova_Timer <= diff) { // to avoid earthquake interruption - if (!me->HasUnitState(UNIT_STAT_STUNNED)) + if (!me->HasUnitState(UNIT_STATE_STUNNED)) { DoScriptText(EMOTE_BLASTNOVA, me); DoCast(me, SPELL_BLASTNOVA); @@ -431,7 +431,7 @@ class boss_magtheridon : public CreatureScript if (!Phase3 && HealthBelowPct(30) && !me->IsNonMeleeSpellCasted(false) // blast nova - && !me->HasUnitState(UNIT_STAT_STUNNED)) // shadow cage and earthquake + && !me->HasUnitState(UNIT_STATE_STUNNED)) // shadow cage and earthquake { Phase3 = true; DoScriptText(SAY_CHAMBER_DESTROY, me); diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp index 7461bb5ceee..caaedc4c51b 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -223,7 +223,7 @@ class instance_magtheridons_lair : public InstanceMapScript Creature* Magtheridon = instance->GetCreature(MagtheridonGUID); if (Magtheridon && Magtheridon->isAlive()) { - Magtheridon->ClearUnitState(UNIT_STAT_STUNNED); + Magtheridon->ClearUnitState(UNIT_STATE_STUNNED); Magtheridon->AI()->AttackStart(Magtheridon->SelectNearestTarget(999)); } CageTimer = 0; diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h index f98eb09d86e..6a232264ba2 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp index 4c051f46945..970c089918e 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp index 3f542ce76e4..5e8ed53fa4b 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp index 5965c352975..3f07552441b 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp index e8f7844bfc5..cc36bf9a385 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h index ad3ec3b3171..60140704012 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index dcbc2832f27..fcfe6c0ea16 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index 6fac13aa8ad..218c5a122f1 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index d987601c5bd..904b2851816 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -397,7 +397,7 @@ class boss_kaelthas : public CreatureScript void MoveInLineOfSight(Unit* who) { - if (!me->HasUnitState(UNIT_STAT_STUNNED) && me->canCreatureAttack(who)) + if (!me->HasUnitState(UNIT_STATE_STUNNED) && me->canCreatureAttack(who)) { if (!me->canFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) return; @@ -820,7 +820,7 @@ class boss_kaelthas : public CreatureScript me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveIdle(); me->SetPosition(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0); - me->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, 0, 0); + me->MonsterMoveWithSpeed(afGravityPos[0], afGravityPos[1], afGravityPos[2], 1); me->InterruptNonMeleeSpells(false); DoCast(me, SPELL_FULLPOWER); @@ -887,7 +887,7 @@ class boss_kaelthas : public CreatureScript me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveIdle(); me->SetPosition(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0); - me->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, MOVEMENTFLAG_NONE, 0); + me->MonsterMoveWithSpeed(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0); // 1) Kael'thas will portal the whole raid right into his body for (i = me->getThreatManager().getThreatList().begin(); i!= me->getThreatManager().getThreatList().end(); ++i) diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp index e2a2176de5f..576d0a8bbf2 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp index f5a7bad0d8e..1ec4a6e55ec 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp index 71a38340a3d..421f9f2f545 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h index 7aac0bc0b45..9a2bd3425b6 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h +++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp index 2f14edef145..4d579ac8c16 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp index cae13adfef7..b8b0ffd4d2e 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp new file mode 100644 index 00000000000..ed818fb13be --- /dev/null +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2008-2012 TrinityCore <http://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/>. + */ + +//! TODO - Boss not scripted, just ported required spellscript from core + +#include "ScriptMgr.h" +#include "SpellScript.h" + +enum Spells +{ + SPELL_POSITIVE_CHARGE = 39090, + SPELL_POSITIVE_CHARGE_STACK = 39089, + SPELL_NEGATIVE_CHARGE = 39093, + SPELL_NEGATIVE_CHARGE_STACK = 39092 +}; + +class spell_capacitus_polarity_shift : public SpellScriptLoader +{ + public: + spell_capacitus_polarity_shift() : SpellScriptLoader("spell_capacitus_polarity_shift") { } + + class spell_capacitus_polarity_shift_SpellScript : public SpellScript + { + PrepareSpellScript(spell_capacitus_polarity_shift_SpellScript); + + bool Validate(SpellInfo const* /*spell*/) + { + if (!sSpellMgr->GetSpellInfo(SPELL_POSITIVE_CHARGE)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_POSITIVE_CHARGE_STACK)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_NEGATIVE_CHARGE)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_NEGATIVE_CHARGE_STACK)) + return false; + return true; + } + + void HandleTargets(std::list<Unit*>& targetList) + { + uint8 count = 0; + for (std::list<Unit*>::iterator ihit = targetList.begin(); ihit != targetList.end(); ++ihit) + if ((*ihit)->GetGUID() != GetCaster()->GetGUID()) + if (Player* target = (*ihit)->ToPlayer()) + if (target->HasAura(GetTriggeringSpell()->Id)) + ++count; + + if (count) + { + uint32 spellId = 0; + + if (GetSpellInfo()->Id == SPELL_POSITIVE_CHARGE) + spellId = SPELL_POSITIVE_CHARGE_STACK; + else // if (GetSpellInfo()->Id == SPELL_NEGATIVE_CHARGE) + spellId = SPELL_NEGATIVE_CHARGE_STACK; + + GetCaster()->SetAuraStack(spellId, GetCaster(), count); + } + } + + void HandleDamage(SpellEffIndex /*effIndex*/) + { + if (!GetTriggeringSpell()) + return; + + Unit* target = GetHitUnit(); + + if (target->HasAura(GetTriggeringSpell()->Id)) + SetHitDamage(0); + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_capacitus_polarity_shift_SpellScript::HandleDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); + OnUnitTargetSelect += SpellUnitTargetFn(spell_capacitus_polarity_shift_SpellScript::HandleTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_capacitus_polarity_shift_SpellScript(); + } +}; + +void AddSC_boss_mechano_lord_capacitus() +{ + new spell_capacitus_polarity_shift(); +} diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp index c5408b4bbf5..7e435187be9 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp index 30a6bdbc0dd..cdc3b799b2c 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp index ef48ebbcf11..9db2b660d2a 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h b/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h index d2fbfc326f4..1ad436892bb 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp index d811390e3d0..db95f60f556 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -38,19 +38,18 @@ EndContentData */ enum eMillhouseSays { - SAY_INTRO_1 = -1552010, - SAY_INTRO_2 = -1552011, - SAY_WATER = -1552012, - SAY_BUFFS = -1552013, - SAY_DRINK = -1552014, - SAY_READY = -1552015, - SAY_KILL_1 = -1552016, - SAY_KILL_2 = -1552017, - SAY_PYRO = -1552018, - SAY_ICEBLOCK = -1552019, - SAY_LOWHP = -1552020, - SAY_DEATH = -1552021, - SAY_COMPLETE = -1552022, + SAY_INTRO_1 = 0, + SAY_INTRO_2 = 1, + SAY_WATER = 2, + SAY_BUFFS = 3, + SAY_DRINK = 4, + SAY_READY = 5, + SAY_KILL = 6, + SAY_PYRO = 7, + SAY_ICEBLOCK = 8, + SAY_LOWHP = 9, + SAY_DEATH = 10, + SAY_COMPLETE = 11, }; enum eMillhouseSpells @@ -107,7 +106,7 @@ class npc_millhouse_manastorm : public CreatureScript Init = true; if (instance->GetData(TYPE_HARBINGERSKYRISS) == DONE) - DoScriptText(SAY_COMPLETE, me); + Talk(SAY_COMPLETE); } } @@ -126,12 +125,12 @@ class npc_millhouse_manastorm : public CreatureScript void KilledUnit(Unit* /*victim*/) { - DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me); + Talk(SAY_KILL); } void JustDied(Unit* /*victim*/) { - DoScriptText(SAY_DEATH, me); + Talk(SAY_DEATH); /*for questId 10886 (heroic mode only) if (instance && instance->GetData(TYPE_HARBINGERSKYRISS) != DONE) @@ -149,30 +148,30 @@ class npc_millhouse_manastorm : public CreatureScript switch (Phase) { case 1: - DoScriptText(SAY_INTRO_1, me); + Talk(SAY_INTRO_1); EventProgress_Timer = 18000; break; case 2: - DoScriptText(SAY_INTRO_2, me); + Talk(SAY_INTRO_2); EventProgress_Timer = 18000; break; case 3: - DoScriptText(SAY_WATER, me); + Talk(SAY_WATER); DoCast(me, SPELL_CONJURE_WATER); EventProgress_Timer = 7000; break; case 4: - DoScriptText(SAY_BUFFS, me); + Talk(SAY_BUFFS); DoCast(me, SPELL_ICE_ARMOR); EventProgress_Timer = 7000; break; case 5: - DoScriptText(SAY_DRINK, me); + Talk(SAY_DRINK); DoCast(me, SPELL_ARCANE_INTELLECT); EventProgress_Timer = 7000; break; case 6: - DoScriptText(SAY_READY, me); + Talk(SAY_READY); EventProgress_Timer = 6000; break; case 7: @@ -192,7 +191,7 @@ class npc_millhouse_manastorm : public CreatureScript return; if (!LowHp && HealthBelowPct(20)) { - DoScriptText(SAY_LOWHP, me); + Talk(SAY_LOWHP); LowHp = true; } @@ -201,7 +200,7 @@ class npc_millhouse_manastorm : public CreatureScript if (me->IsNonMeleeSpellCasted(false)) return; - DoScriptText(SAY_PYRO, me); + Talk(SAY_PYRO); DoCast(me->getVictim(), SPELL_PYROBLAST); Pyroblast_Timer = 40000; @@ -232,14 +231,14 @@ class npc_millhouse_manastorm : public CreatureScript enum eWardenSays { - YELL_INTRO1 = -1552023, - YELL_INTRO2 = -1552024, - YELL_RELEASE1 = -1552025, - YELL_RELEASE2A = -1552026, - YELL_RELEASE2B = -1552027, - YELL_RELEASE3 = -1552028, - YELL_RELEASE4 = -1552029, - YELL_WELCOME = -1552030, + YELL_INTRO1 = 0, + YELL_INTRO2 = 1, + YELL_RELEASE1 = 2, + YELL_RELEASE2A = 3, + YELL_RELEASE2B = 4, + YELL_RELEASE3 = 5, + YELL_RELEASE4 = 6, + YELL_WELCOME = 7, }; enum eWardenUnits @@ -274,10 +273,10 @@ class npc_warden_mellichar : public CreatureScript { public: - npc_warden_mellichar() - : CreatureScript("npc_warden_mellichar") + npc_warden_mellichar() : CreatureScript("npc_warden_mellichar") { } + struct npc_warden_mellicharAI : public ScriptedAI { npc_warden_mellicharAI(Creature* creature) : ScriptedAI(creature) @@ -330,7 +329,7 @@ class npc_warden_mellichar : public CreatureScript void EnterCombat(Unit* /*who*/) { - DoScriptText(YELL_INTRO1, me); + Talk(YELL_INTRO1); DoCast(me, SPELL_BUBBLE_VISUAL); if (instance) @@ -437,7 +436,7 @@ class npc_warden_mellichar : public CreatureScript me->SummonCreature(ENTRY_MILLHOUSE, 413.292f, -148.378f, 42.56f, 6.27f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); break; case 4: - DoScriptText(YELL_RELEASE2B, me); + Talk(YELL_RELEASE2B); break; case 5: switch (urand(0, 1)) @@ -463,7 +462,7 @@ class npc_warden_mellichar : public CreatureScript break; case 7: me->SummonCreature(ENTRY_SKYRISS, 445.763f, -191.639f, 44.64f, 1.60f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); - DoScriptText(YELL_WELCOME, me); + Talk(YELL_WELCOME); break; } CanSpawn = false; @@ -474,17 +473,17 @@ class npc_warden_mellichar : public CreatureScript switch (Phase) { case 1: - DoScriptText(YELL_INTRO2, me); + Talk(YELL_INTRO2); EventProgress_Timer = 10000; ++Phase; break; case 2: - DoScriptText(YELL_RELEASE1, me); + Talk(YELL_RELEASE1); DoPrepareForPhase(); EventProgress_Timer = 7000; break; case 3: - DoScriptText(YELL_RELEASE2A, me); + Talk(YELL_RELEASE2A); DoPrepareForPhase(); EventProgress_Timer = 10000; break; @@ -493,12 +492,12 @@ class npc_warden_mellichar : public CreatureScript EventProgress_Timer = 15000; break; case 5: - DoScriptText(YELL_RELEASE3, me); + Talk(YELL_RELEASE3); DoPrepareForPhase(); EventProgress_Timer = 15000; break; case 6: - DoScriptText(YELL_RELEASE4, me); + Talk(YELL_RELEASE4); DoPrepareForPhase(); EventProgress_Timer = 15000; break; @@ -524,14 +523,16 @@ class npc_warden_mellichar : public CreatureScript # mob_zerekethvoidzone (this script probably not needed in future -> `creature_template_addon`.`auras`='36120 0') #####*/ -#define SPELL_VOID_ZONE_DAMAGE 36120 +enum ZerekethSpell +{ + SPELL_VOID_ZONE_DAMAGE = 36120, +}; class mob_zerekethvoidzone : public CreatureScript { public: - mob_zerekethvoidzone() - : CreatureScript("mob_zerekethvoidzone") + mob_zerekethvoidzone() : CreatureScript("mob_zerekethvoidzone") { } struct mob_zerekethvoidzoneAI : public ScriptedAI @@ -555,10 +556,10 @@ class mob_zerekethvoidzone : public CreatureScript return new mob_zerekethvoidzoneAI(creature); } }; + void AddSC_arcatraz() { new npc_millhouse_manastorm(); new npc_warden_mellichar(); new mob_zerekethvoidzone(); } - diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h index c25ec2600c2..8b897b1b96e 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp index d2375f377c4..de86ec8672c 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -89,7 +89,7 @@ class boss_harbinger_skyriss : public CreatureScript void Reset() { if (!Intro) - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); IsImage33 = false; IsImage66 = false; @@ -184,7 +184,7 @@ class boss_harbinger_skyriss : public CreatureScript Intro_Timer = 3000; break; case 3: - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); Intro = true; break; } diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp index 0988f6ffeb9..6a27d295ebc 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp index 64fea1c41e5..ccac73c5dc6 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp index 43078c48537..488ddba40cf 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp index 75c80b06816..7e9960225bb 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/blades_edge_mountains.cpp b/src/server/scripts/Outland/blades_edge_mountains.cpp index 87304a3f721..97ce9f45430 100644 --- a/src/server/scripts/Outland/blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/blades_edge_mountains.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -562,6 +562,564 @@ class go_thunderspike : public GameObjectScript } }; +enum SimonGame +{ + NPC_SIMON_BUNNY = 22923, + NPC_APEXIS_GUARDIAN = 22275, + + GO_APEXIS_RELIC = 185890, + GO_APEXIS_MONUMENT = 185944, + GO_AURA_BLUE = 185872, + GO_AURA_GREEN = 185873, + GO_AURA_RED = 185874, + GO_AURA_YELLOW = 185875, + + GO_BLUE_CLUSTER_DISPLAY = 7369, + GO_GREEN_CLUSTER_DISPLAY = 7371, + GO_RED_CLUSTER_DISPLAY = 7373, + GO_YELLOW_CLUSTER_DISPLAY = 7375, + GO_BLUE_CLUSTER_DISPLAY_LARGE = 7364, + GO_GREEN_CLUSTER_DISPLAY_LARGE = 7365, + GO_RED_CLUSTER_DISPLAY_LARGE = 7366, + GO_YELLOW_CLUSTER_DISPLAY_LARGE = 7367, + + SPELL_PRE_GAME_BLUE = 40176, + SPELL_PRE_GAME_GREEN = 40177, + SPELL_PRE_GAME_RED = 40178, + SPELL_PRE_GAME_YELLOW = 40179, + SPELL_VISUAL_BLUE = 40244, + SPELL_VISUAL_GREEN = 40245, + SPELL_VISUAL_RED = 40246, + SPELL_VISUAL_YELLOW = 40247, + + SOUND_BLUE = 11588, + SOUND_GREEN = 11589, + SOUND_RED = 11590, + SOUND_YELLOW = 11591, + SOUND_DISABLE_NODE = 11758, + + SPELL_AUDIBLE_GAME_TICK = 40391, + SPELL_VISUAL_START_PLAYER_LEVEL = 40436, + SPELL_VISUAL_START_AI_LEVEL = 40387, + + SPELL_BAD_PRESS_TRIGGER = 41241, + SPELL_BAD_PRESS_DAMAGE = 40065, + SPELL_REWARD_BUFF_1 = 40310, + SPELL_REWARD_BUFF_2 = 40311, + SPELL_REWARD_BUFF_3 = 40312, +}; + +enum SimonEvents +{ + EVENT_SIMON_SETUP_PRE_GAME = 1, + EVENT_SIMON_PLAY_SEQUENCE = 2, + EVENT_SIMON_RESET_CLUSTERS = 3, + EVENT_SIMON_PERIODIC_PLAYER_CHECK = 4, + EVENT_SIMON_TOO_LONG_TIME = 5, + EVENT_SIMON_GAME_TICK = 6, + EVENT_SIMON_ROUND_FINISHED = 7, + + ACTION_SIMON_CORRECT_FULL_SEQUENCE = 8, + ACTION_SIMON_WRONG_SEQUENCE = 9, + ACTION_SIMON_ROUND_FINISHED = 10, +}; + +enum SimonColors +{ + SIMON_BLUE = 0, + SIMON_RED = 1, + SIMON_GREEN = 2, + SIMON_YELLOW = 3, + SIMON_MAX_COLORS = 4, +}; + +class npc_simon_bunny : public CreatureScript +{ + public: + npc_simon_bunny() : CreatureScript("npc_simon_bunny") { } + + struct npc_simon_bunnyAI : public ScriptedAI + { + npc_simon_bunnyAI(Creature* creature) : ScriptedAI(creature) { } + + bool large; + bool listening; + uint8 gameLevel; + uint8 fails; + uint8 gameTicks; + uint64 playerGUID; + uint32 clusterIds[SIMON_MAX_COLORS]; + float zCoordCorrection; + float searchDistance; + EventMap _events; + std::list<uint8> colorSequence, playableSequence, playerSequence; + + void UpdateAI(const uint32 diff) + { + _events.Update(diff); + + switch(_events.ExecuteEvent()) + { + case EVENT_SIMON_PERIODIC_PLAYER_CHECK: + if (!CheckPlayer()) + ResetNode(); + else + _events.ScheduleEvent(EVENT_SIMON_PERIODIC_PLAYER_CHECK, 2000); + break; + case EVENT_SIMON_SETUP_PRE_GAME: + SetUpPreGame(); + _events.CancelEvent(EVENT_SIMON_GAME_TICK); + _events.ScheduleEvent(EVENT_SIMON_PLAY_SEQUENCE, 1000); + break; + case EVENT_SIMON_PLAY_SEQUENCE: + if (!playableSequence.empty()) + { + PlayNextColor(); + _events.ScheduleEvent(EVENT_SIMON_PLAY_SEQUENCE, 1500); + } + else + { + listening = true; + DoCast(SPELL_VISUAL_START_PLAYER_LEVEL); + playerSequence.clear(); + PrepareClusters(); + gameTicks = 0; + _events.ScheduleEvent(EVENT_SIMON_GAME_TICK, 3000); + } + break; + case EVENT_SIMON_GAME_TICK: + DoCast(SPELL_AUDIBLE_GAME_TICK); + + if (gameTicks > gameLevel) + _events.ScheduleEvent(EVENT_SIMON_TOO_LONG_TIME, 500); + else + _events.ScheduleEvent(EVENT_SIMON_GAME_TICK, 3000); + gameTicks++; + break; + case EVENT_SIMON_RESET_CLUSTERS: + PrepareClusters(true); + break; + case EVENT_SIMON_TOO_LONG_TIME: + DoAction(ACTION_SIMON_WRONG_SEQUENCE); + break; + case EVENT_SIMON_ROUND_FINISHED: + DoAction(ACTION_SIMON_ROUND_FINISHED); + break; + } + } + + void DoAction(const int32 action) + { + switch (action) + { + case ACTION_SIMON_ROUND_FINISHED: + listening = false; + DoCast(SPELL_VISUAL_START_AI_LEVEL); + GiveRewardForLevel(gameLevel); + _events.CancelEventGroup(0); + if (gameLevel == 10) + ResetNode(); + else + _events.ScheduleEvent(EVENT_SIMON_SETUP_PRE_GAME, 1000); + break; + case ACTION_SIMON_CORRECT_FULL_SEQUENCE: + gameLevel++; + DoAction(ACTION_SIMON_ROUND_FINISHED); + break; + case ACTION_SIMON_WRONG_SEQUENCE: + GivePunishment(); + DoAction(ACTION_SIMON_ROUND_FINISHED); + break; + } + } + + // Called by color clusters script (go_simon_cluster) and used for knowing the button pressed by player + void SetData(uint32 type, uint32 /*data*/) + { + if (!listening) + return; + + uint8 pressedColor; + + if (type == clusterIds[SIMON_RED]) + pressedColor = SIMON_RED; + else if (type == clusterIds[SIMON_BLUE]) + pressedColor = SIMON_BLUE; + else if (type == clusterIds[SIMON_GREEN]) + pressedColor = SIMON_GREEN; + else if (type == clusterIds[SIMON_YELLOW]) + pressedColor = SIMON_YELLOW; + + PlayColor(pressedColor); + playerSequence.push_back(pressedColor); + _events.ScheduleEvent(EVENT_SIMON_RESET_CLUSTERS, 500); + CheckPlayerSequence(); + } + + // Used for getting involved player guid. Parameter id is used for defining if is a large(Monument) or small(Relic) node + void SetGUID(uint64 guid, int32 id) + { + me->SetFlying(true); + + large = (bool)id; + playerGUID = guid; + StartGame(); + } + + /* + Resets all variables and also find the ids of the four closests color clusters, since every simon + node have diferent ids for clusters this is absolutely NECESSARY. + */ + void StartGame() + { + listening = false; + gameLevel = 0; + fails = 0; + gameTicks = 0; + zCoordCorrection = large ? 8.0f : 2.75f; + searchDistance = large ? 13.0f : 5.0f; + colorSequence.clear(); + playableSequence.clear(); + playerSequence.clear(); + me->SetFloatValue(OBJECT_FIELD_SCALE_X, large ? 2 : 1); + + std::list<WorldObject*> ClusterList; + Trinity::AllWorldObjectsInRange objects(me, searchDistance); + Trinity::WorldObjectListSearcher<Trinity::AllWorldObjectsInRange> searcher(me, ClusterList, objects); + me->VisitNearbyObject(searchDistance, searcher); + + for (std::list<WorldObject*>::const_iterator i = ClusterList.begin(); i != ClusterList.end(); ++i) + { + if (GameObject* go = (*i)->ToGameObject()) + { + // We are checking for displayid because all simon nodes have 4 clusters with different entries + if (large) + { + switch (go->GetGOInfo()->displayId) + { + case GO_BLUE_CLUSTER_DISPLAY_LARGE: clusterIds[SIMON_BLUE] = go->GetEntry(); break; + case GO_RED_CLUSTER_DISPLAY_LARGE: clusterIds[SIMON_RED] = go->GetEntry(); break; + case GO_GREEN_CLUSTER_DISPLAY_LARGE: clusterIds[SIMON_GREEN] = go->GetEntry(); break; + case GO_YELLOW_CLUSTER_DISPLAY_LARGE: clusterIds[SIMON_YELLOW] = go->GetEntry(); break; + } + } + else + { + switch (go->GetGOInfo()->displayId) + { + case GO_BLUE_CLUSTER_DISPLAY: clusterIds[SIMON_BLUE] = go->GetEntry(); break; + case GO_RED_CLUSTER_DISPLAY: clusterIds[SIMON_RED] = go->GetEntry(); break; + case GO_GREEN_CLUSTER_DISPLAY: clusterIds[SIMON_GREEN] = go->GetEntry(); break; + case GO_YELLOW_CLUSTER_DISPLAY: clusterIds[SIMON_YELLOW] = go->GetEntry(); break; + } + } + } + } + + _events.Reset(); + _events.ScheduleEvent(EVENT_SIMON_ROUND_FINISHED, 1000); + _events.ScheduleEvent(EVENT_SIMON_PERIODIC_PLAYER_CHECK, 2000); + + if (GameObject* relic = me->FindNearestGameObject(large ? GO_APEXIS_MONUMENT : GO_APEXIS_RELIC, searchDistance)) + relic->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + } + + // Called when despawning the bunny. Sets all the node GOs to their default states. + void ResetNode() + { + DoPlaySoundToSet(me, SOUND_DISABLE_NODE); + + for (uint32 clusterId = SIMON_BLUE; clusterId < SIMON_MAX_COLORS; clusterId++) + if (GameObject* cluster = me->FindNearestGameObject(clusterIds[clusterId], searchDistance)) + cluster->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + + for (uint32 auraId = GO_AURA_BLUE; auraId <= GO_AURA_YELLOW; auraId++) + if (GameObject* auraGo = me->FindNearestGameObject(auraId, searchDistance)) + auraGo->RemoveFromWorld(); + + if (GameObject* relic = me->FindNearestGameObject(large ? GO_APEXIS_MONUMENT : GO_APEXIS_RELIC, searchDistance)) + relic->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + + me->ForcedDespawn(1000); + } + + /* + Called on every button click of player. Adds the clicked color to the player created sequence and + checks if it corresponds to the AI created sequence. If so, incremente gameLevel and start a new + round, if not, give punishment and restart current level. + */ + void CheckPlayerSequence() + { + bool correct = true; + if (playerSequence.size() <= colorSequence.size()) + for (std::list<uint8>::const_iterator i = playerSequence.begin(), j = colorSequence.begin(); i != playerSequence.end(); ++i, ++j) + if ((*i) != (*j)) + correct = false; + + if (correct && (playerSequence.size() == colorSequence.size())) + DoAction(ACTION_SIMON_CORRECT_FULL_SEQUENCE); + else if (!correct) + DoAction(ACTION_SIMON_WRONG_SEQUENCE); + } + + /* + Generates a random sequence of colors depending on the gameLevel. We also copy this sequence to + the playableSequence wich will be used when playing the sequence to the player. + */ + void GenerateColorSequence() + { + colorSequence.clear(); + for (uint8 i = 0; i <= gameLevel; i++) + colorSequence.push_back(RAND(SIMON_BLUE, SIMON_RED, SIMON_GREEN, SIMON_YELLOW)); + + for (std::list<uint8>::const_iterator i = colorSequence.begin(); i != colorSequence.end(); ++i) + playableSequence.push_back(*i); + } + + + // Remove any existant glowing auras over clusters and set clusters ready for interating with them. + void PrepareClusters(bool clustersOnly = false) + { + for (uint32 clusterId = SIMON_BLUE; clusterId < SIMON_MAX_COLORS; clusterId++) + if (GameObject* cluster = me->FindNearestGameObject(clusterIds[clusterId], searchDistance)) + cluster->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + + if (clustersOnly) + return; + + for (uint32 auraId = GO_AURA_BLUE; auraId <= GO_AURA_YELLOW; auraId++) + if (GameObject* auraGo = me->FindNearestGameObject(auraId, searchDistance)) + auraGo->RemoveFromWorld(); + } + + /* + Called when AI is playing the sequence for player. We cast the visual spell and then remove the + casted color from the casting sequence. + */ + void PlayNextColor() + { + PlayColor(*playableSequence.begin()); + playableSequence.erase(playableSequence.begin()); + } + + // Casts a spell and plays a sound depending on parameter color. + void PlayColor(uint8 color) + { + switch (color) + { + case SIMON_BLUE: + DoCast(SPELL_VISUAL_BLUE); + DoPlaySoundToSet(me, SOUND_BLUE); + break; + case SIMON_GREEN: + DoCast(SPELL_VISUAL_GREEN); + DoPlaySoundToSet(me, SOUND_GREEN); + break; + case SIMON_RED: + DoCast(SPELL_VISUAL_RED); + DoPlaySoundToSet(me, SOUND_RED); + break; + case SIMON_YELLOW: + DoCast(SPELL_VISUAL_YELLOW); + DoPlaySoundToSet(me, SOUND_YELLOW); + break; + } + } + + /* + Creates the transparent glowing auras on every cluster of this node. + After calling this function bunny is teleported to the center of the node. + */ + void SetUpPreGame() + { + for (uint32 clusterId = SIMON_BLUE; clusterId < SIMON_MAX_COLORS; clusterId++) + { + if (GameObject* cluster = me->FindNearestGameObject(clusterIds[clusterId], 2.0f*searchDistance)) + { + cluster->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + + // break since we don't need glowing auras for large clusters + if (large) + break; + + float x, y, z, o; + cluster->GetPosition(x, y, z, o); + me->NearTeleportTo(x, y, z, o); + + uint32 preGameSpellId; + if (cluster->GetEntry() == clusterIds[SIMON_RED]) + preGameSpellId = SPELL_PRE_GAME_RED; + else if (cluster->GetEntry() == clusterIds[SIMON_BLUE]) + preGameSpellId = SPELL_PRE_GAME_BLUE; + else if (cluster->GetEntry() == clusterIds[SIMON_GREEN]) + preGameSpellId = SPELL_PRE_GAME_GREEN; + else if (cluster->GetEntry() == clusterIds[SIMON_YELLOW]) + preGameSpellId = SPELL_PRE_GAME_YELLOW; + else break; + + me->CastSpell(cluster, preGameSpellId, true); + } + } + + if (GameObject* relic = me->FindNearestGameObject(large ? GO_APEXIS_MONUMENT : GO_APEXIS_RELIC, searchDistance)) + { + float x, y, z, o; + relic->GetPosition(x, y, z, o); + me->NearTeleportTo(x, y, z + zCoordCorrection, o); + } + + GenerateColorSequence(); + } + + // Handles the spell rewards. The spells also have the QuestCompleteEffect, so quests credits are working. + void GiveRewardForLevel(uint8 level) + { + uint32 rewSpell; + switch (level) + { + case 6: + if (large) + GivePunishment(); + else + rewSpell = SPELL_REWARD_BUFF_1; + break; + case 8: + rewSpell = SPELL_REWARD_BUFF_2; + break; + case 10: + rewSpell = SPELL_REWARD_BUFF_3; + break; + default: + rewSpell = 0; + } + + if (rewSpell) + if (Player* player = me->GetPlayer(*me, playerGUID)) + DoCast(player, rewSpell, true); + } + + /* + Depending on the number of failed pushes for player the damage of the spell scales, so we first + cast the spell on the target that hits for 50 and shows the visual and then forces the player + to cast the damaging spell on it self with the modified basepoints. + 4 fails = death. + On large nodes punishment and reward are the same, summoning the Apexis Guardian. + */ + void GivePunishment() + { + if (large) + { + if (Player* player = me->GetPlayer(*me, playerGUID)) + if (Creature* guardian = me->SummonCreature(NPC_APEXIS_GUARDIAN, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() - zCoordCorrection, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000)) + guardian->AI()->AttackStart(player); + + ResetNode(); + } + else + { + fails++; + + if (Player* player = me->GetPlayer(*me, playerGUID)) + DoCast(player, SPELL_BAD_PRESS_TRIGGER, true); + + if (fails >= 4) + ResetNode(); + } + } + + void SpellHitTarget(Unit* target, const SpellInfo* spell) + { + // Cast SPELL_BAD_PRESS_DAMAGE with scaled basepoints when the visual hits the target. + // Need Fix: When SPELL_BAD_PRESS_TRIGGER hits target it triggers spell SPELL_BAD_PRESS_DAMAGE by itself + // so player gets damage equal to calculated damage dbc basepoints for SPELL_BAD_PRESS_DAMAGE (~50) + if (spell->Id == SPELL_BAD_PRESS_TRIGGER) + { + int32 bp = (int32)((float)(fails)*0.33f*target->GetMaxHealth()); + target->CastCustomSpell(target, SPELL_BAD_PRESS_DAMAGE, &bp, NULL, NULL, true); + } + } + + // Checks if player has already die or has get too far from the current node + bool CheckPlayer() + { + if (Player* player = me->GetPlayer(*me, playerGUID)) + { + if (player->isDead()) + return false; + if (player->GetDistance2d(me) >= 2.0f*searchDistance) + { + GivePunishment(); + return false; + } + } + else + return false; + + return true; + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_simon_bunnyAI(creature); + } +}; + +class go_simon_cluster : public GameObjectScript +{ + public: + go_simon_cluster() : GameObjectScript("go_simon_cluster") { } + + bool OnGossipHello(Player* player, GameObject* go) + { + if (Creature* bunny = go->FindNearestCreature(NPC_SIMON_BUNNY, 12.0f, true)) + bunny->AI()->SetData(go->GetEntry(), 0); + + player->CastSpell(player, go->GetGOInfo()->goober.spellId, true); + go->AddUse(); + return true; + } +}; + +enum ApexisRelic +{ + QUEST_CRYSTALS = 11025, + GOSSIP_TEXT_ID = 10948, + + ITEM_APEXIS_SHARD = 32569, + SPELL_TAKE_REAGENTS_SOLO = 41145, + SPELL_TAKE_REAGENTS_GROUP = 41146, +}; + +class go_apexis_relic : public GameObjectScript +{ + public: + go_apexis_relic() : GameObjectScript("go_apexis_relic") { } + + bool OnGossipHello(Player* player, GameObject* go) + { + player->PrepareGossipMenu(go, go->GetGOInfo()->questgiver.gossipID); + player->SendPreparedGossip(go); + return true; + } + + bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 /*action*/) + { + player->CLOSE_GOSSIP_MENU(); + + bool large = (go->GetEntry() == GO_APEXIS_MONUMENT); + if (player->HasItemCount(ITEM_APEXIS_SHARD, large ? 35 : 1)) + { + player->CastSpell(player, large ? SPELL_TAKE_REAGENTS_GROUP : SPELL_TAKE_REAGENTS_SOLO, false); + + if (Creature* bunny = player->SummonCreature(NPC_SIMON_BUNNY, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ())) + bunny->AI()->SetGUID(player->GetGUID(), large); + } + + return true; + } +}; + void AddSC_blades_edge_mountains() { new mobs_bladespire_ogre(); @@ -573,4 +1131,7 @@ void AddSC_blades_edge_mountains() new npc_bloodmaul_brutebane(); new npc_ogre_brute(); new go_thunderspike(); + new npc_simon_bunny(); + new go_simon_cluster(); + new go_apexis_relic(); } diff --git a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp index 2f725e78666..2f6e0823da1 100644 --- a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp +++ b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -110,7 +110,7 @@ class boss_doomlord_kazzak : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) diff --git a/src/server/scripts/Outland/boss_doomwalker.cpp b/src/server/scripts/Outland/boss_doomwalker.cpp index 5cb84eb1303..c4bd232cc85 100644 --- a/src/server/scripts/Outland/boss_doomwalker.cpp +++ b/src/server/scripts/Outland/boss_doomwalker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -103,7 +103,7 @@ class boss_doomwalker : public CreatureScript _events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = _events.ExecuteEvent()) diff --git a/src/server/scripts/Outland/hellfire_peninsula.cpp b/src/server/scripts/Outland/hellfire_peninsula.cpp index e28e1c3c685..7d4de409b8b 100644 --- a/src/server/scripts/Outland/hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/hellfire_peninsula.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp index bae3aa65b98..668db2efcbb 100644 --- a/src/server/scripts/Outland/nagrand.cpp +++ b/src/server/scripts/Outland/nagrand.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -632,7 +632,7 @@ public: if (!UpdateVictim()) return; - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; if (ChainLightningTimer <= diff) diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp index e5ee8d19c59..79811069402 100644 --- a/src/server/scripts/Outland/netherstorm.cpp +++ b/src/server/scripts/Outland/netherstorm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -796,7 +796,7 @@ public: Materialize = true; } - if (me->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || me->HasUnitState(UNIT_STAT_ROOT)) // if the mob is rooted/slowed by spells eg.: Entangling Roots, Frost Nova, Hamstring, Crippling Poison, etc. => remove it + if (me->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || me->HasUnitState(UNIT_STATE_ROOT)) // if the mob is rooted/slowed by spells eg.: Entangling Roots, Frost Nova, Hamstring, Crippling Poison, etc. => remove it DoCast(me, SPELL_PHASE_SLIP); if (!UpdateVictim()) diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp index ecbdb921567..19c4754c4fd 100644 --- a/src/server/scripts/Outland/shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/shadowmoon_valley.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -117,7 +117,7 @@ public: { bIsEating = true; EatTimer = 7000; - me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED); + me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED); } } @@ -1195,7 +1195,7 @@ public: AggroTargetGUID = 0; Timers = false; - me->AddUnitState(UNIT_STAT_ROOT); + me->AddUnitState(UNIT_STATE_ROOT); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->SetTarget(0); } @@ -1239,7 +1239,7 @@ public: if (Player* AggroTarget = (Unit::GetPlayer(*me, AggroTargetGUID))) { me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - me->ClearUnitState(UNIT_STAT_ROOT); + me->ClearUnitState(UNIT_STATE_ROOT); float x, y, z; AggroTarget->GetPosition(x, y, z); diff --git a/src/server/scripts/Outland/shattrath_city.cpp b/src/server/scripts/Outland/shattrath_city.cpp index 6ac60e2086b..ed68f55aeb5 100644 --- a/src/server/scripts/Outland/shattrath_city.cpp +++ b/src/server/scripts/Outland/shattrath_city.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/terokkar_forest.cpp b/src/server/scripts/Outland/terokkar_forest.cpp index 91fae26ec74..043b74b6924 100644 --- a/src/server/scripts/Outland/terokkar_forest.cpp +++ b/src/server/scripts/Outland/terokkar_forest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/zangarmarsh.cpp b/src/server/scripts/Outland/zangarmarsh.cpp index 9aecbeb67be..fc7a3f4d667 100644 --- a/src/server/scripts/Outland/zangarmarsh.cpp +++ b/src/server/scripts/Outland/zangarmarsh.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Spells/CMakeLists.txt b/src/server/scripts/Spells/CMakeLists.txt index 0df7cf907b6..496324e4de9 100644 --- a/src/server/scripts/Spells/CMakeLists.txt +++ b/src/server/scripts/Spells/CMakeLists.txt @@ -23,6 +23,7 @@ set(scripts_STAT_SRCS Spells/spell_mage.cpp Spells/spell_paladin.cpp Spells/spell_item.cpp + Spells/spell_holiday.cpp ) message(" -> Prepared: Spells") diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 86b92eebfe3..f62d62c671a 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 17849027dd4..130f61565f7 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 298e9b6410e..9899e50cd28 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -342,11 +342,8 @@ class spell_gen_remove_flight_auras : public SpellScriptLoader PrepareSpellScript(spell_gen_remove_flight_auras_SpellScript); void HandleScript(SpellEffIndex /*effIndex*/) { - Unit* target = GetHitUnit(); - if (!target) - return; - target->RemoveAurasByType(SPELL_AURA_FLY); - target->RemoveAurasByType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED); + GetHitUnit()->RemoveAurasByType(SPELL_AURA_FLY); + GetHitUnit()->RemoveAurasByType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED); } void Register() @@ -412,6 +409,72 @@ class spell_gen_leeching_swarm : public SpellScriptLoader } }; +enum EluneCandle +{ + NPC_OMEN = 15467, + + SPELL_ELUNE_CANDLE_OMEN_HEAD = 26622, + SPELL_ELUNE_CANDLE_OMEN_CHEST = 26624, + SPELL_ELUNE_CANDLE_OMEN_HAND_R = 26625, + SPELL_ELUNE_CANDLE_OMEN_HAND_L = 26649, + SPELL_ELUNE_CANDLE_NORMAL = 26636, +}; + +class spell_gen_elune_candle : public SpellScriptLoader +{ + public: + spell_gen_elune_candle() : SpellScriptLoader("spell_gen_elune_candle") {} + + class spell_gen_elune_candle_SpellScript : public SpellScript + { + PrepareSpellScript(spell_gen_elune_candle_SpellScript); + bool Validate(SpellInfo const* /*spellEntry*/) + { + if (!sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_OMEN_HEAD)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_OMEN_CHEST)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_OMEN_HAND_R)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_OMEN_HAND_L)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_NORMAL)) + return false; + return true; + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + uint32 spellId = 0; + + if (GetHitUnit()->GetEntry() == NPC_OMEN) + { + switch (urand(0, 3)) + { + case 0: spellId = SPELL_ELUNE_CANDLE_OMEN_HEAD; break; + case 1: spellId = SPELL_ELUNE_CANDLE_OMEN_CHEST; break; + case 2: spellId = SPELL_ELUNE_CANDLE_OMEN_HAND_R; break; + case 3: spellId = SPELL_ELUNE_CANDLE_OMEN_HAND_L; break; + } + } + else + spellId = SPELL_ELUNE_CANDLE_NORMAL; + + GetCaster()->CastSpell(GetHitUnit(), spellId, true, NULL); + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_gen_elune_candle_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_gen_elune_candle_SpellScript(); + } +}; + // 24750 Trick enum eTrickSpells { @@ -878,11 +941,8 @@ class spell_generic_clone : public SpellScriptLoader void HandleScriptEffect(SpellEffIndex effIndex) { PreventHitDefaultEffect(effIndex); - Unit* caster = GetCaster(); uint32 spellId = uint32(GetSpellInfo()->Effects[effIndex].CalcValue()); - - if (Unit* target = GetHitUnit()) - target->CastSpell(caster, spellId, true); + GetHitUnit()->CastSpell(GetCaster(), spellId, true); } void Register() @@ -1445,7 +1505,17 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader if (GetUnitOwner()->GetTypeId() != TYPEID_PLAYER) return; - LFGDungeonEntry const* randomDungeon = sLFGDungeonStore.LookupEntry(*(sLFGMgr->GetSelectedDungeons(GetUnitOwner()->GetGUID()).begin())); + const LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(GetUnitOwner()->GetGUID()); + LfgDungeonSet::const_iterator itr = dungeons.begin(); + + if (itr == dungeons.end()) + { + Remove(AURA_REMOVE_BY_DEFAULT); + return; + } + + + LFGDungeonEntry const* randomDungeon = sLFGDungeonStore.LookupEntry(*itr); Group* group = GetUnitOwner()->ToPlayer()->GetGroup(); Map const* map = GetUnitOwner()->GetMap(); if (group && group->isLFGGroup()) @@ -1471,6 +1541,816 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader } }; +enum DalaranDisguiseSpells +{ + SPELL_SUNREAVER_DISGUISE_TRIGGER = 69672, + SPELL_SUNREAVER_DISGUISE_FEMALE = 70973, + SPELL_SUNREAVER_DISGUISE_MALE = 70974, + + SPELL_SILVER_COVENANT_DISGUISE_TRIGGER = 69673, + SPELL_SILVER_COVENANT_DISGUISE_FEMALE = 70971, + SPELL_SILVER_COVENANT_DISGUISE_MALE = 70972, +}; + +class spell_gen_dalaran_disguise : public SpellScriptLoader +{ + public: + spell_gen_dalaran_disguise(const char* name) : SpellScriptLoader(name) {} + + class spell_gen_dalaran_disguise_SpellScript : public SpellScript + { + PrepareSpellScript(spell_gen_dalaran_disguise_SpellScript); + bool Validate(SpellInfo const* spellEntry) + { + switch (spellEntry->Id) + { + case SPELL_SUNREAVER_DISGUISE_TRIGGER: + if (!sSpellMgr->GetSpellInfo(SPELL_SUNREAVER_DISGUISE_FEMALE)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_SUNREAVER_DISGUISE_MALE)) + return false; + break; + case SPELL_SILVER_COVENANT_DISGUISE_TRIGGER: + if (!sSpellMgr->GetSpellInfo(SPELL_SILVER_COVENANT_DISGUISE_FEMALE)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_SILVER_COVENANT_DISGUISE_MALE)) + return false; + break; + } + return true; + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Player* player = GetHitPlayer()) + { + uint8 gender = player->getGender(); + + uint32 spellId = GetSpellInfo()->Id; + + switch (spellId) + { + case SPELL_SUNREAVER_DISGUISE_TRIGGER: + spellId = gender ? SPELL_SUNREAVER_DISGUISE_FEMALE : SPELL_SUNREAVER_DISGUISE_MALE; + break; + case SPELL_SILVER_COVENANT_DISGUISE_TRIGGER: + spellId = gender ? SPELL_SILVER_COVENANT_DISGUISE_FEMALE : SPELL_SILVER_COVENANT_DISGUISE_MALE; + break; + default: + break; + } + + GetCaster()->CastSpell(player, spellId, true); + } + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_gen_dalaran_disguise_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_gen_dalaran_disguise_SpellScript(); + } +}; + +/* DOCUMENTATION: Break-Shield spells + Break-Shield spells can be classified in three groups: + + - Spells on vehicle bar used by players: + + EFFECT_0: SCRIPT_EFFECT + + EFFECT_1: NONE + + EFFECT_2: NONE + - Spells casted by players triggered by script: + + EFFECT_0: SCHOOL_DAMAGE + + EFFECT_1: SCRIPT_EFFECT + + EFFECT_2: FORCE_CAST + - Spells casted by NPCs on players: + + EFFECT_0: SCHOOL_DAMAGE + + EFFECT_1: SCRIPT_EFFECT + + EFFECT_2: NONE + + In the following script we handle the SCRIPT_EFFECT for effIndex EFFECT_0 and EFFECT_1. + - When handling EFFECT_0 we're in the "Spells on vehicle bar used by players" case + and we'll trigger "Spells casted by players triggered by script" + - When handling EFFECT_1 we're in the "Spells casted by players triggered by script" + or "Spells casted by NPCs on players" so we'll search for the first defend layer and drop it. +*/ + +enum BreakShieldSpells +{ + SPELL_BREAK_SHIELD_DAMAGE_2K = 62626, + SPELL_BREAK_SHIELD_DAMAGE_10K = 64590, + + SPELL_BREAK_SHIELD_TRIGGER_FACTION_MOUNTS = 62575, // Also on ToC5 mounts + SPELL_BREAK_SHIELD_TRIGGER_CAMPAING_WARHORSE = 64595, + SPELL_BREAK_SHIELD_TRIGGER_UNK = 66480, +}; + +class spell_gen_break_shield: public SpellScriptLoader +{ + public: + spell_gen_break_shield(const char* name) : SpellScriptLoader(name) {} + + class spell_gen_break_shield_SpellScript : public SpellScript + { + PrepareSpellScript(spell_gen_break_shield_SpellScript) + + void HandleScriptEffect(SpellEffIndex effIndex) + { + Unit* target = GetHitUnit(); + + switch (effIndex) + { + case EFFECT_0: // On spells wich trigger the damaging spell (and also the visual) + { + uint32 spellId; + + switch (GetSpellInfo()->Id) + { + case SPELL_BREAK_SHIELD_TRIGGER_UNK: + case SPELL_BREAK_SHIELD_TRIGGER_CAMPAING_WARHORSE: + spellId = SPELL_BREAK_SHIELD_DAMAGE_10K; + break; + case SPELL_BREAK_SHIELD_TRIGGER_FACTION_MOUNTS: + spellId = SPELL_BREAK_SHIELD_DAMAGE_2K; + break; + default: + return; + } + + if (Unit* rider = GetCaster()->GetCharmer()) + rider->CastSpell(target, spellId, false); + else + GetCaster()->CastSpell(target, spellId, false); + break; + } + case EFFECT_1: // On damaging spells, for removing a defend layer + { + Unit::AuraApplicationMap const& auras = target->GetAppliedAuras(); + for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr) + { + Aura* aura = itr->second->GetBase(); + SpellInfo const* auraInfo = aura->GetSpellInfo(); + if (aura && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN)) + { + aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL); + // Remove dummys from rider (Necessary for updating visual shields) + if (Unit* rider = target->GetCharmer()) + if (Aura* defend = rider->GetAura(aura->GetId())) + defend->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL); + break; + } + } + break; + } + } + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_gen_break_shield_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_gen_break_shield_SpellScript(); + } +}; + +/* DOCUMENTATION: Charge spells + Charge spells can be classified in four groups: + + - Spells on vehicle bar used by players: + + EFFECT_0: SCRIPT_EFFECT + + EFFECT_1: TRIGGER_SPELL + + EFFECT_2: NONE + - Spells casted by player's mounts triggered by script: + + EFFECT_0: CHARGE + + EFFECT_1: TRIGGER_SPELL + + EFFECT_2: APPLY_AURA + - Spells casted by players on the target triggered by script: + + EFFECT_0: SCHOOL_DAMAGE + + EFFECT_1: SCRIPT_EFFECT + + EFFECT_2: NONE + - Spells casted by NPCs on players: + + EFFECT_0: SCHOOL_DAMAGE + + EFFECT_1: CHARGE + + EFFECT_2: SCRIPT_EFFECT + + In the following script we handle the SCRIPT_EFFECT and CHARGE + - When handling SCRIPT_EFFECT: + + EFFECT_0: Corresponds to "Spells on vehicle bar used by players" and we make player's mount cast + the charge effect on the current target ("Spells casted by player's mounts triggered by script"). + + EFFECT_1 and EFFECT_2: Triggered when "Spells casted by player's mounts triggered by script" hits target, + corresponding to "Spells casted by players on the target triggered by script" and "Spells casted by + NPCs on players" and we check Defend layers and drop a charge of the first found. + - When handling CHARGE: + + Only launched for "Spells casted by player's mounts triggered by script", makes the player cast the + damaging spell on target with a small chance of failing it. +*/ + +enum ChargeSpells +{ + SPELL_CHARGE_DAMAGE_8K5 = 62874, + SPELL_CHARGE_DAMAGE_20K = 68498, + SPELL_CHARGE_DAMAGE_45K = 64591, + + SPELL_CHARGE_CHARGING_EFFECT_8K5 = 63661, + SPELL_CHARGE_CHARGING_EFFECT_20K_1 = 68284, + SPELL_CHARGE_CHARGING_EFFECT_20K_2 = 68501, + SPELL_CHARGE_CHARGING_EFFECT_45K_1 = 62563, + SPELL_CHARGE_CHARGING_EFFECT_45K_2 = 66481, + + SPELL_CHARGE_TRIGGER_FACTION_MOUNTS = 62960, + SPELL_CHARGE_TRIGGER_TRIAL_CHAMPION = 68282, + + SPELL_CHARGE_MISS_EFFECT = 62977, +}; + +class spell_gen_mounted_charge: public SpellScriptLoader +{ + public: + spell_gen_mounted_charge() : SpellScriptLoader("spell_gen_mounted_charge") { } + + class spell_gen_mounted_charge_SpellScript : public SpellScript + { + PrepareSpellScript(spell_gen_mounted_charge_SpellScript) + + void HandleScriptEffect(SpellEffIndex effIndex) + { + Unit* target = GetHitUnit(); + + switch (effIndex) + { + case EFFECT_0: // On spells wich trigger the damaging spell (and also the visual) + { + uint32 spellId; + + switch (GetSpellInfo()->Id) + { + case SPELL_CHARGE_TRIGGER_TRIAL_CHAMPION: + spellId = SPELL_CHARGE_CHARGING_EFFECT_20K_1; + case SPELL_CHARGE_TRIGGER_FACTION_MOUNTS: + spellId = SPELL_CHARGE_CHARGING_EFFECT_8K5; + break; + default: + return; + } + + // If target isn't a training dummy there's a chance of failing the charge + if (!target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE) && roll_chance_f(12.5f)) + spellId = SPELL_CHARGE_MISS_EFFECT; + + if (Unit* vehicle = GetCaster()->GetVehicleBase()) + vehicle->CastSpell(target, spellId, false); + else + GetCaster()->CastSpell(target, spellId, false); + break; + } + case EFFECT_1: // On damaging spells, for removing a defend layer + case EFFECT_2: + { + Unit::AuraApplicationMap const& auras = target->GetAppliedAuras(); + for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr) + { + Aura* aura = itr->second->GetBase(); + SpellInfo const* auraInfo = aura->GetSpellInfo(); + if (aura && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN)) + { + aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL); + // Remove dummys from rider (Necessary for updating visual shields) + if (Unit* rider = target->GetCharmer()) + if (Aura* defend = rider->GetAura(aura->GetId())) + defend->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL); + break; + } + } + break; + } + } + } + + void HandleChargeEffect(SpellEffIndex effIndex) + { + uint32 spellId; + + switch (GetSpellInfo()->Id) + { + case SPELL_CHARGE_CHARGING_EFFECT_8K5: + spellId = SPELL_CHARGE_DAMAGE_8K5; + break; + case SPELL_CHARGE_CHARGING_EFFECT_20K_1: + case SPELL_CHARGE_CHARGING_EFFECT_20K_2: + spellId = SPELL_CHARGE_DAMAGE_20K; + break; + case SPELL_CHARGE_CHARGING_EFFECT_45K_1: + case SPELL_CHARGE_CHARGING_EFFECT_45K_2: + spellId = SPELL_CHARGE_DAMAGE_45K; + break; + default: + return; + } + + if (Unit* rider = GetCaster()->GetCharmer()) + rider->CastSpell(GetHitUnit(), spellId, false); + else + GetCaster()->CastSpell(GetHitUnit(), spellId, false); + } + + void Register() + { + SpellInfo const* spell = sSpellMgr->GetSpellInfo(m_scriptSpellId); + + if (spell->HasEffect(SPELL_EFFECT_SCRIPT_EFFECT)) + OnEffectHitTarget += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT); + + if (spell->Effects[EFFECT_0].Effect == SPELL_EFFECT_CHARGE) + OnEffectHitTarget += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleChargeEffect, EFFECT_0, SPELL_EFFECT_CHARGE); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_gen_mounted_charge_SpellScript(); + } +}; + +enum DefendVisuals +{ + SPELL_VISUAL_SHIELD_1 = 63130, + SPELL_VISUAL_SHIELD_2 = 63131, + SPELL_VISUAL_SHIELD_3 = 63132, +}; + +class spell_gen_defend : public SpellScriptLoader +{ + public: + spell_gen_defend() : SpellScriptLoader("spell_gen_defend") { } + + class spell_gen_defendAuraScript : public AuraScript + { + PrepareAuraScript(spell_gen_defendAuraScript); + + bool Validate(SpellInfo const* /*spellEntry*/) + { + if (!sSpellMgr->GetSpellInfo(SPELL_VISUAL_SHIELD_1)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_VISUAL_SHIELD_2)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_VISUAL_SHIELD_3)) + return false; + return true; + } + + void RefreshVisualShields(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) + { + if (Unit* caster = GetCaster()) + { + Unit* target = GetTarget(); + + for (uint8 i = 0; i < GetSpellInfo()->StackAmount; ++i) + target->RemoveAurasDueToSpell(SPELL_VISUAL_SHIELD_1 + i); + + target->CastSpell(target, SPELL_VISUAL_SHIELD_1 + GetAura()->GetStackAmount() - 1, true, NULL, aurEff); + } + else + GetTarget()->RemoveAurasDueToSpell(GetId()); + } + + void RemoveVisualShields(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + for (uint8 i = 0; i < GetSpellInfo()->StackAmount; ++i) + GetTarget()->RemoveAurasDueToSpell(SPELL_VISUAL_SHIELD_1 + i); + } + + void RemoveDummyFromDriver(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (Unit* caster = GetCaster()) + if (TempSummon* vehicle = caster->ToTempSummon()) + if (Unit* rider = vehicle->GetSummoner()) + rider->RemoveAurasDueToSpell(GetId()); + } + + void Register() + { + SpellInfo const* spell = sSpellMgr->GetSpellInfo(m_scriptSpellId); + + // Defend spells casted by NPCs (add visuals) + if (spell->Effects[EFFECT_0].ApplyAuraName == SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN) + { + AfterEffectApply += AuraEffectApplyFn(spell_gen_defendAuraScript::RefreshVisualShields, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); + OnEffectRemove += AuraEffectRemoveFn(spell_gen_defendAuraScript::RemoveVisualShields, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK); + } + + // Remove Defend spell from player when he dismounts + if (spell->Effects[EFFECT_2].ApplyAuraName == SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN) + OnEffectRemove += AuraEffectRemoveFn(spell_gen_defendAuraScript::RemoveDummyFromDriver, EFFECT_2, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL); + + // Defend spells casted by players (add/remove visuals) + if (spell->Effects[EFFECT_1].ApplyAuraName == SPELL_AURA_DUMMY) + { + AfterEffectApply += AuraEffectApplyFn(spell_gen_defendAuraScript::RefreshVisualShields, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); + OnEffectRemove += AuraEffectRemoveFn(spell_gen_defendAuraScript::RemoveVisualShields, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK); + } + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_gen_defendAuraScript(); + } +}; + +enum MountedDuelSpells +{ + SPELL_ON_TOURNAMENT_MOUNT = 63034, + SPELL_MOUNTED_DUEL = 62875, +}; + +class spell_gen_tournament_duel : public SpellScriptLoader +{ + public: + spell_gen_tournament_duel() : SpellScriptLoader("spell_gen_tournament_duel") { } + + class spell_gen_tournament_duel_SpellScript : public SpellScript + { + PrepareSpellScript(spell_gen_tournament_duel_SpellScript); + + bool Validate(SpellInfo const* /*spellEntry*/) + { + if (!sSpellMgr->GetSpellInfo(SPELL_ON_TOURNAMENT_MOUNT)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_MOUNTED_DUEL)) + return false; + return true; + } + + void HandleScriptEffect(SpellEffIndex effIndex) + { + if (Unit* rider = GetCaster()->GetCharmer()) + { + if (Player* plrTarget = GetHitPlayer()) + { + if (plrTarget->HasAura(SPELL_ON_TOURNAMENT_MOUNT) && plrTarget->GetVehicleBase()) + rider->CastSpell(plrTarget, SPELL_MOUNTED_DUEL, true); + } + else if (Unit* unitTarget = GetHitUnit()) + { + if (unitTarget->GetCharmer() && unitTarget->GetCharmer()->GetTypeId() == TYPEID_PLAYER && unitTarget->GetCharmer()->HasAura(SPELL_ON_TOURNAMENT_MOUNT)) + rider->CastSpell(unitTarget->GetCharmer(), SPELL_MOUNTED_DUEL, true); + } + } + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_gen_tournament_duel_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_gen_tournament_duel_SpellScript(); + } +}; + +enum TournamentMountsSpells +{ + SPELL_LANCE_EQUIPPED = 62853, +}; + +class spell_gen_summon_tournament_mount : public SpellScriptLoader +{ + public: + spell_gen_summon_tournament_mount() : SpellScriptLoader("spell_gen_summon_tournament_mount") { } + + class spell_gen_summon_tournament_mount_SpellScript : public SpellScript + { + PrepareSpellScript(spell_gen_summon_tournament_mount_SpellScript); + + bool Validate(SpellInfo const* /*spellEntry*/) + { + if (!sSpellMgr->GetSpellInfo(SPELL_LANCE_EQUIPPED)) + return false; + return true; + } + + SpellCastResult CheckIfLanceEquiped() + { + if (GetCaster()->IsInDisallowedMountForm()) + GetCaster()->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT); + + if (!GetCaster()->HasAura(SPELL_LANCE_EQUIPPED)) + { + SetCustomCastResultMessage(SPELL_CUSTOM_ERROR_MUST_HAVE_LANCE_EQUIPPED); + return SPELL_FAILED_CUSTOM_ERROR; + } + + return SPELL_CAST_OK; + } + + void Register() + { + OnCheckCast += SpellCheckCastFn(spell_gen_summon_tournament_mount_SpellScript::CheckIfLanceEquiped); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_gen_summon_tournament_mount_SpellScript(); + } +}; + +enum TournamentPennantSpells +{ + SPELL_PENNANT_STORMWIND_ASPIRANT = 62595, + SPELL_PENNANT_STORMWIND_VALIANT = 62596, + SPELL_PENNANT_STORMWIND_CHAMPION = 62594, + SPELL_PENNANT_GNOMEREGAN_ASPIRANT = 63394, + SPELL_PENNANT_GNOMEREGAN_VALIANT = 63395, + SPELL_PENNANT_GNOMEREGAN_CHAMPION = 63396, + SPELL_PENNANT_SEN_JIN_ASPIRANT = 63397, + SPELL_PENNANT_SEN_JIN_VALIANT = 63398, + SPELL_PENNANT_SEN_JIN_CHAMPION = 63399, + SPELL_PENNANT_SILVERMOON_ASPIRANT = 63401, + SPELL_PENNANT_SILVERMOON_VALIANT = 63402, + SPELL_PENNANT_SILVERMOON_CHAMPION = 63403, + SPELL_PENNANT_DARNASSUS_ASPIRANT = 63404, + SPELL_PENNANT_DARNASSUS_VALIANT = 63405, + SPELL_PENNANT_DARNASSUS_CHAMPION = 63406, + SPELL_PENNANT_EXODAR_ASPIRANT = 63421, + SPELL_PENNANT_EXODAR_VALIANT = 63422, + SPELL_PENNANT_EXODAR_CHAMPION = 63423, + SPELL_PENNANT_IRONFORGE_ASPIRANT = 63425, + SPELL_PENNANT_IRONFORGE_VALIANT = 63426, + SPELL_PENNANT_IRONFORGE_CHAMPION = 63427, + SPELL_PENNANT_UNDERCITY_ASPIRANT = 63428, + SPELL_PENNANT_UNDERCITY_VALIANT = 63429, + SPELL_PENNANT_UNDERCITY_CHAMPION = 63430, + SPELL_PENNANT_ORGRIMMAR_ASPIRANT = 63431, + SPELL_PENNANT_ORGRIMMAR_VALIANT = 63432, + SPELL_PENNANT_ORGRIMMAR_CHAMPION = 63433, + SPELL_PENNANT_THUNDER_BLUFF_ASPIRANT = 63434, + SPELL_PENNANT_THUNDER_BLUFF_VALIANT = 63435, + SPELL_PENNANT_THUNDER_BLUFF_CHAMPION = 63436, + SPELL_PENNANT_ARGENT_CRUSADE_ASPIRANT = 63606, + SPELL_PENNANT_ARGENT_CRUSADE_VALIANT = 63500, + SPELL_PENNANT_ARGENT_CRUSADE_CHAMPION = 63501, + SPELL_PENNANT_EBON_BLADE_ASPIRANT = 63607, + SPELL_PENNANT_EBON_BLADE_VALIANT = 63608, + SPELL_PENNANT_EBON_BLADE_CHAMPION = 63609, +}; + +enum TournamentMounts +{ + NPC_STORMWIND_STEED = 33217, + NPC_IRONFORGE_RAM = 33316, + NPC_GNOMEREGAN_MECHANOSTRIDER = 33317, + NPC_EXODAR_ELEKK = 33318, + NPC_DARNASSIAN_NIGHTSABER = 33319, + NPC_ORGRIMMAR_WOLF = 33320, + NPC_DARK_SPEAR_RAPTOR = 33321, + NPC_THUNDER_BLUFF_KODO = 33322, + NPC_SILVERMOON_HAWKSTRIDER = 33323, + NPC_FORSAKEN_WARHORSE = 33324, + NPC_ARGENT_WARHORSE = 33782, + NPC_ARGENT_STEED_ASPIRANT = 33845, + NPC_ARGENT_HAWKSTRIDER_ASPIRANT = 33844, +}; + +enum TournamentQuestsAchievements +{ + ACHIEVEMENT_CHAMPION_STORMWIND = 2781, + ACHIEVEMENT_CHAMPION_DARNASSUS = 2777, + ACHIEVEMENT_CHAMPION_IRONFORGE = 2780, + ACHIEVEMENT_CHAMPION_GNOMEREGAN = 2779, + ACHIEVEMENT_CHAMPION_THE_EXODAR = 2778, + ACHIEVEMENT_CHAMPION_ORGRIMMAR = 2783, + ACHIEVEMENT_CHAMPION_SEN_JIN = 2784, + ACHIEVEMENT_CHAMPION_THUNDER_BLUFF = 2786, + ACHIEVEMENT_CHAMPION_UNDERCITY = 2787, + ACHIEVEMENT_CHAMPION_SILVERMOON = 2785, + ACHIEVEMENT_ARGENT_VALOR = 2758, + ACHIEVEMENT_CHAMPION_ALLIANCE = 2782, + ACHIEVEMENT_CHAMPION_HORDE = 2788, + + QUEST_VALIANT_OF_STORMWIND = 13593, + QUEST_A_VALIANT_OF_STORMWIND = 13684, + QUEST_VALIANT_OF_DARNASSUS = 13706, + QUEST_A_VALIANT_OF_DARNASSUS = 13689, + QUEST_VALIANT_OF_IRONFORGE = 13703, + QUEST_A_VALIANT_OF_IRONFORGE = 13685, + QUEST_VALIANT_OF_GNOMEREGAN = 13704, + QUEST_A_VALIANT_OF_GNOMEREGAN = 13688, + QUEST_VALIANT_OF_THE_EXODAR = 13705, + QUEST_A_VALIANT_OF_THE_EXODAR = 13690, + QUEST_VALIANT_OF_ORGRIMMAR = 13707, + QUEST_A_VALIANT_OF_ORGRIMMAR = 13691, + QUEST_VALIANT_OF_SEN_JIN = 13708, + QUEST_A_VALIANT_OF_SEN_JIN = 13693, + QUEST_VALIANT_OF_THUNDER_BLUFF = 13709, + QUEST_A_VALIANT_OF_THUNDER_BLUFF = 13694, + QUEST_VALIANT_OF_UNDERCITY = 13710, + QUEST_A_VALIANT_OF_UNDERCITY = 13695, + QUEST_VALIANT_OF_SILVERMOON = 13711, + QUEST_A_VALIANT_OF_SILVERMOON = 13696, +}; + +class spell_gen_on_tournament_mount : public SpellScriptLoader +{ + public: + spell_gen_on_tournament_mount() : SpellScriptLoader("spell_gen_on_tournament_mount") { } + + class spell_gen_on_tournament_mountAuraScript : public AuraScript + { + PrepareAuraScript(spell_gen_on_tournament_mountAuraScript); + + uint32 _pennantSpellId; + + bool Load() + { + _pennantSpellId = 0; + return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER; + } + + void HandleApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (Unit* caster = GetCaster()) + { + if (Unit* vehicle = caster->GetVehicleBase()) + { + _pennantSpellId = GetPennatSpellId(caster->ToPlayer(), vehicle); + caster->CastSpell(caster, _pennantSpellId, true); + } + } + } + + void HandleRemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (Unit* caster = GetCaster()) + caster->RemoveAurasDueToSpell(_pennantSpellId); + } + + uint32 GetPennatSpellId(Player* player, Unit* mount) + { + switch (mount->GetEntry()) + { + case NPC_ARGENT_STEED_ASPIRANT: + case NPC_STORMWIND_STEED: + { + if (player->GetAchievementMgr().HasAchieved(ACHIEVEMENT_CHAMPION_STORMWIND)) + return SPELL_PENNANT_STORMWIND_CHAMPION; + else if (player->GetQuestRewardStatus(QUEST_VALIANT_OF_STORMWIND) || player->GetQuestRewardStatus(QUEST_A_VALIANT_OF_STORMWIND)) + return SPELL_PENNANT_STORMWIND_VALIANT; + else + return SPELL_PENNANT_STORMWIND_ASPIRANT; + } + case NPC_GNOMEREGAN_MECHANOSTRIDER: + { + if (player->GetAchievementMgr().HasAchieved(ACHIEVEMENT_CHAMPION_GNOMEREGAN)) + return SPELL_PENNANT_GNOMEREGAN_CHAMPION; + else if (player->GetQuestRewardStatus(QUEST_VALIANT_OF_GNOMEREGAN) || player->GetQuestRewardStatus(QUEST_A_VALIANT_OF_GNOMEREGAN)) + return SPELL_PENNANT_GNOMEREGAN_VALIANT; + else + return SPELL_PENNANT_GNOMEREGAN_ASPIRANT; + } + case NPC_DARK_SPEAR_RAPTOR: + { + if (player->GetAchievementMgr().HasAchieved(ACHIEVEMENT_CHAMPION_SEN_JIN)) + return SPELL_PENNANT_SEN_JIN_CHAMPION; + else if (player->GetQuestRewardStatus(QUEST_VALIANT_OF_SEN_JIN) || player->GetQuestRewardStatus(QUEST_A_VALIANT_OF_SEN_JIN)) + return SPELL_PENNANT_SEN_JIN_VALIANT; + else + return SPELL_PENNANT_SEN_JIN_ASPIRANT; + } + case NPC_ARGENT_HAWKSTRIDER_ASPIRANT: + case NPC_SILVERMOON_HAWKSTRIDER: + { + if (player->GetAchievementMgr().HasAchieved(ACHIEVEMENT_CHAMPION_SILVERMOON)) + return SPELL_PENNANT_SILVERMOON_CHAMPION; + else if (player->GetQuestRewardStatus(QUEST_VALIANT_OF_SILVERMOON) || player->GetQuestRewardStatus(QUEST_A_VALIANT_OF_SILVERMOON)) + return SPELL_PENNANT_SILVERMOON_VALIANT; + else + return SPELL_PENNANT_SILVERMOON_ASPIRANT; + } + case NPC_DARNASSIAN_NIGHTSABER: + { + if (player->GetAchievementMgr().HasAchieved(ACHIEVEMENT_CHAMPION_DARNASSUS)) + return SPELL_PENNANT_DARNASSUS_CHAMPION; + else if (player->GetQuestRewardStatus(QUEST_VALIANT_OF_DARNASSUS) || player->GetQuestRewardStatus(QUEST_A_VALIANT_OF_DARNASSUS)) + return SPELL_PENNANT_DARNASSUS_VALIANT; + else + return SPELL_PENNANT_DARNASSUS_ASPIRANT; + } + case NPC_EXODAR_ELEKK: + { + if (player->GetAchievementMgr().HasAchieved(ACHIEVEMENT_CHAMPION_THE_EXODAR)) + return SPELL_PENNANT_EXODAR_CHAMPION; + else if (player->GetQuestRewardStatus(QUEST_VALIANT_OF_THE_EXODAR) || player->GetQuestRewardStatus(QUEST_A_VALIANT_OF_THE_EXODAR)) + return SPELL_PENNANT_EXODAR_VALIANT; + else + return SPELL_PENNANT_EXODAR_ASPIRANT; + } + case NPC_IRONFORGE_RAM: + { + if (player->GetAchievementMgr().HasAchieved(ACHIEVEMENT_CHAMPION_IRONFORGE)) + return SPELL_PENNANT_IRONFORGE_CHAMPION; + else if (player->GetQuestRewardStatus(QUEST_VALIANT_OF_IRONFORGE) || player->GetQuestRewardStatus(QUEST_A_VALIANT_OF_IRONFORGE)) + return SPELL_PENNANT_IRONFORGE_VALIANT; + else + return SPELL_PENNANT_IRONFORGE_ASPIRANT; + } + case NPC_FORSAKEN_WARHORSE: + { + if (player->GetAchievementMgr().HasAchieved(ACHIEVEMENT_CHAMPION_UNDERCITY)) + return SPELL_PENNANT_UNDERCITY_CHAMPION; + else if (player->GetQuestRewardStatus(QUEST_VALIANT_OF_UNDERCITY) || player->GetQuestRewardStatus(QUEST_A_VALIANT_OF_UNDERCITY)) + return SPELL_PENNANT_UNDERCITY_VALIANT; + else + return SPELL_PENNANT_UNDERCITY_ASPIRANT; + } + case NPC_ORGRIMMAR_WOLF: + { + if (player->GetAchievementMgr().HasAchieved(ACHIEVEMENT_CHAMPION_ORGRIMMAR)) + return SPELL_PENNANT_ORGRIMMAR_CHAMPION; + else if (player->GetQuestRewardStatus(QUEST_VALIANT_OF_ORGRIMMAR) || player->GetQuestRewardStatus(QUEST_A_VALIANT_OF_ORGRIMMAR)) + return SPELL_PENNANT_ORGRIMMAR_VALIANT; + else + return SPELL_PENNANT_ORGRIMMAR_ASPIRANT; + } + case NPC_THUNDER_BLUFF_KODO: + { + if (player->GetAchievementMgr().HasAchieved(ACHIEVEMENT_CHAMPION_THUNDER_BLUFF)) + return SPELL_PENNANT_THUNDER_BLUFF_CHAMPION; + else if (player->GetQuestRewardStatus(QUEST_VALIANT_OF_THUNDER_BLUFF) || player->GetQuestRewardStatus(QUEST_A_VALIANT_OF_THUNDER_BLUFF)) + return SPELL_PENNANT_THUNDER_BLUFF_VALIANT; + else + return SPELL_PENNANT_THUNDER_BLUFF_ASPIRANT; + } + case NPC_ARGENT_WARHORSE: + { + if (player->GetAchievementMgr().HasAchieved(ACHIEVEMENT_CHAMPION_ALLIANCE) || player->GetAchievementMgr().HasAchieved(ACHIEVEMENT_CHAMPION_HORDE)) + return player->getClass() == CLASS_DEATH_KNIGHT ? SPELL_PENNANT_EBON_BLADE_CHAMPION : SPELL_PENNANT_ARGENT_CRUSADE_CHAMPION; + else if (player->GetAchievementMgr().HasAchieved(ACHIEVEMENT_ARGENT_VALOR)) + return player->getClass() == CLASS_DEATH_KNIGHT ? SPELL_PENNANT_EBON_BLADE_VALIANT : SPELL_PENNANT_ARGENT_CRUSADE_VALIANT; + else + return player->getClass() == CLASS_DEATH_KNIGHT ? SPELL_PENNANT_EBON_BLADE_ASPIRANT : SPELL_PENNANT_ARGENT_CRUSADE_ASPIRANT; + } + default: + return 0; + } + } + + void Register() + { + AfterEffectApply += AuraEffectApplyFn(spell_gen_on_tournament_mountAuraScript::HandleApplyEffect, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); + OnEffectRemove += AuraEffectRemoveFn(spell_gen_on_tournament_mountAuraScript::HandleRemoveEffect, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_gen_on_tournament_mountAuraScript(); + } +}; + +class spell_gen_tournament_pennant : public SpellScriptLoader +{ + public: + spell_gen_tournament_pennant() : SpellScriptLoader("spell_gen_tournament_pennant") { } + + class spell_gen_tournament_pennantAuraScript : public AuraScript + { + PrepareAuraScript(spell_gen_tournament_pennantAuraScript); + + bool Load() + { + return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER; + } + + void HandleApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (Unit* caster = GetCaster()) + if (!caster->GetVehicleBase()) + caster->RemoveAurasDueToSpell(GetId()); + } + + void Register() + { + OnEffectApply += AuraEffectApplyFn(spell_gen_tournament_pennantAuraScript::HandleApplyEffect, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_gen_tournament_pennantAuraScript(); + } +}; + void AddSC_generic_spell_scripts() { new spell_gen_absorb0_hitlimit1(); @@ -1504,4 +2384,15 @@ void AddSC_generic_spell_scripts() new spell_gen_oracle_wolvar_reputation(); new spell_gen_damage_reduction_aura(); new spell_gen_luck_of_the_draw(); + new spell_gen_dalaran_disguise("spell_gen_sunreaver_disguise"); + new spell_gen_dalaran_disguise("spell_gen_silver_covenant_disguise"); + new spell_gen_elune_candle(); + new spell_gen_break_shield("spell_gen_break_shield"); + new spell_gen_break_shield("spell_gen_tournament_counterattack"); + new spell_gen_mounted_charge(); + new spell_gen_defend(); + new spell_gen_tournament_duel(); + new spell_gen_summon_tournament_mount(); + new spell_gen_on_tournament_mount(); + new spell_gen_tournament_pennant(); } diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp new file mode 100644 index 00000000000..dabe978b58c --- /dev/null +++ b/src/server/scripts/Spells/spell_holiday.cpp @@ -0,0 +1,110 @@ +/* + * Copyright (C) 2008-2012 TrinityCore <http://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/>. + */ + +/* + * Spells used in holidays/game events that do not fit any other category. + * Scriptnames in this file should be prefixed with "spell_#holidayname_". + */ + +#include "ScriptPCH.h" + +// 45102 Romantic Picnic +enum SpellsPicnic +{ + SPELL_BASKET_CHECK = 45119, // Holiday - Valentine - Romantic Picnic Near Basket Check + SPELL_MEAL_PERIODIC = 45103, // Holiday - Valentine - Romantic Picnic Meal Periodic - effect dummy + SPELL_MEAL_EAT_VISUAL = 45120, // Holiday - Valentine - Romantic Picnic Meal Eat Visual + //SPELL_MEAL_PARTICLE = 45114, // Holiday - Valentine - Romantic Picnic Meal Particle - unused + SPELL_DRINK_VISUAL = 45121, // Holiday - Valentine - Romantic Picnic Drink Visual + SPELL_ROMANTIC_PICNIC_ACHIEV = 45123, // Romantic Picnic periodic = 5000 +}; + +class spell_love_is_in_the_air_romantic_picnic : public SpellScriptLoader +{ + public: + spell_love_is_in_the_air_romantic_picnic() : SpellScriptLoader("spell_love_is_in_the_air_romantic_picnic") { } + + class spell_love_is_in_the_air_romantic_picnic_AuraScript : public AuraScript + { + PrepareAuraScript(spell_love_is_in_the_air_romantic_picnic_AuraScript); + + void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + Unit* target = GetTarget(); + target->SetStandState(UNIT_STAND_STATE_SIT); + target->CastSpell(target, SPELL_MEAL_PERIODIC, false); + } + + void OnPeriodic(AuraEffect const* /*aurEff*/) + { + // Every 5 seconds + Unit* target = GetTarget(); + Unit* caster = GetCaster(); + + // If our player is no longer sit, remove all auras + if (target->getStandState() != UNIT_STAND_STATE_SIT) + { + target->RemoveAura(SPELL_ROMANTIC_PICNIC_ACHIEV); + target->RemoveAura(GetAura()); + return; + } + + target->CastSpell(target, SPELL_BASKET_CHECK, false); // unknown use, it targets Romantic Basket + target->CastSpell(target, RAND(SPELL_MEAL_EAT_VISUAL, SPELL_DRINK_VISUAL), false); + + bool foundSomeone = false; + // For nearby players, check if they have the same aura. If so, cast Romantic Picnic (45123) + // required by achievement and "hearts" visual + std::list<Player*> playerList; + Trinity::AnyPlayerInObjectRangeCheck checker(target, INTERACTION_DISTANCE*2); + Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(target, playerList, checker); + target->VisitNearbyWorldObject(INTERACTION_DISTANCE*2, searcher); + for (std::list<Player*>::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr) + { + if ((*itr) != target && (*itr)->HasAura(GetId())) // && (*itr)->getStandState() == UNIT_STAND_STATE_SIT) + { + if (caster) + { + caster->CastSpell(*itr, SPELL_ROMANTIC_PICNIC_ACHIEV, true); + caster->CastSpell(target, SPELL_ROMANTIC_PICNIC_ACHIEV, true); + } + foundSomeone = true; + // break; + } + } + + if (!foundSomeone && target->HasAura(SPELL_ROMANTIC_PICNIC_ACHIEV)) + target->RemoveAura(SPELL_ROMANTIC_PICNIC_ACHIEV); + } + + void Register() + { + AfterEffectApply += AuraEffectApplyFn(spell_love_is_in_the_air_romantic_picnic_AuraScript::OnApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL); + OnEffectPeriodic += AuraEffectPeriodicFn(spell_love_is_in_the_air_romantic_picnic_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_love_is_in_the_air_romantic_picnic_AuraScript(); + } +}; + +void AddSC_holiday_spell_scripts() +{ + new spell_love_is_in_the_air_romantic_picnic(); +} diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 1318a9aa333..8a3424ab1e7 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 2346a30640c..b40879d500e 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -1128,6 +1128,51 @@ class spell_magic_eater_food : public SpellScriptLoader } }; +enum Refocus +{ + SPELL_AIMED_SHOT = 19434, + SPELL_MULTISHOT = 2643, + SPELL_VOLLEY = 42243, +}; + +class spell_item_refocus : public SpellScriptLoader +{ + public: + spell_item_refocus() : SpellScriptLoader("spell_item_refocus") { } + + class spell_item_refocus_SpellScript : public SpellScript + { + PrepareSpellScript(spell_item_refocus_SpellScript); + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + Player* caster = GetCaster()->ToPlayer(); + + if (!caster || caster->getClass() != CLASS_HUNTER) + return; + + if (caster->HasSpellCooldown(SPELL_AIMED_SHOT)) + caster->RemoveSpellCooldown(SPELL_AIMED_SHOT, true); + + if (caster->HasSpellCooldown(SPELL_MULTISHOT)) + caster->RemoveSpellCooldown(SPELL_MULTISHOT, true); + + if (caster->HasSpellCooldown(SPELL_VOLLEY)) + caster->RemoveSpellCooldown(SPELL_VOLLEY, true); + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_item_refocus_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_item_refocus_SpellScript(); + } +}; + void AddSC_item_spell_scripts() { // 23074 Arcanite Dragonling @@ -1160,4 +1205,5 @@ void AddSC_item_spell_scripts() new spell_item_ashbringer(); new spell_magic_eater_food(); + new spell_item_refocus(); } diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index 339f6ed8eca..b0b619c8b08 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 84df4418078..39360e04aa1 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -37,6 +37,10 @@ enum PaladinSpells SPELL_BLESSING_OF_LOWER_CITY_PALADIN = 37879, SPELL_BLESSING_OF_LOWER_CITY_PRIEST = 37880, SPELL_BLESSING_OF_LOWER_CITY_SHAMAN = 37881, + + SPELL_DIVINE_STORM = 53385, + SPELL_DIVINE_STORM_DUMMY = 54171, + SPELL_DIVINE_STORM_HEAL = 54172, }; // 31850 - Ardent Defender @@ -327,6 +331,40 @@ public: } }; +class spell_pal_divine_storm : public SpellScriptLoader +{ +public: + spell_pal_divine_storm() : SpellScriptLoader("spell_pal_divine_storm") { } + + class spell_pal_divine_storm_SpellScript : public SpellScript + { + PrepareSpellScript(spell_pal_divine_storm_SpellScript); + + uint32 healPct; + + bool Load() + { + healPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue(GetCaster()); + return true; + } + + void TriggerHeal() + { + GetCaster()->CastCustomSpell(SPELL_DIVINE_STORM_DUMMY, SPELLVALUE_BASE_POINT0, (GetHitDamage() * healPct) / 100, GetCaster(), true); + } + + void Register() + { + AfterHit += SpellHitFn(spell_pal_divine_storm_SpellScript::TriggerHeal); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_pal_divine_storm_SpellScript(); + } +}; + void AddSC_paladin_spell_scripts() { new spell_pal_ardent_defender(); @@ -335,4 +373,5 @@ void AddSC_paladin_spell_scripts() new spell_pal_guarded_by_the_light(); new spell_pal_holy_shock(); new spell_pal_judgement_of_command(); + new spell_pal_divine_storm(); } diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 07b8a79691a..ee5f6a6d772 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index ecdbd582b76..940e494f18f 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -223,13 +223,13 @@ public: void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Unit* target = GetTarget(); - target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); - target->AddUnitState(UNIT_STAT_ROOT); + target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); + target->AddUnitState(UNIT_STATE_ROOT); } void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - GetTarget()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + GetTarget()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } void Register() diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index e9caa40255e..c88d7b891d6 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 76dac9b59f1..b0116d6d33d 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -26,16 +26,16 @@ enum ShamanSpells { - SHAMAN_SPELL_GLYPH_OF_MANA_TIDE = 55441, - SHAMAN_SPELL_MANA_TIDE_TOTEM = 39609, - SHAMAN_SPELL_FIRE_NOVA_R1 = 1535, - SHAMAN_SPELL_FIRE_NOVA_TRIGGERED_R1 = 8349, - SHAMAN_SPELL_SATED = 57724, - SHAMAN_SPELL_EXHAUSTION = 57723, - - //For Earthen Power - SHAMAN_TOTEM_SPELL_EARTHBIND_TOTEM = 6474, //Spell casted by totem - SHAMAN_TOTEM_SPELL_EARTHEN_POWER = 59566, //Spell witch remove snare effect + SHAMAN_SPELL_GLYPH_OF_MANA_TIDE = 55441, + SHAMAN_SPELL_MANA_TIDE_TOTEM = 39609, + SHAMAN_SPELL_FIRE_NOVA_R1 = 1535, + SHAMAN_SPELL_FIRE_NOVA_TRIGGERED_R1 = 8349, + SHAMAN_SPELL_SATED = 57724, + SHAMAN_SPELL_EXHAUSTION = 57723, + + // For Earthen Power + SHAMAN_TOTEM_SPELL_EARTHBIND_TOTEM = 6474, + SHAMAN_TOTEM_SPELL_EARTHEN_POWER = 59566, }; // 51474 - Astral shift @@ -125,7 +125,7 @@ class spell_sha_fire_nova : public SpellScriptLoader { Creature* totem = caster->GetMap()->GetCreature(caster->m_SummonSlot[1]); if (totem && totem->isTotem()) - totem->CastSpell(totem, spellId, true); + caster->CastSpell(totem, spellId, true); } } @@ -215,9 +215,11 @@ class spell_sha_earthbind_totem : public SpellScriptLoader { Unit* target = GetTarget(); if (Unit* caster = aurEff->GetBase()->GetCaster()) - if (AuraEffect* aur = caster->GetDummyAuraEffect(SPELLFAMILY_SHAMAN, 2289, 0)) - if (roll_chance_i(aur->GetBaseAmount())) - target->CastSpell(target, SHAMAN_TOTEM_SPELL_EARTHEN_POWER, true, NULL, aurEff); + if (TempSummon* summon = caster->ToTempSummon()) + if (Unit* owner = summon->GetOwner()) + if (AuraEffect* aur = owner->GetDummyAuraEffect(SPELLFAMILY_SHAMAN, 2289, 0)) + if (roll_chance_i(aur->GetBaseAmount()) && target->HasAuraWithMechanic(1 << MECHANIC_SNARE)) + caster->CastSpell(caster, SHAMAN_TOTEM_SPELL_EARTHEN_POWER, true, NULL, aurEff); } void Register() diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 17035c2a3d2..51b2de5d0f3 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index b9def701fca..f39ad3d1426 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp index 29cb6c082a2..9bcf450b3aa 100755 --- a/src/server/scripts/World/achievement_scripts.cpp +++ b/src/server/scripts/World/achievement_scripts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -285,6 +285,34 @@ class achievement_bg_sa_defense_of_ancients : public AchievementCriteriaScript } }; +enum ArgentTournamentAreas +{ + AREA_ARGENT_TOURNAMENT_FIELDS = 4658, + AREA_RING_OF_ASPIRANTS = 4670, + AREA_RING_OF_ARGENT_VALIANTS = 4671, + AREA_RING_OF_ALLIANCE_VALIANTS = 4672, + AREA_RING_OF_HORDE_VALIANTS = 4673, + AREA_RING_OF_CHAMPIONS = 4669, +}; + +class achievement_tilted : public AchievementCriteriaScript +{ + public: + achievement_tilted() : AchievementCriteriaScript("achievement_tilted") {} + + bool OnCheck(Player* player, Unit* /*target*/) + { + bool checkArea = player->GetAreaId() == AREA_ARGENT_TOURNAMENT_FIELDS || + player->GetAreaId() == AREA_RING_OF_ASPIRANTS || + player->GetAreaId() == AREA_RING_OF_ARGENT_VALIANTS || + player->GetAreaId() == AREA_RING_OF_ALLIANCE_VALIANTS || + player->GetAreaId() == AREA_RING_OF_HORDE_VALIANTS || + player->GetAreaId() == AREA_RING_OF_CHAMPIONS; + + return player && checkArea && player->duel && player->duel->isMounted; + } +}; + void AddSC_achievement_scripts() { new achievement_resilient_victory(); @@ -302,4 +330,5 @@ void AddSC_achievement_scripts() new achievement_arena_kills("achievement_arena_3v3_kills", ARENA_TYPE_3v3); new achievement_arena_kills("achievement_arena_5v5_kills", ARENA_TYPE_5v5); new achievement_bg_sa_defense_of_ancients(); + new achievement_tilted(); } diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index 7d1ed17ed29..8f86f760775 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/World/boss_emerald_dragons.cpp b/src/server/scripts/World/boss_emerald_dragons.cpp index e5c584df6e1..9f652e7a859 100644 --- a/src/server/scripts/World/boss_emerald_dragons.cpp +++ b/src/server/scripts/World/boss_emerald_dragons.cpp @@ -1,5 +1,5 @@ /* -* Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -144,7 +144,7 @@ struct emerald_dragonAI : public WorldBossAI events.Update(diff); - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp index 0592a452211..2a5d814bfde 100755 --- a/src/server/scripts/World/chat_log.cpp +++ b/src/server/scripts/World/chat_log.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index e93dd2751e6..fff01c83d07 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp index f869138d58f..9bc511931b9 100644 --- a/src/server/scripts/World/guards.cpp +++ b/src/server/scripts/World/guards.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -179,7 +179,7 @@ public: globalCooldown = GENERIC_CREATURE_COOLDOWN; } //If no spells available and we arn't moving run to target - else if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + else if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) { //Cancel our current spell and then mutate new movement generator me->InterruptNonMeleeSpells(false); diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index 9bfa77271f5..165ef9f18b1 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -242,7 +242,7 @@ public: { summon->SetVisible(false); summon->SetReactState(REACT_PASSIVE); - summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } return false; } diff --git a/src/server/scripts/World/mob_generic_creature.cpp b/src/server/scripts/World/mob_generic_creature.cpp index 92909f3885a..3a61b9f9e18 100644 --- a/src/server/scripts/World/mob_generic_creature.cpp +++ b/src/server/scripts/World/mob_generic_creature.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/World/npc_innkeeper.cpp b/src/server/scripts/World/npc_innkeeper.cpp index 55f6eaac687..334eb48cb05 100644 --- a/src/server/scripts/World/npc_innkeeper.cpp +++ b/src/server/scripts/World/npc_innkeeper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 01f12086477..336e232236d 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/World/npc_taxi.cpp b/src/server/scripts/World/npc_taxi.cpp index ff83b0c1ec5..aff326e152d 100644 --- a/src/server/scripts/World/npc_taxi.cpp +++ b/src/server/scripts/World/npc_taxi.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 03fc07c9582..13609a490e5 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -40,6 +40,7 @@ npc_sayge 100% Darkmoon event fortune teller, buff player based npc_snake_trap_serpents 80% AI for snakes that summoned by Snake Trap npc_shadowfiend 100% restore 5% of owner's mana when shadowfiend die from damage npc_locksmith 75% list of keys needs to be confirmed +npc_firework 100% NPC's summoned by rockets and rocket clusters, for making them cast visual EndContentData */ #include "ScriptPCH.h" @@ -1737,6 +1738,12 @@ public: if (!UpdateVictim()) return; + if (me->getVictim()->HasBreakableByDamageCrowdControlAura(me)) + { + me->InterruptNonMeleeSpells(false); + return; + } + if (SpellTimer <= diff) { if (IsViper) //Viper @@ -1909,7 +1916,7 @@ public: Unit* owner = me->GetCharmerOrOwner(); me->CombatStop(true); - if (owner && !me->HasUnitState(UNIT_STAT_FOLLOW)) + if (owner && !me->HasUnitState(UNIT_STATE_FOLLOW)) { me->GetMotionMaster()->Clear(false); me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE); @@ -2068,7 +2075,7 @@ public: void Reset() { - me->SetControlled(true, UNIT_STAT_STUNNED);//disable rotate + me->SetControlled(true, UNIT_STATE_STUNNED);//disable rotate me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);//imune to knock aways like blast wave ResetTimer = 5000; @@ -2100,8 +2107,8 @@ public: if (!UpdateVictim()) return; - if (!me->HasUnitState(UNIT_STAT_STUNNED)) - me->SetControlled(true, UNIT_STAT_STUNNED);//disable rotate + if (!me->HasUnitState(UNIT_STATE_STUNNED)) + me->SetControlled(true, UNIT_STATE_STUNNED);//disable rotate if (Entry != NPC_ADVANCED_TARGET_DUMMY && Entry != NPC_TARGET_DUMMY) { @@ -2202,7 +2209,7 @@ public: if (!UpdateVictim()) return; - if (me->HasUnitState(UNIT_STAT_CASTING)) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; if (FireShield_Timer <= diff) @@ -2764,6 +2771,379 @@ public: } }; +enum Fireworks +{ + NPC_OMEN = 15467, + NPC_MINION_OF_OMEN = 15466, + NPC_FIREWORK_BLUE = 15879, + NPC_FIREWORK_GREEN = 15880, + NPC_FIREWORK_PURPLE = 15881, + NPC_FIREWORK_RED = 15882, + NPC_FIREWORK_YELLOW = 15883, + NPC_FIREWORK_WHITE = 15884, + NPC_FIREWORK_BIG_BLUE = 15885, + NPC_FIREWORK_BIG_GREEN = 15886, + NPC_FIREWORK_BIG_PURPLE = 15887, + NPC_FIREWORK_BIG_RED = 15888, + NPC_FIREWORK_BIG_YELLOW = 15889, + NPC_FIREWORK_BIG_WHITE = 15890, + + NPC_CLUSTER_BLUE = 15872, + NPC_CLUSTER_RED = 15873, + NPC_CLUSTER_GREEN = 15874, + NPC_CLUSTER_PURPLE = 15875, + NPC_CLUSTER_WHITE = 15876, + NPC_CLUSTER_YELLOW = 15877, + NPC_CLUSTER_BIG_BLUE = 15911, + NPC_CLUSTER_BIG_GREEN = 15912, + NPC_CLUSTER_BIG_PURPLE = 15913, + NPC_CLUSTER_BIG_RED = 15914, + NPC_CLUSTER_BIG_WHITE = 15915, + NPC_CLUSTER_BIG_YELLOW = 15916, + NPC_CLUSTER_ELUNE = 15918, + + GO_FIREWORK_LAUNCHER_1 = 180771, + GO_FIREWORK_LAUNCHER_2 = 180868, + GO_FIREWORK_LAUNCHER_3 = 180850, + GO_CLUSTER_LAUNCHER_1 = 180772, + GO_CLUSTER_LAUNCHER_2 = 180859, + GO_CLUSTER_LAUNCHER_3 = 180869, + GO_CLUSTER_LAUNCHER_4 = 180874, + + SPELL_ROCKET_BLUE = 26344, + SPELL_ROCKET_GREEN = 26345, + SPELL_ROCKET_PURPLE = 26346, + SPELL_ROCKET_RED = 26347, + SPELL_ROCKET_WHITE = 26348, + SPELL_ROCKET_YELLOW = 26349, + SPELL_ROCKET_BIG_BLUE = 26351, + SPELL_ROCKET_BIG_GREEN = 26352, + SPELL_ROCKET_BIG_PURPLE = 26353, + SPELL_ROCKET_BIG_RED = 26354, + SPELL_ROCKET_BIG_WHITE = 26355, + SPELL_ROCKET_BIG_YELLOW = 26356, + SPELL_LUNAR_FORTUNE = 26522, + + ANIM_GO_LAUNCH_FIREWORK = 3, + ZONE_MOONGLADE = 493, +}; + +Position omenSummonPos = {7558.993f, -2839.999f, 450.0214f, 4.46f}; + +class npc_firework : public CreatureScript +{ +public: + npc_firework() : CreatureScript("npc_firework") { } + + struct npc_fireworkAI : public ScriptedAI + { + npc_fireworkAI(Creature* creature) : ScriptedAI(creature) {} + + bool isCluster() + { + switch (me->GetEntry()) + { + case NPC_FIREWORK_BLUE: + case NPC_FIREWORK_GREEN: + case NPC_FIREWORK_PURPLE: + case NPC_FIREWORK_RED: + case NPC_FIREWORK_YELLOW: + case NPC_FIREWORK_WHITE: + case NPC_FIREWORK_BIG_BLUE: + case NPC_FIREWORK_BIG_GREEN: + case NPC_FIREWORK_BIG_PURPLE: + case NPC_FIREWORK_BIG_RED: + case NPC_FIREWORK_BIG_YELLOW: + case NPC_FIREWORK_BIG_WHITE: + return false; + case NPC_CLUSTER_BLUE: + case NPC_CLUSTER_GREEN: + case NPC_CLUSTER_PURPLE: + case NPC_CLUSTER_RED: + case NPC_CLUSTER_YELLOW: + case NPC_CLUSTER_WHITE: + case NPC_CLUSTER_BIG_BLUE: + case NPC_CLUSTER_BIG_GREEN: + case NPC_CLUSTER_BIG_PURPLE: + case NPC_CLUSTER_BIG_RED: + case NPC_CLUSTER_BIG_YELLOW: + case NPC_CLUSTER_BIG_WHITE: + case NPC_CLUSTER_ELUNE: + default: + return true; + } + } + + GameObject* FindNearestLauncher() + { + GameObject* launcher = NULL; + + if (isCluster()) + { + GameObject* launcher1 = GetClosestGameObjectWithEntry(me, GO_CLUSTER_LAUNCHER_1, 0.5f); + GameObject* launcher2 = GetClosestGameObjectWithEntry(me, GO_CLUSTER_LAUNCHER_2, 0.5f); + GameObject* launcher3 = GetClosestGameObjectWithEntry(me, GO_CLUSTER_LAUNCHER_3, 0.5f); + GameObject* launcher4 = GetClosestGameObjectWithEntry(me, GO_CLUSTER_LAUNCHER_4, 0.5f); + + if (launcher1) + launcher = launcher1; + else if (launcher2) + launcher = launcher2; + else if (launcher3) + launcher = launcher3; + else if (launcher4) + launcher = launcher4; + } + else + { + GameObject* launcher1 = GetClosestGameObjectWithEntry(me, GO_FIREWORK_LAUNCHER_1, 0.5f); + GameObject* launcher2 = GetClosestGameObjectWithEntry(me, GO_FIREWORK_LAUNCHER_2, 0.5f); + GameObject* launcher3 = GetClosestGameObjectWithEntry(me, GO_FIREWORK_LAUNCHER_3, 0.5f); + + if (launcher1) + launcher = launcher1; + else if (launcher2) + launcher = launcher2; + else if (launcher3) + launcher = launcher3; + } + + return launcher; + } + + uint32 GetFireworkSpell(uint32 entry) + { + switch (entry) + { + case NPC_FIREWORK_BLUE: + return SPELL_ROCKET_BLUE; + case NPC_FIREWORK_GREEN: + return SPELL_ROCKET_GREEN; + case NPC_FIREWORK_PURPLE: + return SPELL_ROCKET_PURPLE; + case NPC_FIREWORK_RED: + return SPELL_ROCKET_RED; + case NPC_FIREWORK_YELLOW: + return SPELL_ROCKET_YELLOW; + case NPC_FIREWORK_WHITE: + return SPELL_ROCKET_WHITE; + case NPC_FIREWORK_BIG_BLUE: + return SPELL_ROCKET_BIG_BLUE; + case NPC_FIREWORK_BIG_GREEN: + return SPELL_ROCKET_BIG_GREEN; + case NPC_FIREWORK_BIG_PURPLE: + return SPELL_ROCKET_BIG_PURPLE; + case NPC_FIREWORK_BIG_RED: + return SPELL_ROCKET_BIG_RED; + case NPC_FIREWORK_BIG_YELLOW: + return SPELL_ROCKET_BIG_YELLOW; + case NPC_FIREWORK_BIG_WHITE: + return SPELL_ROCKET_BIG_WHITE; + default: + return 0; + } + } + + uint32 GetFireworkGameObjectId() + { + uint32 spellId = 0; + + switch (me->GetEntry()) + { + case NPC_CLUSTER_BLUE: + spellId = GetFireworkSpell(NPC_FIREWORK_BLUE); + break; + case NPC_CLUSTER_GREEN: + spellId = GetFireworkSpell(NPC_FIREWORK_GREEN); + break; + case NPC_CLUSTER_PURPLE: + spellId = GetFireworkSpell(NPC_FIREWORK_PURPLE); + break; + case NPC_CLUSTER_RED: + spellId = GetFireworkSpell(NPC_FIREWORK_RED); + break; + case NPC_CLUSTER_YELLOW: + spellId = GetFireworkSpell(NPC_FIREWORK_YELLOW); + break; + case NPC_CLUSTER_WHITE: + spellId = GetFireworkSpell(NPC_FIREWORK_WHITE); + break; + case NPC_CLUSTER_BIG_BLUE: + spellId = GetFireworkSpell(NPC_FIREWORK_BIG_BLUE); + break; + case NPC_CLUSTER_BIG_GREEN: + spellId = GetFireworkSpell(NPC_FIREWORK_BIG_GREEN); + break; + case NPC_CLUSTER_BIG_PURPLE: + spellId = GetFireworkSpell(NPC_FIREWORK_BIG_PURPLE); + break; + case NPC_CLUSTER_BIG_RED: + spellId = GetFireworkSpell(NPC_FIREWORK_BIG_RED); + break; + case NPC_CLUSTER_BIG_YELLOW: + spellId = GetFireworkSpell(NPC_FIREWORK_BIG_YELLOW); + break; + case NPC_CLUSTER_BIG_WHITE: + spellId = GetFireworkSpell(NPC_FIREWORK_BIG_WHITE); + break; + case NPC_CLUSTER_ELUNE: + spellId = GetFireworkSpell(urand(NPC_FIREWORK_BLUE, NPC_FIREWORK_WHITE)); + break; + } + + const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId); + + if (spellInfo && spellInfo->Effects[0].Effect == SPELL_EFFECT_SUMMON_OBJECT_WILD) + return spellInfo->Effects[0].MiscValue; + + return 0; + } + + void Reset() + { + if (GameObject* launcher = FindNearestLauncher()) + { + launcher->SendCustomAnim(ANIM_GO_LAUNCH_FIREWORK); + me->SetOrientation(launcher->GetOrientation() + M_PI/2); + } + else + return; + + if (isCluster()) + { + // Check if we are near Elune'ara lake south, if so try to summon Omen or a minion + if (me->GetZoneId() == ZONE_MOONGLADE) + { + if (!me->FindNearestCreature(NPC_OMEN, 100.0f, false) && me->GetDistance2d(omenSummonPos.GetPositionX(), omenSummonPos.GetPositionY()) <= 100.0f) + { + switch (urand(0,9)) + { + case 0: + case 1: + case 2: + case 3: + if (Creature* minion = me->SummonCreature(NPC_MINION_OF_OMEN, me->GetPositionX()+frand(-5.0f, 5.0f), me->GetPositionY()+frand(-5.0f, 5.0f), me->GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000)) + minion->AI()->AttackStart(me->SelectNearestPlayer(20.0f)); + break; + case 9: + me->SummonCreature(NPC_OMEN, omenSummonPos); + break; + } + } + } + if (me->GetEntry() == NPC_CLUSTER_ELUNE) + DoCast(SPELL_LUNAR_FORTUNE); + + float displacement = 0.7f; + for (uint8 i = 0; i < 4; i++) + me->SummonGameObject(GetFireworkGameObjectId(), me->GetPositionX() + (i%2 == 0 ? displacement : -displacement), me->GetPositionY() + (i > 1 ? displacement : -displacement), me->GetPositionZ() + 4.0f, me->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 1); + } + else + //me->CastSpell(me, GetFireworkSpell(me->GetEntry()), true); + me->CastSpell(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), GetFireworkSpell(me->GetEntry()), true); + } + }; + + CreatureAI *GetAI(Creature* creature) const + { + return new npc_fireworkAI(creature); + } +}; + +/*##### +# npc_spring_rabbit +#####*/ + +enum rabbitSpells +{ + SPELL_SPRING_FLING = 61875, + SPELL_SPRING_RABBIT_JUMP = 61724, + SPELL_SPRING_RABBIT_WANDER = 61726, + SPELL_SUMMON_BABY_BUNNY = 61727, + SPELL_SPRING_RABBIT_IN_LOVE = 61728, + NPC_SPRING_RABBIT = 32791 +}; + +class npc_spring_rabbit : public CreatureScript +{ +public: + npc_spring_rabbit() : CreatureScript("npc_spring_rabbit") { } + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_spring_rabbitAI(creature); + } + + struct npc_spring_rabbitAI : public ScriptedAI + { + npc_spring_rabbitAI(Creature* c) : ScriptedAI(c) { } + + bool inLove; + uint32 jumpTimer; + uint32 bunnyTimer; + uint32 searchTimer; + uint64 rabbitGUID; + + void Reset() + { + inLove = false; + rabbitGUID = 0; + jumpTimer = urand(5000, 10000); + bunnyTimer = urand(10000, 20000); + searchTimer = urand(5000, 10000); + if (Unit* owner = me->GetOwner()) + me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); + } + + void EnterCombat(Unit * /*who*/) { } + + void DoAction(const int32 /*param*/) + { + inLove = true; + if (Unit* owner = me->GetOwner()) + owner->CastSpell(owner, SPELL_SPRING_FLING, true); + } + + void UpdateAI(const uint32 diff) + { + if (inLove) + { + if (jumpTimer <= diff) + { + if (Unit* rabbit = Unit::GetUnit(*me, rabbitGUID)) + DoCast(rabbit, SPELL_SPRING_RABBIT_JUMP); + jumpTimer = urand(5000, 10000); + } else jumpTimer -= diff; + + if (bunnyTimer <= diff) + { + DoCast(SPELL_SUMMON_BABY_BUNNY); + bunnyTimer = urand(20000, 40000); + } else bunnyTimer -= diff; + } + else + { + if (searchTimer <= diff) + { + if (Creature* rabbit = me->FindNearestCreature(NPC_SPRING_RABBIT, 10.0f)) + { + if (rabbit == me || rabbit->HasAura(SPELL_SPRING_RABBIT_IN_LOVE)) + return; + + me->AddAura(SPELL_SPRING_RABBIT_IN_LOVE, me); + DoAction(1); + rabbit->AddAura(SPELL_SPRING_RABBIT_IN_LOVE, rabbit); + rabbit->AI()->DoAction(1); + rabbit->CastSpell(rabbit, SPELL_SPRING_RABBIT_JUMP, true); + rabbitGUID = rabbit->GetGUID(); + } + searchTimer = urand(5000, 10000); + } else searchTimer -= diff; + } + } + }; +}; + void AddSC_npcs_special() { new npc_air_force_bots; @@ -2796,5 +3176,7 @@ void AddSC_npcs_special() new npc_experience; new npc_fire_elemental; new npc_earth_elemental; + new npc_firework; + new npc_spring_rabbit(); } diff --git a/src/server/shared/CMakeLists.txt b/src/server/shared/CMakeLists.txt index e5df566462f..3ec35b5394a 100644 --- a/src/server/shared/CMakeLists.txt +++ b/src/server/shared/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/shared/Common.cpp b/src/server/shared/Common.cpp index 68b5a62b963..88e7d5a76fc 100755 --- a/src/server/shared/Common.cpp +++ b/src/server/shared/Common.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Common.h b/src/server/shared/Common.h index bc9c0c62ccc..57809cca255 100755 --- a/src/server/shared/Common.h +++ b/src/server/shared/Common.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/CompilerDefs.h b/src/server/shared/CompilerDefs.h index 377556a8948..f7e3d0b4979 100755 --- a/src/server/shared/CompilerDefs.h +++ b/src/server/shared/CompilerDefs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Configuration/Config.cpp b/src/server/shared/Configuration/Config.cpp index d5a3a7e46bc..b82d86cc5d0 100755 --- a/src/server/shared/Configuration/Config.cpp +++ b/src/server/shared/Configuration/Config.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Configuration/Config.h b/src/server/shared/Configuration/Config.h index 46d019fd800..a870379881b 100755 --- a/src/server/shared/Configuration/Config.h +++ b/src/server/shared/Configuration/Config.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/ARC4.cpp b/src/server/shared/Cryptography/ARC4.cpp index b1a6da31334..52a60573eca 100755 --- a/src/server/shared/Cryptography/ARC4.cpp +++ b/src/server/shared/Cryptography/ARC4.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/ARC4.h b/src/server/shared/Cryptography/ARC4.h index abf753be02f..541135e52f2 100755 --- a/src/server/shared/Cryptography/ARC4.h +++ b/src/server/shared/Cryptography/ARC4.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp index a2db02dfbe3..5b4ffabd4f6 100755 --- a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp +++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.h b/src/server/shared/Cryptography/Authentication/AuthCrypt.h index e7463b0d962..7081b4973d4 100755 --- a/src/server/shared/Cryptography/Authentication/AuthCrypt.h +++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/BigNumber.cpp b/src/server/shared/Cryptography/BigNumber.cpp index 76cb74d5e13..f55e87c99fc 100755 --- a/src/server/shared/Cryptography/BigNumber.cpp +++ b/src/server/shared/Cryptography/BigNumber.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/BigNumber.h b/src/server/shared/Cryptography/BigNumber.h index eb450c27777..7196aae6579 100755 --- a/src/server/shared/Cryptography/BigNumber.h +++ b/src/server/shared/Cryptography/BigNumber.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/HMACSHA1.cpp b/src/server/shared/Cryptography/HMACSHA1.cpp index 5bb837b1544..447d0b58efc 100755 --- a/src/server/shared/Cryptography/HMACSHA1.cpp +++ b/src/server/shared/Cryptography/HMACSHA1.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -18,6 +18,7 @@ #include "HMACSHA1.h" #include "BigNumber.h" +#include "Common.h" HmacHash::HmacHash(uint32 len, uint8 *seed) { diff --git a/src/server/shared/Cryptography/HMACSHA1.h b/src/server/shared/Cryptography/HMACSHA1.h index 2d6e0c276a8..bd0418b600e 100755 --- a/src/server/shared/Cryptography/HMACSHA1.h +++ b/src/server/shared/Cryptography/HMACSHA1.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/SHA1.cpp b/src/server/shared/Cryptography/SHA1.cpp index c60b8bfb70a..2af8e4d4cbe 100755 --- a/src/server/shared/Cryptography/SHA1.cpp +++ b/src/server/shared/Cryptography/SHA1.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/SHA1.h b/src/server/shared/Cryptography/SHA1.h index 9cb9b7b90f9..b5bf97fd7d9 100755 --- a/src/server/shared/Cryptography/SHA1.h +++ b/src/server/shared/Cryptography/SHA1.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/DataStores/DBCFileLoader.cpp b/src/server/shared/DataStores/DBCFileLoader.cpp index 998724f84ce..f909c8566bb 100755 --- a/src/server/shared/DataStores/DBCFileLoader.cpp +++ b/src/server/shared/DataStores/DBCFileLoader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/DataStores/DBCFileLoader.h b/src/server/shared/DataStores/DBCFileLoader.h index b2d99e9302f..a43807a3b59 100755 --- a/src/server/shared/DataStores/DBCFileLoader.h +++ b/src/server/shared/DataStores/DBCFileLoader.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h index b580048ed45..c5b8b6f5a21 100755 --- a/src/server/shared/DataStores/DBCStore.h +++ b/src/server/shared/DataStores/DBCStore.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Database/AdhocStatement.cpp b/src/server/shared/Database/AdhocStatement.cpp index 603c159162a..9e795ae853a 100755 --- a/src/server/shared/Database/AdhocStatement.cpp +++ b/src/server/shared/Database/AdhocStatement.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/AdhocStatement.h b/src/server/shared/Database/AdhocStatement.h index 1a76956809b..e17a85e7466 100755 --- a/src/server/shared/Database/AdhocStatement.h +++ b/src/server/shared/Database/AdhocStatement.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/DatabaseEnv.h b/src/server/shared/Database/DatabaseEnv.h index 5e8ddfe4cde..13b900d8392 100755 --- a/src/server/shared/Database/DatabaseEnv.h +++ b/src/server/shared/Database/DatabaseEnv.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Database/DatabaseWorker.cpp b/src/server/shared/Database/DatabaseWorker.cpp index 209ca35abae..662c879ad5e 100644 --- a/src/server/shared/Database/DatabaseWorker.cpp +++ b/src/server/shared/Database/DatabaseWorker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/DatabaseWorker.h b/src/server/shared/Database/DatabaseWorker.h index f2249fa750c..c01a9c1bc3c 100755 --- a/src/server/shared/Database/DatabaseWorker.h +++ b/src/server/shared/Database/DatabaseWorker.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h index a128eda3b70..b91972e5b0c 100755 --- a/src/server/shared/Database/DatabaseWorkerPool.h +++ b/src/server/shared/Database/DatabaseWorkerPool.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/Field.cpp b/src/server/shared/Database/Field.cpp index a3428916cc2..3ea153bdc0c 100755 --- a/src/server/shared/Database/Field.cpp +++ b/src/server/shared/Database/Field.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/Field.h b/src/server/shared/Database/Field.h index dde7b902b2d..355f6b47ff2 100755 --- a/src/server/shared/Database/Field.h +++ b/src/server/shared/Database/Field.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp index 28f7f95b319..fe276b26738 100755..100644 --- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -23,299 +23,315 @@ void CharacterDatabaseConnection::DoPrepareStatements() m_stmts.resize(MAX_CHARACTERDATABASE_STATEMENTS); PREPARE_STATEMENT(CHAR_DEL_QUEST_POOL_SAVE, "DELETE FROM pool_quest_save WHERE pool_id = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_ADD_QUEST_POOL_SAVE, "INSERT INTO pool_quest_save (pool_id, quest_id) VALUES (?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_QUEST_POOL_SAVE, "INSERT INTO pool_quest_save (pool_id, quest_id) VALUES (?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_NONEXISTENT_GUILD_BANK_ITEM, "DELETE FROM guild_bank_item WHERE guildid = ? AND TabId = ? AND SlotId = ?", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_EXPIRED_BANS, "UPDATE character_banned SET active = 0 WHERE unbandate <= UNIX_TIMESTAMP() AND unbandate <> bandate", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_GET_GUID_BY_NAME, "SELECT guid FROM characters WHERE name = ?", CONNECTION_BOTH); - PREPARE_STATEMENT(CHAR_GET_CHECK_NAME, "SELECT 1 FROM characters WHERE name = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_GET_SUM_CHARS, "SELECT COUNT(guid) FROM characters WHERE account = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_GET_CHAR_CREATE_INFO, "SELECT level, race, class FROM characters WHERE account = ? LIMIT 0, ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_ADD_BAN, "INSERT INTO character_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, ?, ?, 1)", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_NOT_BANNED, "UPDATE character_banned SET active = 0 WHERE guid = ? AND active != 0", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_GET_BANINFO, "SELECT FROM_UNIXTIME(bandate), unbandate-bandate, active, unbandate, banreason, bannedby FROM character_banned WHERE guid = ? ORDER BY bandate ASC", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_GET_GUID_BY_NAME_FILTER, "SELECT guid, name FROM characters WHERE name LIKE CONCAT('%', ?, '%')", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_GET_BANINFO_LIST, "SELECT bandate, unbandate, bannedby, banreason FROM character_banned WHERE guid = ? ORDER BY unbandate", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_GET_BANNED_NAME, "SELECT characters.name FROM characters, character_banned WHERE character_banned.guid = ? AND character_banned.guid = characters.guid", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_GET_ENUM, "SELECT c.guid, c.name, c.race, c.class, c.gender, c.playerBytes, c.playerBytes2, c.level, c.zone, c.map, c.position_x, c.position_y, c.position_z, gm.guildid, c.playerFlags, c.at_login, cp.entry, cp.modelid, cp.level, c.equipmentCache, cb.guid FROM characters AS c LEFT JOIN character_pet AS cp ON c.guid = cp.owner AND cp.slot = ? LEFT JOIN guild_member AS gm ON c.guid = gm.guid LEFT JOIN character_banned AS cb ON c.guid = cb.guid AND cb.active = 1 WHERE c.account = ? ORDER BY c.guid", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_GET_ENUM_DECLINED_NAME, "SELECT c.guid, c.name, c.race, c.class, c.gender, c.playerBytes, c.playerBytes2, c.level, c.zone, c.map, c.position_x, c.position_y, c.position_z, gm.guildid, c.playerFlags, c.at_login, cp.entry, cp.modelid, cp.level, c.equipmentCache, cb.guid, cd.genitive FROM characters AS c LEFT JOIN character_pet AS cp ON c.guid = cp.owner AND cp.slot = ? LEFT JOIN character_declinedname AS cd ON c.guid = cd.guid LEFT JOIN guild_member AS gm ON c.guid = gm.guid LEFT JOIN character_banned AS cb ON c.guid = cb.guid AND cb.active = 1 WHERE c.account = ? ORDER BY c.guid", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_GET_PET_SLOTS, "SELECT owner, slot FROM character_pet WHERE owner = ? AND slot >= ? AND slot <= ? ORDER BY slot", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_GET_PET_SLOTS_DETAIL, "SELECT owner, id, entry, level, name FROM character_pet WHERE owner = ? AND slot >= ? AND slot <= ? ORDER BY slot", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_GET_PET_ENTRY, "SELECT entry FROM character_pet WHERE owner = ? AND id = ? AND slot >= ? AND slot <= ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_GET_PET_SLOT_BY_ID, "SELECT slot, entry FROM character_pet WHERE owner = ? AND id = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_GET_FREE_NAME, "SELECT guid, name FROM characters WHERE guid = ? AND account = ? AND (at_login & ?) = ? AND NOT EXISTS (SELECT NULL FROM characters WHERE name = ?)", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_GET_GUID_RACE_ACC_BY_NAME, "SELECT guid, race, account FROM characters WHERE name = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_SEL_GUID_BY_NAME, "SELECT guid FROM characters WHERE name = ?", CONNECTION_BOTH); + PREPARE_STATEMENT(CHAR_SEL_CHECK_NAME, "SELECT 1 FROM characters WHERE name = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_SEL_SUM_CHARS, "SELECT COUNT(guid) FROM characters WHERE account = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_SEL_CHAR_CREATE_INFO, "SELECT level, race, class FROM characters WHERE account = ? LIMIT 0, ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_INS_CHARACTER_BAN, "INSERT INTO character_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, ?, ?, 1)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_CHARACTER_BAN, "UPDATE character_banned SET active = 0 WHERE guid = ? AND active != 0", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_BANINFO, "SELECT FROM_UNIXTIME(bandate), unbandate-bandate, active, unbandate, banreason, bannedby FROM character_banned WHERE guid = ? ORDER BY bandate ASC", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_SEL_GUID_BY_NAME_FILTER, "SELECT guid, name FROM characters WHERE name LIKE CONCAT('%', ?, '%')", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_SEL_BANINFO_LIST, "SELECT bandate, unbandate, bannedby, banreason FROM character_banned WHERE guid = ? ORDER BY unbandate", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_SEL_BANNED_NAME, "SELECT characters.name FROM characters, character_banned WHERE character_banned.guid = ? AND character_banned.guid = characters.guid", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_SEL_ENUM, "SELECT c.guid, c.name, c.race, c.class, c.gender, c.playerBytes, c.playerBytes2, c.level, c.zone, c.map, c.position_x, c.position_y, c.position_z, gm.guildid, c.playerFlags, c.at_login, cp.entry, cp.modelid, cp.level, c.equipmentCache, cb.guid FROM characters AS c LEFT JOIN character_pet AS cp ON c.guid = cp.owner AND cp.slot = ? LEFT JOIN guild_member AS gm ON c.guid = gm.guid LEFT JOIN character_banned AS cb ON c.guid = cb.guid AND cb.active = 1 WHERE c.account = ? ORDER BY c.guid", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_SEL_ENUM_DECLINED_NAME, "SELECT c.guid, c.name, c.race, c.class, c.gender, c.playerBytes, c.playerBytes2, c.level, c.zone, c.map, c.position_x, c.position_y, c.position_z, gm.guildid, c.playerFlags, c.at_login, cp.entry, cp.modelid, cp.level, c.equipmentCache, cb.guid, cd.genitive FROM characters AS c LEFT JOIN character_pet AS cp ON c.guid = cp.owner AND cp.slot = ? LEFT JOIN character_declinedname AS cd ON c.guid = cd.guid LEFT JOIN guild_member AS gm ON c.guid = gm.guid LEFT JOIN character_banned AS cb ON c.guid = cb.guid AND cb.active = 1 WHERE c.account = ? ORDER BY c.guid", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_SEL_PET_SLOTS, "SELECT owner, slot FROM character_pet WHERE owner = ? AND slot >= ? AND slot <= ? ORDER BY slot", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_SEL_PET_SLOTS_DETAIL, "SELECT owner, id, entry, level, name FROM character_pet WHERE owner = ? AND slot >= ? AND slot <= ? ORDER BY slot", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_SEL_PET_ENTRY, "SELECT entry FROM character_pet WHERE owner = ? AND id = ? AND slot >= ? AND slot <= ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_SEL_PET_SLOT_BY_ID, "SELECT slot, entry FROM character_pet WHERE owner = ? AND id = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_SEL_FREE_NAME, "SELECT guid, name FROM characters WHERE guid = ? AND account = ? AND (at_login & ?) = ? AND NOT EXISTS (SELECT NULL FROM characters WHERE name = ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_SEL_GUID_RACE_ACC_BY_NAME, "SELECT guid, race, account FROM characters WHERE name = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_QUEST_STATUS_DAILY, "DELETE FROM character_queststatus_daily", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_QUEST_STATUS_WEEKLY, "DELETE FROM character_queststatus_weekly", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_DEL_QUEST_STATUS_SEASONAL, "DELETE FROM character_queststatus_seasonal WHERE event = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_DEL_QUEST_STATUS_DAILY_CHAR, "DELETE FROM character_queststatus_daily WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_DEL_QUEST_STATUS_WEEKLY_CHAR, "DELETE FROM character_queststatus_weekly WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_DEL_QUEST_STATUS_SEASONAL_CHAR, "DELETE FROM character_queststatus_seasonal WHERE guid = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_BATTLEGROUND_RANDOM, "DELETE FROM character_battleground_random", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_INS_BATTLEGROUND_RANDOM, "INSERT INTO character_battleground_random (guid) VALUES (?)", CONNECTION_ASYNC); // Start LoginQueryHolder content - PREPARE_STATEMENT(CHAR_LOAD_PLAYER, "SELECT guid, account, name, race, class, gender, level, xp, money, playerBytes, playerBytes2, playerFlags, " + PREPARE_STATEMENT(CHAR_SEL_CHARACTER, "SELECT guid, account, name, race, class, gender, level, xp, money, playerBytes, playerBytes2, playerFlags, " "position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, " "resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, instance_mode_mask, " "arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk, " "health, power1, power2, power3, power4, power5, power6, power7, instance_id, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles, actionBars, grantableLevels FROM characters WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_GROUP, "SELECT guid FROM group_member WHERE memberGuid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_BOUNDINSTANCES, "SELECT id, permanent, map, difficulty, resettime FROM character_instance LEFT JOIN instance ON instance = id WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_AURAS, "SELECT caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, " + PREPARE_STATEMENT(CHAR_SEL_GROUP_MEMBER, "SELECT guid FROM group_member WHERE memberGuid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_INSTANCE, "SELECT id, permanent, map, difficulty, resettime FROM character_instance LEFT JOIN instance ON instance = id WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_AURAS, "SELECT caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, " "base_amount0, base_amount1, base_amount2, maxduration, remaintime, remaincharges FROM character_aura WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_SPELLS, "SELECT spell, active, disabled FROM character_spell WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_QUESTSTATUS, "SELECT quest, status, explored, timer, mobcount1, mobcount2, mobcount3, mobcount4, " + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_SPELL, "SELECT spell, active, disabled FROM character_spell WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_QUESTSTATUS, "SELECT quest, status, explored, timer, mobcount1, mobcount2, mobcount3, mobcount4, " "itemcount1, itemcount2, itemcount3, itemcount4, playercount FROM character_queststatus WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_DAILYQUESTSTATUS, "SELECT quest, time FROM character_queststatus_daily WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_WEKLYQUESTSTATUS, "SELECT quest FROM character_queststatus_weekly WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_REPUTATION, "SELECT faction, standing, flags FROM character_reputation WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_INVENTORY, "SELECT creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomPropertyId, durability, playedTime, text, bag, slot, " + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_DAILYQUESTSTATUS, "SELECT quest, time FROM character_queststatus_daily WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_WEEKLYQUESTSTATUS, "SELECT quest FROM character_queststatus_weekly WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_SEASONALQUESTSTATUS, "SELECT quest, event FROM character_queststatus_seasonal WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_CHARACTER_DAILYQUESTSTATUS, "INSERT INTO character_queststatus_daily (guid, quest, time) VALUES (?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_CHARACTER_WEEKLYQUESTSTATUS, "INSERT INTO character_queststatus_weekly (guid, quest) VALUES (?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_CHARACTER_SEASONALQUESTSTATUS, "INSERT INTO character_queststatus_seasonal (guid, quest, event) VALUES (?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_REPUTATION, "SELECT faction, standing, flags FROM character_reputation WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_INVENTORY, "SELECT creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomPropertyId, durability, playedTime, text, bag, slot, " "item, itemEntry FROM character_inventory ci JOIN item_instance ii ON ci.item = ii.guid WHERE ci.guid = ? ORDER BY bag, slot", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_ACTIONS, "SELECT a.button, a.action, a.type FROM character_action as a, characters as c WHERE a.guid = c.guid AND a.spec = c.activespec AND a.guid = ? ORDER BY button", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_MAILCOUNT, "SELECT COUNT(id) FROM mail WHERE receiver = ? AND (checked & 1) = 0 AND deliver_time <= ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_MAILDATE, "SELECT MIN(deliver_time) FROM mail WHERE receiver = ? AND (checked & 1) = 0", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_SOCIALLIST, "SELECT friend, flags, note FROM character_social JOIN characters ON characters.guid = character_social.friend WHERE character_social.guid = ? AND deleteinfos_name IS NULL LIMIT 255", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_HOMEBIND, "SELECT mapId, zoneId, posX, posY, posZ FROM character_homebind WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_SPELLCOOLDOWNS, "SELECT spell, item, time FROM character_spell_cooldown WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_DECLINEDNAMES, "SELECT genitive, dative, accusative, instrumental, prepositional FROM character_declinedname WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_GUILD, "SELECT guildid, rank FROM guild_member WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_ACHIEVEMENTS, "SELECT achievement, date FROM character_achievement WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_CRITERIAPROGRESS, "SELECT criteria, counter, date FROM character_achievement_progress WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_EQUIPMENTSETS, "SELECT setguid, setindex, name, iconname, item0, item1, item2, item3, item4, item5, item6, item7, item8, " + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_ACTIONS, "SELECT a.button, a.action, a.type FROM character_action as a, characters as c WHERE a.guid = c.guid AND a.spec = c.activespec AND a.guid = ? ORDER BY button", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_MAILCOUNT, "SELECT COUNT(id) FROM mail WHERE receiver = ? AND (checked & 1) = 0 AND deliver_time <= ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_MAILDATE, "SELECT MIN(deliver_time) FROM mail WHERE receiver = ? AND (checked & 1) = 0", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_SOCIALLIST, "SELECT friend, flags, note FROM character_social JOIN characters ON characters.guid = character_social.friend WHERE character_social.guid = ? AND deleteinfos_name IS NULL LIMIT 255", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_HOMEBIND, "SELECT mapId, zoneId, posX, posY, posZ FROM character_homebind WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_SPELLCOOLDOWNS, "SELECT spell, item, time FROM character_spell_cooldown WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_DECLINEDNAMES, "SELECT genitive, dative, accusative, instrumental, prepositional FROM character_declinedname WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_GUILD_MEMBER, "SELECT guildid, rank FROM guild_member WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_ACHIEVEMENTS, "SELECT achievement, date FROM character_achievement WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_CRITERIAPROGRESS, "SELECT criteria, counter, date FROM character_achievement_progress WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_EQUIPMENTSETS, "SELECT setguid, setindex, name, iconname, item0, item1, item2, item3, item4, item5, item6, item7, item8, " "item9, item10, item11, item12, item13, item14, item15, item16, item17, item18 FROM character_equipmentsets WHERE guid = ? ORDER BY setindex", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_BGDATA, "SELECT instanceId, team, joinX, joinY, joinZ, joinO, joinMapId, taxiStart, taxiEnd, mountSpell FROM character_battleground_data WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_GLYPHS, "SELECT spec, glyph1, glyph2, glyph3, glyph4, glyph5, glyph6 FROM character_glyphs WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_TALENTS, "SELECT spell, spec FROM character_talent WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_SKILLS, "SELECT skill, value, max FROM character_skills WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_RANDOMBG, "SELECT guid FROM character_battleground_random WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_BANNED, "SELECT guid FROM character_banned WHERE guid = ? AND active = 1", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_QUESTSTATUSREW, "SELECT quest FROM character_queststatus_rewarded WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_ACCOUNT_INSTANCELOCKTIMES, "SELECT instanceId, releaseTime FROM account_instance_times WHERE accountId = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_BGDATA, "SELECT instanceId, team, joinX, joinY, joinZ, joinO, joinMapId, taxiStart, taxiEnd, mountSpell FROM character_battleground_data WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_GLYPHS, "SELECT spec, glyph1, glyph2, glyph3, glyph4, glyph5, glyph6 FROM character_glyphs WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_TALENTS, "SELECT spell, spec FROM character_talent WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_SKILLS, "SELECT skill, value, max FROM character_skills WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_RANDOMBG, "SELECT guid FROM character_battleground_random WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_BANNED, "SELECT guid FROM character_banned WHERE guid = ? AND active = 1", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_QUESTSTATUSREW, "SELECT quest FROM character_queststatus_rewarded WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_ACCOUNT_INSTANCELOCKTIMES, "SELECT instanceId, releaseTime FROM account_instance_times WHERE accountId = ?", CONNECTION_ASYNC) // End LoginQueryHolder content - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_ACTIONS_SPEC, "SELECT button, action, type FROM character_action WHERE guid = ? AND spec = ? ORDER BY button", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_MAILITEMS, "SELECT creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomPropertyId, durability, playedTime, text, item_guid, itemEntry, owner_guid FROM mail_items mi JOIN item_instance ii ON mi.item_guid = ii.guid WHERE mail_id = ?", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_LOAD_AUCTION_ITEMS, "SELECT creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomPropertyId, durability, playedTime, text, itemguid, itemEntry FROM auctionhouse ah JOIN item_instance ii ON ah.itemguid = ii.guid", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_LOAD_AUCTIONS, "SELECT id, auctioneerguid, itemguid, itemEntry, itemowner, buyoutprice, time, buyguid, lastbid, startbid, deposit FROM auctionhouse ah INNER JOIN item_instance ii ON ii.guid = ah.itemguid", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_ADD_AUCTION, "INSERT INTO auctionhouse (id, auctioneerguid, itemguid, itemowner, buyoutprice, time, buyguid, lastbid, startbid, deposit) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_ACTIONS_SPEC, "SELECT button, action, type FROM character_action WHERE guid = ? AND spec = ? ORDER BY button", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_SEL_MAILITEMS, "SELECT creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomPropertyId, durability, playedTime, text, item_guid, itemEntry, owner_guid FROM mail_items mi JOIN item_instance ii ON mi.item_guid = ii.guid WHERE mail_id = ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_SEL_AUCTION_ITEMS, "SELECT creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomPropertyId, durability, playedTime, text, itemguid, itemEntry FROM auctionhouse ah JOIN item_instance ii ON ah.itemguid = ii.guid", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_SEL_AUCTIONS, "SELECT id, auctioneerguid, itemguid, itemEntry, itemowner, buyoutprice, time, buyguid, lastbid, startbid, deposit FROM auctionhouse ah INNER JOIN item_instance ii ON ii.guid = ah.itemguid", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_INS_AUCTION, "INSERT INTO auctionhouse (id, auctioneerguid, itemguid, itemowner, buyoutprice, time, buyguid, lastbid, startbid, deposit) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_AUCTION, "DELETE FROM auctionhouse WHERE id = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_ADD_MAIL, "INSERT INTO mail(id, messageType, stationery, mailTemplateId, sender, receiver, subject, body, has_items, expire_time, deliver_time, money, cod, checked) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_MAIL, "INSERT INTO mail(id, messageType, stationery, mailTemplateId, sender, receiver, subject, body, has_items, expire_time, deliver_time, money, cod, checked) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_MAIL, "DELETE FROM mail WHERE id = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_ADD_MAIL_ITEM, "INSERT INTO mail_items(mail_id, item_guid, receiver) VALUES (?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_MAIL_ITEM, "INSERT INTO mail_items(mail_id, item_guid, receiver) VALUES (?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_DEL_MAIL_ITEM, "DELETE FROM mail_items WHERE item_guid = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_INVALID_MAIL_ITEM, "DELETE FROM mail_items WHERE item_guid = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_EMPTY_EXPIRED_MAIL, "DELETE FROM mail WHERE expire_time < ? AND has_items = 0 AND body = ''", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_GET_EXPIRED_MAIL, "SELECT id, messageType, sender, receiver, has_items, expire_time, cod, checked, mailTemplateId FROM mail WHERE expire_time < ?", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_GET_EXPIRED_MAIL_ITEMS, "SELECT item_guid, itemEntry, mail_id FROM mail_items mi INNER JOIN item_instance ii ON ii.guid = mi.item_guid LEFT JOIN mail mm ON mi.mail_id = mm.id WHERE mm.id IS NOT NULL AND mm.expire_time < ?", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_SET_MAIL_RETURNED, "UPDATE mail SET sender = ?, receiver = ?, expire_time = ?, deliver_time = ?, cod = 0, checked = ? WHERE id = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_MAIL_ITEM_RECEIVER, "UPDATE mail_items SET receiver = ? WHERE item_guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_ITEM_OWNER, "UPDATE item_instance SET owner_guid = ? WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_EXPIRED_MAIL, "SELECT id, messageType, sender, receiver, has_items, expire_time, cod, checked, mailTemplateId FROM mail WHERE expire_time < ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_SEL_EXPIRED_MAIL_ITEMS, "SELECT item_guid, itemEntry, mail_id FROM mail_items mi INNER JOIN item_instance ii ON ii.guid = mi.item_guid LEFT JOIN mail mm ON mi.mail_id = mm.id WHERE mm.id IS NOT NULL AND mm.expire_time < ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_UPD_MAIL_RETURNED, "UPDATE mail SET sender = ?, receiver = ?, expire_time = ?, deliver_time = ?, cod = 0, checked = ? WHERE id = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_MAIL_ITEM_RECEIVER, "UPDATE mail_items SET receiver = ? WHERE item_guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_ITEM_OWNER, "UPDATE item_instance SET owner_guid = ? WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_ITEM_REFUNDS, "SELECT player_guid, paidMoney, paidExtendedCost FROM item_refund_instance WHERE item_guid = ? AND player_guid = ? LIMIT 1", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_LOAD_ITEM_BOP_TRADE, "SELECT allowedPlayers FROM item_soulbound_trade_data WHERE itemGuid = ? LIMIT 1", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_SEL_ITEM_REFUNDS, "SELECT player_guid, paidMoney, paidExtendedCost FROM item_refund_instance WHERE item_guid = ? AND player_guid = ? LIMIT 1", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_SEL_ITEM_BOP_TRADE, "SELECT allowedPlayers FROM item_soulbound_trade_data WHERE itemGuid = ? LIMIT 1", CONNECTION_SYNCH) PREPARE_STATEMENT(CHAR_DEL_ITEM_BOP_TRADE, "DELETE FROM item_soulbound_trade_data WHERE itemGuid = ? LIMIT 1", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_ADD_ITEM_BOP_TRADE, "INSERT INTO item_soulbound_trade_data VALUES (?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_ITEM_BOP_TRADE, "INSERT INTO item_soulbound_trade_data VALUES (?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_REP_INVENTORY_ITEM, "REPLACE INTO character_inventory (guid, bag, slot, item) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_INVENTORY_ITEM, "DELETE FROM character_inventory WHERE item = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_ADD_ITEM_INSTANCE, "REPLACE INTO item_instance (itemEntry, owner_guid, creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomPropertyId, durability, playedTime, text, guid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_UPDATE_ITEM_INSTANCE, "UPDATE item_instance SET itemEntry = ?, owner_guid = ?, creatorGuid = ?, giftCreatorGuid = ?, count = ?, duration = ?, charges = ?, flags = ?, enchantments = ?, randomPropertyId = ?, durability = ?, playedTime = ?, text = ? WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_UPDATE_ITEM_INSTANCE_ON_LOAD, "UPDATE item_instance SET duration = ?, flags = ?, durability = ? WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_REP_ITEM_INSTANCE, "REPLACE INTO item_instance (itemEntry, owner_guid, creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomPropertyId, durability, playedTime, text, guid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_ITEM_INSTANCE, "UPDATE item_instance SET itemEntry = ?, owner_guid = ?, creatorGuid = ?, giftCreatorGuid = ?, count = ?, duration = ?, charges = ?, flags = ?, enchantments = ?, randomPropertyId = ?, durability = ?, playedTime = ?, text = ? WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_ITEM_INSTANCE_ON_LOAD, "UPDATE item_instance SET duration = ?, flags = ?, durability = ? WHERE guid = ?", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_ITEM_INSTANCE, "DELETE FROM item_instance WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_UPDATE_GIFT_OWNER, "UPDATE character_gifts SET guid = ? WHERE item_guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GIFT_OWNER, "UPDATE character_gifts SET guid = ? WHERE item_guid = ?", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_GIFT, "DELETE FROM character_gifts WHERE item_guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_GET_ACCOUNT_BY_NAME, "SELECT account FROM characters WHERE name = ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_SEL_ACCOUNT_BY_NAME, "SELECT account FROM characters WHERE name = ?", CONNECTION_SYNCH) PREPARE_STATEMENT(CHAR_DEL_ACCOUNT_INSTANCE_LOCK_TIMES, "DELETE FROM account_instance_times WHERE accountId = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_ADD_ACCOUNT_INSTANCE_LOCK_TIMES, "INSERT INTO account_instance_times (accountId, instanceId, releaseTime) VALUES (?, ?, ?)", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_NAME_CLASS, "SELECT name, class FROM characters WHERE guid = ?", CONNECTION_SYNCH); - PREPARE_STATEMENT(CHAR_LOAD_MATCH_MAKER_RATING, "SELECT matchMakerRating FROM character_arena_stats WHERE guid = ? AND slot = ?", CONNECTION_SYNCH); - PREPARE_STATEMENT(CHAR_GET_CHARACTER_COUNT, "SELECT account, COUNT(guid) FROM characters WHERE account = ? GROUP BY account", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_NAME, "UPDATE characters set name = ?, at_login = at_login & ~ ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_INS_ACCOUNT_INSTANCE_LOCK_TIMES, "INSERT INTO account_instance_times (accountId, instanceId, releaseTime) VALUES (?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_NAME_CLASS, "SELECT name, class FROM characters WHERE guid = ?", CONNECTION_SYNCH); + PREPARE_STATEMENT(CHAR_SEL_MATCH_MAKER_RATING, "SELECT matchMakerRating FROM character_arena_stats WHERE guid = ? AND slot = ?", CONNECTION_SYNCH); + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_COUNT, "SELECT account, COUNT(guid) FROM characters WHERE account = ? GROUP BY account", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_NAME, "UPDATE characters set name = ?, at_login = at_login & ~ ? WHERE guid = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_DECLINED_NAME, "DELETE FROM character_declinedname WHERE guid = ?", CONNECTION_ASYNC); // Guild handling // 0: uint32, 1: string, 2: uint32, 3: string, 4: string, 5: uint64, 6-10: uint32, 11: uint64 - PREPARE_STATEMENT(CHAR_ADD_GUILD, "INSERT INTO guild (guildid, name, leaderguid, info, motd, createdate, EmblemStyle, EmblemColor, BorderStyle, BorderColor, BackgroundColor, BankMoney) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_GUILD, "INSERT INTO guild (guildid, name, leaderguid, info, motd, createdate, EmblemStyle, EmblemColor, BorderStyle, BorderColor, BackgroundColor, BankMoney) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_GUILD, "DELETE FROM guild WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint32 // 0: uint32, 1: uint32, 2: uint8, 4: string, 5: string - PREPARE_STATEMENT(CHAR_ADD_GUILD_MEMBER, "INSERT INTO guild_member (guildid, guid, rank, pnote, offnote) VALUES (?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_GUILD_MEMBER, "INSERT INTO guild_member (guildid, guid, rank, pnote, offnote) VALUES (?, ?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_GUILD_MEMBER, "DELETE FROM guild_member WHERE guid = ?", CONNECTION_ASYNC) // 0: uint32 PREPARE_STATEMENT(CHAR_DEL_GUILD_MEMBERS, "DELETE FROM guild_member WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint32 // 0: uint32, 1: uint8, 3: string, 4: uint32 - PREPARE_STATEMENT(CHAR_ADD_GUILD_RANK, "INSERT INTO guild_rank (guildid, rid, rname, rights) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_GUILD_RANK, "INSERT INTO guild_rank (guildid, rid, rname, rights) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_GUILD_RANKS, "DELETE FROM guild_rank WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint32 PREPARE_STATEMENT(CHAR_DEL_GUILD_LOWEST_RANK, "DELETE FROM guild_rank WHERE guildid = ? AND rid >= ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8 - PREPARE_STATEMENT(CHAR_ADD_GUILD_BANK_TAB, "INSERT INTO guild_bank_tab (guildid, TabId) VALUES (?, ?)", CONNECTION_ASYNC) // 0: uint32, 1: uint8 + PREPARE_STATEMENT(CHAR_INS_GUILD_BANK_TAB, "INSERT INTO guild_bank_tab (guildid, TabId) VALUES (?, ?)", CONNECTION_ASYNC) // 0: uint32, 1: uint8 PREPARE_STATEMENT(CHAR_DEL_GUILD_BANK_TAB, "DELETE FROM guild_bank_tab WHERE guildid = ? AND TabId = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8 PREPARE_STATEMENT(CHAR_DEL_GUILD_BANK_TABS, "DELETE FROM guild_bank_tab WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint32 // 0: uint32, 1: uint8, 2: uint8, 3: uint32, 4: uint32 - PREPARE_STATEMENT(CHAR_ADD_GUILD_BANK_ITEM, "INSERT INTO guild_bank_item (guildid, TabId, SlotId, item_guid) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_GUILD_BANK_ITEM, "INSERT INTO guild_bank_item (guildid, TabId, SlotId, item_guid) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_GUILD_BANK_ITEM, "DELETE FROM guild_bank_item WHERE guildid = ? AND TabId = ? AND SlotId = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8, 2: uint8 PREPARE_STATEMENT(CHAR_DEL_GUILD_BANK_ITEMS, "DELETE FROM guild_bank_item WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint32 - PREPARE_STATEMENT(CHAR_ADD_GUILD_BANK_RIGHT_DEFAULT, "INSERT INTO guild_bank_right (guildid, TabId, rid) VALUES (?, ?, ?)", CONNECTION_ASYNC) // 0: uint32, 1: uint8, 2: uint8 + PREPARE_STATEMENT(CHAR_INS_GUILD_BANK_RIGHT_DEFAULT, "INSERT INTO guild_bank_right (guildid, TabId, rid) VALUES (?, ?, ?)", CONNECTION_ASYNC) // 0: uint32, 1: uint8, 2: uint8 // 0: uint32, 1: uint8, 2: uint8, 3: uint8, 4: uint32 - PREPARE_STATEMENT(CHAR_ADD_GUILD_BANK_RIGHT, "INSERT INTO guild_bank_right (guildid, TabId, rid, gbright, SlotPerDay) VALUES (?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_GUILD_BANK_RIGHT, "INSERT INTO guild_bank_right (guildid, TabId, rid, gbright, SlotPerDay) VALUES (?, ?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_GUILD_BANK_RIGHT, "DELETE FROM guild_bank_right WHERE guildid = ? AND TabId = ? AND rid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8, 2: uint8 PREPARE_STATEMENT(CHAR_DEL_GUILD_BANK_RIGHTS, "DELETE FROM guild_bank_right WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint32 PREPARE_STATEMENT(CHAR_DEL_GUILD_BANK_RIGHTS_FOR_RANK, "DELETE FROM guild_bank_right WHERE guildid = ? AND rid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8 // 0-1: uint32, 2-3: uint8, 4-5: uint32, 6: uint16, 7: uint8, 8: uint64 - PREPARE_STATEMENT(CHAR_ADD_GUILD_BANK_EVENTLOG, "INSERT INTO guild_bank_eventlog (guildid, LogGuid, TabId, EventType, PlayerGuid, ItemOrMoney, ItemStackCount, DestTabId, TimeStamp) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_GUILD_BANK_EVENTLOG, "INSERT INTO guild_bank_eventlog (guildid, LogGuid, TabId, EventType, PlayerGuid, ItemOrMoney, ItemStackCount, DestTabId, TimeStamp) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_GUILD_BANK_EVENTLOG, "DELETE FROM guild_bank_eventlog WHERE guildid = ? AND LogGuid = ? AND TabId = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint32, 2: uint8 PREPARE_STATEMENT(CHAR_DEL_GUILD_BANK_EVENTLOGS, "DELETE FROM guild_bank_eventlog WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint32 // 0-1: uint32, 2: uint8, 3-4: uint32, 5: uint8, 6: uint64 - PREPARE_STATEMENT(CHAR_ADD_GUILD_EVENTLOG, "INSERT INTO guild_eventlog (guildid, LogGuid, EventType, PlayerGuid1, PlayerGuid2, NewRank, TimeStamp) VALUES (?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_GUILD_EVENTLOG, "INSERT INTO guild_eventlog (guildid, LogGuid, EventType, PlayerGuid1, PlayerGuid2, NewRank, TimeStamp) VALUES (?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_GUILD_EVENTLOG, "DELETE FROM guild_eventlog WHERE guildid = ? AND LogGuid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint32 PREPARE_STATEMENT(CHAR_DEL_GUILD_EVENTLOGS, "DELETE FROM guild_eventlog WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint32 - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_PNOTE, "UPDATE guild_member SET pnote = ? WHERE guid = ?", CONNECTION_ASYNC) // 0: string, 1: uint32 - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_OFFNOTE, "UPDATE guild_member SET offnote = ? WHERE guid = ?", CONNECTION_ASYNC) // 0: string, 1: uint32 - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_RANK, "UPDATE guild_member SET rank = ? WHERE guid = ?", CONNECTION_ASYNC) // 0: uint8, 1: uint32 - PREPARE_STATEMENT(CHAR_SET_GUILD_MOTD, "UPDATE guild SET motd = ? WHERE guildid = ?", CONNECTION_ASYNC) // 0: string, 1: uint32 - PREPARE_STATEMENT(CHAR_SET_GUILD_INFO, "UPDATE guild SET info = ? WHERE guildid = ?", CONNECTION_ASYNC) // 0: string, 1: uint32 - PREPARE_STATEMENT(CHAR_SET_GUILD_LEADER, "UPDATE guild SET leaderguid = ? WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint32 - PREPARE_STATEMENT(CHAR_SET_GUILD_RANK_NAME, "UPDATE guild_rank SET rname = ? WHERE rid = ? AND guildid = ?", CONNECTION_ASYNC) // 0: string, 1: uint8, 2: uint32 - PREPARE_STATEMENT(CHAR_SET_GUILD_RANK_RIGHTS, "UPDATE guild_rank SET rights = ? WHERE rid = ? AND guildid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8, 2: uint32 + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_PNOTE, "UPDATE guild_member SET pnote = ? WHERE guid = ?", CONNECTION_ASYNC) // 0: string, 1: uint32 + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_OFFNOTE, "UPDATE guild_member SET offnote = ? WHERE guid = ?", CONNECTION_ASYNC) // 0: string, 1: uint32 + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_RANK, "UPDATE guild_member SET rank = ? WHERE guid = ?", CONNECTION_ASYNC) // 0: uint8, 1: uint32 + PREPARE_STATEMENT(CHAR_UPD_GUILD_MOTD, "UPDATE guild SET motd = ? WHERE guildid = ?", CONNECTION_ASYNC) // 0: string, 1: uint32 + PREPARE_STATEMENT(CHAR_UPD_GUILD_INFO, "UPDATE guild SET info = ? WHERE guildid = ?", CONNECTION_ASYNC) // 0: string, 1: uint32 + PREPARE_STATEMENT(CHAR_UPD_GUILD_LEADER, "UPDATE guild SET leaderguid = ? WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint32 + PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_NAME, "UPDATE guild_rank SET rname = ? WHERE rid = ? AND guildid = ?", CONNECTION_ASYNC) // 0: string, 1: uint8, 2: uint32 + PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_RIGHTS, "UPDATE guild_rank SET rights = ? WHERE rid = ? AND guildid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8, 2: uint32 // 0-5: uint32 - PREPARE_STATEMENT(CHAR_SET_GUILD_EMBLEM_INFO, "UPDATE guild SET EmblemStyle = ?, EmblemColor = ?, BorderStyle = ?, BorderColor = ?, BackgroundColor = ? WHERE guildid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_EMBLEM_INFO, "UPDATE guild SET EmblemStyle = ?, EmblemColor = ?, BorderStyle = ?, BorderColor = ?, BackgroundColor = ? WHERE guildid = ?", CONNECTION_ASYNC) // 0: string, 1: string, 2: uint32, 3: uint8 - PREPARE_STATEMENT(CHAR_SET_GUILD_BANK_TAB_INFO, "UPDATE guild_bank_tab SET TabName = ?, TabIcon = ? WHERE guildid = ? AND TabId = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_GUILD_BANK_MONEY, "UPDATE guild SET BankMoney = ? WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint64, 1: uint32 + PREPARE_STATEMENT(CHAR_UPD_GUILD_BANK_TAB_INFO, "UPDATE guild_bank_tab SET TabName = ?, TabIcon = ? WHERE guildid = ? AND TabId = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_BANK_MONEY, "UPDATE guild SET BankMoney = ? WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint64, 1: uint32 // 0: uint8, 1: uint32, 2: uint8, 3: uint32 - PREPARE_STATEMENT(CHAR_SET_GUILD_BANK_EVENTLOG_TAB, "UPDATE guild_bank_eventlog SET TabId = ? WHERE guildid = ? AND TabId = ? AND LogGuid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_BANK_REM_MONEY, "UPDATE guild_member SET BankRemMoney = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint32, 2: uint32 - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_BANK_TIME_MONEY, "UPDATE guild_member SET BankResetTimeMoney = ?, BankRemMoney = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint32, 2: uint32, 3: uint32 - PREPARE_STATEMENT(CHAR_RESET_GUILD_RANK_BANK_RESET_TIME, "UPDATE guild_member SET BankResetTimeMoney = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8 - PREPARE_STATEMENT(CHAR_SET_GUILD_RANK_BANK_MONEY, "UPDATE guild_rank SET BankMoneyPerDay = ? WHERE rid = ? AND guildid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8, 2: uint32 - PREPARE_STATEMENT(CHAR_SET_GUILD_BANK_TAB_TEXT, "UPDATE guild_bank_tab SET TabText = ? WHERE guildid = ? AND TabId = ?", CONNECTION_ASYNC) // 0: string, 1: uint32, 2: uint8 + PREPARE_STATEMENT(CHAR_UPD_GUILD_BANK_EVENTLOG_TAB, "UPDATE guild_bank_eventlog SET TabId = ? WHERE guildid = ? AND TabId = ? AND LogGuid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_REM_MONEY, "UPDATE guild_member SET BankRemMoney = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint32, 2: uint32 + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_TIME_MONEY, "UPDATE guild_member SET BankResetTimeMoney = ?, BankRemMoney = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint32, 2: uint32, 3: uint32 + PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_RESET_TIME, "UPDATE guild_member SET BankResetTimeMoney = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8 + PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_MONEY, "UPDATE guild_rank SET BankMoneyPerDay = ? WHERE rid = ? AND guildid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8, 2: uint32 + PREPARE_STATEMENT(CHAR_UPD_GUILD_BANK_TAB_TEXT, "UPDATE guild_bank_tab SET TabText = ? WHERE guildid = ? AND TabId = ?", CONNECTION_ASYNC) // 0: string, 1: uint32, 2: uint8 // 0: uint32, 1: uint32, 2: uint32 - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_BANK_REM_SLOTS0, "UPDATE guild_member SET BankRemSlotsTab0 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_BANK_REM_SLOTS1, "UPDATE guild_member SET BankRemSlotsTab1 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_BANK_REM_SLOTS2, "UPDATE guild_member SET BankRemSlotsTab2 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_BANK_REM_SLOTS3, "UPDATE guild_member SET BankRemSlotsTab3 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_BANK_REM_SLOTS4, "UPDATE guild_member SET BankRemSlotsTab4 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_BANK_REM_SLOTS5, "UPDATE guild_member SET BankRemSlotsTab5 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS0, "UPDATE guild_member SET BankRemSlotsTab0 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS1, "UPDATE guild_member SET BankRemSlotsTab1 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS2, "UPDATE guild_member SET BankRemSlotsTab2 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS3, "UPDATE guild_member SET BankRemSlotsTab3 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS4, "UPDATE guild_member SET BankRemSlotsTab4 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS5, "UPDATE guild_member SET BankRemSlotsTab5 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint32, 2: uint32, 3: uint32 - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_BANK_TIME_REM_SLOTS0, "UPDATE guild_member SET BankResetTimeTab0 = ?, BankRemSlotsTab0 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_BANK_TIME_REM_SLOTS1, "UPDATE guild_member SET BankResetTimeTab1 = ?, BankRemSlotsTab1 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_BANK_TIME_REM_SLOTS2, "UPDATE guild_member SET BankResetTimeTab2 = ?, BankRemSlotsTab2 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_BANK_TIME_REM_SLOTS3, "UPDATE guild_member SET BankResetTimeTab3 = ?, BankRemSlotsTab3 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_BANK_TIME_REM_SLOTS4, "UPDATE guild_member SET BankResetTimeTab4 = ?, BankRemSlotsTab4 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_GUILD_MEMBER_BANK_TIME_REM_SLOTS5, "UPDATE guild_member SET BankResetTimeTab5 = ?, BankRemSlotsTab5 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS0, "UPDATE guild_member SET BankResetTimeTab0 = ?, BankRemSlotsTab0 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS1, "UPDATE guild_member SET BankResetTimeTab1 = ?, BankRemSlotsTab1 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS2, "UPDATE guild_member SET BankResetTimeTab2 = ?, BankRemSlotsTab2 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS3, "UPDATE guild_member SET BankResetTimeTab3 = ?, BankRemSlotsTab3 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS4, "UPDATE guild_member SET BankResetTimeTab4 = ?, BankRemSlotsTab4 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS5, "UPDATE guild_member SET BankResetTimeTab5 = ?, BankRemSlotsTab5 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8 - PREPARE_STATEMENT(CHAR_RESET_GUILD_RANK_BANK_TIME0, "UPDATE guild_member SET BankResetTimeTab0 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_RESET_GUILD_RANK_BANK_TIME1, "UPDATE guild_member SET BankResetTimeTab1 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_RESET_GUILD_RANK_BANK_TIME2, "UPDATE guild_member SET BankResetTimeTab2 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_RESET_GUILD_RANK_BANK_TIME3, "UPDATE guild_member SET BankResetTimeTab3 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_RESET_GUILD_RANK_BANK_TIME4, "UPDATE guild_member SET BankResetTimeTab4 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_RESET_GUILD_RANK_BANK_TIME5, "UPDATE guild_member SET BankResetTimeTab5 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_CHAR_DATA_FOR_GUILD, "SELECT name, level, class, zone, account FROM characters WHERE guid = ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_TIME0, "UPDATE guild_member SET BankResetTimeTab0 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_TIME1, "UPDATE guild_member SET BankResetTimeTab1 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_TIME2, "UPDATE guild_member SET BankResetTimeTab2 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_TIME3, "UPDATE guild_member SET BankResetTimeTab3 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_TIME4, "UPDATE guild_member SET BankResetTimeTab4 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_TIME5, "UPDATE guild_member SET BankResetTimeTab5 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHAR_DATA_FOR_GUILD, "SELECT name, level, class, zone, account FROM characters WHERE guid = ?", CONNECTION_SYNCH) // Chat channel handling - PREPARE_STATEMENT(CHAR_LOAD_CHANNEL, "SELECT announce, ownership, password, bannedList FROM channels WHERE name = ? AND team = ?", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_ADD_CHANNEL, "INSERT INTO channels(name, team, lastUsed) VALUES (?, ?, UNIX_TIMESTAMP())", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_CHANNEL, "UPDATE channels SET announce = ?, ownership = ?, password = ?, bannedList = ?, lastUsed = UNIX_TIMESTAMP() WHERE name = ? AND team = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_CHANNEL_USAGE, "UPDATE channels SET lastUsed = UNIX_TIMESTAMP() WHERE name = ? AND team = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_CHANNEL_OWNERSHIP, "UPDATE channels SET ownership = ? WHERE name LIKE ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CHANNEL, "SELECT announce, ownership, password, bannedList FROM channels WHERE name = ? AND team = ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_INS_CHANNEL, "INSERT INTO channels(name, team, lastUsed) VALUES (?, ?, UNIX_TIMESTAMP())", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_CHANNEL, "UPDATE channels SET announce = ?, ownership = ?, password = ?, bannedList = ?, lastUsed = UNIX_TIMESTAMP() WHERE name = ? AND team = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_CHANNEL_USAGE, "UPDATE channels SET lastUsed = UNIX_TIMESTAMP() WHERE name = ? AND team = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_CHANNEL_OWNERSHIP, "UPDATE channels SET ownership = ? WHERE name LIKE ?", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_OLD_CHANNELS, "DELETE FROM channels WHERE ownership = 1 AND lastUsed + ? < UNIX_TIMESTAMP()", CONNECTION_ASYNC) // Equipmentsets - PREPARE_STATEMENT(CHAR_SET_EQUIP_SET, "UPDATE character_equipmentsets SET name=?, iconname=?, item0=?, item1=?, item2=?, item3=?, item4=?, item5=?, item6=?, item7=?, item8=?, item9=?, item10=?, item11=?, item12=?, item13=?, item14=?, item15=?, item16=?, item17=?, item18=? WHERE guid=? AND setguid=? AND setindex=?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_ADD_EQUIP_SET, "INSERT INTO character_equipmentsets (guid, setguid, setindex, name, iconname, item0, item1, item2, item3, item4, item5, item6, item7, item8, item9, item10, item11, item12, item13, item14, item15, item16, item17, item18) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_EQUIP_SET, "UPDATE character_equipmentsets SET name=?, iconname=?, item0=?, item1=?, item2=?, item3=?, item4=?, item5=?, item6=?, item7=?, item8=?, item9=?, item10=?, item11=?, item12=?, item13=?, item14=?, item15=?, item16=?, item17=?, item18=? WHERE guid=? AND setguid=? AND setindex=?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_EQUIP_SET, "INSERT INTO character_equipmentsets (guid, setguid, setindex, name, iconname, item0, item1, item2, item3, item4, item5, item6, item7, item8, item9, item10, item11, item12, item13, item14, item15, item16, item17, item18) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_EQUIP_SET, "DELETE FROM character_equipmentsets WHERE setguid=?", CONNECTION_ASYNC) // Auras PREPARE_STATEMENT(CHAR_DEL_AURA, "DELETE FROM character_aura WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_ADD_AURA, "INSERT INTO character_aura (guid, caster_guid, item_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, maxduration, remaintime, remaincharges) " + PREPARE_STATEMENT(CHAR_INS_AURA, "INSERT INTO character_aura (guid, caster_guid, item_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, maxduration, remaintime, remaincharges) " "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) // Account data - PREPARE_STATEMENT(CHAR_LOAD_ACCOUNT_DATA, "SELECT type, time, data FROM account_data WHERE accountId = ?", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_SET_ACCOUNT_DATA, "REPLACE INTO account_data(accountId, type, time, data) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_ACCOUNT_DATA, "SELECT type, time, data FROM account_data WHERE accountId = ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_REP_ACCOUNT_DATA, "REPLACE INTO account_data(accountId, type, time, data) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_ACCOUNT_DATA, "DELETE FROM account_data WHERE accountId = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_ACCOUNT_DATA, "SELECT type, time, data FROM character_account_data WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_PLAYER_ACCOUNT_DATA, "REPLACE INTO character_account_data(guid, type, time, data) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_PLAYER_ACCOUNT_DATA, "SELECT type, time, data FROM character_account_data WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_REP_PLAYER_ACCOUNT_DATA, "REPLACE INTO character_account_data(guid, type, time, data) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_PLAYER_ACCOUNT_DATA, "DELETE FROM character_account_data WHERE guid = ?", CONNECTION_ASYNC) // Tutorials - PREPARE_STATEMENT(CHAR_LOAD_TUTORIALS, "SELECT tut0, tut1, tut2, tut3, tut4, tut5, tut6, tut7 FROM account_tutorial WHERE accountId = ?", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_GET_HAS_TUTORIALS, "SELECT 1 FROM account_tutorial WHERE accountId = ?", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_ADD_TUTORIALS, "INSERT INTO account_tutorial(tut0, tut1, tut2, tut3, tut4, tut5, tut6, tut7, accountId) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_TUTORIALS, "UPDATE account_tutorial SET tut0 = ?, tut1 = ?, tut2 = ?, tut3 = ?, tut4 = ?, tut5 = ?, tut6 = ?, tut7 = ? WHERE accountId = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_TUTORIALS, "SELECT tut0, tut1, tut2, tut3, tut4, tut5, tut6, tut7 FROM account_tutorial WHERE accountId = ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_SEL_HAS_TUTORIALS, "SELECT 1 FROM account_tutorial WHERE accountId = ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_INS_TUTORIALS, "INSERT INTO account_tutorial(tut0, tut1, tut2, tut3, tut4, tut5, tut6, tut7, accountId) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_TUTORIALS, "UPDATE account_tutorial SET tut0 = ?, tut1 = ?, tut2 = ?, tut3 = ?, tut4 = ?, tut5 = ?, tut6 = ?, tut7 = ? WHERE accountId = ?", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_TUTORIALS, "DELETE FROM account_tutorial WHERE accountId = ?", CONNECTION_ASYNC) // Instance saves - PREPARE_STATEMENT(CHAR_ADD_INSTANCE_SAVE, "INSERT INTO instance (id, map, resettime, difficulty, completedEncounters, data) VALUES (?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_UPDATE_INSTANCE_DATA, "UPDATE instance SET completedEncounters=?, data=? WHERE id=?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_INSTANCE_SAVE, "INSERT INTO instance (id, map, resettime, difficulty, completedEncounters, data) VALUES (?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_INSTANCE_DATA, "UPDATE instance SET completedEncounters=?, data=? WHERE id=?", CONNECTION_ASYNC) // Game event saves PREPARE_STATEMENT(CHAR_DEL_GAME_EVENT_SAVE, "DELETE FROM game_event_save WHERE eventEntry = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_ADD_GAME_EVENT_SAVE, "INSERT INTO game_event_save (eventEntry, state, next_start) VALUES (?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_GAME_EVENT_SAVE, "INSERT INTO game_event_save (eventEntry, state, next_start) VALUES (?, ?, ?)", CONNECTION_ASYNC) // Game event condition saves PREPARE_STATEMENT(CHAR_DEL_ALL_GAME_EVENT_CONDITION_SAVE, "DELETE FROM game_event_condition_save WHERE eventEntry = ?", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_GAME_EVENT_CONDITION_SAVE, "DELETE FROM game_event_condition_save WHERE eventEntry = ? AND condition_id = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_ADD_GAME_EVENT_CONDITION_SAVE, "INSERT INTO game_event_condition_save (eventEntry, condition_id, done) VALUES (?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_GAME_EVENT_CONDITION_SAVE, "INSERT INTO game_event_condition_save (eventEntry, condition_id, done) VALUES (?, ?, ?)", CONNECTION_ASYNC) // Petitions - PREPARE_STATEMENT(CHAR_LOAD_PETITION, "SELECT ownerguid, name, type FROM petition WHERE petitionguid = ?", CONNECTION_SYNCH); - PREPARE_STATEMENT(CHAR_LOAD_PETITION_SIGNATURE, "SELECT playerguid FROM petition_sign WHERE petitionguid = ?", CONNECTION_SYNCH); + PREPARE_STATEMENT(CHAR_SEL_PETITION, "SELECT ownerguid, name, type FROM petition WHERE petitionguid = ?", CONNECTION_SYNCH); + PREPARE_STATEMENT(CHAR_SEL_PETITION_SIGNATURE, "SELECT playerguid FROM petition_sign WHERE petitionguid = ?", CONNECTION_SYNCH); + PREPARE_STATEMENT(CHAR_DEL_ALL_PETITION_SIGNATURES, "DELETE FROM petition_sign WHERE playerguid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_DEL_PETITION_SIGNATURE, "DELETE FROM petition_sign WHERE playerguid = ? AND type = ?", CONNECTION_ASYNC); // Arena teams - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_ARENAINFO, "SELECT arenaTeamId, weekGames, seasonGames, seasonWins, personalRating FROM arena_team_member WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_ADD_ARENA_TEAM, "INSERT INTO arena_team (arenaTeamId, name, captainGuid, type, rating, backgroundColor, emblemStyle, emblemColor, borderStyle, borderColor) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_SET_ARENA_TEAM_MEMBER, "INSERT INTO arena_team_member (arenaTeamId, guid) VALUES (?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_SEL_CHARACTER_ARENAINFO, "SELECT arenaTeamId, weekGames, seasonGames, seasonWins, personalRating FROM arena_team_member WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_ARENA_TEAM, "INSERT INTO arena_team (arenaTeamId, name, captainGuid, type, rating, backgroundColor, emblemStyle, emblemColor, borderStyle, borderColor) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_INS_ARENA_TEAM_MEMBER, "INSERT INTO arena_team_member (arenaTeamId, guid) VALUES (?, ?)", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_ARENA_TEAM, "DELETE FROM arena_team where arenaTeamId = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_ARENA_TEAM_MEMBERS, "DELETE FROM arena_team_member WHERE arenaTeamId = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_ARENA_TEAM_CAPTAIN, "UPDATE arena_team SET captainGuid = ? WHERE arenaTeamId = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_ARENA_TEAM_CAPTAIN, "UPDATE arena_team SET captainGuid = ? WHERE arenaTeamId = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_ARENA_TEAM_MEMBER, "DELETE FROM arena_team_member WHERE arenaTeamId = ? AND guid = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_ARENA_TEAM_STATS, "UPDATE arena_team SET rating = ?, weekGames = ?, weekWins = ?, seasonGames = ?, seasonWins = ?, rank = ? WHERE arenaTeamId = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_ARENA_TEAM_MEMBER, "UPDATE arena_team_member SET personalRating = ?, weekGames = ?, weekWins = ?, seasonGames = ?, seasonWins = ? WHERE arenaTeamId = ? AND guid = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_CHARACTER_ARENA_STATS, "REPLACE INTO character_arena_stats (guid, slot, matchMakerRating) VALUES (?, ?, ?)", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_LOAD_PLAYER_ARENA_TEAMS, "SELECT arena_team_member.arenaTeamId FROM arena_team_member JOIN arena_team ON arena_team_member.arenaTeamId = arena_team.arenaTeamId WHERE guid = ?", CONNECTION_SYNCH); + PREPARE_STATEMENT(CHAR_UPD_ARENA_TEAM_STATS, "UPDATE arena_team SET rating = ?, weekGames = ?, weekWins = ?, seasonGames = ?, seasonWins = ?, rank = ? WHERE arenaTeamId = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_ARENA_TEAM_MEMBER, "UPDATE arena_team_member SET personalRating = ?, weekGames = ?, weekWins = ?, seasonGames = ?, seasonWins = ? WHERE arenaTeamId = ? AND guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_REP_CHARACTER_ARENA_STATS, "REPLACE INTO character_arena_stats (guid, slot, matchMakerRating) VALUES (?, ?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_SEL_PLAYER_ARENA_TEAMS, "SELECT arena_team_member.arenaTeamId FROM arena_team_member JOIN arena_team ON arena_team_member.arenaTeamId = arena_team.arenaTeamId WHERE guid = ?", CONNECTION_SYNCH); // Character battleground data - PREPARE_STATEMENT(CHAR_ADD_PLAYER_BGDATA, "INSERT INTO character_battleground_data (guid, instanceId, team, joinX, joinY, joinZ, joinO, joinMapId, taxiStart, taxiEnd, mountSpell) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_PLAYER_BGDATA, "INSERT INTO character_battleground_data (guid, instanceId, team, joinX, joinY, joinZ, joinO, joinMapId, taxiStart, taxiEnd, mountSpell) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_PLAYER_BGDATA, "DELETE FROM character_battleground_data WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_RESET_PLAYERS_BGDATA, "UPDATE character_battleground_data SET instanceId = 0", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_UPD_PLAYERS_BGDATA, "UPDATE character_battleground_data SET instanceId = 0", CONNECTION_SYNCH) // Character homebind - PREPARE_STATEMENT(CHAR_ADD_PLAYER_HOMEBIND, "INSERT INTO character_homebind (guid, mapId, zoneId, posX, posY, posZ) VALUES (?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_SET_PLAYER_HOMEBIND, "UPDATE character_homebind SET mapId = ?, zoneId = ?, posX = ?, posY = ?, posZ = ? WHERE guid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_PLAYER_HOMEBIND, "INSERT INTO character_homebind (guid, mapId, zoneId, posX, posY, posZ) VALUES (?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_UPD_PLAYER_HOMEBIND, "UPDATE character_homebind SET mapId = ?, zoneId = ?, posX = ?, posY = ?, posZ = ? WHERE guid = ?", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_PLAYER_HOMEBIND, "DELETE FROM character_homebind WHERE guid = ?", CONNECTION_ASYNC) // Corpse - PREPARE_STATEMENT(CHAR_LOAD_CORPSES, "SELECT posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, guildId, flags, dynFlags, time, corpseType, instanceId, phaseMask, corpseGuid, guid FROM corpse WHERE corpseType <> 0", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_ADD_CORPSE, "INSERT INTO corpse (corpseGuid, guid, posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, guildId, flags, dynFlags, time, corpseType, instanceId, phaseMask) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CORPSES, "SELECT posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, guildId, flags, dynFlags, time, corpseType, instanceId, phaseMask, corpseGuid, guid FROM corpse WHERE corpseType <> 0", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_INS_CORPSE, "INSERT INTO corpse (corpseGuid, guid, posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, guildId, flags, dynFlags, time, corpseType, instanceId, phaseMask) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_CORPSE, "DELETE FROM corpse WHERE corpseGuid = ?", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_PLAYER_CORPSES, "DELETE FROM corpse WHERE guid = ? AND corpseType <> 0", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_OLD_CORPSES, "DELETE FROM corpse WHERE corpseType = 0 OR time < (UNIX_TIMESTAMP(NOW()) - ?)", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_RESET_NONEXISTENT_INSTANCE_FOR_CORPSES, "UPDATE corpse SET instanceId = 0 WHERE instanceId > 0 AND instanceId NOT IN (SELECT id FROM instance)", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_UPD_NONEXISTENT_INSTANCE_FOR_CORPSES, "UPDATE corpse SET instanceId = 0 WHERE instanceId > 0 AND instanceId NOT IN (SELECT id FROM instance)", CONNECTION_SYNCH) // Creature respawn - PREPARE_STATEMENT(CHAR_LOAD_CREATURE_RESPAWNS, "SELECT guid, respawnTime, instanceId FROM creature_respawn", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_ADD_CREATURE_RESPAWN, "REPLACE INTO creature_respawn (guid, respawnTime, instanceId) VALUES (?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_CREATURE_RESPAWNS, "SELECT guid, respawnTime, instanceId FROM creature_respawn", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_REP_CREATURE_RESPAWN, "REPLACE INTO creature_respawn (guid, respawnTime, instanceId) VALUES (?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_CREATURE_RESPAWN, "DELETE FROM creature_respawn WHERE guid = ? AND instanceId = ?", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_CREATURE_RESPAWN_BY_GUID, "DELETE FROM creature_respawn WHERE guid = ?", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_CREATURE_RESPAWN_BY_INSTANCE, "DELETE FROM creature_respawn WHERE instanceId = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_GET_MAX_CREATURE_RESPAWNS, "SELECT MAX(respawnTime), instanceId FROM creature_respawn WHERE instanceId > 0 GROUP BY instanceId", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_DEL_NONEXISTENT_INSTANCE_CREATURE_RESPAWNS, "DELETE FROM creature_respawn WHERE instanceId > 0 AND instanceId NOT IN (SELECT instanceId FROM instance)", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_SEL_MAX_CREATURE_RESPAWNS, "SELECT MAX(respawnTime), instanceId FROM creature_respawn WHERE instanceId > 0 GROUP BY instanceId", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_DEL_NONEXISTENT_INSTANCE_CREATURE_RESPAWNS, "DELETE FROM creature_respawn WHERE instanceId > 0 AND instanceId NOT IN (SELECT id FROM instance)", CONNECTION_SYNCH) // Gameobject respawn - PREPARE_STATEMENT(CHAR_LOAD_GO_RESPAWNS, "SELECT guid, respawnTime, instanceId FROM gameobject_respawn", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_ADD_GO_RESPAWN, "REPLACE INTO gameobject_respawn (guid, respawnTime, instanceId) VALUES (?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_GO_RESPAWNS, "SELECT guid, respawnTime, instanceId FROM gameobject_respawn", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_REP_GO_RESPAWN, "REPLACE INTO gameobject_respawn (guid, respawnTime, instanceId) VALUES (?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_GO_RESPAWN, "DELETE FROM gameobject_respawn WHERE guid = ? AND instanceId = ?", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_GO_RESPAWN_BY_INSTANCE, "DELETE FROM gameobject_respawn WHERE instanceId = ?", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_EXPIRED_GO_RESPAWNS, "DELETE FROM gameobject_respawn WHERE respawnTime <= UNIX_TIMESTAMP(NOW())", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_DEL_NONEXISTENT_INSTANCE_GO_RESPAWNS, "DELETE FROM gameobject_respawn WHERE instanceId > 0 AND instanceId NOT IN (SELECT instanceId FROM instance)", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_DEL_NONEXISTENT_INSTANCE_GO_RESPAWNS, "DELETE FROM gameobject_respawn WHERE instanceId > 0 AND instanceId NOT IN (SELECT id FROM instance)", CONNECTION_SYNCH) // GM Tickets - PREPARE_STATEMENT(CHAR_LOAD_GM_TICKETS, "SELECT ticketId, guid, name, message, createTime, mapId, posX, posY, posZ, lastModifiedTime, closedBy, assignedTo, comment, completed, escalated, viewed FROM gm_tickets", CONNECTION_SYNCH) - PREPARE_STATEMENT(CHAR_ADD_GM_TICKET, "REPLACE INTO gm_tickets (ticketId, guid, name, message, createTime, mapId, posX, posY, posZ, lastModifiedTime, closedBy, assignedTo, comment, completed, escalated, viewed) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_SEL_GM_TICKETS, "SELECT ticketId, guid, name, message, createTime, mapId, posX, posY, posZ, lastModifiedTime, closedBy, assignedTo, comment, completed, escalated, viewed FROM gm_tickets", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_REP_GM_TICKET, "REPLACE INTO gm_tickets (ticketId, guid, name, message, createTime, mapId, posX, posY, posZ, lastModifiedTime, closedBy, assignedTo, comment, completed, escalated, viewed) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_GM_TICKET, "DELETE FROM gm_tickets WHERE ticketId = ?", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_DEL_PLAYER_GM_TICKETS, "DELETE FROM gm_tickets WHERE guid = ?", CONNECTION_ASYNC) // GM Survey/subsurvey/lag report - PREPARE_STATEMENT(CHAR_ADD_GM_SURVEY, "INSERT INTO gm_surveys (guid, surveyId, mainSurvey, overallComment, createTime) VALUES (?, ?, ?, ?, UNIX_TIMESTAMP(NOW()))", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_ADD_GM_SUBSURVEY, "INSERT INTO gm_subsurveys (surveyId, subsurveyId, rank, comment) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC) - PREPARE_STATEMENT(CHAR_ADD_LAG_REPORT, "INSERT INTO lag_reports (guid, lagType, mapId, posX, posY, posZ) VALUES (?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_GM_SURVEY, "INSERT INTO gm_surveys (guid, surveyId, mainSurvey, overallComment, createTime) VALUES (?, ?, ?, ?, UNIX_TIMESTAMP(NOW()))", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_GM_SUBSURVEY, "INSERT INTO gm_subsurveys (surveyId, subsurveyId, rank, comment) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_INS_LAG_REPORT, "INSERT INTO lag_reports (guid, lagType, mapId, posX, posY, posZ) VALUES (?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC) // For loading and deleting expired auctions at startup - PREPARE_STATEMENT(CHAR_LOAD_EXPIRED_AUCTIONS, "SELECT id, auctioneerguid, itemguid, itemEntry, itemowner, buyoutprice, time, buyguid, lastbid, startbid, deposit FROM auctionhouse ah INNER JOIN item_instance ii ON ii.guid = ah.itemguid WHERE ah.time <= ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(CHAR_SEL_EXPIRED_AUCTIONS, "SELECT id, auctioneerguid, itemguid, itemEntry, itemowner, buyoutprice, time, buyguid, lastbid, startbid, deposit FROM auctionhouse ah INNER JOIN item_instance ii ON ii.guid = ah.itemguid WHERE ah.time <= ?", CONNECTION_SYNCH) + + // LFG Data + PREPARE_STATEMENT(CHAR_INS_LFG_DATA, "INSERT INTO lfg_data (guid, dungeon, state) VALUES (?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_DEL_LFG_DATA, "DELETE FROM lfg_data WHERE guid = ?", CONNECTION_ASYNC) // Player saving - PREPARE_STATEMENT(CHAR_ADD_CHARACTER, "INSERT INTO characters (guid, account, name, race, class, gender, level, xp, money, playerBytes, playerBytes2, playerFlags, " + PREPARE_STATEMENT(CHAR_INS_CHARACTER, "INSERT INTO characters (guid, account, name, race, class, gender, level, xp, money, playerBytes, playerBytes2, playerFlags, " "map, instance_id, instance_mode_mask, position_x, position_y, position_z, orientation, " "taximask, cinematic, " "totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, " @@ -331,34 +347,52 @@ void CharacterDatabaseConnection::DoPrepareStatements() "watchedFaction=?,drunk=?,health=?,power1=?,power2=?,power3=?,power4=?,power5=?,power6=?,power7=?,latency=?,speccount=?,activespec=?,exploredZones=?," "equipmentCache=?,ammoId=?,knownTitles=?,actionBars=?,grantableLevels=?,online=? WHERE guid=?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_AT_LOGIN_FLAG, "UPDATE characters SET at_login = at_login | ? WHERE guid = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_ALL_AT_LOGIN_FLAGS, "UPDATE characters SET at_login = at_login | ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_ADD_BUG_REPORT, "INSERT INTO bugreport (type, content) VALUES(?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_ADD_AT_LOGIN_FLAG, "UPDATE characters SET at_login = at_login | ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_REM_AT_LOGIN_FLAG, "UPDATE characters set at_login = at_login & ~ ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_ALL_AT_LOGIN_FLAGS, "UPDATE characters SET at_login = at_login | ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_INS_BUG_REPORT, "INSERT INTO bugreport (type, content) VALUES(?, ?)", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_UPD_PETITION_NAME, "UPDATE petition SET name = ? WHERE petitionguid = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_ADD_PETITION_SIGNATURE, "INSERT INTO petition_sign (ownerguid, petitionguid, playerguid, player_account) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_INS_PETITION_SIGNATURE, "INSERT INTO petition_sign (ownerguid, petitionguid, playerguid, player_account) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_UPD_ACCOUNT_ONLINE, "UPDATE characters SET online = 0 WHERE account = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_ADD_GROUP, "INSERT INTO groups (guid, leaderGuid, lootMethod, looterGuid, lootThreshold, icon1, icon2, icon3, icon4, icon5, icon6, icon7, icon8, groupType, difficulty, raiddifficulty) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_ADD_GROUP_MEMBER, "INSERT INTO group_member (guid, memberGuid, memberFlags, subgroup, roles) VALUES(?, ?, ?, ?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_INS_GROUP, "INSERT INTO groups (guid, leaderGuid, lootMethod, looterGuid, lootThreshold, icon1, icon2, icon3, icon4, icon5, icon6, icon7, icon8, groupType, difficulty, raiddifficulty) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_INS_GROUP_MEMBER, "INSERT INTO group_member (guid, memberGuid, memberFlags, subgroup, roles) VALUES(?, ?, ?, ?, ?)", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_GROUP_MEMBER, "DELETE FROM group_member WHERE memberGuid = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_GROUP_INSTANCE_PERM_BINDING, "DELETE FROM group_instance WHERE guid = ? AND (permanent = 1 OR instance IN (SELECT instance FROM character_instance WHERE guid = ?))", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_GROUP_LEADER, "UPDATE groups SET leaderGuid = ? WHERE guid = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_GROUP_TYPE, "UPDATE groups SET groupType = ? WHERE guid = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_GROUP_MEMBER_SUBGROUP, "UPDATE group_member SET subgroup = ? WHERE memberGuid = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_GROUP_MEMBER_FLAG, "UPDATE group_member SET memberFlags = ? WHERE memberGuid = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_GROUP_DIFFICULTY, "UPDATE groups SET difficulty = ? WHERE guid = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_GROUP_RAID_DIFFICULTY, "UPDATE groups SET raiddifficulty = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_GROUP_LEADER, "UPDATE groups SET leaderGuid = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_GROUP_TYPE, "UPDATE groups SET groupType = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_GROUP_MEMBER_SUBGROUP, "UPDATE group_member SET subgroup = ? WHERE memberGuid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_GROUP_MEMBER_FLAG, "UPDATE group_member SET memberFlags = ? WHERE memberGuid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_GROUP_DIFFICULTY, "UPDATE groups SET difficulty = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_GROUP_RAID_DIFFICULTY, "UPDATE groups SET raiddifficulty = ? WHERE guid = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_ALL_GM_TICKETS, "TRUNCATE TABLE gm_tickets", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_INVALID_SPELL, "DELETE FROM character_talent WHERE spell = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_DELETE_INFO, "UPDATE characters SET deleteInfos_Name = name, deleteInfos_Account = account, deleteDate = UNIX_TIMESTAMP(), name = '', account = 0 WHERE guid = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_ZONE, "UPDATE characters SET zone = ? WHERE guid = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_LEVEL, "UPDATE characters SET level = ?, xp = 0 WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_DELETE_INFO, "UPDATE characters SET deleteInfos_Name = name, deleteInfos_Account = account, deleteDate = UNIX_TIMESTAMP(), name = '', account = 0 WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UDP_RESTORE_DELETE_INFO, "UPDATE characters SET name = ?, account = ?, deleteDate = NULL, deleteInfos_Name = NULL, deleteInfos_Account = NULL WHERE deleteDate IS NOT NULL AND guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_ZONE, "UPDATE characters SET zone = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_LEVEL, "UPDATE characters SET level = ?, xp = 0 WHERE guid = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_INVALID_ACHIEV_PROGRESS_CRITERIA, "DELETE FROM character_achievement_progress WHERE criteria = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_INVALID_ACHIEVMENT, "DELETE FROM character_achievement WHERE achievement = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_ADD_ADDON, "INSERT INTO addons (name, crc) VALUES (?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_INS_ADDON, "INSERT INTO addons (name, crc) VALUES (?, ?)", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_INVALID_PET_SPELL, "DELETE FROM pet_spell WHERE spell = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_GROUP_INSTANCE_BY_INSTANCE, "DELETE FROM group_instance WHERE instance = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_GROUP_INSTANCE_BY_GUID, "DELETE FROM group_instance WHERE guid = ? AND instance = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_ADD_GROUP_INSTANCE, "REPLACE INTO group_instance (guid, instance, permanent) VALUES (?, ?, ?)", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_INSTANCE_RESETTIME, "UPDATE instance SET resettime = ? WHERE id = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_UPDATE_GLOBAL_INSTANCE_RESETTIME, "UPDATE instance_reset SET resettime = ? WHERE mapid = ? AND difficulty = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_REP_GROUP_INSTANCE, "REPLACE INTO group_instance (guid, instance, permanent) VALUES (?, ?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_INSTANCE_RESETTIME, "UPDATE instance SET resettime = ? WHERE id = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_GLOBAL_INSTANCE_RESETTIME, "UPDATE instance_reset SET resettime = ? WHERE mapid = ? AND difficulty = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_CHAR_ONLINE, "UPDATE characters SET online = 1 WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_CHAR_NAME_AT_LOGIN, "UPDATE characters set name = ?, at_login = at_login & ~ ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_WORLDSTATE, "UPDATE worldstates SET value = ? WHERE entry = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_INS_WORLDSTATE, "INSERT INTO worldstates (entry, value) VALUES (?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_DEL_CHAR_INSTANCE, "DELETE FROM character_instance WHERE guid = ? AND instance = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_CHAR_INSTANCE, "UPDATE character_instance SET instance = ?, permanent = ? WHERE guid = ? AND instance = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_INS_CHAR_INSTANCE, "INSERT INTO character_instance (guid, instance, permanent) VALUES (?, ?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_GENDER_PLAYERBYTES, "UPDATE characters SET gender = ?, playerBytes = ?, playerBytes2 = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_DEL_CHARACTER_SKILL, "DELETE FROM character_skills WHERE guid = ? AND skill = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_ADD_CHARACTER_SOCIAL_FLAGS, "UPDATE character_social SET flags = flags | ? WHERE guid = ? AND friend = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_REM_CHARACTER_SOCIAL_FLAGS, "UPDATE character_social SET flags = flags & ~ ? WHERE guid = ? AND friend = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_INS_CHARACTER_SOCIAL, "INSERT INTO character_social (guid, friend, flags) VALUES (?, ?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_DEL_CHARACTER_SOCIAL, "DELETE FROM character_social WHERE guid = ? AND friend = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_CHARACTER_SOCIAL_NOTE, "UPDATE character_social SET note = ? WHERE guid = ? AND friend = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_UPD_CHARACTER_POSITION, "UPDATE characters SET position_x = ?, position_y = ?, position_z = ?, orientation = ?, map = ?, zone = ?, trans_x = 0, trans_y = 0, trans_z = 0, transguid = 0, taxi_path = '' WHERE guid = ?", CONNECTION_ASYNC); + } diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h index eea02ee60b9..18b488e055a 100755..100644 --- a/src/server/shared/Database/Implementation/CharacterDatabase.h +++ b/src/server/shared/Database/Implementation/CharacterDatabase.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -37,291 +37,323 @@ typedef DatabaseWorkerPool<CharacterDatabaseConnection> CharacterDatabaseWorkerP enum CharacterDatabaseStatements { /* Naming standard for defines: - {DB}_{SET/DEL/ADD/REP}_{Summary of data changed} + {DB}_{SEL/INS/UPD/DEL/REP}_{Summary of data changed} When updating more than one field, consider looking at the calling function name for a suiting suffix. */ CHAR_DEL_QUEST_POOL_SAVE, - CHAR_ADD_QUEST_POOL_SAVE, + CHAR_INS_QUEST_POOL_SAVE, CHAR_DEL_NONEXISTENT_GUILD_BANK_ITEM, CHAR_DEL_EXPIRED_BANS, - CHAR_GET_GUID_BY_NAME, - CHAR_GET_CHECK_NAME, - CHAR_GET_SUM_CHARS, - CHAR_GET_CHAR_CREATE_INFO, - CHAR_ADD_BAN, - CHAR_SET_NOT_BANNED, - CHAR_GET_BANINFO, - CHAR_GET_GUID_BY_NAME_FILTER, - CHAR_GET_BANINFO_LIST, - CHAR_GET_BANNED_NAME, - CHAR_GET_ENUM, - CHAR_GET_ENUM_DECLINED_NAME, - CHAR_GET_PET_SLOTS, - CHAR_GET_PET_SLOTS_DETAIL, - CHAR_GET_PET_ENTRY, - CHAR_GET_PET_SLOT_BY_ID, - CHAR_GET_FREE_NAME, - CHAR_GET_GUID_RACE_ACC_BY_NAME, + CHAR_SEL_GUID_BY_NAME, + CHAR_SEL_CHECK_NAME, + CHAR_SEL_SUM_CHARS, + CHAR_SEL_CHAR_CREATE_INFO, + CHAR_INS_CHARACTER_BAN, + CHAR_UPD_CHARACTER_BAN, + CHAR_SEL_BANINFO, + CHAR_SEL_GUID_BY_NAME_FILTER, + CHAR_SEL_BANINFO_LIST, + CHAR_SEL_BANNED_NAME, + CHAR_SEL_ENUM, + CHAR_SEL_ENUM_DECLINED_NAME, + CHAR_SEL_PET_SLOTS, + CHAR_SEL_PET_SLOTS_DETAIL, + CHAR_SEL_PET_ENTRY, + CHAR_SEL_PET_SLOT_BY_ID, + CHAR_SEL_FREE_NAME, + CHAR_SEL_GUID_RACE_ACC_BY_NAME, CHAR_DEL_QUEST_STATUS_DAILY, CHAR_DEL_QUEST_STATUS_WEEKLY, + CHAR_DEL_QUEST_STATUS_SEASONAL, + CHAR_DEL_QUEST_STATUS_DAILY_CHAR, + CHAR_DEL_QUEST_STATUS_WEEKLY_CHAR, + CHAR_DEL_QUEST_STATUS_SEASONAL_CHAR, CHAR_DEL_BATTLEGROUND_RANDOM, - CHAR_LOAD_PLAYER, - CHAR_LOAD_PLAYER_GROUP, - CHAR_LOAD_PLAYER_BOUNDINSTANCES, - CHAR_LOAD_PLAYER_AURAS, - CHAR_LOAD_PLAYER_SPELLS, - CHAR_LOAD_PLAYER_QUESTSTATUS, - CHAR_LOAD_PLAYER_DAILYQUESTSTATUS, - CHAR_LOAD_PLAYER_WEKLYQUESTSTATUS, - CHAR_LOAD_PLAYER_REPUTATION, - CHAR_LOAD_PLAYER_INVENTORY, - CHAR_LOAD_PLAYER_ACTIONS, - CHAR_LOAD_PLAYER_ACTIONS_SPEC, - CHAR_LOAD_PLAYER_MAILCOUNT, - CHAR_LOAD_PLAYER_MAILDATE, - CHAR_LOAD_PLAYER_SOCIALLIST, - CHAR_LOAD_PLAYER_HOMEBIND, - CHAR_LOAD_PLAYER_SPELLCOOLDOWNS, - CHAR_LOAD_PLAYER_DECLINEDNAMES, - CHAR_LOAD_PLAYER_GUILD, - CHAR_LOAD_PLAYER_ARENAINFO, - CHAR_LOAD_PLAYER_ACHIEVEMENTS, - CHAR_LOAD_PLAYER_CRITERIAPROGRESS, - CHAR_LOAD_PLAYER_EQUIPMENTSETS, - CHAR_LOAD_PLAYER_BGDATA, - CHAR_LOAD_PLAYER_GLYPHS, - CHAR_LOAD_PLAYER_TALENTS, - CHAR_LOAD_PLAYER_SKILLS, - CHAR_LOAD_PLAYER_RANDOMBG, - CHAR_LOAD_PLAYER_BANNED, - CHAR_LOAD_PLAYER_QUESTSTATUSREW, - CHAR_LOAD_ACCOUNT_INSTANCELOCKTIMES, - CHAR_LOAD_PLAYER_MAILITEMS, - CHAR_LOAD_AUCTION_ITEMS, - CHAR_ADD_AUCTION, + CHAR_INS_BATTLEGROUND_RANDOM, + + CHAR_SEL_CHARACTER, + CHAR_SEL_GROUP_MEMBER, + CHAR_SEL_CHARACTER_INSTANCE, + CHAR_SEL_CHARACTER_AURAS, + CHAR_SEL_CHARACTER_SPELL, + CHAR_SEL_CHARACTER_QUESTSTATUS, + CHAR_SEL_CHARACTER_DAILYQUESTSTATUS, + CHAR_SEL_CHARACTER_WEEKLYQUESTSTATUS, + CHAR_SEL_CHARACTER_SEASONALQUESTSTATUS, + CHAR_INS_CHARACTER_DAILYQUESTSTATUS, + CHAR_INS_CHARACTER_WEEKLYQUESTSTATUS, + CHAR_INS_CHARACTER_SEASONALQUESTSTATUS, + CHAR_SEL_CHARACTER_REPUTATION, + CHAR_SEL_CHARACTER_INVENTORY, + CHAR_SEL_CHARACTER_ACTIONS, + CHAR_SEL_CHARACTER_ACTIONS_SPEC, + CHAR_SEL_CHARACTER_MAILCOUNT, + CHAR_SEL_CHARACTER_MAILDATE, + CHAR_SEL_CHARACTER_SOCIALLIST, + CHAR_SEL_CHARACTER_HOMEBIND, + CHAR_SEL_CHARACTER_SPELLCOOLDOWNS, + CHAR_SEL_CHARACTER_DECLINEDNAMES, + CHAR_SEL_GUILD_MEMBER, + CHAR_SEL_CHARACTER_ARENAINFO, + CHAR_SEL_CHARACTER_ACHIEVEMENTS, + CHAR_SEL_CHARACTER_CRITERIAPROGRESS, + CHAR_SEL_CHARACTER_EQUIPMENTSETS, + CHAR_SEL_CHARACTER_BGDATA, + CHAR_SEL_CHARACTER_GLYPHS, + CHAR_SEL_CHARACTER_TALENTS, + CHAR_SEL_CHARACTER_SKILLS, + CHAR_SEL_CHARACTER_RANDOMBG, + CHAR_SEL_CHARACTER_BANNED, + CHAR_SEL_CHARACTER_QUESTSTATUSREW, + CHAR_SEL_ACCOUNT_INSTANCELOCKTIMES, + CHAR_SEL_MAILITEMS, + CHAR_SEL_AUCTION_ITEMS, + CHAR_INS_AUCTION, CHAR_DEL_AUCTION, - CHAR_LOAD_AUCTIONS, - CHAR_ADD_MAIL, + CHAR_SEL_AUCTIONS, + CHAR_INS_MAIL, CHAR_DEL_MAIL, - CHAR_ADD_MAIL_ITEM, + CHAR_INS_MAIL_ITEM, + CHAR_DEL_MAIL_ITEM, CHAR_DEL_INVALID_MAIL_ITEM, CHAR_DEL_EMPTY_EXPIRED_MAIL, - CHAR_GET_EXPIRED_MAIL, - CHAR_GET_EXPIRED_MAIL_ITEMS, - CHAR_SET_MAIL_RETURNED, - CHAR_SET_MAIL_ITEM_RECEIVER, - CHAR_SET_ITEM_OWNER, - CHAR_LOAD_GUILD_BANK_ITEMS, - CHAR_LOAD_ITEM_REFUNDS, - CHAR_LOAD_ITEM_BOP_TRADE, + CHAR_SEL_EXPIRED_MAIL, + CHAR_SEL_EXPIRED_MAIL_ITEMS, + CHAR_UPD_MAIL_RETURNED, + CHAR_UPD_MAIL_ITEM_RECEIVER, + CHAR_UPD_ITEM_OWNER, + CHAR_SEL_ITEM_REFUNDS, + CHAR_SEL_ITEM_BOP_TRADE, CHAR_DEL_ITEM_BOP_TRADE, - CHAR_ADD_ITEM_BOP_TRADE, + CHAR_INS_ITEM_BOP_TRADE, CHAR_REP_INVENTORY_ITEM, CHAR_DEL_INVENTORY_ITEM, - CHAR_ADD_ITEM_INSTANCE, - CHAR_UPDATE_ITEM_INSTANCE, - CHAR_UPDATE_ITEM_INSTANCE_ON_LOAD, + CHAR_REP_ITEM_INSTANCE, + CHAR_UPD_ITEM_INSTANCE, + CHAR_UPD_ITEM_INSTANCE_ON_LOAD, CHAR_DEL_ITEM_INSTANCE, - CHAR_UPDATE_GIFT_OWNER, + CHAR_UPD_GIFT_OWNER, CHAR_DEL_GIFT, - CHAR_GET_ACCOUNT_BY_NAME, + CHAR_SEL_ACCOUNT_BY_NAME, CHAR_DEL_ACCOUNT_INSTANCE_LOCK_TIMES, - CHAR_ADD_ACCOUNT_INSTANCE_LOCK_TIMES, - CHAR_LOAD_PLAYER_NAME_CLASS, - CHAR_LOAD_MATCH_MAKER_RATING, - CHAR_GET_CHARACTER_COUNT, - CHAR_UPDATE_NAME, + CHAR_INS_ACCOUNT_INSTANCE_LOCK_TIMES, + CHAR_SEL_CHARACTER_NAME_CLASS, + CHAR_SEL_MATCH_MAKER_RATING, + CHAR_SEL_CHARACTER_COUNT, + CHAR_UPD_NAME, CHAR_DEL_DECLINED_NAME, - CHAR_ADD_GUILD, + CHAR_INS_GUILD, CHAR_DEL_GUILD, - CHAR_ADD_GUILD_MEMBER, + CHAR_INS_GUILD_MEMBER, CHAR_DEL_GUILD_MEMBER, CHAR_DEL_GUILD_MEMBERS, - CHAR_ADD_GUILD_RANK, + CHAR_INS_GUILD_RANK, CHAR_DEL_GUILD_RANKS, CHAR_DEL_GUILD_LOWEST_RANK, - CHAR_ADD_GUILD_BANK_TAB, + CHAR_INS_GUILD_BANK_TAB, CHAR_DEL_GUILD_BANK_TAB, CHAR_DEL_GUILD_BANK_TABS, - CHAR_ADD_GUILD_BANK_ITEM, + CHAR_INS_GUILD_BANK_ITEM, CHAR_DEL_GUILD_BANK_ITEM, CHAR_DEL_GUILD_BANK_ITEMS, - CHAR_ADD_GUILD_BANK_RIGHT_DEFAULT, - CHAR_ADD_GUILD_BANK_RIGHT, + CHAR_INS_GUILD_BANK_RIGHT_DEFAULT, + CHAR_INS_GUILD_BANK_RIGHT, CHAR_DEL_GUILD_BANK_RIGHT, CHAR_DEL_GUILD_BANK_RIGHTS, CHAR_DEL_GUILD_BANK_RIGHTS_FOR_RANK, - CHAR_ADD_GUILD_BANK_EVENTLOG, + CHAR_INS_GUILD_BANK_EVENTLOG, CHAR_DEL_GUILD_BANK_EVENTLOG, CHAR_DEL_GUILD_BANK_EVENTLOGS, - CHAR_ADD_GUILD_EVENTLOG, + CHAR_INS_GUILD_EVENTLOG, CHAR_DEL_GUILD_EVENTLOG, CHAR_DEL_GUILD_EVENTLOGS, - CHAR_SET_GUILD_MEMBER_PNOTE, - CHAR_SET_GUILD_MEMBER_OFFNOTE, - CHAR_SET_GUILD_MEMBER_RANK, - CHAR_SET_GUILD_MOTD, - CHAR_SET_GUILD_INFO, - CHAR_SET_GUILD_LEADER, - CHAR_SET_GUILD_RANK_NAME, - CHAR_SET_GUILD_RANK_RIGHTS, - CHAR_SET_GUILD_EMBLEM_INFO, - CHAR_SET_GUILD_BANK_TAB_INFO, - CHAR_SET_GUILD_BANK_MONEY, - CHAR_SET_GUILD_BANK_EVENTLOG_TAB, - CHAR_SET_GUILD_MEMBER_BANK_REM_MONEY, - CHAR_SET_GUILD_MEMBER_BANK_TIME_MONEY, - CHAR_RESET_GUILD_RANK_BANK_RESET_TIME, - CHAR_SET_GUILD_RANK_BANK_MONEY, - CHAR_SET_GUILD_BANK_TAB_TEXT, - CHAR_SET_GUILD_MEMBER_BANK_TIME_REM_SLOTS0, - CHAR_SET_GUILD_MEMBER_BANK_TIME_REM_SLOTS1, - CHAR_SET_GUILD_MEMBER_BANK_TIME_REM_SLOTS2, - CHAR_SET_GUILD_MEMBER_BANK_TIME_REM_SLOTS3, - CHAR_SET_GUILD_MEMBER_BANK_TIME_REM_SLOTS4, - CHAR_SET_GUILD_MEMBER_BANK_TIME_REM_SLOTS5, - CHAR_SET_GUILD_MEMBER_BANK_REM_SLOTS0, - CHAR_SET_GUILD_MEMBER_BANK_REM_SLOTS1, - CHAR_SET_GUILD_MEMBER_BANK_REM_SLOTS2, - CHAR_SET_GUILD_MEMBER_BANK_REM_SLOTS3, - CHAR_SET_GUILD_MEMBER_BANK_REM_SLOTS4, - CHAR_SET_GUILD_MEMBER_BANK_REM_SLOTS5, - CHAR_RESET_GUILD_RANK_BANK_TIME0, - CHAR_RESET_GUILD_RANK_BANK_TIME1, - CHAR_RESET_GUILD_RANK_BANK_TIME2, - CHAR_RESET_GUILD_RANK_BANK_TIME3, - CHAR_RESET_GUILD_RANK_BANK_TIME4, - CHAR_RESET_GUILD_RANK_BANK_TIME5, - CHAR_LOAD_CHAR_DATA_FOR_GUILD, + CHAR_UPD_GUILD_MEMBER_PNOTE, + CHAR_UPD_GUILD_MEMBER_OFFNOTE, + CHAR_UPD_GUILD_MEMBER_RANK, + CHAR_UPD_GUILD_MOTD, + CHAR_UPD_GUILD_INFO, + CHAR_UPD_GUILD_LEADER, + CHAR_UPD_GUILD_RANK_NAME, + CHAR_UPD_GUILD_RANK_RIGHTS, + CHAR_UPD_GUILD_EMBLEM_INFO, + CHAR_UPD_GUILD_BANK_TAB_INFO, + CHAR_UPD_GUILD_BANK_MONEY, + CHAR_UPD_GUILD_BANK_EVENTLOG_TAB, + CHAR_UPD_GUILD_MEMBER_BANK_REM_MONEY, + CHAR_UPD_GUILD_MEMBER_BANK_TIME_MONEY, + CHAR_UPD_GUILD_RANK_BANK_RESET_TIME, + CHAR_UPD_GUILD_RANK_BANK_MONEY, + CHAR_UPD_GUILD_BANK_TAB_TEXT, + CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS0, + CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS1, + CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS2, + CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS3, + CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS4, + CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS5, + CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS0, + CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS1, + CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS2, + CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS3, + CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS4, + CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS5, + CHAR_UPD_GUILD_RANK_BANK_TIME0, + CHAR_UPD_GUILD_RANK_BANK_TIME1, + CHAR_UPD_GUILD_RANK_BANK_TIME2, + CHAR_UPD_GUILD_RANK_BANK_TIME3, + CHAR_UPD_GUILD_RANK_BANK_TIME4, + CHAR_UPD_GUILD_RANK_BANK_TIME5, + CHAR_SEL_CHAR_DATA_FOR_GUILD, - CHAR_LOAD_CHANNEL, - CHAR_ADD_CHANNEL, - CHAR_SET_CHANNEL, - CHAR_SET_CHANNEL_USAGE, - CHAR_SET_CHANNEL_OWNERSHIP, + CHAR_SEL_CHANNEL, + CHAR_INS_CHANNEL, + CHAR_UPD_CHANNEL, + CHAR_UPD_CHANNEL_USAGE, + CHAR_UPD_CHANNEL_OWNERSHIP, CHAR_DEL_OLD_CHANNELS, - CHAR_SET_EQUIP_SET, - CHAR_ADD_EQUIP_SET, + CHAR_UPD_EQUIP_SET, + CHAR_INS_EQUIP_SET, CHAR_DEL_EQUIP_SET, CHAR_DEL_AURA, - CHAR_ADD_AURA, + CHAR_INS_AURA, - CHAR_LOAD_ACCOUNT_DATA, - CHAR_SET_ACCOUNT_DATA, + CHAR_SEL_ACCOUNT_DATA, + CHAR_REP_ACCOUNT_DATA, CHAR_DEL_ACCOUNT_DATA, - CHAR_LOAD_PLAYER_ACCOUNT_DATA, - CHAR_SET_PLAYER_ACCOUNT_DATA, + CHAR_SEL_PLAYER_ACCOUNT_DATA, + CHAR_REP_PLAYER_ACCOUNT_DATA, CHAR_DEL_PLAYER_ACCOUNT_DATA, - CHAR_LOAD_TUTORIALS, - CHAR_GET_HAS_TUTORIALS, - CHAR_ADD_TUTORIALS, - CHAR_SET_TUTORIALS, + CHAR_SEL_TUTORIALS, + CHAR_SEL_HAS_TUTORIALS, + CHAR_INS_TUTORIALS, + CHAR_UPD_TUTORIALS, CHAR_DEL_TUTORIALS, - CHAR_ADD_INSTANCE_SAVE, - CHAR_UPDATE_INSTANCE_DATA, + CHAR_INS_INSTANCE_SAVE, + CHAR_UPD_INSTANCE_DATA, CHAR_DEL_GAME_EVENT_SAVE, - CHAR_ADD_GAME_EVENT_SAVE, + CHAR_INS_GAME_EVENT_SAVE, CHAR_DEL_ALL_GAME_EVENT_CONDITION_SAVE, CHAR_DEL_GAME_EVENT_CONDITION_SAVE, - CHAR_ADD_GAME_EVENT_CONDITION_SAVE, + CHAR_INS_GAME_EVENT_CONDITION_SAVE, - CHAR_ADD_ARENA_TEAM, - CHAR_SET_ARENA_TEAM_MEMBER, + CHAR_INS_ARENA_TEAM, + CHAR_INS_ARENA_TEAM_MEMBER, CHAR_DEL_ARENA_TEAM, CHAR_DEL_ARENA_TEAM_MEMBERS, - CHAR_UPDATE_ARENA_TEAM_CAPTAIN, + CHAR_UPD_ARENA_TEAM_CAPTAIN, CHAR_DEL_ARENA_TEAM_MEMBER, - CHAR_UPDATE_ARENA_TEAM_STATS, - CHAR_UPDATE_ARENA_TEAM_MEMBER, - CHAR_UPDATE_CHARACTER_ARENA_STATS, - CHAR_LOAD_PLAYER_ARENA_TEAMS, + CHAR_UPD_ARENA_TEAM_STATS, + CHAR_UPD_ARENA_TEAM_MEMBER, + CHAR_REP_CHARACTER_ARENA_STATS, + CHAR_SEL_PLAYER_ARENA_TEAMS, - CHAR_LOAD_PETITION, - CHAR_LOAD_PETITION_SIGNATURE, + CHAR_SEL_PETITION, + CHAR_SEL_PETITION_SIGNATURE, + CHAR_DEL_ALL_PETITION_SIGNATURES, + CHAR_DEL_PETITION_SIGNATURE, - CHAR_ADD_PLAYER_BGDATA, + CHAR_INS_PLAYER_BGDATA, CHAR_DEL_PLAYER_BGDATA, - CHAR_RESET_PLAYERS_BGDATA, + CHAR_UPD_PLAYERS_BGDATA, - CHAR_ADD_PLAYER_HOMEBIND, - CHAR_SET_PLAYER_HOMEBIND, + CHAR_INS_PLAYER_HOMEBIND, + CHAR_UPD_PLAYER_HOMEBIND, CHAR_DEL_PLAYER_HOMEBIND, - CHAR_LOAD_CORPSES, - CHAR_ADD_CORPSE, + CHAR_SEL_CORPSES, + CHAR_INS_CORPSE, CHAR_DEL_CORPSE, CHAR_DEL_PLAYER_CORPSES, CHAR_DEL_OLD_CORPSES, - CHAR_RESET_NONEXISTENT_INSTANCE_FOR_CORPSES, + CHAR_UPD_NONEXISTENT_INSTANCE_FOR_CORPSES, - CHAR_LOAD_CREATURE_RESPAWNS, - CHAR_ADD_CREATURE_RESPAWN, + CHAR_SEL_CREATURE_RESPAWNS, + CHAR_REP_CREATURE_RESPAWN, CHAR_DEL_CREATURE_RESPAWN, CHAR_DEL_CREATURE_RESPAWN_BY_GUID, CHAR_DEL_CREATURE_RESPAWN_BY_INSTANCE, - CHAR_GET_MAX_CREATURE_RESPAWNS, + CHAR_SEL_MAX_CREATURE_RESPAWNS, CHAR_DEL_NONEXISTENT_INSTANCE_CREATURE_RESPAWNS, - CHAR_LOAD_GO_RESPAWNS, - CHAR_ADD_GO_RESPAWN, + CHAR_SEL_GO_RESPAWNS, + CHAR_REP_GO_RESPAWN, CHAR_DEL_GO_RESPAWN, CHAR_DEL_GO_RESPAWN_BY_INSTANCE, CHAR_DEL_EXPIRED_GO_RESPAWNS, CHAR_DEL_NONEXISTENT_INSTANCE_GO_RESPAWNS, - CHAR_LOAD_GM_TICKETS, - CHAR_ADD_GM_TICKET, + CHAR_SEL_GM_TICKETS, + CHAR_REP_GM_TICKET, CHAR_DEL_GM_TICKET, CHAR_DEL_ALL_GM_TICKETS, CHAR_DEL_PLAYER_GM_TICKETS, - CHAR_ADD_GM_SURVEY, - CHAR_ADD_GM_SUBSURVEY, - CHAR_ADD_LAG_REPORT, + CHAR_INS_GM_SURVEY, + CHAR_INS_GM_SUBSURVEY, + CHAR_INS_LAG_REPORT, - CHAR_LOAD_EXPIRED_AUCTIONS, + CHAR_SEL_EXPIRED_AUCTIONS, - CHAR_ADD_CHARACTER, + CHAR_INS_CHARACTER, CHAR_UPD_CHARACTER, - CHAR_UPDATE_AT_LOGIN_FLAG, - CHAR_UPDATE_ALL_AT_LOGIN_FLAGS, - CHAR_ADD_BUG_REPORT, + CHAR_UPD_ADD_AT_LOGIN_FLAG, + CHAR_UPD_REM_AT_LOGIN_FLAG, + CHAR_UPD_ALL_AT_LOGIN_FLAGS, + CHAR_INS_BUG_REPORT, CHAR_UPD_PETITION_NAME, - CHAR_ADD_PETITION_SIGNATURE, + CHAR_INS_PETITION_SIGNATURE, CHAR_UPD_ACCOUNT_ONLINE, - CHAR_ADD_GROUP, - CHAR_ADD_GROUP_MEMBER, + CHAR_INS_GROUP, + CHAR_INS_GROUP_MEMBER, CHAR_DEL_GROUP_MEMBER, CHAR_DEL_GROUP_INSTANCE_PERM_BINDING, - CHAR_UPDATE_GROUP_LEADER, - CHAR_UPDATE_GROUP_TYPE, - CHAR_UPDATE_GROUP_MEMBER_SUBGROUP, - CHAR_UPDATE_GROUP_MEMBER_FLAG, - CHAR_UPDATE_GROUP_DIFFICULTY, - CHAR_UPDATE_GROUP_RAID_DIFFICULTY, + CHAR_UPD_GROUP_LEADER, + CHAR_UPD_GROUP_TYPE, + CHAR_UPD_GROUP_MEMBER_SUBGROUP, + CHAR_UPD_GROUP_MEMBER_FLAG, + CHAR_UPD_GROUP_DIFFICULTY, + CHAR_UPD_GROUP_RAID_DIFFICULTY, CHAR_DEL_INVALID_SPELL, - CHAR_UPDATE_DELETE_INFO, - CHAR_UPDATE_ZONE, - CHAR_UPDATE_LEVEL, + CHAR_UPD_DELETE_INFO, + CHAR_UDP_RESTORE_DELETE_INFO, + CHAR_UPD_ZONE, + CHAR_UPD_LEVEL, CHAR_DEL_INVALID_ACHIEV_PROGRESS_CRITERIA, CHAR_DEL_INVALID_ACHIEVMENT, - CHAR_ADD_ADDON, + CHAR_INS_ADDON, CHAR_DEL_INVALID_PET_SPELL, CHAR_DEL_GROUP_INSTANCE_BY_INSTANCE, CHAR_DEL_GROUP_INSTANCE_BY_GUID, - CHAR_ADD_GROUP_INSTANCE, - CHAR_UPDATE_INSTANCE_RESETTIME, - CHAR_UPDATE_GLOBAL_INSTANCE_RESETTIME, + CHAR_REP_GROUP_INSTANCE, + CHAR_UPD_INSTANCE_RESETTIME, + CHAR_UPD_GLOBAL_INSTANCE_RESETTIME, + CHAR_UPD_CHAR_ONLINE, + CHAR_UPD_CHAR_NAME_AT_LOGIN, + CHAR_UPD_WORLDSTATE, + CHAR_INS_WORLDSTATE, + CHAR_DEL_CHAR_INSTANCE, + CHAR_UPD_CHAR_INSTANCE, + CHAR_INS_CHAR_INSTANCE, + CHAR_UPD_GENDER_PLAYERBYTES, + CHAR_DEL_CHARACTER_SKILL, + CHAR_UPD_ADD_CHARACTER_SOCIAL_FLAGS, + CHAR_UPD_REM_CHARACTER_SOCIAL_FLAGS, + CHAR_INS_CHARACTER_SOCIAL, + CHAR_DEL_CHARACTER_SOCIAL, + CHAR_UPD_CHARACTER_SOCIAL_NOTE, + CHAR_UPD_CHARACTER_POSITION, + + CHAR_INS_LFG_DATA, + CHAR_DEL_LFG_DATA, MAX_CHARACTERDATABASE_STATEMENTS, }; diff --git a/src/server/shared/Database/Implementation/LoginDatabase.cpp b/src/server/shared/Database/Implementation/LoginDatabase.cpp index 713d4a31e6d..7e497c4437b 100755 --- a/src/server/shared/Database/Implementation/LoginDatabase.cpp +++ b/src/server/shared/Database/Implementation/LoginDatabase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -22,38 +22,44 @@ void LoginDatabaseConnection::DoPrepareStatements() if (!m_reconnecting) m_stmts.resize(MAX_LOGINDATABASE_STATEMENTS); - PREPARE_STATEMENT(LOGIN_GET_REALMLIST, "SELECT id, name, address, port, icon, color, timezone, allowedSecurityLevel, population, gamebuild FROM realmlist WHERE color <> 3 ORDER BY name", CONNECTION_SYNCH) - PREPARE_STATEMENT(LOGIN_SET_EXPIREDIPBANS, "DELETE FROM ip_banned WHERE unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP()", CONNECTION_ASYNC) - PREPARE_STATEMENT(LOGIN_SET_EXPIREDACCBANS, "UPDATE account_banned SET active = 0 WHERE active = 1 AND unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP()", CONNECTION_ASYNC) - PREPARE_STATEMENT(LOGIN_GET_IPBANNED, "SELECT * FROM ip_banned WHERE ip = ?", CONNECTION_SYNCH) - PREPARE_STATEMENT(LOGIN_SET_IPAUTOBANNED, "INSERT INTO ip_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, 'Trinity realmd', 'Failed login autoban')", CONNECTION_ASYNC) - PREPARE_STATEMENT(LOGIN_GET_ACCBANNED, "SELECT bandate, unbandate FROM account_banned WHERE id = ? AND active = 1", CONNECTION_SYNCH) - PREPARE_STATEMENT(LOGIN_SET_ACCAUTOBANNED, "INSERT INTO account_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, 'Trinity realmd', 'Failed login autoban', 1)", CONNECTION_ASYNC) - PREPARE_STATEMENT(LOGIN_GET_SESSIONKEY, "SELECT a.sessionkey, a.id, aa.gmlevel FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE username = ?", CONNECTION_SYNCH) - PREPARE_STATEMENT(LOGIN_SET_VS, "UPDATE account SET v = ?, s = ? WHERE username = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(LOGIN_SET_LOGONPROOF, "UPDATE account SET sessionkey = ?, last_ip = ?, last_login = NOW(), locale = ?, failed_logins = 0 WHERE username = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(LOGIN_GET_LOGONCHALLENGE, "SELECT a.sha_pass_hash, a.id, a.locked, a.last_ip, aa.gmlevel, a.v, a.s FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE a.username = ?", CONNECTION_SYNCH) - PREPARE_STATEMENT(LOGIN_SET_FAILEDLOGINS, "UPDATE account SET failed_logins = failed_logins + 1 WHERE username = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(LOGIN_GET_FAILEDLOGINS, "SELECT id, failed_logins FROM account WHERE username = ?", CONNECTION_SYNCH) - PREPARE_STATEMENT(LOGIN_GET_ACCIDBYNAME, "SELECT id FROM account WHERE username = ?", CONNECTION_SYNCH) - PREPARE_STATEMENT(LOGIN_GET_NUMCHARSONREALM, "SELECT numchars FROM realmcharacters WHERE realmid = ? AND acctid= ?", CONNECTION_SYNCH) - PREPARE_STATEMENT(LOGIN_GET_ACCOUNT_BY_IP, "SELECT id FROM account WHERE last_ip = ?", CONNECTION_SYNCH) - PREPARE_STATEMENT(LOGIN_SET_IP_BANNED, "INSERT INTO ip_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, ?, ?)", CONNECTION_ASYNC) - PREPARE_STATEMENT(LOGIN_SET_IP_NOT_BANNED, "DELETE FROM ip_banned WHERE ip = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(LOGIN_SET_ACCOUNT_BANNED, "INSERT INTO account_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, ?, ?, 1)", CONNECTION_ASYNC) - PREPARE_STATEMENT(LOGIN_SET_ACCOUNT_NOT_BANNED, "UPDATE account_banned SET active = 0 WHERE id = ? AND active != 0", CONNECTION_ASYNC) - PREPARE_STATEMENT(LOGIN_DEL_REALMCHARACTERS, "DELETE FROM realmcharacters WHERE acctid = ? AND realmid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(LOGIN_ADD_REALMCHARACTERS, "INSERT INTO realmcharacters (numchars, acctid, realmid) VALUES (?, ?, ?)", CONNECTION_ASYNC) - PREPARE_STATEMENT(LOGIN_GET_SUM_REALMCHARS, "SELECT SUM(numchars) FROM realmcharacters WHERE acctid = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(LOGIN_ADD_ACCOUNT, "INSERT INTO account(username, sha_pass_hash, joindate) VALUES(?, ?, NOW())", CONNECTION_ASYNC); - PREPARE_STATEMENT(LOGIN_ADD_REALM_CHARS, "INSERT INTO realmcharacters (realmid, acctid, numchars) SELECT realmlist.id, account.id, 0 FROM realmlist, account LEFT JOIN realmcharacters ON acctid=account.id WHERE acctid IS NULL", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_SEL_REALMLIST, "SELECT id, name, address, port, icon, color, timezone, allowedSecurityLevel, population, gamebuild FROM realmlist WHERE color <> 3 ORDER BY name", CONNECTION_SYNCH) + PREPARE_STATEMENT(LOGIN_DEL_EXPIRED_IP_BANS, "DELETE FROM ip_banned WHERE unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP()", CONNECTION_ASYNC) + PREPARE_STATEMENT(LOGIN_UPD_EXPIRED_ACCOUNT_BANS, "UPDATE account_banned SET active = 0 WHERE active = 1 AND unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP()", CONNECTION_ASYNC) + PREPARE_STATEMENT(LOGIN_SEL_IP_BANNED, "SELECT * FROM ip_banned WHERE ip = ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(LOGIN_INS_IP_AUTO_BANNED, "INSERT INTO ip_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, 'Trinity realmd', 'Failed login autoban')", CONNECTION_ASYNC) + PREPARE_STATEMENT(LOGIN_SEL_ACCOUNT_BANNED, "SELECT bandate, unbandate FROM account_banned WHERE id = ? AND active = 1", CONNECTION_SYNCH) + PREPARE_STATEMENT(LOGIN_INS_ACCOUNT_AUTO_BANNED, "INSERT INTO account_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, 'Trinity realmd', 'Failed login autoban', 1)", CONNECTION_ASYNC) + PREPARE_STATEMENT(LOGIN_SEL_SESSIONKEY, "SELECT a.sessionkey, a.id, aa.gmlevel FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE username = ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(LOGIN_UPD_VS, "UPDATE account SET v = ?, s = ? WHERE username = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(LOGIN_UPD_LOGONPROOF, "UPDATE account SET sessionkey = ?, last_ip = ?, last_login = NOW(), locale = ?, failed_logins = 0 WHERE username = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(LOGIN_SEL_LOGONCHALLENGE, "SELECT a.sha_pass_hash, a.id, a.locked, a.last_ip, aa.gmlevel, a.v, a.s FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE a.username = ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(LOGIN_UPD_FAILEDLOGINS, "UPDATE account SET failed_logins = failed_logins + 1 WHERE username = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(LOGIN_SEL_FAILEDLOGINS, "SELECT id, failed_logins FROM account WHERE username = ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(LOGIN_SEL_ACCOUNT_ID_BY_NAME, "SELECT id FROM account WHERE username = ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(LOGIN_SEL_NUM_CHARS_ON_REALM, "SELECT numchars FROM realmcharacters WHERE realmid = ? AND acctid= ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(LOGIN_SEL_ACCOUNT_BY_IP, "SELECT id FROM account WHERE last_ip = ?", CONNECTION_SYNCH) + PREPARE_STATEMENT(LOGIN_INS_IP_BANNED, "INSERT INTO ip_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(LOGIN_DEL_IP_NOT_BANNED, "DELETE FROM ip_banned WHERE ip = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(LOGIN_INS_ACCOUNT_BANNED, "INSERT INTO account_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, ?, ?, 1)", CONNECTION_ASYNC) + PREPARE_STATEMENT(LOGIN_UPD_ACCOUNT_NOT_BANNED, "UPDATE account_banned SET active = 0 WHERE id = ? AND active != 0", CONNECTION_ASYNC) + PREPARE_STATEMENT(LOGIN_DEL_REALM_CHARACTERS, "DELETE FROM realmcharacters WHERE acctid = ? AND realmid = ?", CONNECTION_ASYNC) + PREPARE_STATEMENT(LOGIN_INS_REALM_CHARACTERS, "INSERT INTO realmcharacters (numchars, acctid, realmid) VALUES (?, ?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(LOGIN_SEL_SUM_REALM_CHARACTERS, "SELECT SUM(numchars) FROM realmcharacters WHERE acctid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_INS_ACCOUNT, "INSERT INTO account(username, sha_pass_hash, joindate) VALUES(?, ?, NOW())", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_INS_REALM_CHARACTERS_INIT, "INSERT INTO realmcharacters (realmid, acctid, numchars) SELECT realmlist.id, account.id, 0 FROM realmlist, account LEFT JOIN realmcharacters ON acctid=account.id WHERE acctid IS NULL", CONNECTION_ASYNC); PREPARE_STATEMENT(LOGIN_DEL_OLD_BANS, "DELETE FROM ip_banned WHERE unbandate <= UNIX_TIMESTAMP() AND unbandate<>bandate", CONNECTION_ASYNC); PREPARE_STATEMENT(LOGIN_DEL_OLD_IP_BANS, "DELETE FROM ip_banned WHERE unbandate <= UNIX_TIMESTAMP() AND unbandate<>bandate", CONNECTION_ASYNC); - PREPARE_STATEMENT(LOGIN_UPDATE_EXPANSION, "UPDATE account SET expansion = ? WHERE id = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(LOGIN_UPDATE_ACCOUNT_LOCK, "UPDATE account SET locked = ? WHERE id = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(LOGIN_ADD_LOG, "INSERT INTO logs (time, realm, type, string) VALUES (UNIX_TIMESTAMP(), ? , ?, ?)", CONNECTION_ASYNC); - PREPARE_STATEMENT(LOGIN_UPDATE_USERNAME, "UPDATE account SET v = 0, s = 0, username = ?, sha_pass_hash = ? WHERE id = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(LOGIN_UPDATE_PASSWORD, "UPDATE account SET v = 0, s = 0, sha_pass_hash = ? WHERE id = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(LOGIN_UPDATE_MUTE_TIME, "UPDATE account SET mutetime = ? WHERE id = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(LOGIN_UPDATE_LAST_IP, "UPDATE account SET last_ip = ? WHERE username = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_UPD_EXPANSION, "UPDATE account SET expansion = ? WHERE id = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_UPD_ACCOUNT_LOCK, "UPDATE account SET locked = ? WHERE id = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_INS_LOG, "INSERT INTO logs (time, realm, type, string) VALUES (UNIX_TIMESTAMP(), ? , ?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_UPD_USERNAME, "UPDATE account SET v = 0, s = 0, username = ?, sha_pass_hash = ? WHERE id = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_UPD_PASSWORD, "UPDATE account SET v = 0, s = 0, sha_pass_hash = ? WHERE id = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_UPD_MUTE_TIME, "UPDATE account SET mutetime = ? WHERE id = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_UPD_LAST_IP, "UPDATE account SET last_ip = ? WHERE username = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_UPD_ACCOUNT_ONLINE, "UPDATE account SET online = 1 WHERE id = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_UPD_UPTIME_PLAYERS, "UPDATE uptime SET uptime = ?, maxplayers = ? WHERE realmid = ? AND starttime = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_DEL_OLD_LOGS, "DELETE FROM logs WHERE (time + ?) < ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_DEL_ACCOUNT_ACCESS, "DELETE FROM account_access WHERE id = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_DEL_ACCOUNT_ACCESS_BY_REALM, "DELETE FROM account_access WHERE id = ? AND (RealmID = ? OR RealmID = -1)", CONNECTION_ASYNC); + PREPARE_STATEMENT(LOGIN_INS_ACCOUNT_ACCESS, "INSERT INTO account_access (id,gmlevel,RealmID) VALUES (?, ?, ?)", CONNECTION_ASYNC); } diff --git a/src/server/shared/Database/Implementation/LoginDatabase.h b/src/server/shared/Database/Implementation/LoginDatabase.h index 98d9c505fa0..afb188020c7 100755 --- a/src/server/shared/Database/Implementation/LoginDatabase.h +++ b/src/server/shared/Database/Implementation/LoginDatabase.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -37,45 +37,51 @@ typedef DatabaseWorkerPool<LoginDatabaseConnection> LoginDatabaseWorkerPool; enum LoginDatabaseStatements { /* Naming standard for defines: - {DB}_{SET/DEL/ADD/REP}_{Summary of data changed} + {DB}_{SEL/INS/UPD/DEL/REP}_{Summary of data changed} When updating more than one field, consider looking at the calling function name for a suiting suffix. */ - LOGIN_GET_REALMLIST, - LOGIN_SET_EXPIREDIPBANS, - LOGIN_SET_EXPIREDACCBANS, - LOGIN_GET_IPBANNED, - LOGIN_SET_IPAUTOBANNED, - LOGIN_GET_ACCBANNED, - LOGIN_SET_ACCAUTOBANNED, - LOGIN_GET_SESSIONKEY, - LOGIN_SET_VS, - LOGIN_SET_LOGONPROOF, - LOGIN_GET_LOGONCHALLENGE, - LOGIN_SET_FAILEDLOGINS, - LOGIN_GET_FAILEDLOGINS, - LOGIN_GET_ACCIDBYNAME, - LOGIN_GET_NUMCHARSONREALM, - LOGIN_GET_ACCOUNT_BY_IP, - LOGIN_SET_IP_BANNED, - LOGIN_SET_IP_NOT_BANNED, - LOGIN_SET_ACCOUNT_BANNED, - LOGIN_SET_ACCOUNT_NOT_BANNED, - LOGIN_DEL_REALMCHARACTERS, - LOGIN_ADD_REALMCHARACTERS, - LOGIN_GET_SUM_REALMCHARS, - LOGIN_ADD_ACCOUNT, - LOGIN_ADD_REALM_CHARS, + LOGIN_SEL_REALMLIST, + LOGIN_DEL_EXPIRED_IP_BANS, + LOGIN_UPD_EXPIRED_ACCOUNT_BANS, + LOGIN_SEL_IP_BANNED, + LOGIN_INS_IP_AUTO_BANNED, + LOGIN_SEL_ACCOUNT_BANNED, + LOGIN_INS_ACCOUNT_AUTO_BANNED, + LOGIN_SEL_SESSIONKEY, + LOGIN_UPD_VS, + LOGIN_UPD_LOGONPROOF, + LOGIN_SEL_LOGONCHALLENGE, + LOGIN_UPD_FAILEDLOGINS, + LOGIN_SEL_FAILEDLOGINS, + LOGIN_SEL_ACCOUNT_ID_BY_NAME, + LOGIN_SEL_NUM_CHARS_ON_REALM, + LOGIN_SEL_ACCOUNT_BY_IP, + LOGIN_INS_IP_BANNED, + LOGIN_DEL_IP_NOT_BANNED, + LOGIN_INS_ACCOUNT_BANNED, + LOGIN_UPD_ACCOUNT_NOT_BANNED, + LOGIN_DEL_REALM_CHARACTERS, + LOGIN_INS_REALM_CHARACTERS, + LOGIN_SEL_SUM_REALM_CHARACTERS, + LOGIN_INS_ACCOUNT, + LOGIN_INS_REALM_CHARACTERS_INIT, LOGIN_DEL_OLD_BANS, LOGIN_DEL_OLD_IP_BANS, - LOGIN_UPDATE_EXPANSION, - LOGIN_UPDATE_ACCOUNT_LOCK, - LOGIN_ADD_LOG, - LOGIN_UPDATE_USERNAME, - LOGIN_UPDATE_PASSWORD, - LOGIN_UPDATE_MUTE_TIME, - LOGIN_UPDATE_LAST_IP, + LOGIN_UPD_EXPANSION, + LOGIN_UPD_ACCOUNT_LOCK, + LOGIN_INS_LOG, + LOGIN_UPD_USERNAME, + LOGIN_UPD_PASSWORD, + LOGIN_UPD_MUTE_TIME, + LOGIN_UPD_LAST_IP, + LOGIN_UPD_ACCOUNT_ONLINE, + LOGIN_UPD_UPTIME_PLAYERS, + LOGIN_DEL_OLD_LOGS, + LOGIN_DEL_ACCOUNT_ACCESS, + LOGIN_DEL_ACCOUNT_ACCESS_BY_REALM, + LOGIN_INS_ACCOUNT_ACCESS, MAX_LOGINDATABASE_STATEMENTS, }; diff --git a/src/server/shared/Database/Implementation/WorldDatabase.cpp b/src/server/shared/Database/Implementation/WorldDatabase.cpp index 5df8299310f..d7d8491008b 100755 --- a/src/server/shared/Database/Implementation/WorldDatabase.cpp +++ b/src/server/shared/Database/Implementation/WorldDatabase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -22,12 +22,42 @@ void WorldDatabaseConnection::DoPrepareStatements() if (!m_reconnecting) m_stmts.resize(MAX_WORLDDATABASE_STATEMENTS); - PREPARE_STATEMENT(WORLD_LOAD_QUEST_POOLS, "SELECT entry, pool_entry FROM pool_quest", CONNECTION_SYNCH) + PREPARE_STATEMENT(WORLD_SEL_QUEST_POOLS, "SELECT entry, pool_entry FROM pool_quest", CONNECTION_SYNCH) PREPARE_STATEMENT(WORLD_DEL_CRELINKED_RESPAWN, "DELETE FROM linked_respawn WHERE guid = ?", CONNECTION_ASYNC) - PREPARE_STATEMENT(WORLD_REP_CRELINKED_RESPAWN, "REPLACE INTO linked_respawn (guid, linkedGuid) VALUES (?, ?)", CONNECTION_ASYNC) - PREPARE_STATEMENT(WORLD_LOAD_CRETEXT, "SELECT entry, groupid, id, text, type, language, probability, emote, duration, sound FROM creature_text", CONNECTION_SYNCH) - PREPARE_STATEMENT(WORLD_LOAD_SMART_SCRIPTS, "SELECT 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 FROM smart_scripts ORDER BY entryorguid, source_type, id, link", CONNECTION_SYNCH) - PREPARE_STATEMENT(WORLD_LOAD_SMARTAI_WP, "SELECT entry, pointid, position_x, position_y, position_z FROM waypoints ORDER BY entry, pointid", CONNECTION_SYNCH) + PREPARE_STATEMENT(WORLD_REP_CREATURE_LINKED_RESPAWN, "REPLACE INTO linked_respawn (guid, linkedGuid) VALUES (?, ?)", CONNECTION_ASYNC) + PREPARE_STATEMENT(WORLD_SEL_CREATURE_TEXT, "SELECT entry, groupid, id, text, type, language, probability, emote, duration, sound FROM creature_text", CONNECTION_SYNCH) + PREPARE_STATEMENT(WORLD_SEL_SMART_SCRIPTS, "SELECT 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 FROM smart_scripts ORDER BY entryorguid, source_type, id, link", CONNECTION_SYNCH) + PREPARE_STATEMENT(WORLD_SEL_SMARTAI_WP, "SELECT entry, pointid, position_x, position_y, position_z FROM waypoints ORDER BY entry, pointid", CONNECTION_SYNCH) PREPARE_STATEMENT(WORLD_DEL_GAMEOBJECT, "DELETE FROM gameobject WHERE guid = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(WORLD_DEL_EVENT_GAMEOBJECT, "DELETE FROM game_event_gameobject WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_INS_GRAVEYARD_ZONE, "INSERT INTO game_graveyard_zone (id, ghost_zone, faction) VALUES (?, ?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_DEL_GRAVEYARD_ZONE, "DELETE FROM game_graveyard_zone WHERE id = ? AND ghost_zone = ? AND faction = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_INS_GAME_TELE, "INSERT INTO game_tele (id, position_x, position_y, position_z, orientation, map, name) VALUES (?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_DEL_GAME_TELE, "DELETE FROM game_tele WHERE name = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_INS_NPC_VENODR, "INSERT INTO npc_vendor (entry, item, maxcount, incrtime, extendedcost) VALUES(?, ?, ?, ?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_DEL_NPC_VENDOR, "DELETE FROM npc_vendor WHERE entry = ? AND item = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_CREATURE_MOVEMENT_TYPE, "UPDATE creature SET MovementType = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_CREATURE_FACTION, "UPDATE creature_template SET faction_A = ?, faction_H = ? WHERE entry = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_CREATURE_NPCFLAG, "UPDATE creature_template SET npcflag = ? WHERE entry = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_CREATURE_POSITION, "UPDATE creature SET position_x = ?, position_y = ?, position_z = ?, orientation = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_CREATURE_SPAWN_DISTANCE, "UPDATE creature SET spawndist = ?, MovementType = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_CREATURE_SPAWN_TIME_SECS, "UPDATE creature SET spawntimesecs = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_INS_CREATURE_FORMATION, "INSERT INTO creature_formations (leaderGUID, memberGUID, dist, angle, groupAI) VALUES (?, ?, ?, ?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_INS_WAYPOINT_DATA, "INSERT INTO waypoint_data (id, point, position_x, position_y, position_z) VALUES (?, ?, ?, ?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_DEL_WAYPOINT_DATA, "DELETE FROM waypoint_data WHERE id = ? AND point = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_WAYPOINT_DATA_POINT, "UPDATE waypoint_data SET point = point - 1 WHERE id = ? AND point > ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_WAYPOINT_DATA_POSITION, "UPDATE waypoint_data SET position_x = ?, position_y = ?, position_z = ? where id = ? AND point = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_WAYPOINT_DATA_WPGUID, "UPDATE waypoint_data SET wpguid = ? WHERE id = ? and point = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_ALL_WAYPOINT_DATA_WPGUID, "UPDATE waypoint_data SET wpguid = 0", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_INS_CREATURE_ADDON, "INSERT INTO creature_addon(guid, path_id) VALUES (?, ?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_CREATURE_ADDON_PATH, "UPDATE creature_addon SET path_id = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_DEL_CREATURE_ADDON, "DELETE FROM creature_addon WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_INS_WAYPOINT_SCRIPT, "INSERT INTO waypoint_scripts (guid) VALUES (?)", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_DEL_WAYPOINT_SCRIPT, "DELETE FROM waypoint_scripts WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_WAYPOINT_SCRIPT_ID, "UPDATE waypoint_scripts SET id = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_WAYPOINT_SCRIPT_X, "UPDATE waypoint_scripts SET x = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_WAYPOINT_SCRIPT_Y, "UPDATE waypoint_scripts SET y = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_WAYPOINT_SCRIPT_Z, "UPDATE waypoint_scripts SET z = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_UPD_WAYPOINT_SCRIPT_O, "UPDATE waypoint_scripts SET o = ? WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(WORLD_DEL_CREATURE, "DELETE FROM creature WHERE guid = ?", CONNECTION_ASYNC); } diff --git a/src/server/shared/Database/Implementation/WorldDatabase.h b/src/server/shared/Database/Implementation/WorldDatabase.h index 94d6365c081..e708177503f 100755 --- a/src/server/shared/Database/Implementation/WorldDatabase.h +++ b/src/server/shared/Database/Implementation/WorldDatabase.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 @@ -37,19 +37,49 @@ typedef DatabaseWorkerPool<WorldDatabaseConnection> WorldDatabaseWorkerPool; enum WorldDatabaseStatements { /* Naming standard for defines: - {DB}_{SET/DEL/ADD/REP}_{Summary of data changed} + {DB}_{SEL/INS/UPD/DEL/REP}_{Summary of data changed} When updating more than one field, consider looking at the calling function name for a suiting suffix. */ - WORLD_LOAD_QUEST_POOLS, + WORLD_SEL_QUEST_POOLS, WORLD_DEL_CRELINKED_RESPAWN, - WORLD_REP_CRELINKED_RESPAWN, - WORLD_LOAD_CRETEXT, - WORLD_LOAD_SMART_SCRIPTS, - WORLD_LOAD_SMARTAI_WP, + WORLD_REP_CREATURE_LINKED_RESPAWN, + WORLD_SEL_CREATURE_TEXT, + WORLD_SEL_SMART_SCRIPTS, + WORLD_SEL_SMARTAI_WP, WORLD_DEL_GAMEOBJECT, WORLD_DEL_EVENT_GAMEOBJECT, + WORLD_INS_GRAVEYARD_ZONE, + WORLD_DEL_GRAVEYARD_ZONE, + WORLD_INS_GAME_TELE, + WORLD_DEL_GAME_TELE, + WORLD_INS_NPC_VENODR, + WORLD_DEL_NPC_VENDOR, + WORLD_UPD_CREATURE_MOVEMENT_TYPE, + WORLD_UPD_CREATURE_FACTION, + WORLD_UPD_CREATURE_NPCFLAG, + WORLD_UPD_CREATURE_POSITION, + WORLD_UPD_CREATURE_SPAWN_DISTANCE, + WORLD_UPD_CREATURE_SPAWN_TIME_SECS, + WORLD_INS_CREATURE_FORMATION, + WORLD_INS_WAYPOINT_DATA, + WORLD_DEL_WAYPOINT_DATA, + WORLD_UPD_WAYPOINT_DATA_POINT, + WORLD_UPD_WAYPOINT_DATA_POSITION, + WORLD_UPD_WAYPOINT_DATA_WPGUID, + WORLD_UPD_ALL_WAYPOINT_DATA_WPGUID, + WORLD_UPD_CREATURE_ADDON_PATH, + WORLD_INS_CREATURE_ADDON, + WORLD_DEL_CREATURE_ADDON, + WORLD_INS_WAYPOINT_SCRIPT, + WORLD_DEL_WAYPOINT_SCRIPT, + WORLD_UPD_WAYPOINT_SCRIPT_ID, + WORLD_UPD_WAYPOINT_SCRIPT_X, + WORLD_UPD_WAYPOINT_SCRIPT_Y, + WORLD_UPD_WAYPOINT_SCRIPT_Z, + WORLD_UPD_WAYPOINT_SCRIPT_O, + WORLD_DEL_CREATURE, MAX_WORLDDATABASE_STATEMENTS, }; diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp index 9ce924127ba..f686db4c199 100755 --- a/src/server/shared/Database/MySQLConnection.cpp +++ b/src/server/shared/Database/MySQLConnection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h index 2e134cfa814..46e14d81a5e 100755 --- a/src/server/shared/Database/MySQLConnection.h +++ b/src/server/shared/Database/MySQLConnection.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/MySQLThreading.h b/src/server/shared/Database/MySQLThreading.h index 33f24d9aba5..2004ee9826c 100755 --- a/src/server/shared/Database/MySQLThreading.h +++ b/src/server/shared/Database/MySQLThreading.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/PreparedStatement.cpp b/src/server/shared/Database/PreparedStatement.cpp index 22ca31fc20a..baeb591ffb1 100755 --- a/src/server/shared/Database/PreparedStatement.cpp +++ b/src/server/shared/Database/PreparedStatement.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/PreparedStatement.h b/src/server/shared/Database/PreparedStatement.h index 97240d79801..11ece3e3032 100755 --- a/src/server/shared/Database/PreparedStatement.h +++ b/src/server/shared/Database/PreparedStatement.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/QueryHolder.cpp b/src/server/shared/Database/QueryHolder.cpp index b948a92fc5f..a3602531205 100755 --- a/src/server/shared/Database/QueryHolder.cpp +++ b/src/server/shared/Database/QueryHolder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/QueryHolder.h b/src/server/shared/Database/QueryHolder.h index 06cfde72e48..86b3b5955bd 100755 --- a/src/server/shared/Database/QueryHolder.h +++ b/src/server/shared/Database/QueryHolder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/QueryResult.cpp b/src/server/shared/Database/QueryResult.cpp index 9c6ad20222e..dff055b8d3d 100755 --- a/src/server/shared/Database/QueryResult.cpp +++ b/src/server/shared/Database/QueryResult.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Database/QueryResult.h b/src/server/shared/Database/QueryResult.h index 6dc01076b59..c165a9456f5 100755 --- a/src/server/shared/Database/QueryResult.h +++ b/src/server/shared/Database/QueryResult.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Database/SQLOperation.h b/src/server/shared/Database/SQLOperation.h index ff91771b1a6..b911c1c92aa 100755 --- a/src/server/shared/Database/SQLOperation.h +++ b/src/server/shared/Database/SQLOperation.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/Transaction.cpp b/src/server/shared/Database/Transaction.cpp index b4295379664..5aecda87797 100755 --- a/src/server/shared/Database/Transaction.cpp +++ b/src/server/shared/Database/Transaction.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Database/Transaction.h b/src/server/shared/Database/Transaction.h index 1537f238f37..92002819951 100755 --- a/src/server/shared/Database/Transaction.h +++ b/src/server/shared/Database/Transaction.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Debugging/Errors.h b/src/server/shared/Debugging/Errors.h index 921363d6dc5..6927fdb483f 100755 --- a/src/server/shared/Debugging/Errors.h +++ b/src/server/shared/Debugging/Errors.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Define.h b/src/server/shared/Define.h index 42663fb6bd4..bb3bab75e87 100755 --- a/src/server/shared/Define.h +++ b/src/server/shared/Define.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/FactoryHolder.h b/src/server/shared/Dynamic/FactoryHolder.h index 4184eec119e..830e6d8b67d 100755 --- a/src/server/shared/Dynamic/FactoryHolder.h +++ b/src/server/shared/Dynamic/FactoryHolder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/LinkedList.h b/src/server/shared/Dynamic/LinkedList.h index 19a2bb1c8cf..29cbeb2e66c 100755 --- a/src/server/shared/Dynamic/LinkedList.h +++ b/src/server/shared/Dynamic/LinkedList.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/LinkedReference/RefManager.h b/src/server/shared/Dynamic/LinkedReference/RefManager.h index ab56de9bc24..1c6e6956dbd 100755 --- a/src/server/shared/Dynamic/LinkedReference/RefManager.h +++ b/src/server/shared/Dynamic/LinkedReference/RefManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/LinkedReference/Reference.h b/src/server/shared/Dynamic/LinkedReference/Reference.h index fd5ce8fc25b..d4c607470cc 100755 --- a/src/server/shared/Dynamic/LinkedReference/Reference.h +++ b/src/server/shared/Dynamic/LinkedReference/Reference.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/ObjectRegistry.h b/src/server/shared/Dynamic/ObjectRegistry.h index db5e28eff8f..ca481671796 100755 --- a/src/server/shared/Dynamic/ObjectRegistry.h +++ b/src/server/shared/Dynamic/ObjectRegistry.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/TypeContainer.h b/src/server/shared/Dynamic/TypeContainer.h index 7f6f5fa661c..67789d8ff42 100755 --- a/src/server/shared/Dynamic/TypeContainer.h +++ b/src/server/shared/Dynamic/TypeContainer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/TypeContainerFunctions.h b/src/server/shared/Dynamic/TypeContainerFunctions.h index 9bfbf47da93..19ebfb3adfc 100755 --- a/src/server/shared/Dynamic/TypeContainerFunctions.h +++ b/src/server/shared/Dynamic/TypeContainerFunctions.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/TypeContainerFunctionsPtr.h b/src/server/shared/Dynamic/TypeContainerFunctionsPtr.h index 7b03f8503b5..2c065d96d4a 100755 --- a/src/server/shared/Dynamic/TypeContainerFunctionsPtr.h +++ b/src/server/shared/Dynamic/TypeContainerFunctionsPtr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/TypeContainerVisitor.h b/src/server/shared/Dynamic/TypeContainerVisitor.h index 66ab8443375..beddb31f343 100755 --- a/src/server/shared/Dynamic/TypeContainerVisitor.h +++ b/src/server/shared/Dynamic/TypeContainerVisitor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/TypeList.h b/src/server/shared/Dynamic/TypeList.h index 588bfc65755..4967ab0fbc0 100755 --- a/src/server/shared/Dynamic/TypeList.h +++ b/src/server/shared/Dynamic/TypeList.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/UnorderedMap.h b/src/server/shared/Dynamic/UnorderedMap.h index 92a7dddf8a8..5e7b48f9b7b 100755 --- a/src/server/shared/Dynamic/UnorderedMap.h +++ b/src/server/shared/Dynamic/UnorderedMap.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp index 11f2fc090b1..abdeace4d97 100755 --- a/src/server/shared/Logging/Log.cpp +++ b/src/server/shared/Logging/Log.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -374,7 +374,7 @@ void Log::outDB(LogTypes type, const char * str) if (logStr.empty()) return; - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_ADD_LOG); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_LOG); stmt->setInt32(0, realm); stmt->setInt32(1, type); diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h index 5b2eb6aafb6..2381d91d98d 100755 --- a/src/server/shared/Logging/Log.h +++ b/src/server/shared/Logging/Log.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h index 08318aa7a5b..6b99b79625d 100755 --- a/src/server/shared/Packets/ByteBuffer.h +++ b/src/server/shared/Packets/ByteBuffer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Packets/WorldPacket.h b/src/server/shared/Packets/WorldPacket.h index c27801a8d58..7ab95bc496d 100755 --- a/src/server/shared/Packets/WorldPacket.h +++ b/src/server/shared/Packets/WorldPacket.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/SystemConfig.h b/src/server/shared/SystemConfig.h index 18acc739018..2431ebb7165 100755 --- a/src/server/shared/SystemConfig.h +++ b/src/server/shared/SystemConfig.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Threading/Callback.h b/src/server/shared/Threading/Callback.h index 6ec2f49c8ff..fd7a1130fb4 100755 --- a/src/server/shared/Threading/Callback.h +++ b/src/server/shared/Threading/Callback.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/shared/Threading/LockedQueue.h b/src/server/shared/Threading/LockedQueue.h index 4d2ddd33f5f..7f78dc07db8 100755 --- a/src/server/shared/Threading/LockedQueue.h +++ b/src/server/shared/Threading/LockedQueue.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Threading/Threading.cpp b/src/server/shared/Threading/Threading.cpp index 7e22f1afdae..f31db8fbdcd 100755 --- a/src/server/shared/Threading/Threading.cpp +++ b/src/server/shared/Threading/Threading.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Threading/Threading.h b/src/server/shared/Threading/Threading.h index 89550ec996f..8b10e223828 100755 --- a/src/server/shared/Threading/Threading.h +++ b/src/server/shared/Threading/Threading.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/ByteConverter.h b/src/server/shared/Utilities/ByteConverter.h index e202b822309..d0790acadd3 100755 --- a/src/server/shared/Utilities/ByteConverter.h +++ b/src/server/shared/Utilities/ByteConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/EventProcessor.cpp b/src/server/shared/Utilities/EventProcessor.cpp index 56dcad2516b..b4f67471323 100755 --- a/src/server/shared/Utilities/EventProcessor.cpp +++ b/src/server/shared/Utilities/EventProcessor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/EventProcessor.h b/src/server/shared/Utilities/EventProcessor.h index 3edd531035b..149ca9a4098 100755 --- a/src/server/shared/Utilities/EventProcessor.h +++ b/src/server/shared/Utilities/EventProcessor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/ServiceWin32.cpp b/src/server/shared/Utilities/ServiceWin32.cpp index cd623c62132..f2887a4d1bd 100755 --- a/src/server/shared/Utilities/ServiceWin32.cpp +++ b/src/server/shared/Utilities/ServiceWin32.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/ServiceWin32.h b/src/server/shared/Utilities/ServiceWin32.h index da65aebc5d2..f810a0e5624 100755 --- a/src/server/shared/Utilities/ServiceWin32.h +++ b/src/server/shared/Utilities/ServiceWin32.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/SignalHandler.h b/src/server/shared/Utilities/SignalHandler.h index 143cde71ceb..a478c1f58d9 100755 --- a/src/server/shared/Utilities/SignalHandler.h +++ b/src/server/shared/Utilities/SignalHandler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/Timer.h b/src/server/shared/Utilities/Timer.h index 9e9265ddc09..4d3f02f6688 100755 --- a/src/server/shared/Utilities/Timer.h +++ b/src/server/shared/Utilities/Timer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -133,7 +133,7 @@ struct TimeTrackerSmall { public: - TimeTrackerSmall(uint32 expiry) + TimeTrackerSmall(uint32 expiry = 0) : i_expiryTime(expiry) { } diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp index 5919529c6bf..6ae43bc6840 100755 --- a/src/server/shared/Utilities/Util.cpp +++ b/src/server/shared/Utilities/Util.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -30,17 +30,22 @@ typedef ACE_TSS<SFMTRand> SFMTRandTSS; static SFMTRandTSS sfmtRand; -int32 irand (int32 min, int32 max) +int32 irand(int32 min, int32 max) { return int32(sfmtRand->IRandom(min, max)); } -uint32 urand (uint32 min, uint32 max) +uint32 urand(uint32 min, uint32 max) { return sfmtRand->URandom(min, max); } -int32 rand32 () +float frand(float min, float max) +{ + return float(sfmtRand->Random() * (max - min) + min); +} + +int32 rand32() { return int32(sfmtRand->BRandom()); } @@ -50,27 +55,33 @@ double rand_norm(void) return sfmtRand->Random(); } -double rand_chance (void) +double rand_chance(void) { return sfmtRand->Random() * 100.0; } + #else typedef ACE_TSS<MTRand> MTRandTSS; static MTRandTSS mtRand; int32 irand(int32 min, int32 max) { - return int32(mtRand->randInt (max - min)) + min; + return int32(mtRand->randInt(max - min)) + min; } uint32 urand(uint32 min, uint32 max) { - return mtRand->randInt (max - min) + min; + return mtRand->randInt(max - min) + min; +} + +float frand(float min, float max) +{ + return float(mtRand->randExc(max - min) + min); } int32 rand32() { - return mtRand->randInt (); + return mtRand->randInt(); } double rand_norm(void) diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h index 8ded45a7bb6..684b26eea63 100755 --- a/src/server/shared/Utilities/Util.h +++ b/src/server/shared/Utilities/Util.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -64,6 +64,9 @@ inline uint32 secsToTimeBitFields(time_t secs) /* Return a random number in the range 0 .. RAND32_MAX. */ int32 rand32(); + /* Return a random number in the range min..max */ + float frand(float min, float max); + /* Return a random double from 0.0 to 1.0 (exclusive). Floats support only 7 valid decimal digits. * A double supports up to 15 valid decimal digits and is used internally (RAND32_MAX has 10 digits). * With an FPU, there is usually no difference in performance between float and double. */ diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt index cdd9b04c234..191bbbf35b4 100644 --- a/src/server/worldserver/CMakeLists.txt +++ b/src/server/worldserver/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -57,12 +57,10 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/server/shared/Database ${CMAKE_SOURCE_DIR}/src/server/shared/DataStores ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging - ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/CountedReference ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/LinkedReference ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic ${CMAKE_SOURCE_DIR}/src/server/shared/Logging ${CMAKE_SOURCE_DIR}/src/server/shared/Packets - ${CMAKE_SOURCE_DIR}/src/server/shared/Policies ${CMAKE_SOURCE_DIR}/src/server/shared/Threading ${CMAKE_SOURCE_DIR}/src/server/shared/Utilities ${CMAKE_SOURCE_DIR}/src/server/game @@ -108,6 +106,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/server/game/Grids ${CMAKE_SOURCE_DIR}/src/server/game/Groups ${CMAKE_SOURCE_DIR}/src/server/game/Guilds + ${CMAKE_SOURCE_DIR}/src/server/game/Handlers ${CMAKE_SOURCE_DIR}/src/server/game/Instances ${CMAKE_SOURCE_DIR}/src/server/game/Loot ${CMAKE_SOURCE_DIR}/src/server/game/Mails @@ -123,7 +122,6 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/server/game/Reputation ${CMAKE_SOURCE_DIR}/src/server/game/Scripting ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol - ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol/Handlers ${CMAKE_SOURCE_DIR}/src/server/game/Server ${CMAKE_SOURCE_DIR}/src/server/game/Skills ${CMAKE_SOURCE_DIR}/src/server/game/Spells diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp index 61352521d9f..8e04a9c2f34 100755 --- a/src/server/worldserver/CommandLine/CliRunnable.cpp +++ b/src/server/worldserver/CommandLine/CliRunnable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -292,8 +292,13 @@ void ChatHandler::HandleCharacterDeletedRestoreHelper(DeletedInfo const& delInfo return; } - CharacterDatabase.PExecute("UPDATE characters SET name='%s', account='%u', deleteDate=NULL, deleteInfos_Name=NULL, deleteInfos_Account=NULL WHERE deleteDate IS NOT NULL AND guid = %u", - delInfo.name.c_str(), delInfo.accountId, delInfo.lowguid); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UDP_RESTORE_DELETE_INFO); + + stmt->setString(0, delInfo.name); + stmt->setUInt32(1, delInfo.accountId); + stmt->setUInt32(2, delInfo.lowguid); + + CharacterDatabase.Execute(stmt); } /** diff --git a/src/server/worldserver/CommandLine/CliRunnable.h b/src/server/worldserver/CommandLine/CliRunnable.h index 416dc8e9008..af5691367b3 100755 --- a/src/server/worldserver/CommandLine/CliRunnable.h +++ b/src/server/worldserver/CommandLine/CliRunnable.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index 1ce247d9249..23f925dedef 100755 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp index 42d72aa2c6f..d84cfc1a4a4 100755 --- a/src/server/worldserver/Master.cpp +++ b/src/server/worldserver/Master.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -457,7 +457,7 @@ bool Master::_StartDB() clearOnlineAccounts(); ///- Insert version info into DB - WorldDatabase.PExecute("UPDATE version SET core_version = '%s', core_revision = '%s'", _FULLVERSION, _HASH); + WorldDatabase.PExecute("UPDATE version SET core_version = '%s', core_revision = '%s'", _FULLVERSION, _HASH); // One-time query sWorld->LoadDBVersion(); @@ -486,5 +486,5 @@ void Master::clearOnlineAccounts() CharacterDatabase.DirectExecute("UPDATE characters SET online = 0 WHERE online <> 0"); // Battleground instance ids reset at server restart - CharacterDatabase.DirectExecute(CharacterDatabase.GetPreparedStatement(CHAR_RESET_PLAYERS_BGDATA)); + CharacterDatabase.DirectExecute(CharacterDatabase.GetPreparedStatement(CHAR_UPD_PLAYERS_BGDATA)); } diff --git a/src/server/worldserver/Master.h b/src/server/worldserver/Master.h index 76259199d68..17c230ef7c7 100755 --- a/src/server/worldserver/Master.h +++ b/src/server/worldserver/Master.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/RemoteAccess/RARunnable.cpp b/src/server/worldserver/RemoteAccess/RARunnable.cpp index 60145cf99aa..3f5d7bde736 100644 --- a/src/server/worldserver/RemoteAccess/RARunnable.cpp +++ b/src/server/worldserver/RemoteAccess/RARunnable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/worldserver/RemoteAccess/RARunnable.h b/src/server/worldserver/RemoteAccess/RARunnable.h index 76807e5797c..9b3e93cc5fa 100644 --- a/src/server/worldserver/RemoteAccess/RARunnable.h +++ b/src/server/worldserver/RemoteAccess/RARunnable.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp index 82238ee54bc..e5637d282c6 100755 --- a/src/server/worldserver/RemoteAccess/RASocket.cpp +++ b/src/server/worldserver/RemoteAccess/RASocket.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/RemoteAccess/RASocket.h b/src/server/worldserver/RemoteAccess/RASocket.h index 0c626d5840e..1c9b1ac24b5 100755 --- a/src/server/worldserver/RemoteAccess/RASocket.h +++ b/src/server/worldserver/RemoteAccess/RASocket.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp index fa7c34cffbf..8b7d8c19071 100755 --- a/src/server/worldserver/TCSoap/TCSoap.cpp +++ b/src/server/worldserver/TCSoap/TCSoap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/worldserver/TCSoap/TCSoap.h b/src/server/worldserver/TCSoap/TCSoap.h index 37ed841086d..285adaaaf4b 100755 --- a/src/server/worldserver/TCSoap/TCSoap.h +++ b/src/server/worldserver/TCSoap/TCSoap.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://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 diff --git a/src/server/worldserver/WorldThread/WorldRunnable.cpp b/src/server/worldserver/WorldThread/WorldRunnable.cpp index c7e4891747d..8ea54ca599e 100755 --- a/src/server/worldserver/WorldThread/WorldRunnable.cpp +++ b/src/server/worldserver/WorldThread/WorldRunnable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/WorldThread/WorldRunnable.h b/src/server/worldserver/WorldThread/WorldRunnable.h index 03805e67541..31ae51f064d 100755 --- a/src/server/worldserver/WorldThread/WorldRunnable.h +++ b/src/server/worldserver/WorldThread/WorldRunnable.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/worldserver.rc b/src/server/worldserver/worldserver.rc index 7712a50cffb..2f778e599a1 100755 --- a/src/server/worldserver/worldserver.rc +++ b/src/server/worldserver/worldserver.rc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index 64a7dcb7276..82f71aed030 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/tools/map_extractor/CMakeLists.txt b/src/tools/map_extractor/CMakeLists.txt index 641bf00c678..afeb8af99ba 100644 --- a/src/tools/map_extractor/CMakeLists.txt +++ b/src/tools/map_extractor/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (C) 2005-2009 MaNGOS project <http://getmangos.com/> -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/tools/vmap3_assembler/CMakeLists.txt b/src/tools/vmap3_assembler/CMakeLists.txt index d596fb3e818..ba5d1649d38 100644 --- a/src/tools/vmap3_assembler/CMakeLists.txt +++ b/src/tools/vmap3_assembler/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (C) 2005-2009 MaNGOS project <http://getmangos.com/> -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/tools/vmap3_extractor/CMakeLists.txt b/src/tools/vmap3_extractor/CMakeLists.txt index 905e9318985..2ff2fd0cf6b 100644 --- a/src/tools/vmap3_extractor/CMakeLists.txt +++ b/src/tools/vmap3_extractor/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (C) 2005-2009 MaNGOS project <http://getmangos.com/> -# Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without |