diff --git a/cmake/macros/FindOpenSSL.cmake b/cmake/macros/FindOpenSSL.cmake index 2a691ee016..b403092f9d 100644 --- a/cmake/macros/FindOpenSSL.cmake +++ b/cmake/macros/FindOpenSSL.cmake @@ -230,7 +230,7 @@ if (OPENSSL_INCLUDE_DIR) include(EnsureVersion) ENSURE_VERSION_RANGE("${OPENSSL_EXPECTED_VERSION}" "${OPENSSL_VERSION}" "${OPENSSL_MAX_VERSION}" OPENSSL_VERSION_OK) if (NOT OPENSSL_VERSION_OK) - message(FATAL_ERROR "TrinityCore needs OpenSSL version ${OPENSSL_EXPECTED_VERSION} but found too new version ${OPENSSL_VERSION}. Any version different to 1.0.x breaks TrinityCore compatibility (and we cannot fix this). Please install OpenSSL 1.0.x if you still have problems search on forum for TCE00022") + message(FATAL_ERROR "TrinityCore needs OpenSSL version ${OPENSSL_EXPECTED_VERSION} but found too new version ${OPENSSL_VERSION}. TrinityCore needs OpenSSL 1.0.x or 1.1.x to work properly. If you still have problems please install OpenSSL 1.0.x if you still have problems search on forum for TCE00022") endif() endif (OPENSSL_INCLUDE_DIR) diff --git a/contrib/extractor.bat b/contrib/extractor.bat index 22161e491e..29eff365c3 100644 --- a/contrib/extractor.bat +++ b/contrib/extractor.bat @@ -9,7 +9,8 @@ ECHO ............................................... ECHO PRESS 1, 2, 3 OR 4 to select your task, or 5 to EXIT. ECHO ............................................... ECHO. -ECHO The vmaps extractor output text below is intended and not an error: +ECHO WARNING! when extracting the vmaps extractor will +ECHO output the text below, it's intended and not an error: ECHO .......................................... ECHO Extracting World\Wmo\Band\Final_Stage.wmo ECHO No such file. @@ -17,6 +18,7 @@ ECHO Couldn't open RootWmo!!! ECHO Done! ECHO .......................................... ECHO. +ECHO Press 1, 2, 3 or 4 to start extracting or 5 to exit. ECHO 1 - Extract dbc/db2 and maps ECHO 2 - Extract vmaps (needs maps to be extracted before you run this) ECHO 3 - Extract mmaps (needs vmaps to be extracted before you run this, may take hours) diff --git a/revision_data.h.in.cmake b/revision_data.h.in.cmake index 92ef6b3d55..a5ebbe6af4 100644 --- a/revision_data.h.in.cmake +++ b/revision_data.h.in.cmake @@ -9,7 +9,7 @@ #define _SOURCE_DIRECTORY R"(@CMAKE_SOURCE_DIR@)" #define _BUILD_DIRECTORY R"(@BUILDDIR@)" #define _MYSQL_EXECUTABLE R"(@MYSQL_EXECUTABLE@)" - #define _FULL_DATABASE "TDB_full_world_434.33_2018_08_15.sql" + #define _FULL_DATABASE "TDB_full_world_434.34_2018_09_15.sql" #define VER_COMPANYNAME_STR "TrinityCore Developers" #define VER_LEGALCOPYRIGHT_STR "(c)2008-2018 TrinityCore" #define VER_FILEVERSION 0,0,0 diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql index 10634fc978..c870dec204 100644 --- a/sql/base/auth_database.sql +++ b/sql/base/auth_database.sql @@ -1036,7 +1036,6 @@ INSERT INTO `rbac_linked_permissions` VALUES (198,317), (198,318), (198,855), -(198,874), (198,367), (198,368), (198,369), @@ -1046,15 +1045,6 @@ INSERT INTO `rbac_linked_permissions` VALUES (198,374), (198,376), (198,377), -(198,378), -(198,379), -(198,380), -(198,381), -(198,382), -(198,383), -(198,384), -(198,385), -(198,386), (198,408), (198,409), (198,410), @@ -1395,15 +1385,6 @@ INSERT INTO `rbac_permissions` VALUES (375,'Command: gm list'), (376,'Command: gm visible'), (377,'Command: go'), -(378,'Command: go creature'), -(379,'Command: go graveyard'), -(380,'Command: go grid'), -(381,'Command: go object'), -(382,'Command: go taxinode'), -(383,'Command: go ticket'), -(384,'Command: go trigger'), -(385,'Command: go xyz'), -(386,'Command: go zonexy'), (387,'Command: gobject'), (388,'Command: gobject activate'), (389,'Command: gobject add'), @@ -1832,8 +1813,7 @@ INSERT INTO `rbac_permissions` VALUES (865,'Command: npc showloot'), (866,'Command: list spawnpoints'), (867,'Command: reload quest_greeting_locale'), -(872,'Command: server debug'), -(874,'Command: go instance'); +(872,'Command: server debug'); /*!40000 ALTER TABLE `rbac_permissions` ENABLE KEYS */; UNLOCK TABLES; @@ -1979,7 +1959,9 @@ INSERT INTO `updates` VALUES ('2018_08_15_00_auth.sql','22DC7AA7A1D2B04C62B2EEBFF4562DDDC412B456','ARCHIVED','2018-08-15 01:40:04',0), ('2018_08_16_00_auth.sql','FF00C2A63E8F1E43442C083F2682E100FB39AA5C','ARCHIVED','2018-08-16 01:40:04',0), ('2018_08_17_00_auth.sql','0C9921DCEF92D0C66524299A2F0B86EBB1B7020E','ARCHIVED','2018-08-17 01:40:04',0), -('2018_09_02_00_auth_from_335_was_2018_08_30_00_auth.sql','7E6ABD3FF59FC6CC82B227CE074E8E91DE4D1DB2','ARCHIVED','2018-08-17 01:40:04',0); +('2018_09_02_00_auth_from_335_was_2018_08_30_00_auth.sql','7E6ABD3FF59FC6CC82B227CE074E8E91DE4D1DB2','ARCHIVED','2018-08-17 01:40:04',0), +('2018_09_09_00_auth_from_335_was_2018_09_06_00_auth.sql','309D21E0DF82ED8921F77EAFDE741F38AC32BB13','ARCHIVED','2018-09-06 00:00:00',0), +('2018_09_15_00_auth.sql','941C5BEF44A004C32746509EA7E1651DB2943BDA','ARCHIVED','2018-09-15 01:40:04',0); /*!40000 ALTER TABLE `updates` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql index 0ef10c67dd..1d97272227 100644 --- a/sql/base/characters_database.sql +++ b/sql/base/characters_database.sql @@ -2962,7 +2962,8 @@ INSERT INTO `updates` VALUES ('2018_06_15_00_characters.sql','084C438D587E555D1FBCFC86A2A19570BD0B470A','ARCHIVED','2018-06-15 00:00:00',0), ('2018_07_09_00_characters.sql','6F3EA22DD5E4CD9F9C60C4332B147E3DBF2E8A44','ARCHIVED','2018-07-09 18:19:18',0), ('2018_07_15_00_characters.sql','1EB34168BC396A8264C7467AACD1F0A3B036B22D','ARCHIVED','2018-07-15 00:00:00',0), -('2018_08_15_00_characters.sql','592D9F32E96E1A14C8F340E8D085F8F5105B063F','ARCHIVED','2018-08-15 00:00:00',0); +('2018_08_15_00_characters.sql','592D9F32E96E1A14C8F340E8D085F8F5105B063F','ARCHIVED','2018-08-15 00:00:00',0), +('2018_09_15_00_characters.sql','FDC0AF579D140BE377482B115EE07DC43F870C98','ARCHIVED','2018-08-15 00:00:00',0); /*!40000 ALTER TABLE `updates` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/base/dev/world_database.sql b/sql/base/dev/world_database.sql index fe80f2323f..5a221ff466 100644 --- a/sql/base/dev/world_database.sql +++ b/sql/base/dev/world_database.sql @@ -1399,6 +1399,22 @@ CREATE TABLE `instance_encounters` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `instance_spawn_groups` +-- + DROP TABLE IF EXISTS `instance_spawn_groups`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `instance_spawn_groups` ( + `instanceMapId` smallint(5) unsigned NOT NULL, + `bossStateId` tinyint(3) unsigned NOT NULL, + `bossStates` tinyint(3) unsigned NOT NULL, + `spawnGroupId` int(10) unsigned NOT NULL, + `flags` tinyint(3) unsigned NOT NULL, + PRIMARY KEY (`instanceMapId`,`bossStateId`,`spawnGroupId`,`bossStates`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `instance_template` -- @@ -3211,6 +3227,33 @@ CREATE TABLE `smart_scripts` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `spawn_group` +-- + DROP TABLE IF EXISTS `spawn_group`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `spawn_group` ( + `groupId` int(10) unsigned NOT NULL, + `spawnType` tinyint(10) unsigned NOT NULL, + `spawnId` int(10) unsigned NOT NULL, + PRIMARY KEY (`groupId`,`spawnType`,`spawnId`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + -- +-- Table structure for table `spawn_group_template` +-- + DROP TABLE IF EXISTS `spawn_group_template`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `spawn_group_template` ( + `groupId` int(10) unsigned NOT NULL, + `groupName` varchar(100) NOT NULL, + `groupFlags` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`groupId`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `spell_area` -- diff --git a/sql/old/4.3.4/auth/32_2018_07_15/2018_07_15_00_auth.sql b/sql/old/4.3.4/auth/32_2018_08_15/2018_07_15_00_auth.sql similarity index 100% rename from sql/old/4.3.4/auth/32_2018_07_15/2018_07_15_00_auth.sql rename to sql/old/4.3.4/auth/32_2018_08_15/2018_07_15_00_auth.sql diff --git a/sql/old/4.3.4/auth/32_2018_07_15/2018_07_21_00_auth.sql b/sql/old/4.3.4/auth/32_2018_08_15/2018_07_21_00_auth.sql similarity index 100% rename from sql/old/4.3.4/auth/32_2018_07_15/2018_07_21_00_auth.sql rename to sql/old/4.3.4/auth/32_2018_08_15/2018_07_21_00_auth.sql diff --git a/sql/updates/auth/4.3.4/2018_08_15_00_auth.sql b/sql/old/4.3.4/auth/33_2018_09_15/2018_08_15_00_auth.sql similarity index 100% rename from sql/updates/auth/4.3.4/2018_08_15_00_auth.sql rename to sql/old/4.3.4/auth/33_2018_09_15/2018_08_15_00_auth.sql diff --git a/sql/updates/auth/4.3.4/2018_08_16_00_auth.sql b/sql/old/4.3.4/auth/33_2018_09_15/2018_08_16_00_auth.sql similarity index 100% rename from sql/updates/auth/4.3.4/2018_08_16_00_auth.sql rename to sql/old/4.3.4/auth/33_2018_09_15/2018_08_16_00_auth.sql diff --git a/sql/updates/auth/4.3.4/2018_08_17_00_auth.sql b/sql/old/4.3.4/auth/33_2018_09_15/2018_08_17_00_auth.sql similarity index 100% rename from sql/updates/auth/4.3.4/2018_08_17_00_auth.sql rename to sql/old/4.3.4/auth/33_2018_09_15/2018_08_17_00_auth.sql diff --git a/sql/updates/auth/4.3.4/2018_09_02_00_auth_from_335_was_2018_08_30_00_auth.sql b/sql/old/4.3.4/auth/33_2018_09_15/2018_09_02_00_auth_from_335_was_2018_08_30_00_auth.sql similarity index 100% rename from sql/updates/auth/4.3.4/2018_09_02_00_auth_from_335_was_2018_08_30_00_auth.sql rename to sql/old/4.3.4/auth/33_2018_09_15/2018_09_02_00_auth_from_335_was_2018_08_30_00_auth.sql diff --git a/sql/old/4.3.4/auth/33_2018_09_15/2018_09_09_00_auth_from_335_was_2018_09_06_00_auth.sql b/sql/old/4.3.4/auth/33_2018_09_15/2018_09_09_00_auth_from_335_was_2018_09_06_00_auth.sql new file mode 100644 index 0000000000..5a9718edcf --- /dev/null +++ b/sql/old/4.3.4/auth/33_2018_09_15/2018_09_09_00_auth_from_335_was_2018_09_06_00_auth.sql @@ -0,0 +1,3 @@ +-- rbac simplify +DELETE FROM `rbac_linked_permissions` WHERE `linkedid` IN (378,379,380,381,382,383,384,385,386,852,874); +DELETE FROM `rbac_permissions` WHERE `id` IN (378,379,380,381,382,383,384,385,386,852,874); diff --git a/sql/old/4.3.4/characters/32_2018_07_15/2018_07_15_00_characters.sql b/sql/old/4.3.4/characters/32_2018_08_15/2018_07_15_00_characters.sql similarity index 100% rename from sql/old/4.3.4/characters/32_2018_07_15/2018_07_15_00_characters.sql rename to sql/old/4.3.4/characters/32_2018_08_15/2018_07_15_00_characters.sql diff --git a/sql/updates/characters/4.3.4/2018_08_15_00_characters.sql b/sql/old/4.3.4/characters/33_2018_09_15/2018_08_15_00_characters.sql similarity index 100% rename from sql/updates/characters/4.3.4/2018_08_15_00_characters.sql rename to sql/old/4.3.4/characters/33_2018_09_15/2018_08_15_00_characters.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_15_00.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_15_00.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_15_00.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_15_00.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_16_00_world_from_335_was_2018_07_15_00_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_16_00_world_from_335_was_2018_07_15_00_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_16_00_world_from_335_was_2018_07_15_00_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_16_00_world_from_335_was_2018_07_15_00_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_16_01_world_from_335_was_2018_07_15_01_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_16_01_world_from_335_was_2018_07_15_01_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_16_01_world_from_335_was_2018_07_15_01_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_16_01_world_from_335_was_2018_07_15_01_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_16_02_world_from_335_was_2018_07_15_02_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_16_02_world_from_335_was_2018_07_15_02_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_16_02_world_from_335_was_2018_07_15_02_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_16_02_world_from_335_was_2018_07_15_02_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_16_03_world_from_335_was_2018_07_15_03_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_16_03_world_from_335_was_2018_07_15_03_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_16_03_world_from_335_was_2018_07_15_03_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_16_03_world_from_335_was_2018_07_15_03_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_16_04.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_16_04.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_16_04.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_16_04.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_18_00_world.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_18_00_world.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_18_00_world.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_18_00_world.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_21_00_world.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_21_00_world.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_21_00_world.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_21_00_world.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_21_01_world.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_21_01_world.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_21_01_world.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_21_01_world.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_21_02_world.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_21_02_world.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_21_02_world.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_21_02_world.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_23_00_world_from_335_was_2018_07_18_01_world.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_23_00_world_from_335_was_2018_07_18_01_world.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_23_00_world_from_335_was_2018_07_18_01_world.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_23_00_world_from_335_was_2018_07_18_01_world.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_23_01_world_from_335_was_2018_07_18_02_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_23_01_world_from_335_was_2018_07_18_02_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_23_01_world_from_335_was_2018_07_18_02_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_23_01_world_from_335_was_2018_07_18_02_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_23_02_world_from_335_was_2018_07_18_03_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_23_02_world_from_335_was_2018_07_18_03_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_23_02_world_from_335_was_2018_07_18_03_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_23_02_world_from_335_was_2018_07_18_03_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_23_03_world_from_335_was_2018_07_18_04_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_23_03_world_from_335_was_2018_07_18_04_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_23_03_world_from_335_was_2018_07_18_04_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_23_03_world_from_335_was_2018_07_18_04_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_23_04_world_from_335_was_2018_07_22_00_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_23_04_world_from_335_was_2018_07_22_00_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_23_04_world_from_335_was_2018_07_22_00_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_23_04_world_from_335_was_2018_07_22_00_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_23_05_world_from_335_was_2018_07_22_01_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_23_05_world_from_335_was_2018_07_22_01_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_23_05_world_from_335_was_2018_07_22_01_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_23_05_world_from_335_was_2018_07_22_01_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_23_06_world_from_335_was_2018_07_22_02_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_23_06_world_from_335_was_2018_07_22_02_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_23_06_world_from_335_was_2018_07_22_02_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_23_06_world_from_335_was_2018_07_22_02_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_23_07_world_from_335_was_2018_07_22_03_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_23_07_world_from_335_was_2018_07_22_03_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_23_07_world_from_335_was_2018_07_22_03_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_23_07_world_from_335_was_2018_07_22_03_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_23_08_world_from_335_was_2018_07_22_04_world.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_23_08_world_from_335_was_2018_07_22_04_world.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_23_08_world_from_335_was_2018_07_22_04_world.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_23_08_world_from_335_was_2018_07_22_04_world.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_23_09_world_from_335_was_2018_07_22_05_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_23_09_world_from_335_was_2018_07_22_05_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_23_09_world_from_335_was_2018_07_22_05_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_23_09_world_from_335_was_2018_07_22_05_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_23_10_world_from_335_was_2018_07_22_06_world.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_23_10_world_from_335_was_2018_07_22_06_world.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_23_10_world_from_335_was_2018_07_22_06_world.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_23_10_world_from_335_was_2018_07_22_06_world.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_23_11_world_from_335_was_2018_07_22_07_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_23_11_world_from_335_was_2018_07_22_07_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_23_11_world_from_335_was_2018_07_22_07_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_23_11_world_from_335_was_2018_07_22_07_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_25_00_world.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_25_00_world.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_25_00_world.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_25_00_world.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_29_00_world_from_335_was_2018_07_25_00_world.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_29_00_world_from_335_was_2018_07_25_00_world.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_29_00_world_from_335_was_2018_07_25_00_world.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_29_00_world_from_335_was_2018_07_25_00_world.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_29_01_world_from_335_was_2018_07_27_00_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_29_01_world_from_335_was_2018_07_27_00_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_29_01_world_from_335_was_2018_07_27_00_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_29_01_world_from_335_was_2018_07_27_00_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_29_02_world_from_335_was_2018_07_27_01_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_29_02_world_from_335_was_2018_07_27_01_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_29_02_world_from_335_was_2018_07_27_01_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_29_02_world_from_335_was_2018_07_27_01_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_29_03_world_from_335_was_2018_07_27_02_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_29_03_world_from_335_was_2018_07_27_02_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_29_03_world_from_335_was_2018_07_27_02_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_29_03_world_from_335_was_2018_07_27_02_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_29_04_world_from_335_was_2018_07_27_03_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_29_04_world_from_335_was_2018_07_27_03_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_29_04_world_from_335_was_2018_07_27_03_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_29_04_world_from_335_was_2018_07_27_03_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_29_05_world_from_335_was_2018_07_27_04_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_29_05_world_from_335_was_2018_07_27_04_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_29_05_world_from_335_was_2018_07_27_04_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_29_05_world_from_335_was_2018_07_27_04_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_29_06_world_from_335_was_2018_07_27_05_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_29_06_world_from_335_was_2018_07_27_05_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_29_06_world_from_335_was_2018_07_27_05_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_29_06_world_from_335_was_2018_07_27_05_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_29_07_world_from_335_was_2018_07_29_00_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_29_07_world_from_335_was_2018_07_29_00_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_29_07_world_from_335_was_2018_07_29_00_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_29_07_world_from_335_was_2018_07_29_00_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_07_29_08_world_from_335_was_2018_07_29_01_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_07_29_08_world_from_335_was_2018_07_29_01_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_07_29_08_world_from_335_was_2018_07_29_01_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_07_29_08_world_from_335_was_2018_07_29_01_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_07_00_world_from_335_was_2018_08_02_00_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_07_00_world_from_335_was_2018_08_02_00_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_07_00_world_from_335_was_2018_08_02_00_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_07_00_world_from_335_was_2018_08_02_00_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_07_01_world_from_335_was_2018_08_02_01_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_07_01_world_from_335_was_2018_08_02_01_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_07_01_world_from_335_was_2018_08_02_01_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_07_01_world_from_335_was_2018_08_02_01_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_07_02_world_from_335_was_2018_08_02_02_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_07_02_world_from_335_was_2018_08_02_02_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_07_02_world_from_335_was_2018_08_02_02_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_07_02_world_from_335_was_2018_08_02_02_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_07_03_world_from_335_was_2018_08_02_03_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_07_03_world_from_335_was_2018_08_02_03_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_07_03_world_from_335_was_2018_08_02_03_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_07_03_world_from_335_was_2018_08_02_03_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_07_04_world_from_335_was_2018_08_02_04_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_07_04_world_from_335_was_2018_08_02_04_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_07_04_world_from_335_was_2018_08_02_04_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_07_04_world_from_335_was_2018_08_02_04_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_07_05_world_from_335_was_2018_08_02_05_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_07_05_world_from_335_was_2018_08_02_05_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_07_05_world_from_335_was_2018_08_02_05_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_07_05_world_from_335_was_2018_08_02_05_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_07_06_world_from_335_was_2018_08_06_00_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_07_06_world_from_335_was_2018_08_06_00_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_07_06_world_from_335_was_2018_08_06_00_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_07_06_world_from_335_was_2018_08_06_00_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_00_world_from_335_was_2018_08_11_00_world.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_00_world_from_335_was_2018_08_11_00_world.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_00_world_from_335_was_2018_08_11_00_world.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_00_world_from_335_was_2018_08_11_00_world.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_01_world_from_335_was_2018_08_11_01_world.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_01_world_from_335_was_2018_08_11_01_world.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_01_world_from_335_was_2018_08_11_01_world.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_01_world_from_335_was_2018_08_11_01_world.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_02_world_from_335_was_2018_08_11_02_world.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_02_world_from_335_was_2018_08_11_02_world.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_02_world_from_335_was_2018_08_11_02_world.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_02_world_from_335_was_2018_08_11_02_world.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_03_world_from_335_was_2018_08_11_03_world.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_03_world_from_335_was_2018_08_11_03_world.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_03_world_from_335_was_2018_08_11_03_world.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_03_world_from_335_was_2018_08_11_03_world.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_04_world_from_335_was_2018_08_11_04_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_04_world_from_335_was_2018_08_11_04_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_04_world_from_335_was_2018_08_11_04_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_04_world_from_335_was_2018_08_11_04_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_05_world_from_335_was_2018_08_11_05_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_05_world_from_335_was_2018_08_11_05_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_05_world_from_335_was_2018_08_11_05_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_05_world_from_335_was_2018_08_11_05_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_06_world_from_335_was_2018_08_11_06_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_06_world_from_335_was_2018_08_11_06_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_06_world_from_335_was_2018_08_11_06_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_06_world_from_335_was_2018_08_11_06_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_07_world_from_335_was_2018_08_11_07_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_07_world_from_335_was_2018_08_11_07_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_07_world_from_335_was_2018_08_11_07_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_07_world_from_335_was_2018_08_11_07_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_08_world_from_335_was_2018_08_11_08_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_08_world_from_335_was_2018_08_11_08_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_08_world_from_335_was_2018_08_11_08_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_08_world_from_335_was_2018_08_11_08_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_09_world_from_335_was_2018_08_11_09_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_09_world_from_335_was_2018_08_11_09_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_09_world_from_335_was_2018_08_11_09_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_09_world_from_335_was_2018_08_11_09_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_10_world_from_335_was_2018_08_11_10_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_10_world_from_335_was_2018_08_11_10_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_10_world_from_335_was_2018_08_11_10_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_10_world_from_335_was_2018_08_11_10_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_11_world_from_335_was_2018_08_11_11_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_11_world_from_335_was_2018_08_11_11_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_11_world_from_335_was_2018_08_11_11_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_11_world_from_335_was_2018_08_11_11_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_12_world_from_335_was_2018_08_11_12_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_12_world_from_335_was_2018_08_11_12_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_12_world_from_335_was_2018_08_11_12_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_12_world_from_335_was_2018_08_11_12_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_13_world_from_335_was_2018_08_11_13_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_13_world_from_335_was_2018_08_11_13_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_13_world_from_335_was_2018_08_11_13_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_13_world_from_335_was_2018_08_11_13_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_14_world_from_335_was_2018_08_11_14_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_14_world_from_335_was_2018_08_11_14_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_14_world_from_335_was_2018_08_11_14_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_14_world_from_335_was_2018_08_11_14_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_15_world_from_335_was_2018_08_11_15_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_15_world_from_335_was_2018_08_11_15_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_15_world_from_335_was_2018_08_11_15_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_15_world_from_335_was_2018_08_11_15_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_13_16_world_from_335_was_2018_08_11_16_world_335.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_13_16_world_from_335_was_2018_08_11_16_world_335.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_13_16_world_from_335_was_2018_08_11_16_world_335.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_13_16_world_from_335_was_2018_08_11_16_world_335.sql diff --git a/sql/old/4.3.4/world/32_2018_07_15/2018_08_14_00_world_from_335_was_2018_08_14_00_world.sql b/sql/old/4.3.4/world/32_2018_08_15/2018_08_14_00_world_from_335_was_2018_08_14_00_world.sql similarity index 100% rename from sql/old/4.3.4/world/32_2018_07_15/2018_08_14_00_world_from_335_was_2018_08_14_00_world.sql rename to sql/old/4.3.4/world/32_2018_08_15/2018_08_14_00_world_from_335_was_2018_08_14_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_08_15_00_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_15_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_15_00_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_15_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_00_world_from_335_was_2018_08_15_00_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_00_world_from_335_was_2018_08_15_00_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_00_world_from_335_was_2018_08_15_00_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_00_world_from_335_was_2018_08_15_00_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_01_world_from_335_was_2018_08_15_01_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_01_world_from_335_was_2018_08_15_01_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_01_world_from_335_was_2018_08_15_01_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_01_world_from_335_was_2018_08_15_01_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_02_world_from_335_was_2018_08_15_02_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_02_world_from_335_was_2018_08_15_02_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_02_world_from_335_was_2018_08_15_02_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_02_world_from_335_was_2018_08_15_02_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_03_world_from_335_was_2018_08_16_00_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_03_world_from_335_was_2018_08_16_00_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_03_world_from_335_was_2018_08_16_00_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_03_world_from_335_was_2018_08_16_00_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_04_world_from_335_was_2018_08_16_01_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_04_world_from_335_was_2018_08_16_01_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_04_world_from_335_was_2018_08_16_01_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_04_world_from_335_was_2018_08_16_01_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_05_world_from_335_was_2018_08_16_02_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_05_world_from_335_was_2018_08_16_02_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_05_world_from_335_was_2018_08_16_02_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_05_world_from_335_was_2018_08_16_02_world.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_06_world_from_335_was_2018_08_17_00_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_06_world_from_335_was_2018_08_17_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_06_world_from_335_was_2018_08_17_00_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_06_world_from_335_was_2018_08_17_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_07_world_from_335_was_2018_08_19_00_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_07_world_from_335_was_2018_08_19_00_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_07_world_from_335_was_2018_08_19_00_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_07_world_from_335_was_2018_08_19_00_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_08_world_from_335_was_2018_08_19_01_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_08_world_from_335_was_2018_08_19_01_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_08_world_from_335_was_2018_08_19_01_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_08_world_from_335_was_2018_08_19_01_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_09_world_from_335_was_2018_08_19_02_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_09_world_from_335_was_2018_08_19_02_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_09_world_from_335_was_2018_08_19_02_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_09_world_from_335_was_2018_08_19_02_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_10_world_from_335_was_2018_08_19_03_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_10_world_from_335_was_2018_08_19_03_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_10_world_from_335_was_2018_08_19_03_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_10_world_from_335_was_2018_08_19_03_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_11_world_from_335_was_2018_08_19_04_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_11_world_from_335_was_2018_08_19_04_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_11_world_from_335_was_2018_08_19_04_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_11_world_from_335_was_2018_08_19_04_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_12_world_from_335_was_2018_08_19_05_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_12_world_from_335_was_2018_08_19_05_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_12_world_from_335_was_2018_08_19_05_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_12_world_from_335_was_2018_08_19_05_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_13_world_from_335_was_2018_08_19_06_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_13_world_from_335_was_2018_08_19_06_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_13_world_from_335_was_2018_08_19_06_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_13_world_from_335_was_2018_08_19_06_world.sql diff --git a/sql/updates/world/4.3.4/2018_08_20_14_world_from_335_was_2018_08_20_00_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_20_14_world_from_335_was_2018_08_20_00_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_20_14_world_from_335_was_2018_08_20_00_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_20_14_world_from_335_was_2018_08_20_00_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_22_00_world_from_335_was_2018_08_22_00_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_22_00_world_from_335_was_2018_08_22_00_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_22_00_world_from_335_was_2018_08_22_00_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_22_00_world_from_335_was_2018_08_22_00_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_22_01_world_from_335_was_2018_08_22_01_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_22_01_world_from_335_was_2018_08_22_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_22_01_world_from_335_was_2018_08_22_01_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_22_01_world_from_335_was_2018_08_22_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_08_22_02_world_from_335_was_2018_08_22_02_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_22_02_world_from_335_was_2018_08_22_02_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_22_02_world_from_335_was_2018_08_22_02_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_22_02_world_from_335_was_2018_08_22_02_world.sql diff --git a/sql/updates/world/4.3.4/2018_08_22_03_world_from_335_was_2018_08_22_03_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_22_03_world_from_335_was_2018_08_22_03_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_22_03_world_from_335_was_2018_08_22_03_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_22_03_world_from_335_was_2018_08_22_03_world.sql diff --git a/sql/updates/world/4.3.4/2018_08_22_04_world_from_335_was_2018_08_22_04_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_22_04_world_from_335_was_2018_08_22_04_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_22_04_world_from_335_was_2018_08_22_04_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_22_04_world_from_335_was_2018_08_22_04_world.sql diff --git a/sql/updates/world/4.3.4/2018_08_22_05_world_from_335_was_2018_08_22_05_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_22_05_world_from_335_was_2018_08_22_05_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_22_05_world_from_335_was_2018_08_22_05_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_22_05_world_from_335_was_2018_08_22_05_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_22_06_world_from_335_was_2018_08_22_06_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_22_06_world_from_335_was_2018_08_22_06_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_22_06_world_from_335_was_2018_08_22_06_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_22_06_world_from_335_was_2018_08_22_06_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_22_07_world_from_335_was_2018_08_22_07_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_22_07_world_from_335_was_2018_08_22_07_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_22_07_world_from_335_was_2018_08_22_07_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_22_07_world_from_335_was_2018_08_22_07_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_22_08_world_from_335_was_2018_08_22_08_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_22_08_world_from_335_was_2018_08_22_08_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_22_08_world_from_335_was_2018_08_22_08_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_22_08_world_from_335_was_2018_08_22_08_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_22_09_world_from_335_was_2018_08_22_09_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_22_09_world_from_335_was_2018_08_22_09_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_22_09_world_from_335_was_2018_08_22_09_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_22_09_world_from_335_was_2018_08_22_09_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_22_10_world_from_335_was_2018_08_22_10_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_22_10_world_from_335_was_2018_08_22_10_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_22_10_world_from_335_was_2018_08_22_10_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_22_10_world_from_335_was_2018_08_22_10_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_26_00_world_from_335_was_2018_08_26_02_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_26_00_world_from_335_was_2018_08_26_02_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_26_00_world_from_335_was_2018_08_26_02_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_26_00_world_from_335_was_2018_08_26_02_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_26_01_world_from_335_was_2018_08_26_03_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_26_01_world_from_335_was_2018_08_26_03_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_26_01_world_from_335_was_2018_08_26_03_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_26_01_world_from_335_was_2018_08_26_03_world.sql diff --git a/sql/updates/world/4.3.4/2018_08_26_02_world_from_335_was_2018_08_26_04_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_26_02_world_from_335_was_2018_08_26_04_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_26_02_world_from_335_was_2018_08_26_04_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_26_02_world_from_335_was_2018_08_26_04_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_26_03_world_from_335_was_2018_08_26_05_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_26_03_world_from_335_was_2018_08_26_05_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_26_03_world_from_335_was_2018_08_26_05_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_26_03_world_from_335_was_2018_08_26_05_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_26_04_world_from_335_was_2018_08_26_06_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_26_04_world_from_335_was_2018_08_26_06_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_26_04_world_from_335_was_2018_08_26_06_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_26_04_world_from_335_was_2018_08_26_06_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_26_05_world_from_335_was_2018_08_26_07_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_26_05_world_from_335_was_2018_08_26_07_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_26_05_world_from_335_was_2018_08_26_07_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_26_05_world_from_335_was_2018_08_26_07_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_26_06_world_from_335_was_2018_08_26_08_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_26_06_world_from_335_was_2018_08_26_08_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_26_06_world_from_335_was_2018_08_26_08_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_26_06_world_from_335_was_2018_08_26_08_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_29_00_world_from_335_was_2018_08_26_09_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_29_00_world_from_335_was_2018_08_26_09_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_29_00_world_from_335_was_2018_08_26_09_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_29_00_world_from_335_was_2018_08_26_09_world.sql diff --git a/sql/updates/world/4.3.4/2018_08_29_01_world_from_335_was_2018_08_27_00_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_29_01_world_from_335_was_2018_08_27_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_29_01_world_from_335_was_2018_08_27_00_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_29_01_world_from_335_was_2018_08_27_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_08_29_02_world_from_335_was_2018_08_28_00_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_29_02_world_from_335_was_2018_08_28_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_29_02_world_from_335_was_2018_08_28_00_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_29_02_world_from_335_was_2018_08_28_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_08_29_03_world_from_335_was_2018_08_29_00_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_29_03_world_from_335_was_2018_08_29_00_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_29_03_world_from_335_was_2018_08_29_00_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_29_03_world_from_335_was_2018_08_29_00_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_29_04_world_from_335_was_2018_08_29_01_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_29_04_world_from_335_was_2018_08_29_01_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_29_04_world_from_335_was_2018_08_29_01_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_29_04_world_from_335_was_2018_08_29_01_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_29_05_world_from_335_was_2018_08_29_02_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_29_05_world_from_335_was_2018_08_29_02_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_29_05_world_from_335_was_2018_08_29_02_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_29_05_world_from_335_was_2018_08_29_02_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_08_29_06_world_from_master_was_2018_08_29_00_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_29_06_world_from_master_was_2018_08_29_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_29_06_world_from_master_was_2018_08_29_00_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_29_06_world_from_master_was_2018_08_29_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_08_29_07_world_from_master_was_2018_08_29_01_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_08_29_07_world_from_master_was_2018_08_29_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_08_29_07_world_from_master_was_2018_08_29_01_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_08_29_07_world_from_master_was_2018_08_29_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_09_02_00_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_02_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_09_02_00_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_09_02_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_09_02_00_world_from_335_was_2018_08_30_00_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_02_00_world_from_335_was_2018_08_30_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_09_02_00_world_from_335_was_2018_08_30_00_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_09_02_00_world_from_335_was_2018_08_30_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_09_02_01_world_from_335_was_2018_08_30_01_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_02_01_world_from_335_was_2018_08_30_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_09_02_01_world_from_335_was_2018_08_30_01_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_09_02_01_world_from_335_was_2018_08_30_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_09_02_02_world_from_335_was_2018_08_30_02_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_02_02_world_from_335_was_2018_08_30_02_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_09_02_02_world_from_335_was_2018_08_30_02_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_09_02_02_world_from_335_was_2018_08_30_02_world.sql diff --git a/sql/updates/world/4.3.4/2018_09_02_03_world_from_335_was_2018_08_30_03_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_02_03_world_from_335_was_2018_08_30_03_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_09_02_03_world_from_335_was_2018_08_30_03_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_09_02_03_world_from_335_was_2018_08_30_03_world.sql diff --git a/sql/updates/world/4.3.4/2018_09_02_04_world_from_335_was_2018_09_01_01_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_02_04_world_from_335_was_2018_09_01_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_09_02_04_world_from_335_was_2018_09_01_01_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_09_02_04_world_from_335_was_2018_09_01_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_09_02_05_world_from_335_was_2018_09_02_00_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_02_05_world_from_335_was_2018_09_02_00_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_09_02_05_world_from_335_was_2018_09_02_00_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_09_02_05_world_from_335_was_2018_09_02_00_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_09_02_06_world_from_335_was_2018_09_02_01_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_02_06_world_from_335_was_2018_09_02_01_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_09_02_06_world_from_335_was_2018_09_02_01_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_09_02_06_world_from_335_was_2018_09_02_01_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_09_02_07_world_from_335_was_2018_09_02_02_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_02_07_world_from_335_was_2018_09_02_02_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_09_02_07_world_from_335_was_2018_09_02_02_world_335.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_09_02_07_world_from_335_was_2018_09_02_02_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_09_03_00_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_03_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_09_03_00_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_09_03_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_09_03_01_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_03_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_09_03_01_world.sql rename to sql/old/4.3.4/world/33_2018_09_15/2018_09_03_01_world.sql diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_03_01_world_from_335_was_2018_02_13_04_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_03_01_world_from_335_was_2018_02_13_04_world.sql new file mode 100644 index 0000000000..f5671ce15b --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_03_01_world_from_335_was_2018_02_13_04_world.sql @@ -0,0 +1,2 @@ +-- SMART_ACTION_FLEE_FOR_ASSIST (25) does not need a target +UPDATE `smart_scripts` SET `target_type`=0 WHERE `action_type`=25; diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_03_02_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_03_02_world.sql new file mode 100644 index 0000000000..e1a1cdc91f --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_03_02_world.sql @@ -0,0 +1,20 @@ +-- +UPDATE `smart_scripts` SET `action_param2`=294149 WHERE `entryorguid`=2362200 AND `source_type`=9 AND `id`=3; +DELETE FROM `creature` WHERE guid IN (294223,294457,294714); +DELETE FROM `creature_addon` WHERE `guid` IN (294223,294457,294714); +DELETE FROM `spawn_group` WHERE `spawnId` IN (294223,294457,294714) AND `spawnType`=0; +UPDATE `smart_scripts` SET `action_param1`=120 WHERE `entryorguid`=7750 AND `source_type`=0 AND `id`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=44614 AND `source_type`=0 AND `id` IN (7); +DELETE FROM `smart_scripts` WHERE `entryorguid`=44794 AND `source_type`=0 AND `id` IN (5); +UPDATE `creature` SET `spawntimesecs`=2 WHERE `id` IN (44614,44794); +UPDATE `smart_scripts` SET `target_type`=12, target_param1=1 WHERE `entryorguid`=37988 AND `source_type`=0 AND `id` IN (5,6); +DELETE FROM `smart_scripts` WHERE `entryorguid`=3798800 AND `source_type`=9 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`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(3798800,9,4,0,0,0,100,0,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Zuni Lvl 1 - Script - store target"); +DELETE FROM `smart_scripts` WHERE `entryorguid`=40927 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(40927,0,0,0,8,0,100,1,43671,0,0,0,0,11,89877,0,0,0,0,0,7,0,0,0,0,0,0,0,"On spell 43671 hit - Self: Cast spell 89877 on Action invoker"); +UPDATE `smart_scripts` SET `target_type`=23 WHERE `entryorguid`=44586 AND `source_type`=0 AND `id` IN (1); +DELETE FROM `smart_scripts` WHERE `entryorguid`=48092 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(48092,0,0,0,8,0,100,0,93970,0,0,0,0,11,85016,2,0,0,0,0,7,0,0,0,0,0,0,0,"On spell 93970 hit - Self: Cast spell 85016 on Action invoker"); diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_03_03_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_03_03_world.sql new file mode 100644 index 0000000000..28bab05b52 --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_03_03_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature_template_addon` SET `auras`= '' WHERE `entry` IN (35845, 38821); +UPDATE `creature_template` SET `InhabitType`= 4 WHERE `entry`= 44744; diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_00_world_from_335_was_2018_09_03_00_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_00_world_from_335_was_2018_09_03_00_world_335.sql new file mode 100644 index 0000000000..b0d6baf147 --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_00_world_from_335_was_2018_09_03_00_world_335.sql @@ -0,0 +1,31 @@ +/* +-- +DELETE FROM `smart_scripts` WHERE `entryorguid`=738 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (73800,73803,73804) AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(738,0,1,0,11,0,100,0,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Respawn - Set Active On"), +(738,0,2,0,11,0,100,0,0,0,0,0,0,80,73800,2,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Respawn - Run Sript"), +(738,0,3,0,40,0,100,0,14,73800,0,0,0,80,73801,2,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Waypoint 14 Reached - Run Script"), +(738,0,4,0,40,0,100,0,16,73800,0,0,0,80,73802,2,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Waypoint 16 Reached - Run Script"), +(738,0,5,0,38,0,100,0,1,1,0,0,0,80,73803,0,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Data Set - Run Script"), +(738,0,6,0,40,0,100,0,16,73801,0,0,0,80,73804,2,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Waypoint 16 Reached - Run Script"), +(73800,9,0,0,0,0,100,0,600000,600000,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Script - Say Line 0"), +(73800,9,1,0,0,0,100,0,5000,5000,0,0,0,53,0,73800,0,0,0,2,1,0,0,0,0,0,0,0,"Private Thorsen - On Script - Start Waypoint"), +(73800,9,2,0,0,0,100,0,0,0,0,0,0,83,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Script - Remove Npc Flag Questgiver"), +(73803,9,0,0,0,0,100,0,2000,2000,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Script - Say Line 3"), +(73803,9,1,0,0,0,100,0,0,0,0,0,0,82,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Script - Add Npc Flag Questgiver"), +(73803,9,3,0,0,0,100,0,120000,120000,0,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Script - Say Line 4"), +(73803,9,4,0,0,0,100,0,5000,5000,0,0,0,53,0,73801,0,0,0,2,1,0,0,0,0,0,0,0,"Private Thorsen - On Script - Start Waypoint"), +(73803,9,5,0,0,0,100,0,0,0,0,0,0,83,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Script - Remove Npc Flag Questgiver"), +(73804,9,0,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,5.5676,"Private Thorsen - On Script - Set Orientation"), +(73804,9,1,0,0,0,100,0,0,0,0,0,0,82,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Script - add Npc Flag Questgiver"), +(73804,9,2,0,0,0,100,0,500,500,0,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Script - Say Line 5"), +(73804,9,3,0,0,0,100,0,7000,7000,0,0,0,1,0,0,0,0,0,0,19,733,0,0,0,0,0,0,"Private Thorsen - On Script - Say Line 0 (Sergeant Yohwa)"), +(73804,9,4,0,0,0,100,0,900000,900000,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Script - Say Line 0"), +(73804,9,6,0,0,0,100,0,5000,5000,0,0,0,53,0,73800,0,0,0,2,1,0,0,0,0,0,0,0,"Private Thorsen - On Script - Start Waypoint"), +(73804,9,5,0,0,0,100,0,0,0,0,0,0,83,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Private Thorsen - On Script - Remove Npc Flag Questgiver"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `SourceEntry`=215; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(19,0,215,0,0,23,0,99,0,0,1,0,0,"","Quest 'Jungle Secrets' can only be taken if Private Thorsen is not in area 99"); +*/ diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_01_world_from_335_was_2018_09_03_01_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_01_world_from_335_was_2018_09_03_01_world.sql new file mode 100644 index 0000000000..294d91dff7 --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_01_world_from_335_was_2018_09_03_01_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=177964; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(22,1,177964,1,0,29,1,12876,50,0,1,0,'','Execute sai if not near 12876 alive'), +(22,1,177964,1,0,29,1,12876,50,1,1,0,'','Execute sai if not near 12876 dead'); diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_02_world_from_335_was_2018_09_03_02_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_02_world_from_335_was_2018_09_03_02_world_335.sql new file mode 100644 index 0000000000..54ecaeb052 --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_02_world_from_335_was_2018_09_03_02_world_335.sql @@ -0,0 +1,5 @@ +/* +-- +UPDATE `quest_template_addon` SET `PrevQuestID`=9685 WHERE `id` IN (9690); +UPDATE `smart_scripts` SET `action_param6`=1 WHERE `action_type`=53 AND `entryorguid` IN (17811, 17812,17809,17810) AND source_type=0; +*/ diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_03_world_from_335_was_2018_09_03_03_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_03_world_from_335_was_2018_09_03_03_world_335.sql new file mode 100644 index 0000000000..cb759a78c5 --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_03_world_from_335_was_2018_09_03_03_world_335.sql @@ -0,0 +1,6 @@ +/* +-- +UPDATE `gameobject` SET `id`=171942, `spawntimesecs`=180, `animprogress`=100 WHERE `guid`=18199; +DELETE FROM `gameobject` WHERE `guid`=48892; +DELETE FROM `gameobject_addon` WHERE `guid`=48892; +*/ diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_04_world_from_335_was_2018_09_06_00_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_04_world_from_335_was_2018_09_06_00_world.sql new file mode 100644 index 0000000000..6986b42a7c --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_04_world_from_335_was_2018_09_06_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `command` SET `permission`=377 WHERE (`permission` BETWEEN 378 AND 386) OR `permission` IN (852,874); diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_05_world_from_335_was_2018_09_07_00_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_05_world_from_335_was_2018_09_07_00_world.sql new file mode 100644 index 0000000000..10ca8af85d --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_05_world_from_335_was_2018_09_07_00_world.sql @@ -0,0 +1,33 @@ +-- +DELETE FROM `command` WHERE `name` IN ('go creature', 'go creature id', 'go object', 'go gameobject', 'go gameobject id', 'go graveyard', 'go grid', 'go instance', 'go offset', 'go taxinode', 'go ticket', 'go trigger', 'go areatrigger', 'go xyz', 'go zonexy'); +INSERT INTO `command` (`name`,`permission`,`help`) VALUES +('go creature', 377, 'Syntax: .go creature +Teleport yourself to the creature spawn with the specified spawn ID.'), +('go creature id', 377, 'Syntax: .go creature id +Teleport yourself to the first spawn point for the specified creature ID. +If multiple spawn points for the creature exist, teleport to the first one found.'), +('go gameobject', 377, 'Syntax: .go gameobject +Teleport yourself to the gameobject spawn with the specified spawn ID.'), +('go gameobject id', 377, 'Syntax: .go gameobject id +Teleport yourself to the first spawn point for the specified gameobject ID. +If multiple spawn points for the gameobject exist, teleport to the first one found.'), +('go graveyard', 377, 'Syntax: .go graveyard +Teleport yourself to the graveyard with the specified graveyard ID.'), +('go grid', 377, 'Syntax: .go grid [] +Teleport yourself to center of grid at the provided indices in specified (or current) map.'), +('go instance', 377, 'Syntax: .go instance +Teleport yourself to the entrance of the instance matching the specified script name.'), +('go offset', 377, 'Syntax: .go offset [ [ []]]] +Teleport yourself by the specified amount relative to your current position and orientation.'), +('go taxinode', 377, 'Syntax: .go taxinode +Teleport yourself to the specified taxi node.'), +('go ticket', 377, 'Syntax: .go ticket +Teleport yourself to the location at which the specified ticket was created.'), +('go areatrigger', 377, 'Syntax: .go areatrigger +Teleport yourself to the specified areatrigger\'s location. +Note that you may end up at the trigger\'s target location if it is a teleport trigger.'), +('go xyz', 377, 'Syntax: .go xyz [ [ []]] +Teleport yourself to the specified location in the specified (or current) map. +If no z coordinate is specified, defaults to ground/water level.'), +('go zonexy', 377, 'Syntax: .go zonexy [] +Teleport yourself to the given local (x,y) position in the specified (or current) zone.'); diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_06_world_from_335_was_2018_09_09_00_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_06_world_from_335_was_2018_09_09_00_world_335.sql new file mode 100644 index 0000000000..6633645ef7 --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_06_world_from_335_was_2018_09_09_00_world_335.sql @@ -0,0 +1,32 @@ +/* +-- Yeh'kinya +DELETE FROM `creature_template_movement` WHERE `CreatureId`=8579; +INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`) VALUES +(8579,1,0,2,0); + +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8579; +DELETE FROM `smart_scripts` WHERE `entryorguid`=8579 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=857900 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 +(8579,0,0,0,20,0,100,0,8181,0,0,0,80,857900,0,0,0,0,0,1,0,0,0,0,0,0,0,"Yeh'kinya - On Quest 'Confront Yeh'kinya' Finished - Run Script"), +(8579,0,1,0,20,0,100,0,8181,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Yeh'kinya - On Quest 'Confront Yeh'kinya' Finished - Set Active On"), +(8579,0,2,0,40,0,100,0,2,8579,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Yeh'kinya - On Waypoint 2 Reached - Despawn"), +(857900,9,0,0,0,0,100,0,0,0,0,0,83,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Yeh'kinya - On Script - Remove Npc Flag Questgiver+Gossip"), +(857900,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Yeh'kinya - On Script - Say Line 0"), +(857900,9,2,0,0,0,100,0,6000,6000,0,0,3,0,2706,0,0,0,0,1,0,0,0,0,0,0,0,"Yeh'kinya - On Script - Morph To Model 2706"), +(857900,9,3,0,0,0,100,0,0,0,0,0,11,7741,0,0,0,0,0,1,0,0,0,0,0,0,0,"Yeh'kinya - On Script - Cast 'Summoned Demon'"), +(857900,9,4,0,0,0,100,0,2000,2000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Yeh'kinya - On Script - Say Line 1"), +(857900,9,5,0,0,0,100,0,0,0,0,0,53,1,8579,0,0,0,0,1,0,0,0,0,0,0,0,"Yeh'kinya - On Script - Start Waypoint"); + +DELETE FROM `creature_text` WHERE `CreatureID`=8579; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(8579,0,0,"It is true, $n. The wheels of doom now turn, inevitably, toward the true return of Hakkar!",12,0,100,5,0,0,10456,0,"Yeh'kinya"), +(8579,1,0,"Blood and souls for Hakkar! HAHAHAH!",14,0,100,0,0,6963,10457,0,"Yeh'kinya"); + +DELETE FROM `waypoints` WHERE `entry`=8579; +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(8579,1,-6916.84,-4847.92,12.5325,""), +(8579,2,-6964.45,-4949.57,6.45678,""); + + +*/ diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_07_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_07_world.sql new file mode 100644 index 0000000000..6eda66c890 --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_09_07_world.sql @@ -0,0 +1,352 @@ +-- +UPDATE creature_template SET unit_flags=512, unit_flags2=2048, `dynamicflags`=0 WHERE entry=237; +UPDATE creature_template SET unit_flags=512, unit_flags2=2048, `dynamicflags`=0 WHERE entry=238; +UPDATE creature_template SET unit_flags=512, unit_flags2=2048, `dynamicflags`=0 WHERE entry=1182; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=1831; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=1835; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=2344; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=2345; +UPDATE creature_template SET unit_flags=64, unit_flags2=2048, `dynamicflags`=0 WHERE entry=2346; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=3225; +UPDATE creature_template SET unit_flags=4608, unit_flags2=2048, `dynamicflags`=0 WHERE entry=3703; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=3725; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=3727; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=3728; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=3730; +UPDATE creature_template SET unit_flags=768, unit_flags2=2048, `dynamicflags`=32 WHERE entry=3891; +UPDATE creature_template SET unit_flags=4608, unit_flags2=2048, `dynamicflags`=0 WHERE entry=3955; +UPDATE creature_template SET unit_flags=4608, unit_flags2=2048, `dynamicflags`=0 WHERE entry=3956; +UPDATE creature_template SET unit_flags=4608, unit_flags2=2048, `dynamicflags`=0 WHERE entry=3960; +UPDATE creature_template SET unit_flags=4608, unit_flags2=2048, `dynamicflags`=0 WHERE entry=3963; +UPDATE creature_template SET unit_flags=4608, unit_flags2=2048, `dynamicflags`=0 WHERE entry=3964; +UPDATE creature_template SET unit_flags=4608, unit_flags2=2048, `dynamicflags`=0 WHERE entry=3965; +UPDATE creature_template SET unit_flags=4608, unit_flags2=2048, `dynamicflags`=0 WHERE entry=4320; +UPDATE creature_template SET unit_flags=4608, unit_flags2=2048, `dynamicflags`=0 WHERE entry=5944; +UPDATE creature_template SET unit_flags=4608, unit_flags2=2048, `dynamicflags`=0 WHERE entry=6288; +UPDATE creature_template SET unit_flags=4608, unit_flags2=2048, `dynamicflags`=0 WHERE entry=6387; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=8016; +UPDATE creature_template SET unit_flags=4608, unit_flags2=2048, `dynamicflags`=0 WHERE entry=10378; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=10605; +UPDATE creature_template SET unit_flags=512, unit_flags2=2048, `dynamicflags`=0 WHERE entry=11749; +UPDATE creature_template SET unit_flags=512, unit_flags2=2048, `dynamicflags`=0 WHERE entry=14901; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=32 WHERE entry=16852; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=17062; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=17133; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=17600; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry IN (17731,20173); +UPDATE creature_template SET unit_flags=512, unit_flags2=2048, `dynamicflags`=0 WHERE entry=17890; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=32 WHERE entry=18035; +UPDATE creature_template SET unit_flags=2, unit_flags2=2048, `dynamicflags`=0 WHERE entry=18240; +UPDATE creature_template SET unit_flags=570425600, unit_flags2=2048, `dynamicflags`=0 WHERE entry=19760; +UPDATE creature_template SET unit_flags=33554432, unit_flags2=2048, `dynamicflags`=0 WHERE entry=20148; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2048, `dynamicflags`=32 WHERE entry=20158; +UPDATE creature_template SET unit_flags=388, unit_flags2=2048, `dynamicflags`=32 WHERE entry=20561; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry IN (20869,21586); +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=20922; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=32 WHERE entry=21303; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=32 WHERE entry=21304; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=21307; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=32 WHERE entry=21592; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=32 WHERE entry=21623; +UPDATE creature_template SET unit_flags=537133312, unit_flags2=2048, `dynamicflags`=32 WHERE entry=21725; +UPDATE creature_template SET unit_flags=537133312, unit_flags2=2048, `dynamicflags`=0 WHERE entry=21727; +UPDATE creature_template SET unit_flags=536904448, unit_flags2=2048, `dynamicflags`=32 WHERE entry=21846; +UPDATE creature_template SET unit_flags=536904448, unit_flags2=2048, `dynamicflags`=32 WHERE entry=21859; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=32 WHERE entry=21962; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=23667; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=23674; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=24008; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2048, `dynamicflags`=32 WHERE entry=24122; +UPDATE creature_template SET unit_flags=537166080, unit_flags2=2048, `dynamicflags`=32 WHERE entry=24196; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=24280; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2048, `dynamicflags`=32 WHERE entry=24467; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=24580; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=24662; +UPDATE creature_template SET unit_flags=537165824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=24678; +UPDATE creature_template SET unit_flags=570721088, unit_flags2=2048, `dynamicflags`=0 WHERE entry IN (24808,25546); +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2048, `dynamicflags`=32 WHERE entry=25328; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2048, `dynamicflags`=32 WHERE entry=25342; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2048, `dynamicflags`=32 WHERE entry=25343; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=25384; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=25385; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=25488; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2048, `dynamicflags`=0 WHERE entry=25797; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=25841; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=25984; +UPDATE creature_template SET unit_flags=537133312, unit_flags2=2048, `dynamicflags`=32 WHERE entry=26172; +UPDATE creature_template SET unit_flags=537165824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=26219; +UPDATE creature_template SET unit_flags=33555264, unit_flags2=2048, `dynamicflags`=0 WHERE entry=26475; +UPDATE creature_template SET unit_flags=537133056, unit_flags2=2048, `dynamicflags`=32 WHERE entry=26477; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=26513; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=26514; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=26516; +UPDATE creature_template SET unit_flags=33088, unit_flags2=2048, `dynamicflags`=0 WHERE entry IN (26761,30521); +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2048, `dynamicflags`=0 WHERE entry=26772; +UPDATE creature_template SET unit_flags=536870912, unit_flags2=2048, `dynamicflags`=32 WHERE entry=26809; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=26816; +UPDATE creature_template SET unit_flags=537165824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=26873; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=32 WHERE entry=26896; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=26943; +UPDATE creature_template SET unit_flags=33280, unit_flags2=2048, `dynamicflags`=32 WHERE entry=27219; +UPDATE creature_template SET unit_flags=536904448, unit_flags2=2048, `dynamicflags`=32 WHERE entry=27400; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2048, `dynamicflags`=32 WHERE entry=27412; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=27457; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=0 WHERE entry=27479; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=27481; +UPDATE creature_template SET unit_flags=537133056, unit_flags2=2048, `dynamicflags`=0 WHERE entry=27530; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2048, `dynamicflags`=32 WHERE entry=27610; +UPDATE creature_template SET unit_flags=536903936, unit_flags2=2048, `dynamicflags`=32 WHERE entry=27613; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2048, `dynamicflags`=32 WHERE entry=27787; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2048, `dynamicflags`=32 WHERE entry=27828; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=27953; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2048, `dynamicflags`=0 WHERE entry=28089; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2048, `dynamicflags`=32 WHERE entry=28150; +UPDATE creature_template SET unit_flags=135428, unit_flags2=2048, `dynamicflags`=32 WHERE entry=28156; +UPDATE creature_template SET unit_flags=537133056, unit_flags2=2048, `dynamicflags`=32 WHERE entry=28162; +UPDATE creature_template SET unit_flags=537133312, unit_flags2=2048, `dynamicflags`=32 WHERE entry=28260; +UPDATE creature_template SET unit_flags=570720256, unit_flags2=2048, `dynamicflags`=32 WHERE entry=28390; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=32 WHERE entry=28391; +UPDATE creature_template SET unit_flags=570720256, unit_flags2=2048, `dynamicflags`=32 WHERE entry=28392; +UPDATE creature_template SET unit_flags=570720256, unit_flags2=2048, `dynamicflags`=32 WHERE entry=28393; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2048, `dynamicflags`=32 WHERE entry=28672; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=28844; +UPDATE creature_template SET unit_flags=537133312, unit_flags2=2048, `dynamicflags`=32 WHERE entry=28852; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2048, `dynamicflags`=0 WHERE entry=29454; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=0 WHERE entry=29543; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=0 WHERE entry=29544; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=0 WHERE entry=29545; +UPDATE creature_template SET unit_flags=537165824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=29546; +UPDATE creature_template SET unit_flags=537133312, unit_flags2=2048, `dynamicflags`=0 WHERE entry=29571; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=0 WHERE entry=29584; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=29585; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=29914; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2048, `dynamicflags`=32 WHERE entry=29916; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2048, `dynamicflags`=32 WHERE entry=29917; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=30058; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=30148; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=0 WHERE entry=30163; +UPDATE creature_template SET unit_flags=536904448, unit_flags2=2048, `dynamicflags`=0 WHERE entry=30177; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=30292; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2048, `dynamicflags`=0 WHERE entry=30673; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2048, `dynamicflags`=32 WHERE entry=30674; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=30881; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry IN (31007,31485); +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry IN (31008,31489); +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry IN (31009,31496); +UPDATE creature_template SET unit_flags=536871424, unit_flags2=2048, `dynamicflags`=32 WHERE entry=31130; +UPDATE creature_template SET unit_flags=570458368, unit_flags2=2048, `dynamicflags`=32 WHERE entry=31177; +UPDATE creature_template SET unit_flags=33587456, unit_flags2=2048, `dynamicflags`=0 WHERE entry=31281; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2048, `dynamicflags`=0 WHERE entry=31285; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2048, `dynamicflags`=0 WHERE entry=31292; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2048, `dynamicflags`=0 WHERE entry=31293; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2048, `dynamicflags`=0 WHERE entry=31294; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2048, `dynamicflags`=0 WHERE entry=31295; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2048, `dynamicflags`=0 WHERE entry=31296; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2048, `dynamicflags`=0 WHERE entry=31297; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2048, `dynamicflags`=0 WHERE entry=31298; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2048, `dynamicflags`=0 WHERE entry=31299; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2048, `dynamicflags`=0 WHERE entry=31308; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2048, `dynamicflags`=0 WHERE entry=31309; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2048, `dynamicflags`=32 WHERE entry=32569; +UPDATE creature_template SET unit_flags=570703872, unit_flags2=2049, `dynamicflags`=32 WHERE entry=33063; +UPDATE creature_template SET unit_flags=537133056, unit_flags2=2049, `dynamicflags`=32 WHERE entry=33439; +UPDATE creature_template SET unit_flags=537133056, unit_flags2=2049, `dynamicflags`=32 WHERE entry=33455; +UPDATE creature_template SET unit_flags=537133056, unit_flags2=2049, `dynamicflags`=32 WHERE entry=33457; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2048, `dynamicflags`=32 WHERE entry=33774; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2048, `dynamicflags`=32 WHERE entry=33775; +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=32 WHERE entry=34852; +UPDATE creature_template SET unit_flags=537166336, unit_flags2=2048, `dynamicflags`=32 WHERE entry=35097; +UPDATE creature_template SET unit_flags=536871680, unit_flags2=2048, `dynamicflags`=32 WHERE entry=35324; +UPDATE creature_template SET unit_flags=32832, unit_flags2=2048, `dynamicflags`=0 WHERE entry IN (37127,38126); +UPDATE creature_template SET unit_flags=32832, unit_flags2=2048, `dynamicflags`=0 WHERE entry IN (37134,38131); +UPDATE creature_template SET unit_flags=0, unit_flags2=2048, `dynamicflags`=0 WHERE entry=37552; +UPDATE creature_template SET unit_flags=536904000, unit_flags2=2048, `dynamicflags`=0 WHERE entry IN (38401, 37970, 38784,38785); +UPDATE creature_template SET unit_flags=536904000, unit_flags2=2048, `dynamicflags`=0 WHERE entry IN (37972,38399,38770,38769); +UPDATE creature_template SET unit_flags=536904000, unit_flags2=2048, `dynamicflags`=0 WHERE entry IN (37973,38771,38400,38772); +UPDATE creature_template SET unit_flags=570688258, unit_flags2=2048, `dynamicflags`=32 WHERE entry=40626; +UPDATE creature_template SET unit_flags=570688258, unit_flags2=2048, `dynamicflags`=32 WHERE entry=40627; +UPDATE creature_template SET unit_flags=570688258, unit_flags2=2048, `dynamicflags`=32 WHERE entry=40628; +UPDATE creature_template SET unit_flags=570688258, unit_flags2=2048, `dynamicflags`=32 WHERE entry=40870; +UPDATE creature_template SET unit_flags=537166336, unit_flags2=2049, `dynamicflags`=32 WHERE entry=32974; +UPDATE creature_template SET unit_flags=537165824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=32975; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=33001; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=33033; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=33035; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=33037; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=33039; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=0 WHERE entry=33040; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=33071; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2099201, `dynamicflags`=32 WHERE entry=33183; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=33295; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=33347; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=33348; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2049, `dynamicflags`=32 WHERE entry=34030; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=34232; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=34299; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=32 WHERE entry=34315; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=34426; +UPDATE creature_template SET unit_flags=537166080, unit_flags2=2049, `dynamicflags`=32 WHERE entry=34446; +UPDATE creature_template SET unit_flags=537165824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=34498; +UPDATE creature_template SET unit_flags=537133056, unit_flags2=2049, `dynamicflags`=0 WHERE entry=34576; +UPDATE creature_template SET unit_flags=570458880, unit_flags2=2049, `dynamicflags`=0 WHERE entry=34843; +UPDATE creature_template SET unit_flags=537165824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=34863; +UPDATE creature_template SET unit_flags=570720256, unit_flags2=2049, `dynamicflags`=32 WHERE entry=35235; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=32 WHERE entry=35237; +UPDATE creature_template SET unit_flags=537165824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=35810; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=35837; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=32 WHERE entry=35928; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=32 WHERE entry=35929; +UPDATE creature_template SET unit_flags=570458880, unit_flags2=2049, `dynamicflags`=32 WHERE entry=36176; +UPDATE creature_template SET unit_flags=537165824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=36205; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=32 WHERE entry=36342; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=32 WHERE entry=36348; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=32 WHERE entry=36354; +UPDATE creature_template SET unit_flags=570458880, unit_flags2=2049, `dynamicflags`=32 WHERE entry=36621; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=32 WHERE entry=36756; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=0 WHERE entry=36869; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=0 WHERE entry=36870; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=36922; +UPDATE creature_template SET unit_flags=570687488, unit_flags2=2049, `dynamicflags`=0 WHERE entry=37082; +UPDATE creature_template SET unit_flags=570720256, unit_flags2=2049, `dynamicflags`=32 WHERE entry=37911; +UPDATE creature_template SET unit_flags=570720256, unit_flags2=2049, `dynamicflags`=32 WHERE entry=37912; +UPDATE creature_template SET unit_flags=570426112, unit_flags2=2049, `dynamicflags`=32 WHERE entry=38554; +UPDATE creature_template SET unit_flags=537165824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=38614; +UPDATE creature_template SET unit_flags=570426112, unit_flags2=2049, `dynamicflags`=32 WHERE entry=38823; +UPDATE creature_template SET unit_flags=570426112, unit_flags2=2049, `dynamicflags`=32 WHERE entry=38824; +UPDATE creature_template SET unit_flags=570458880, unit_flags2=2049, `dynamicflags`=32 WHERE entry=39015; +UPDATE creature_template SET unit_flags=570458880, unit_flags2=2049, `dynamicflags`=32 WHERE entry=39016; +UPDATE creature_template SET unit_flags=570458880, unit_flags2=2049, `dynamicflags`=32 WHERE entry=39017; +UPDATE creature_template SET unit_flags=537166080, unit_flags2=2049, `dynamicflags`=0 WHERE entry=39086; +UPDATE creature_template SET unit_flags=537166080, unit_flags2=2049, `dynamicflags`=0 WHERE entry=39087; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=32 WHERE entry=39095; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=32 WHERE entry=39449; +UPDATE creature_template SET unit_flags=0, unit_flags2=2049, `dynamicflags`=0 WHERE entry=39464; +UPDATE creature_template SET unit_flags=536903680, unit_flags2=2049, `dynamicflags`=32 WHERE entry=39886; +UPDATE creature_template SET unit_flags=536903680, unit_flags2=2049, `dynamicflags`=32 WHERE entry=39911; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=40129; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=32 WHERE entry=40382; +UPDATE creature_template SET unit_flags=536903936, unit_flags2=2049, `dynamicflags`=32 WHERE entry=40661; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=40662; +UPDATE creature_template SET unit_flags=570720256, unit_flags2=2049, `dynamicflags`=32 WHERE entry=40676; +UPDATE creature_template SET unit_flags=570720256, unit_flags2=2049, `dynamicflags`=32 WHERE entry=40758; +UPDATE creature_template SET unit_flags=537165824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=40901; +UPDATE creature_template SET unit_flags=570425344, unit_flags2=2049, `dynamicflags`=0 WHERE entry=40939; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=41097; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=41099; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=41100; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=41101; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=41103; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=41104; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=41109; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=41111; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=41113; +UPDATE creature_template SET unit_flags=570458112, unit_flags2=2049, `dynamicflags`=32 WHERE entry=41157; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=32 WHERE entry=41289; +UPDATE creature_template SET unit_flags=536903680, unit_flags2=2049, `dynamicflags`=32 WHERE entry=41629; +UPDATE creature_template SET unit_flags=537150208, unit_flags2=2049, `dynamicflags`=0 WHERE entry=41783; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=4196353, `dynamicflags`=0 WHERE entry=41894; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=0 WHERE entry=41899; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=32 WHERE entry=42091; +UPDATE creature_template SET unit_flags=570458880, unit_flags2=2049, `dynamicflags`=0 WHERE entry=42220; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=42259; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=42381; +UPDATE creature_template SET unit_flags=537133056, unit_flags2=2049, `dynamicflags`=32 WHERE entry=42681; +UPDATE creature_template SET unit_flags=537133056, unit_flags2=2049, `dynamicflags`=32 WHERE entry=42682; +UPDATE creature_template SET unit_flags=537133312, unit_flags2=2049, `dynamicflags`=0 WHERE entry=42857; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2049, `dynamicflags`=0 WHERE entry=42945; +UPDATE creature_template SET unit_flags=0, unit_flags2=2049, `dynamicflags`=32 WHERE entry=43032; +UPDATE creature_template SET unit_flags=0, unit_flags2=2049, `dynamicflags`=32 WHERE entry=43048; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=43115; +UPDATE creature_template SET unit_flags=570426112, unit_flags2=2049, `dynamicflags`=0 WHERE entry=43261; +UPDATE creature_template SET unit_flags=536903680, unit_flags2=2049, `dynamicflags`=32 WHERE entry=43521; +UPDATE creature_template SET unit_flags=570687488, unit_flags2=2049, `dynamicflags`=32 WHERE entry=43681; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=43985; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=43986; +UPDATE creature_template SET unit_flags=537166080, unit_flags2=2049, `dynamicflags`=32 WHERE entry=44105; +UPDATE creature_template SET unit_flags=537133888, unit_flags2=2049, `dynamicflags`=32 WHERE entry=44124; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=44149; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=44150; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=44172; +UPDATE creature_template SET unit_flags=33536, unit_flags2=2049, `dynamicflags`=0 WHERE entry=44592; +UPDATE creature_template SET unit_flags=33536, unit_flags2=2049, `dynamicflags`=0 WHERE entry=44593; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=44762; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=44763; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=32 WHERE entry=44899; +UPDATE creature_template SET unit_flags=537166080, unit_flags2=2049, `dynamicflags`=0 WHERE entry=45129; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=45186; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=45197; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2049, `dynamicflags`=0 WHERE entry=45251; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2049, `dynamicflags`=32 WHERE entry=45364; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=0 WHERE entry=45372; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=45517; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=32 WHERE entry=45571; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=45613; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2049, `dynamicflags`=32 WHERE entry=45754; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=45874; +UPDATE creature_template SET unit_flags=537165824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=45887; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=4196353, `dynamicflags`=0 WHERE entry=45893; +UPDATE creature_template SET unit_flags=537133056, unit_flags2=4196353, `dynamicflags`=0 WHERE entry=46003; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=32 WHERE entry=46014; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2049, `dynamicflags`=32 WHERE entry=46299; +UPDATE creature_template SET unit_flags=570688256, unit_flags2=2049, `dynamicflags`=32 WHERE entry=46300; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=46610; +UPDATE creature_template SET unit_flags=570687488, unit_flags2=2049, `dynamicflags`=0 WHERE entry=46629; +UPDATE creature_template SET unit_flags=0, unit_flags2=2099200, `dynamicflags`=0 WHERE entry=46713; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=46809; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=46810; +UPDATE creature_template SET unit_flags=570458112, unit_flags2=2099201, `dynamicflags`=0 WHERE entry=46837; +UPDATE creature_template SET unit_flags=570687488, unit_flags2=2049, `dynamicflags`=32 WHERE entry=46976; +UPDATE creature_template SET unit_flags=537133056, unit_flags2=2049, `dynamicflags`=0 WHERE entry=47207; +UPDATE creature_template SET unit_flags=537133056, unit_flags2=2049, `dynamicflags`=0 WHERE entry=47213; +UPDATE creature_template SET unit_flags=537133056, unit_flags2=2049, `dynamicflags`=0 WHERE entry=47216; +UPDATE creature_template SET unit_flags=537133056, unit_flags2=2049, `dynamicflags`=0 WHERE entry=47219; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=47317; +UPDATE creature_template SET unit_flags=537133312, unit_flags2=2049, `dynamicflags`=32 WHERE entry=47326; +UPDATE creature_template SET unit_flags=537133312, unit_flags2=2049, `dynamicflags`=32 WHERE entry=47327; +UPDATE creature_template SET unit_flags=536904448, unit_flags2=2049, `dynamicflags`=0 WHERE entry=47446; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=47515; +UPDATE creature_template SET unit_flags=570687488, unit_flags2=2049, `dynamicflags`=32 WHERE entry=47660; +UPDATE creature_template SET unit_flags=570688320, unit_flags2=2049, `dynamicflags`=32 WHERE entry=47704; +UPDATE creature_template SET unit_flags=570688320, unit_flags2=2049, `dynamicflags`=32 WHERE entry=47705; +UPDATE creature_template SET unit_flags=570688320, unit_flags2=2049, `dynamicflags`=32 WHERE entry=47706; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=32 WHERE entry=47834; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=47870; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=47871; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=47947; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=32 WHERE entry=48002; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=32 WHERE entry=48003; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=32 WHERE entry=48004; +UPDATE creature_template SET unit_flags=536904448, unit_flags2=2049, `dynamicflags`=0 WHERE entry=48147; +UPDATE creature_template SET unit_flags=536904448, unit_flags2=2049, `dynamicflags`=0 WHERE entry=48148; +UPDATE creature_template SET unit_flags=537166656, unit_flags2=1073743873, `dynamicflags`=0 WHERE entry=48185; +UPDATE creature_template SET unit_flags=570687552, unit_flags2=2049, `dynamicflags`=32 WHERE entry=48280; +UPDATE creature_template SET unit_flags=570687552, unit_flags2=2049, `dynamicflags`=32 WHERE entry=48439; +UPDATE creature_template SET unit_flags=537133312, unit_flags2=2049, `dynamicflags`=32 WHERE entry=48488; +UPDATE creature_template SET unit_flags=537133312, unit_flags2=2049, `dynamicflags`=32 WHERE entry=48534; +UPDATE creature_template SET unit_flags=537133312, unit_flags2=2049, `dynamicflags`=32 WHERE entry=49114; +UPDATE creature_template SET unit_flags=537133312, unit_flags2=2099201, `dynamicflags`=0 WHERE entry=49115; +UPDATE creature_template SET unit_flags=570721024, unit_flags2=2049, `dynamicflags`=32 WHERE entry=49339; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=0 WHERE entry=49340; +UPDATE creature_template SET unit_flags=570688320, unit_flags2=2049, `dynamicflags`=0 WHERE entry=49414; +UPDATE creature_template SET unit_flags=570688320, unit_flags2=2049, `dynamicflags`=0 WHERE entry=49415; +UPDATE creature_template SET unit_flags=32768, unit_flags2=2048, `dynamicflags`=0 WHERE entry=49548; +UPDATE creature_template SET unit_flags=537166656, unit_flags2=2049, `dynamicflags`=0 WHERE entry=50276; +UPDATE creature_template SET unit_flags=537166656, unit_flags2=2049, `dynamicflags`=0 WHERE entry=50278; +UPDATE creature_template SET unit_flags=570721088, unit_flags2=2049, `dynamicflags`=32 WHERE entry=50279; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=50658; +UPDATE creature_template SET unit_flags=570688320, unit_flags2=2049, `dynamicflags`=32 WHERE entry=51123; +UPDATE creature_template SET unit_flags=570688320, unit_flags2=2049, `dynamicflags`=32 WHERE entry=51124; +UPDATE creature_template SET unit_flags=570687744, unit_flags2=2049, `dynamicflags`=32 WHERE entry=51196; +UPDATE creature_template SET unit_flags=768, unit_flags2=2049, `dynamicflags`=32 WHERE entry=52000; +UPDATE creature_template SET unit_flags=537133824, unit_flags2=2049, `dynamicflags`=0 WHERE entry=52161; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=32 WHERE entry=52892; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=32 WHERE entry=52936; +UPDATE creature_template SET unit_flags=570687552, unit_flags2=2099201, `dynamicflags`=0 WHERE entry=53209; +UPDATE creature_template SET unit_flags=537166592, unit_flags2=2049, `dynamicflags`=32 WHERE entry=54111; +UPDATE creature_template SET unit_flags=570687808, unit_flags2=2049, `dynamicflags`=32 WHERE entry=54486; +UPDATE creature_template SET unit_flags=570687488, unit_flags2=2049, `dynamicflags`=32 WHERE entry=54488; +UPDATE creature_template SET unit_flags=570687552, unit_flags2=2049, `dynamicflags`=32 WHERE entry=54489; +UPDATE creature_template SET unit_flags=537133312, unit_flags2=2049, `dynamicflags`=32 WHERE entry=56369; +UPDATE creature_template SET unit_flags=570687488, unit_flags2=2049, `dynamicflags`=32 WHERE entry=56894; +UPDATE creature_template SET unit_flags=537165824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=57908; +UPDATE creature_template SET unit_flags=537165824, unit_flags2=2049, `dynamicflags`=32 WHERE entry=57909; diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_00_world_from_335_was_2018_09_09_01_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_00_world_from_335_was_2018_09_09_01_world_335.sql new file mode 100644 index 0000000000..697b5ca897 --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_00_world_from_335_was_2018_09_09_01_world_335.sql @@ -0,0 +1,2 @@ +-- Bloodsurge proc +-- UPDATE `spell_proc` SET `AttributesMask`=2 WHERE `SpellId`=46916; diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_01_world_from_335_was_2018_09_10_00_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_01_world_from_335_was_2018_09_10_00_world.sql new file mode 100644 index 0000000000..1aff3e3c52 --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_01_world_from_335_was_2018_09_10_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `instance_template` SET `parent` = 571 WHERE `map` = 631; diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_02_world_from_335_was_2018_09_10_01_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_02_world_from_335_was_2018_09_10_01_world.sql new file mode 100644 index 0000000000..d061f10b4c --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_02_world_from_335_was_2018_09_10_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `instance_template` SET `parent`=571 WHERE `map` IN (724, 668, 658, 632, 631); diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_03_world_from_335_was_2018_09_11_00_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_03_world_from_335_was_2018_09_11_00_world.sql new file mode 100644 index 0000000000..0bf494a234 --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_03_world_from_335_was_2018_09_11_00_world.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `player_factionchange_spells` WHERE `alliance_id` IN (16056, 16055); +INSERT INTO `player_factionchange_spells` (`alliance_id`, `horde_id`) VALUES +(16056, 18991), (16055, 18992); + +DELETE FROM `player_factionchange_items` WHERE `alliance_id` IN (12302,12303); +INSERT INTO `player_factionchange_items` (`race_A`, `alliance_id`, `commentA`, `race_H`, `horde_id`, `commentH`) VALUE +(0, 12302, 'Reins of the Ancient Frostsaber', 0, 15292, 'Green Kodo'), +(0, 12303, 'Reins of the Nightsaber', 0, 15293, 'Teal Kodo'); diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_04_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_04_world.sql new file mode 100644 index 0000000000..0a7bba3fb1 --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_11_04_world.sql @@ -0,0 +1,31 @@ +-- Celestine of the Harvest trainer +UPDATE `creature_template` SET `gossip_menu_id`= 11829, `npcflag`= 51, `unit_class`= 2, `unit_flags`= 32768 WHERE `entry`= 44396; +DELETE FROM `npc_trainer` WHERE `ID`= 44396; +INSERT INTO `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`, `Index`) VALUES +(44396, -200011, 0, 0, 0, 0, 0); +UPDATE `gossip_menu_option` SET `OptionNpcFlag`= 1, `OptionType`= 16, `OptionBroadcastTextID`= 8271 WHERE `MenuID`= 11829 AND `OptionID`= 1; + +-- Adding Cataclysm event entries +DELETE FROM `game_event` WHERE `eventEntry` IN (77, 78, 79, 80, 81); +INSERT INTO `game_event` (`eventEntry`, `occurence`, `length`, `holiday`, `description`) VALUES +(77, 1440, 1440, 0, 'Cataclysm Pre-Launch Deathwing Event'), +(78, 180, 180, 0, 'Dragonwrath Stormwind Event'), +(79, 180, 180, 0, 'Dragonwrath Orgrimmar Event'), +(80, 1440, 1440, 0, 'Nefarian''s Head Stormwind'), +(81, 1440, 1440, 0, 'Nefarian''s Head Orgrimmar'); + +-- Assigning some creatures to it +DELETE FROM `game_event_creature` WHERE `guid` IN (307108, 314353, 383796, 310826); +INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES +(78, 307108), +(3, 314353), +(77, 383796), +(81, 310826); + +DELETE FROM `game_event_gameobject` WHERE `guid` IN (307108, 314353); +INSERT INTO `game_event_gameobject` (`eventEntry`, `guid`) VALUES +(80, 220136), +(80, 211533); + +DELETE FROM `gameobject` WHERE `guid`= 218806; +DELETE FROM `gameobject_addon` WHERE `guid`= 218806; diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_12_00_world_from_335_was_2018_09_11_01_world_335.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_12_00_world_from_335_was_2018_09_11_01_world_335.sql new file mode 100644 index 0000000000..47dd55ea43 --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_12_00_world_from_335_was_2018_09_11_01_world_335.sql @@ -0,0 +1,15 @@ +/* +-- +UPDATE `smart_scripts` SET `action_param4`=1 WHERE `entryorguid` IN (8391) AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_x`=-6477.161133, `target_y`=-1255.462769, `target_z`=180.371185, `target_o`=1.720018 WHERE `entryorguid` IN (8400) AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `target_x`=-6477.161133, `target_y`=-1255.462769, `target_z`=180.371185, `target_o`=1.720018 WHERE `entryorguid` IN (8400) AND `source_type`=0 AND `id`=14; + +DELETE FROM `smart_scripts` WHERE `entryorguid` =8391 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 +(8391, 0,5,6,11,0,100,0,0,0,0,0,18,256,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lathoric the Black - On Spawn - Set unit flag'), +(8391, 0,6,7,61,0,100,0,0,0,0,0,2,16,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lathoric the Black - On Spawn - Change faction'), +(8391, 0,7,0,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,19,8421,20,0,0,0,0,0,'Lathoric the Black - On Spawn - set invisible'), +(8391, 0,8,0,1,0,100,1,7000,7000,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lathoric the Black - ooc - remove unit flag'); + +UPDATE `creature` SET `position_x`=-6455.95459, `position_y`=-1247.351807, `position_z`=180.441589, `orientation`=4.558472 WHERE `guid`=5809; +*/ diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_12_01_world_from_335_was_2018_09_11_02_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_12_01_world_from_335_was_2018_09_11_02_world.sql new file mode 100644 index 0000000000..1bca624368 --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_12_01_world_from_335_was_2018_09_11_02_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `smart_scripts` SET `action_param1`=1, `comment`="All champions - Script 1 - Set run On" WHERE `entryorguid` IN (3374500) AND `source_type`=9 AND `id`=7; +UPDATE `smart_scripts` SET `action_param1`=1, `comment`="All champions - Script 1 - Set run On" WHERE `entryorguid` IN (3328500) AND `source_type`=9 AND `id`=7; diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_12_02_world_from_335_was_2018_09_11_03_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_12_02_world_from_335_was_2018_09_11_03_world.sql new file mode 100644 index 0000000000..fd9908e147 --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_12_02_world_from_335_was_2018_09_11_03_world.sql @@ -0,0 +1,18 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=36325; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,36325,0,31,3,21182,0,0,'','Spell 36325 target creature 21182'), +(13,1,36325,1,31,3,22401,0,0,'','Spell 36325 target creature 22401'), +(13,1,36325,2,31,3,22402,0,0,'','Spell 36325 target creature 22402'), +(13,1,36325,3,31,3,22403,0,0,'','Spell 36325 target creature 22403'); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN ( 21182, 22401, 22402, 22403) AND `source_type`=0 AND `id`=2 AND action_type=11; +UPDATE `smart_scripts` SET `id`=2 WHERE `entryorguid` IN ( 21182, 22401, 22402, 22403) AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param1`=34386 WHERE `entryorguid` IN (20813,20814,20815,20816) AND `source_type`=0 AND `id`=2; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (21170, 22404, 22405, 22406) AND `source_type`=0 AND `id` IN (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 +(21170,0,9,0,11,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Honor Hold Gryphon Brigadier, Foothill - On Respawn - Set active"), +(22404,0,9,0,11,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Honor Hold Gryphon Brigadier, Foothill - On Respawn - Set active"), +(22405,0,9,0,11,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Honor Hold Gryphon Brigadier, Foothill - On Respawn - Set active"), +(22406,0,9,0,11,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Honor Hold Gryphon Brigadier, Foothill - On Respawn - Set active"); diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_15_00_world_from_335_was_2018_09_12_00_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_15_00_world_from_335_was_2018_09_12_00_world.sql new file mode 100644 index 0000000000..b5c908159d --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_15_00_world_from_335_was_2018_09_12_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `unit_flags`=768 WHERE `entry` IN (32443, 32446); diff --git a/sql/old/4.3.4/world/33_2018_09_15/2018_09_15_01_world_from_335_was_2018_09_14_00_world.sql b/sql/old/4.3.4/world/33_2018_09_15/2018_09_15_01_world_from_335_was_2018_09_14_00_world.sql new file mode 100644 index 0000000000..987e46c34e --- /dev/null +++ b/sql/old/4.3.4/world/33_2018_09_15/2018_09_15_01_world_from_335_was_2018_09_14_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `action_type`=41, `action_param1`=2100 WHERE `entryorguid` IN (175622); diff --git a/sql/updates/auth/4.3.4/2018_09_15_00_auth.sql b/sql/updates/auth/4.3.4/2018_09_15_00_auth.sql new file mode 100644 index 0000000000..deab508c5a --- /dev/null +++ b/sql/updates/auth/4.3.4/2018_09_15_00_auth.sql @@ -0,0 +1,2 @@ +-- TDB 4.3.4-34 auth database +UPDATE `updates` SET `state`='ARCHIVED'; diff --git a/sql/updates/characters/4.3.4/2018_09_15_00_characters.sql b/sql/updates/characters/4.3.4/2018_09_15_00_characters.sql new file mode 100644 index 0000000000..8a95f7352c --- /dev/null +++ b/sql/updates/characters/4.3.4/2018_09_15_00_characters.sql @@ -0,0 +1,2 @@ +-- TDB 4.3.4-34 characters database +UPDATE `updates` SET `state`='ARCHIVED'; diff --git a/sql/updates/world/4.3.4/2018_09_15_00_world.sql b/sql/updates/world/4.3.4/2018_09_15_00_world.sql new file mode 100644 index 0000000000..e57c593067 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_09_15_00_world.sql @@ -0,0 +1,3 @@ +UPDATE `version` SET `db_version`='TDB 434.34', `cache_id`=34 LIMIT 1; + +UPDATE `updates` SET `state`='ARCHIVED'; diff --git a/src/common/Utilities/Util.cpp b/src/common/Utilities/Util.cpp index 889ab9176d..d80165fe5e 100644 --- a/src/common/Utilities/Util.cpp +++ b/src/common/Utilities/Util.cpp @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include #include @@ -574,6 +576,12 @@ bool StringToBool(std::string const& str) return lowerStr == "1" || lowerStr == "true" || lowerStr == "yes"; } +bool StringContainsStringI(std::string const& haystack, std::string const& needle) +{ + return haystack.end() != + std::search(haystack.begin(), haystack.end(), needle.begin(), needle.end(), [](char c1, char c2) { return std::toupper(c1) == std::toupper(c2); }); +} + float DegToRad(float degrees) { return degrees * (2.f * float(M_PI) / 360.f); diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index 9a2bd54817..7359d42686 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -302,6 +302,9 @@ TC_COMMON_API std::string ByteArrayToHexStr(uint8 const* bytes, uint32 length, b TC_COMMON_API void HexStrToByteArray(std::string const& str, uint8* out, bool reverse = false); TC_COMMON_API bool StringToBool(std::string const& str); + +TC_COMMON_API bool StringContainsStringI(std::string const& haystack, std::string const& needle); + TC_COMMON_API float DegToRad(float degrees); template diff --git a/src/common/Utilities/advstd.h b/src/common/Utilities/advstd.h new file mode 100644 index 0000000000..ce32e14c33 --- /dev/null +++ b/src/common/Utilities/advstd.h @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2008-2018 TrinityCore + * + * This program 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 . + */ + +#ifndef TRINITY_ADVSTD_H +#define TRINITY_ADVSTD_H + +#include +#include +#include +#include + +// this namespace holds implementations of upcoming stdlib features that our c++ version doesn't have yet +namespace advstd { + // C++17 std::apply (constrained to only function pointers, not all callable) + template + using apply_tuple_type = std::tuple>...>; + template + R apply_impl(R(*func)(Ts...), apply_tuple_type&& args, std::index_sequence) + { + return func(std::get(std::forward>(args))...); + } + template + R apply(R(*func)(Ts...), apply_tuple_type&& args) + { + return apply_impl(func, std::forward>(args), std::index_sequence_for{}); + } + +#define forward_1v(stdname, type) template constexpr type stdname ## _v = std::stdname::value +#define forward_2v(stdname, type) template constexpr type stdname ## _v = std::stdname::value + + // C++17 std::is_same_v + forward_2v(is_same, bool); + + // C++17 std::is_integral_v + forward_1v(is_integral, bool); + + // C++17 std::is_assignable_v + forward_2v(is_assignable, bool); + + // C++17 std::is_signed_v + forward_1v(is_signed, bool); + + // C++17 std::is_unsigned_v + forward_1v(is_unsigned, bool); + + // C++17 std::is_base_of_v + forward_2v(is_base_of, bool); + + // C++17 std::is_floating_point_v + forward_1v(is_floating_point, bool); + + // C++17 std::tuple_size_v + forward_1v(tuple_size, size_t); + +#undef forward_1v +#undef forward_2v + + // C++20 std::remove_cvref_t + template + using remove_cvref_t = std::remove_cv_t>; +} + +#endif diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 38c2fda2be..566cebe176 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -785,9 +785,9 @@ uint32 SmartAI::GetData(uint32 /*id*/) const return 0; } -void SmartAI::SetData(uint32 id, uint32 value) +void SmartAI::SetData(uint32 id, uint32 value, Unit* invoker) { - GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, nullptr, id, value); + GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, invoker, id, value); } void SmartAI::SetGUID(ObjectGuid const& /*guid*/, int32 /*id*/) { } @@ -1045,9 +1045,9 @@ void SmartGameObjectAI::Destroyed(Player* player, uint32 eventId) GetScript()->ProcessEventsFor(SMART_EVENT_DEATH, player, eventId, 0, false, nullptr, me); } -void SmartGameObjectAI::SetData(uint32 id, uint32 value) +void SmartGameObjectAI::SetData(uint32 id, uint32 value, Unit* invoker) { - GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, nullptr, id, value); + GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, invoker, id, value); } void SmartGameObjectAI::SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker) diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index 79e0ac716a..1cc44fe16c 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -155,7 +155,8 @@ class TC_GAME_API SmartAI : public CreatureAI uint32 GetData(uint32 id = 0) const override; // Used in scripts to share variables - void SetData(uint32 id, uint32 value) override; + void SetData(uint32 id, uint32 value) override { SetData(id, value, nullptr); } + void SetData(uint32 id, uint32 value, Unit* invoker); // Used in scripts to share variables void SetGUID(ObjectGuid const& guid, int32 id = 0) override; @@ -264,7 +265,8 @@ class TC_GAME_API SmartGameObjectAI : public GameObjectAI void QuestAccept(Player* player, Quest const* quest) override; void QuestReward(Player* player, Quest const* quest, uint32 opt) override; void Destroyed(Player* player, uint32 eventId) override; - void SetData(uint32 id, uint32 value) override; + void SetData(uint32 id, uint32 value, Unit* invoker); + void SetData(uint32 id, uint32 value) override { SetData(id, value, nullptr); } void SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker); void OnGameEvent(bool start, uint16 eventId) override; void OnLootStateChanged(uint32 state, Unit* unit) override; diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h index ff0e4ced60..2e07c576a8 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.h +++ b/src/server/game/AI/SmartScripts/SmartScript.h @@ -69,8 +69,10 @@ class TC_GAME_API SmartScript void DoFindFriendlyMissingBuff(std::list& list, float range, uint32 spellid); Unit* DoFindClosestFriendlyInRange(float range, bool playerOnly); - bool IsSmart(Creature* c = nullptr); - bool IsSmartGO(GameObject* g = nullptr); + + bool IsSmart(Creature* c, bool silent = false); + bool IsSmart(GameObject* g, bool silent = false); + bool IsSmart(bool silent = false); void StoreTargetList(ObjectVector const& targets, uint32 id); ObjectVector const* GetStoredTargetVector(uint32 id, WorldObject const& ref) const; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index a45740c1ed..059dc78d6d 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -453,6 +453,7 @@ SmartScriptHolder& SmartAIMgr::FindLinkedEvent(SmartAIEventList& list, uint32 li case SMART_EVENT_IS_BEHIND_TARGET: case SMART_EVENT_INSTANCE_PLAYER_ENTER: case SMART_EVENT_TRANSPORT_ADDCREATURE: + case SMART_EVENT_DATA_SET: return true; default: return false; diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h index ff75c7a23d..2c67709d13 100644 --- a/src/server/game/Accounts/RBAC.h +++ b/src/server/game/Accounts/RBAC.h @@ -283,15 +283,7 @@ enum RBACPermissions RBAC_PERM_COMMAND_GM_LIST = 375, RBAC_PERM_COMMAND_GM_VISIBLE = 376, RBAC_PERM_COMMAND_GO = 377, - RBAC_PERM_COMMAND_GO_CREATURE = 378, - RBAC_PERM_COMMAND_GO_GRAVEYARD = 379, - RBAC_PERM_COMMAND_GO_GRID = 380, - RBAC_PERM_COMMAND_GO_OBJECT = 381, - RBAC_PERM_COMMAND_GO_TAXINODE = 382, - RBAC_PERM_COMMAND_GO_TICKET = 383, - RBAC_PERM_COMMAND_GO_TRIGGER = 384, - RBAC_PERM_COMMAND_GO_XYZ = 385, - RBAC_PERM_COMMAND_GO_ZONEXY = 386, + // unused 378-386 RBAC_PERM_COMMAND_GOBJECT = 387, RBAC_PERM_COMMAND_GOBJECT_ACTIVATE = 388, RBAC_PERM_COMMAND_GOBJECT_ADD = 389, @@ -750,7 +742,14 @@ enum RBACPermissions RBAC_PERM_COMMAND_RELOAD_CHARACTER_TEMPLATE = 842, // not on 3.3.5a or 4.3.4 RBAC_PERM_COMMAND_RELOAD_QUEST_GREETING = 843, RBAC_PERM_COMMAND_DEBUG_SEND_PLAYSCENE = 844, // not on 3.3.5a or 4.3.4 - RBAC_PERM_COMMAND_GO_OFFSET = 845, + RBAC_PERM_COMMAND_SCENE_DEBUG = 845, // not on 3.3.5a or 4.3.4 + RBAC_PERM_COMMAND_SCENE_PLAY = 846, // not on 3.3.5a or 4.3.4 + RBAC_PERM_COMMAND_SCENE_PLAY_PACKAGE = 847, // not on 3.3.5a or 4.3.4 + RBAC_PERM_COMMAND_SCENE_CANCEL = 848, // not on 3.3.5a or 4.3.4 + RBAC_PERM_COMMAND_LIST_SCENES = 849, // not on 3.3.5a or 4.3.4 + RBAC_PERM_COMMAND_RELOAD_SCENE_TEMPLATE = 850, // not on 3.3.5a or 4.3.4 + RBAC_PERM_COMMAND_RELOAD_AREATRIGGER_TEMPLATE = 851, // not on 3.3.5a or 4.3.4 + // unused 852 RBAC_PERM_COMMAND_RELOAD_CONVERSATION_TEMPLATE = 853, // not on 3.3.5a or 4.3.4 RBAC_PERM_COMMAND_DEBUG_CONVERSATION = 854, // not on 3.3.5a or 4.3.4 RBAC_PERM_COMMAND_DEBUG_PLAY_MUSIC = 855, @@ -772,7 +771,6 @@ enum RBACPermissions RBAC_PERM_COMMAND_DEBUG_INSTANCESPAWN = 871, RBAC_PERM_COMMAND_SERVER_DEBUG = 872, RBAC_PERM_COMMAND_RELOAD_CREATURE_MOVEMENT_OVERRIDE = 873, - RBAC_PERM_COMMAND_GO_INSTANCE = 874, // // IF YOU ADD NEW PERMISSIONS, ADD THEM IN MASTER BRANCH AS WELL! // diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 4e7b8f5174..c3897f8204 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -35,11 +35,6 @@ #include "World.h" #include -ChatCommand::ChatCommand(char const* name, uint32 permission, bool allowConsole, pHandler handler, std::string help, std::vector childCommands /*= std::vector()*/) - : Name(ASSERT_NOTNULL(name)), Permission(permission), AllowConsole(allowConsole), Handler(handler), Help(std::move(help)), ChildCommands(std::move(childCommands)) -{ -} - // Lazy loading of the command table cache from commands and the // ScriptMgr should be thread safe since the player commands, // cli commands and ScriptMgr updates are all dispatched one after @@ -306,12 +301,12 @@ bool ChatHandler::ExecuteCommandInTable(std::vector const& table, c } // must be available and have handler - if (!table[i].Handler || !isAvailable(table[i])) + if (!table[i].HasHandler() || !isAvailable(table[i])) continue; SetSentErrorMessage(false); // table[i].Name == "" is special case: send original command to handler - if ((table[i].Handler)(this, table[i].Name[0] != '\0' ? text : oldtext)) + if (table[i](this, table[i].Name[0] != '\0' ? text : oldtext)) { if (!m_session) // ignore console return true; diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h index 8fb44a4c29..fe68921b80 100644 --- a/src/server/game/Chat/Chat.h +++ b/src/server/game/Chat/Chat.h @@ -20,6 +20,7 @@ #define TRINITYCORE_CHAT_H #include "Common.h" +#include "ChatCommand.h" #include "ObjectGuid.h" #include "SharedDefines.h" #include "StringFormat.h" @@ -37,21 +38,6 @@ class WorldPacket; struct GameTele; -class TC_GAME_API ChatCommand -{ - typedef bool(*pHandler)(ChatHandler*, char const*); - - public: - ChatCommand(char const* name, uint32 permission, bool allowConsole, pHandler handler, std::string help, std::vector childCommands = std::vector()); - - char const* Name; - uint32 Permission; // function pointer required correct align (use uint32) - bool AllowConsole; - pHandler Handler; - std::string Help; - std::vector ChildCommands; -}; - class TC_GAME_API ChatHandler { public: diff --git a/src/server/game/Chat/ChatCommands/ChatCommand.h b/src/server/game/Chat/ChatCommands/ChatCommand.h new file mode 100644 index 0000000000..7f35f90677 --- /dev/null +++ b/src/server/game/Chat/ChatCommands/ChatCommand.h @@ -0,0 +1,279 @@ +/* + * Copyright (C) 2008-2018 TrinityCore + * + * This program 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 . + */ + +#ifndef TRINITY_CHATCOMMAND_H +#define TRINITY_CHATCOMMAND_H + +#include "advstd.h" +#include "ChatCommandArgs.h" +#include "ChatCommandTags.h" +#include "Define.h" +#include "Errors.h" +#include "ObjectGuid.h" +#include "Optional.h" +#include +#include +#include +#include + +class ChatHandler; +class CommandArgs; + +template +struct CommandArgsConsumerSingle +{ + using arginfo = Trinity::ChatCommands::ArgInfo; + static char const* TryConsumeTo(T& val, char const* args) + { + return arginfo::TryConsume(val, args); + } +}; + +struct CommandArgsVariantConsumer +{ + template + static char const* TryConsumeTo(V& val, char const* args) + { + T1 v; + if (char const* next = CommandArgsConsumerSingle::TryConsumeTo(v, args)) + { + val = std::move(v); + return next; + } + else + return TryConsumeTo(val, args); + } + + template + static char const* TryConsumeTo(V& val, char const* args) + { + T1 v; + if (char const* next = CommandArgsConsumerSingle::TryConsumeTo(v, args)) + { + val = std::move(v); + return next; + } + else + return nullptr; + } +}; + +template +struct CommandArgsConsumerSingle> +{ + static char const* TryConsumeTo(Trinity::ChatCommands::Variant& val, char const* args) + { + return CommandArgsVariantConsumer::TryConsumeTo, Ts...>(val, args); + } +}; + +template +struct CommandArgsConsumerSingle> +{ + static char const* TryConsumeTo(std::vector& val, char const* args) + { + char const* last; + val.clear(); + + do val.emplace_back(); + while ((args = CommandArgsConsumerSingle::TryConsumeTo(val.back(), (last = args)))); + + val.pop_back(); + return last; + } +}; + +template <> +struct CommandArgsConsumerSingle +{ + static char const* TryConsumeTo(CommandArgs*&, char const* args) { return args; } +}; + +template <> +struct CommandArgsConsumerSingle +{ + static char const* TryConsumeTo(char const*&, char const* args) { return args; } +}; + +template +struct CommandArgsConsumerNext; + +template +struct CommandArgsConsumerMulti +{ + static char const* TryConsumeTo(Tuple& tuple, char const* args) + { + if (char const* next = CommandArgsConsumerSingle::TryConsumeTo(std::get(tuple), args)) + return CommandArgsConsumerNext::GoNext(tuple, next); + else + return nullptr; + } +}; + +template +struct CommandArgsConsumerMulti, offset> +{ + static char const* TryConsumeTo(Tuple& tuple, char const* args) + { + // try with the argument + auto& myArg = std::get(tuple); + myArg.emplace(); + if (char const* next = CommandArgsConsumerSingle::TryConsumeTo(*(myArg.get_ptr()), args)) + if ((next = CommandArgsConsumerNext::GoNext(tuple, next))) + return next; + // try again omitting the argument + myArg = boost::none; + if (char const* next = CommandArgsConsumerNext::GoNext(tuple, args)) + return next; + return nullptr; + } +}; + +template +struct CommandArgsConsumerNext, offset> +{ + using tuple_type = std::tuple; + + template + static std::enable_if_t GoNext(tuple_type& tuple, char const* args) + { + return CommandArgsConsumerMulti, offset>::TryConsumeTo(tuple, args); + } + + template + static std::enable_if_t GoNext(tuple_type&, char const* args) + { + return args; + } +}; + +class TC_GAME_API CommandArgs +{ + public: + CommandArgs(char const* args) : _original(args), _args(args) {} + + template + auto TryConsume() + { + Optional, advstd::remove_cvref_t, advstd::remove_cvref_t...>> rv; + rv.emplace(); + if (!TryConsumeToTuple<0>(*(rv.get_ptr()))) + rv = boost::none; + return rv; + } + + template + auto TryConsume() + { + using T = advstd::remove_cvref_t; + Optional rv; + rv.emplace(); + if (char const* next = CommandArgsConsumerSingle::TryConsumeTo(*(rv.get_ptr()), _args)) + _args = next; + else + rv = boost::none; + return rv; + } + + template + bool TryConsumeToTuple(T& tuple) + { + if (char const* next = CommandArgsConsumerNext::GoNext(tuple, _args)) + { + _args = next; + return true; + } + else + return false; + } + + void Reset() { _args = _original; } + + char const* GetFullArgs() const { return _original; } + char const* GetRemainingArgs() const { return _args; } + + bool IsEmpty() const { return !!*_args; } + explicit operator bool() const { return IsEmpty(); } + + private: + char const* const _original; + char const* _args; +}; + +template struct ChatCommandHandlerToTuple { static_assert(!advstd::is_same_v, "Invalid command handler signature"); }; +template struct ChatCommandHandlerToTuple { using type = std::tuple...>; }; + +template struct ChatCommandStoreLastArg { static void store(T&, CommandArgs&) {} }; +template <> struct ChatCommandStoreLastArg { static void store(char const*& arg, CommandArgs& args) { arg = args.GetRemainingArgs(); } }; +template <> struct ChatCommandStoreLastArg { static void store(CommandArgs*& arg, CommandArgs& args) { arg = &args; } }; + +class TC_GAME_API ChatCommand +{ + using wrapper_func = bool(void*, ChatHandler*, char const*); + + public: + template + ChatCommand(char const* name, uint32 permission, bool allowConsole, TypedHandler handler, std::string help) + : Name(ASSERT_NOTNULL(name)), Permission(permission), AllowConsole(allowConsole), Help(std::move(help)), ChildCommands({}) + { + _wrapper = [](void* handler, ChatHandler* chatHandler, char const* argsStr) + { + using tuple_type = typename ChatCommandHandlerToTuple::type; + + tuple_type arguments; + std::get<0>(arguments) = chatHandler; + + CommandArgs args(argsStr); + if (args.TryConsumeToTuple<1>(arguments)) + { + auto& last = std::get-1>(arguments); + ChatCommandStoreLastArg>::store(last, args); + return advstd::apply(reinterpret_cast(handler), std::move(arguments)); + } + else + return false; + }; + _handler = reinterpret_cast(handler); + } + + ChatCommand(char const* name, uint32 permission, bool allowConsole, std::nullptr_t, std::string help, std::vector childCommands = {}) + : Name(ASSERT_NOTNULL(name)), Permission(permission), AllowConsole(allowConsole), Help(std::move(help)), ChildCommands(std::move(childCommands)) + { + _wrapper = nullptr; + _handler = nullptr; + } + + bool operator()(ChatHandler* chatHandler, char const* args) const + { + ASSERT(_wrapper && _handler); + return _wrapper(_handler, chatHandler, args); + } + + bool HasHandler() const { return !!_handler; } + + char const* Name; + uint32 Permission; // function pointer required correct align (use uint32) + bool AllowConsole; + std::string Help; + std::vector ChildCommands; + + private: + wrapper_func* _wrapper; + void* _handler; +}; + +#endif diff --git a/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp b/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp new file mode 100644 index 0000000000..6dad85f41c --- /dev/null +++ b/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2008-2018 TrinityCore + * + * This program 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 . + */ + +#include "ChatCommandArgs.h" +#include "AchievementMgr.h" +#include "ChatCommand.h" +#include "ChatCommandHyperlinks.h" +#include "ObjectMgr.h" + +using namespace Trinity::ChatCommands; + +struct AchievementVisitor +{ + using value_type = AchievementEntry const*; + value_type operator()(Hyperlink achData) const { return achData->achievement; } + value_type operator()(uint32 achId) const { return sAchievementMgr->GetAchievement(achId); } +}; +char const* Trinity::ChatCommands::ArgInfo::TryConsume(AchievementEntry const*& data, char const* args) +{ + Variant , uint32> val; + if ((args = CommandArgsConsumerSingle::TryConsumeTo(val, args))) + data = boost::apply_visitor(AchievementVisitor(), val); + return args; +} + +struct GameTeleVisitor +{ + using value_type = GameTele const*; + value_type operator()(Hyperlink tele) const { return sObjectMgr->GetGameTele(tele); } + value_type operator()(std::string const& tele) const { return sObjectMgr->GetGameTele(tele); } +}; +char const* Trinity::ChatCommands::ArgInfo::TryConsume(GameTele const*& data, char const* args) +{ + Variant, std::string> val; + if ((args = CommandArgsConsumerSingle::TryConsumeTo(val, args))) + data = boost::apply_visitor(GameTeleVisitor(), val); + return args; +} + +struct BoolVisitor +{ + using value_type = bool; + value_type operator()(uint32 i) const { return !!i; } + value_type operator()(ExactSequence<'o', 'n'>) const { return true; } + value_type operator()(ExactSequence<'o', 'f', 'f'>) const { return false; } +}; +char const* Trinity::ChatCommands::ArgInfo::TryConsume(bool& data, char const* args) +{ + Variant, ExactSequence<'o', 'f', 'f'>> val; + if ((args = CommandArgsConsumerSingle::TryConsumeTo(val, args))) + data = boost::apply_visitor(BoolVisitor(), val); + return args; +} diff --git a/src/server/game/Chat/ChatCommands/ChatCommandArgs.h b/src/server/game/Chat/ChatCommands/ChatCommandArgs.h new file mode 100644 index 0000000000..bbdb2565f2 --- /dev/null +++ b/src/server/game/Chat/ChatCommands/ChatCommandArgs.h @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2008-2018 TrinityCore + * + * This program 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 . + */ + +#ifndef TRINITY_CHATCOMMANDARGS_H +#define TRINITY_CHATCOMMANDARGS_H + +#include "ChatCommandHelpers.h" +#include "ChatCommandTags.h" +#include "ChatCommandHyperlinks.h" + +struct GameTele; + +namespace Trinity { +namespace ChatCommands { + +/************************** ARGUMENT HANDLERS *******************************************\ +|* Define how to extract contents of a certain requested type from a string *| +|* Must implement the following: *| +|* - TryConsume: T&, char const* -> char const* *| +|* returns nullptr if no match, otherwise pointer to first character of next token *| +|* - if nullptr is returned, state of T& is indeterminate *| +|* - otherwise, T& should be initialized to the intended return value *| +|* *| +\****************************************************************************************/ +template +struct ArgInfo { static_assert(!advstd::is_same_v, "Invalid command parameter type - see ChatCommandArgs.h for possible types"); }; + +// catch-all for signed integral types +template +struct ArgInfo && advstd::is_signed_v>> +{ + static char const* TryConsume(T& val, char const* args) + { + char const* next = args; + std::string token(args, tokenize(next)); + try { val = std::stoll(token); } + catch (...) { return nullptr; } + return next; + } +}; + +// catch-all for unsigned integral types +template +struct ArgInfo && advstd::is_unsigned_v>> +{ + static char const* TryConsume(T& val, char const* args) + { + char const* next = args; + std::string token(args, tokenize(next)); + try { val = std::stoull(token); } + catch (...) { return nullptr; } + return next; + } +}; + +// catch-all for floating point types +template +struct ArgInfo>> +{ + static char const* TryConsume(T& val, char const* args) + { + char const* next = args; + std::string token(args, tokenize(next)); + try { val = std::stold(token); } + catch (...) { return nullptr; } + return std::isfinite(val) ? next : nullptr; + } +}; + +// string +template <> +struct ArgInfo +{ + static char const* TryConsume(std::string& val, char const* args) + { + char const* next = args; + if (size_t len = tokenize(next)) + { + val.assign(args, len); + return next; + } + else + return nullptr; + } +}; + +// a container tag +template +struct ArgInfo>> +{ + static char const* TryConsume(T& tag, char const* args) + { + return tag.TryConsume(args); + } +}; + +// AchievementEntry* from numeric id or link +template <> +struct TC_GAME_API ArgInfo +{ + static char const* TryConsume(AchievementEntry const*&, char const*); +}; + +// GameTele* from string name or link +template <> +struct TC_GAME_API ArgInfo +{ + static char const* TryConsume(GameTele const*&, char const*); +}; + +// bool from 1/0 or on/off +template <> +struct TC_GAME_API ArgInfo +{ + static char const* TryConsume(bool&, char const*); +}; + +}} + +#endif diff --git a/src/server/game/Chat/ChatCommands/ChatCommandHelpers.h b/src/server/game/Chat/ChatCommands/ChatCommandHelpers.h new file mode 100644 index 0000000000..42c0a19504 --- /dev/null +++ b/src/server/game/Chat/ChatCommands/ChatCommandHelpers.h @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2008-2018 TrinityCore + * + * This program 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 . + */ + +#ifndef TRINITY_CHATCOMMANDHELPERS_H +#define TRINITY_CHATCOMMANDHELPERS_H + +#include "advstd.h" +#include + +namespace Trinity { +namespace ChatCommands { + +static constexpr char COMMAND_DELIMITER = ' '; + +/***************** HELPERS *************************\ +|* These really aren't for outside use... *| +\***************************************************/ +inline size_t tokenize(char const*& end) +{ + size_t len = 0; + for (; *end && *end != COMMAND_DELIMITER; ++end, ++len); + for (; *end && *end == COMMAND_DELIMITER; ++end); + return len; +} + +template +struct tag_base +{ + using type = T; +}; + +template +using tag_base_t = typename tag_base::type; + +template +struct are_all_assignable +{ + static constexpr bool value = true; +}; + +template +struct are_all_assignable +{ + static constexpr bool value = advstd::is_assignable_v && are_all_assignable::value; +}; + +template +struct get_nth : get_nth { }; + +template +struct get_nth<0, T1, Ts...> +{ + using type = T1; +}; + +template +using get_nth_t = typename get_nth::type; + +}} + +#endif diff --git a/src/server/game/Chat/ChatCommands/ChatCommandHyperlinks.cpp b/src/server/game/Chat/ChatCommands/ChatCommandHyperlinks.cpp new file mode 100644 index 0000000000..4fcf7490be --- /dev/null +++ b/src/server/game/Chat/ChatCommands/ChatCommandHyperlinks.cpp @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2008-2018 TrinityCore + * + * This program 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 . + */ + +#include "ChatCommandHyperlinks.h" +#include "AchievementMgr.h" + +static constexpr char HYPERLINK_DELIMITER = ':'; + +class AchievementLinkTokenizer +{ + public: + AchievementLinkTokenizer(char const* pos, size_t len) : _pos(pos), _len(len), _empty(false) {} + + template + bool TryConsumeTo(T& val) + { + if (_empty) + return false; + + char const* firstPos = _pos; + size_t thisLen = 0; + // find next delimiter + for (; _len && *_pos != HYPERLINK_DELIMITER; --_len, ++_pos, ++thisLen); + if (_len) + --_len, ++_pos; // skip the delimiter + else + _empty = true; + + return Trinity::ChatCommands::base_tag::StoreTo(val, firstPos, thisLen); + } + + bool IsEmpty() { return _empty; } + + private: + char const* _pos; + size_t _len; + bool _empty; +}; + +bool Trinity::ChatCommands::achievement::StoreTo(AchievementLinkData& val, char const* pos, size_t len) +{ + AchievementLinkTokenizer t(pos, len); + uint32 achievementId; + if (!t.TryConsumeTo(achievementId)) + return false; + val.achievement = sAchievementMgr->GetAchievement(achievementId); + return val.achievement && t.TryConsumeTo(val.characterId) && t.TryConsumeTo(val.isFinished) && + t.TryConsumeTo(val.month) && t.TryConsumeTo(val.day) && t.TryConsumeTo(val.year) && t.TryConsumeTo(val.criteria[0]) && + t.TryConsumeTo(val.criteria[1]) && t.TryConsumeTo(val.criteria[2]) && t.TryConsumeTo(val.criteria[3]) && t.IsEmpty(); +} diff --git a/src/server/game/Chat/ChatCommands/ChatCommandHyperlinks.h b/src/server/game/Chat/ChatCommands/ChatCommandHyperlinks.h new file mode 100644 index 0000000000..a8d8e591a2 --- /dev/null +++ b/src/server/game/Chat/ChatCommands/ChatCommandHyperlinks.h @@ -0,0 +1,154 @@ +/* + * Copyright (C) 2008-2018 TrinityCore + * + * This program 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 . + */ + +#ifndef TRINITY_CHATCOMMANDHYPERLINKS_H +#define TRINITY_CHATCOMMANDHYPERLINKS_H + +#include "ChatCommandHelpers.h" +#include "ChatCommandTags.h" +#include "ObjectGuid.h" + +struct AchievementEntry; + +namespace Trinity { +namespace ChatCommands { + +// for details on what ContainerTag has to expose, see ChatCommandTags.h +template +struct Hyperlink : public ContainerTag +{ + typedef typename linktag::value_type value_type; + typedef advstd::remove_cvref_t storage_type; + + public: + operator value_type() const { return val; } + value_type const& operator*() const { return val; } + value_type const* operator->() const { return &val; } + + char const* TryConsume(char const* pos) + { + //color tag + if (*(pos++) != '|' || *(pos++) != 'c') + return nullptr; + for (uint8 i = 0; i < 8; ++i) + if (!*(pos++)) // make sure we don't overrun a terminator + return nullptr; + // link data start tag + if (*(pos++) != '|' || *(pos++) != 'H') + return nullptr; + // link tag, should match argument + char const* tag = linktag::tag(); + while (*tag) + if (*(pos++) != *(tag++)) + return nullptr; + // separator + if (*(pos++) != ':') + return nullptr; + // ok, link data, let's figure out how long it is + char const* datastart = pos; + size_t datalength = 0; + while (*pos && *(pos++) != '|') + ++datalength; + // ok, next should be link data end tag... + if (*(pos++) != 'h') + return nullptr; + // then visible link text, skip to next '|', should be '|h|r' terminator + while (*pos && *(pos++) != '|'); + if (*(pos++) != 'h' || *(pos++) != '|' || *(pos++) != 'r') + return nullptr; + // finally, skip to end of token + tokenize(pos); + // store value + if (!linktag::StoreTo(val, datastart, datalength)) + return nullptr; + + // return final pos + return pos; + } + + private: + storage_type val; +}; + +/************************** LINK TAGS ***************************************************\ +|* Link tags must abide by the following: *| +|* - MUST expose ::value_type typedef *| +|* - storage type is remove_cvref_t *| +|* - MUST expose static ::tag method, void -> const char* *| +|* - this method SHOULD be constexpr *| +|* - returns identifier string for the link ("creature", "creature_entry", "item") *| +|* - MUST expose static ::StoreTo method, (storage&, char const*, size_t) *| +|* - assign value_type& based on content of std::string(char const*, size_t) *| +|* - return value indicates success/failure *| +|* - for integral/string types this can be achieved by extending base_tag *| +\****************************************************************************************/ +struct base_tag +{ + static bool StoreTo(std::string& val, char const* pos, size_t len) + { + val.assign(pos, len); + return true; + } + + template + static std::enable_if_t && advstd::is_unsigned_v, bool> StoreTo(T& val, char const* pos, size_t len) + { + try { val = std::stoull(std::string(pos, len)); } + catch (...) { return false; } + return true; + } + + template + static std::enable_if_t && advstd::is_signed_v, bool> StoreTo(T& val, char const* pos, size_t len) + { + try { val = std::stoll(std::string(pos, len)); } + catch (...) { return false; } + return true; + } +}; + +#define make_base_tag(ltag, type) struct ltag : public base_tag { using value_type = type; static constexpr char const* tag() { return #ltag; } } +make_base_tag(areatrigger, uint32); +make_base_tag(creature, ObjectGuid::LowType); +make_base_tag(creature_entry, uint32); +make_base_tag(gameobject, ObjectGuid::LowType); +make_base_tag(taxinode, uint32); +make_base_tag(tele, uint32); +#undef make_base_tag + +struct AchievementLinkData +{ + AchievementEntry const* achievement; + ObjectGuid::LowType characterId; + bool isFinished; + uint16 year; + uint8 month; + uint8 day; + uint32 criteria[4]; +}; + +struct TC_GAME_API achievement +{ + using value_type = AchievementLinkData; + static constexpr char const* tag() { return "achievement"; } + static bool StoreTo(AchievementLinkData& val, char const* pos, size_t len); +}; + +}} + +#endif + diff --git a/src/server/game/Chat/ChatCommands/ChatCommandTags.h b/src/server/game/Chat/ChatCommands/ChatCommandTags.h new file mode 100644 index 0000000000..c28c4f21a8 --- /dev/null +++ b/src/server/game/Chat/ChatCommands/ChatCommandTags.h @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2008-2018 TrinityCore + * + * This program 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 . + */ + +#ifndef TRINITY_CHATCOMMANDTAGS_H +#define TRINITY_CHATCOMMANDTAGS_H + +#include "ChatCommandHelpers.h" +#include "Optional.h" +#include +#include +#include +#include +#include +#include +#include + +namespace Trinity { +namespace ChatCommands { +/************************** CONTAINER TAGS **********************************************\ +|* Simple holder classes to differentiate between extraction methods *| +|* Should inherit from ContainerTag for template identification *| +|* Must implement the following: *| +|* - TryConsume: char const* -> char const* *| +|* returns nullptr if no match, otherwise pointer to first character of next token *| +|* - typedef value_type of type that is contained within the tag *| +|* - cast operator to value_type *| +|* *| +\****************************************************************************************/ +struct ContainerTag {}; +template +struct tag_base>> +{ + using type = typename T::value_type; +}; + +template +struct ExactSequence : public ContainerTag +{ + using value_type = void; + + static constexpr bool isSingleChar = !sizeof...(chars); + + template + static typename std::enable_if_t _TryConsume(char const* pos) + { + if (*(pos++) == c1) + return ExactSequence::_TryConsume(pos); + else + return nullptr; + } + + template + static typename std::enable_if_t _TryConsume(char const* pos) + { + if (*(pos++) != c1) + return nullptr; + // if more of string is left, tokenize should return 0 (otherwise we didn't reach end of token yet) + return *pos && tokenize(pos) ? nullptr : pos; + } + + char const* TryConsume(char const* pos) const { return ExactSequence::_TryConsume(pos); } +}; + +/************************** VARIANT TAG LOGIC *********************************\ +|* This has some special handling over in ChatCommand.h *| +\******************************************************************************/ + +template +struct CastToVisitor { + using result_type = T; + + template + T operator()(U const& v) const { return v; } +}; + +template +struct Variant : public boost::variant +{ + using first_type = tag_base_t; + static constexpr bool have_operators = are_all_assignable...>::value; + + template + operator std::enable_if_t() + { + return operator*(); + } + + template + std::enable_if_t operator*() + { + return boost::apply_visitor(CastToVisitor(), *this); + } + + template + std::enable_if_t operator*() const + { + return boost::apply_visitor(CastToVisitor(), *this); + } + + template + Variant& operator=(T&& arg) { boost::variant::operator=(std::forward(arg)); return *this; } + + template + decltype(auto) get() const { return boost::get>(*this); } +}; + +}} + +#endif diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index c49ee719db..c2cab0bb68 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -692,7 +692,7 @@ struct AreaTriggerEntry float x; // 2 m_x float y; // 3 m_y float z; // 4 m_z - uint32 PhaseUseFlags; // 5 PhaseUseFlags + uint32 PhaseUseFlags; // 5 PhaseUseFlags uint32 PhaseID; // 6 PhaseID uint32 PhaseGroupID; // 7 PhaseGroupID float radius; // 8 m_radius diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 0e3db1943c..d9aea45417 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -233,7 +233,7 @@ void Creature::AddToWorld() AIM_Initialize(); if (IsVehicle()) GetVehicleKit()->Install(); - + if (GetZoneScript()) GetZoneScript()->OnCreatureCreate(this); } @@ -674,7 +674,7 @@ void Creature::Update(uint32 diff) if (m_shouldReacquireTarget && !IsFocusing(nullptr, true)) { SetTarget(m_suppressedTarget); - + if (!HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_DISABLE_TURN)) { if (m_suppressedTarget) @@ -2981,7 +2981,7 @@ void Creature::FocusTarget(Spell const* focusSpell, WorldObject const* target) } bool const noTurnDuringCast = spellInfo->HasAttribute(SPELL_ATTR5_DONT_TURN_DURING_CAST); - + if (!HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_DISABLE_TURN)) { // Face the target - we need to do this before the unit state is modified for no-turn spells diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 3377a91853..cb8c245bd1 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -4610,6 +4610,7 @@ void Player::BuildPlayerRepop() GetMap()->AddToMap(corpse); // convert player body to ghost + setDeathState(DEAD); SetHealth(1); SetWaterWalking(true); @@ -17910,6 +17911,10 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder* holder) GetSpellHistory()->LoadFromDB(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS)); + uint32 savedHealth = fields[55].GetUInt32(); + if (!savedHealth) + m_deathState = CORPSE; + // Spell code allow apply any auras to dead character in load time in aura/spell/item loading // Do now before stats re-calculation cleanup for ghost state unexpected auras if (!IsAlive()) @@ -17922,7 +17927,6 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder* holder) UpdateAllStats(); // restore remembered power/health values (but not more max values) - uint32 savedHealth = fields[51].GetUInt32(); SetHealth(savedHealth > GetMaxHealth() ? GetMaxHealth() : savedHealth); uint32 loadedPowers = 0; for (uint32 i = 0; i < MAX_POWERS; ++i) @@ -18255,14 +18259,14 @@ void Player::LoadCorpse(PreparedQueryResult result) if (!IsAlive()) { - if (result && !HasAtLoginFlag(AT_LOGIN_RESURRECT)) + if (HasAtLoginFlag(AT_LOGIN_RESURRECT)) + ResurrectPlayer(0.5f); + else if (result) { Field* fields = result->Fetch(); _corpseLocation.WorldRelocate(fields[0].GetUInt16(), fields[1].GetFloat(), fields[2].GetFloat(), fields[3].GetFloat(), fields[4].GetFloat()); ApplyModByteFlag(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTES_OFFSET_FLAGS, PLAYER_FIELD_BYTE_RELEASE_TIMER, !sMapStore.LookupEntry(_corpseLocation.GetMapId())->Instanceable()); } - else - ResurrectPlayer(0.5f); } RemoveAtLoginFlag(AT_LOGIN_RESURRECT); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index e56fdc0bb7..8ccd27b1f3 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -9964,7 +9964,7 @@ void Unit::SetLevel(uint8 lvl) void Unit::SetHealth(uint32 val) { - if (getDeathState() == JUST_DIED) + if (getDeathState() == JUST_DIED || getDeathState() == CORPSE) val = 0; else if (GetTypeId() == TYPEID_PLAYER && getDeathState() == DEAD) val = 1; diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index af434deceb..b7ae6ae228 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -990,17 +990,8 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) pCurrChar->LoadCorpse(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_CORPSE_LOCATION)); // setting Ghost+speed if dead - if (pCurrChar->m_deathState != ALIVE) - { - // not blizz like, we must correctly save and load player instead... - if (pCurrChar->getRace() == RACE_NIGHTELF && !pCurrChar->HasAura(20584)) - pCurrChar->CastSpell(pCurrChar, 20584, true, 0);// auras SPELL_AURA_INCREASE_SPEED(+speed in wisp form), SPELL_AURA_INCREASE_SWIM_SPEED(+swim speed in wisp form), SPELL_AURA_TRANSFORM (to wisp form) - - if (!pCurrChar->HasAura(8326)) - pCurrChar->CastSpell(pCurrChar, 8326, true, 0); // auras SPELL_AURA_GHOST, SPELL_AURA_INCREASE_SPEED(why?), SPELL_AURA_INCREASE_SWIM_SPEED(why?) - + if (pCurrChar->m_deathState == DEAD) pCurrChar->SetWaterWalking(true); - } pCurrChar->ContinueTaxiFlight(); @@ -1147,6 +1138,13 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) // Handle Login-Achievements (should be handled after loading) _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_ON_LOGIN, 1); + // if we're loading a dead player, repop them to the GY after the load is finished + if (pCurrChar->getDeathState() == CORPSE) + { + pCurrChar->BuildPlayerRepop(); + pCurrChar->RepopAtGraveyard(); + } + sScriptMgr->OnPlayerLogin(pCurrChar, firstLogin); TC_METRIC_EVENT("player_events", "Login", pCurrChar->GetName()); diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 63f75038f9..8da28e43cc 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -3121,7 +3121,7 @@ void Map::AddRespawnInfo(RespawnInfo& info, bool replace) return; RespawnInfoMap& bySpawnIdMap = GetRespawnMapForType(info.type); - + auto it = bySpawnIdMap.find(info.spawnId); if (it != bySpawnIdMap.end()) // spawnid already has a respawn scheduled { diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index c3db6100db..4fcb3e31c8 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -803,7 +803,7 @@ class TC_GAME_API Map : public GridRefManager if (RespawnInfo* info = GetRespawnInfo(type, spawnId)) DeleteRespawnInfo(info); } - + public: void GetRespawnInfo(std::vector& respawnData, SpawnObjectTypeMask types, uint32 zoneId = 0) const; RespawnInfo* GetRespawnInfo(SpawnObjectType type, ObjectGuid::LowType spawnId) const; diff --git a/src/server/game/Maps/SpawnData.h b/src/server/game/Maps/SpawnData.h index 24843ef043..cc6d049647 100644 --- a/src/server/game/Maps/SpawnData.h +++ b/src/server/game/Maps/SpawnData.h @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ - + #ifndef TRINITY_SPAWNDATA_H #define TRINITY_SPAWNDATA_H diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 5cbbbc4137..03f4cb85ba 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3548,6 +3548,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(28); // 5 seconds, wrong DBC data? }); + // Summon Swarming Guardian (Auriaya) + ApplySpellFix({ 64397 }, [](SpellInfo* spellInfo) + { + spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(137); // 8y, Based in BFA effect radius + }); + // Potent Pheromones (Freya) ApplySpellFix({ 64321 }, [](SpellInfo* spellInfo) { diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 213d2f1009..b8daa62001 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -34,6 +34,8 @@ EndScriptData */ #include "World.h" #include "WorldSession.h" +using namespace Trinity::ChatCommands; + class account_commandscript : public CommandScript { public: @@ -77,21 +79,9 @@ public: return commandTable; } - static bool HandleAccountAddonCommand(ChatHandler* handler, char const* args) + static bool HandleAccountAddonCommand(ChatHandler* handler, uint8 expansion) { - if (!*args) - { - handler->SendSysMessage(LANG_CMD_SYNTAX); - handler->SetSentErrorMessage(true); - return false; - } - - char* exp = strtok((char*)args, " "); - - uint32 accountId = handler->GetSession()->GetAccountId(); - - int expansion = atoi(exp); //get int anyway (0 if error) - if (expansion < 0 || uint8(expansion) > sWorld->getIntConfig(CONFIG_EXPANSION)) + if (expansion > sWorld->getIntConfig(CONFIG_EXPANSION)) { handler->SendSysMessage(LANG_IMPROPER_VALUE); handler->SetSentErrorMessage(true); @@ -100,8 +90,8 @@ public: PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_EXPANSION); - stmt->setUInt8(0, uint8(expansion)); - stmt->setUInt32(1, accountId); + stmt->setUInt8(0, expansion); + stmt->setUInt32(1, handler->GetSession()->GetAccountId()); LoginDatabase.Execute(stmt); @@ -110,31 +100,16 @@ public: } /// Create an account - static bool HandleAccountCreateCommand(ChatHandler* handler, char const* args) + static bool HandleAccountCreateCommand(ChatHandler* handler, std::string const& accountName, std::string const& password, Optional const& email) { - if (!*args) - return false; - - std::string email; - - ///- %Parse the command line arguments - char* accountName = strtok((char*)args, " "); - char* password = strtok(nullptr, " "); - char* possibleEmail = strtok(nullptr, " ' "); - if (possibleEmail) - email = possibleEmail; - - if (!accountName || !password) - return false; - - if (strchr(accountName, '@')) + if (accountName.find('@') != std::string::npos) { handler->PSendSysMessage(LANG_ACCOUNT_USE_BNET_COMMANDS); handler->SetSentErrorMessage(true); return false; } - switch (sAccountMgr->CreateAccount(std::string(accountName), std::string(password), email)) + switch (sAccountMgr->CreateAccount(accountName, password, email.get_value_or(""))) { case AccountOpResult::AOR_OK: handler->PSendSysMessage(LANG_ACCOUNT_CREATED, accountName); @@ -143,7 +118,7 @@ public: TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s) Character:[%s] (GUID: %u) created Account %s (Email: '%s')", handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().GetCounter(), - accountName, email.c_str()); + accountName.c_str(), email.get_value_or("").c_str()); } break; case AccountOpResult::AOR_NAME_TOO_LONG: @@ -173,17 +148,8 @@ public: /// Delete a user account and all associated characters in this realm /// @todo This function has to be enhanced to respect the login/realm split (delete char, delete account chars in realm then delete account) - static bool HandleAccountDeleteCommand(ChatHandler* handler, char const* args) + static bool HandleAccountDeleteCommand(ChatHandler* handler, std::string accountName) { - if (!*args) - return false; - - ///- Get the account name from the command line - char* account = strtok((char*)args, " "); - if (!account) - return false; - - std::string accountName = account; if (!Utf8ToUpperOnlyLatin(accountName)) { handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str()); @@ -229,7 +195,7 @@ public: } /// Display info on users currently in the realm - static bool HandleAccountOnlineListCommand(ChatHandler* handler, char const* /*args*/) + static bool HandleAccountOnlineListCommand(ChatHandler* handler) { ///- Get the list of accounts ID logged to the realm PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ONLINE); @@ -277,108 +243,60 @@ public: return true; } - static bool HandleAccountLockCountryCommand(ChatHandler* handler, char const* args) + static bool HandleAccountLockCountryCommand(ChatHandler* handler, bool state) { - if (!*args) + if (state) { - handler->SendSysMessage(LANG_USE_BOL); - handler->SetSentErrorMessage(true); - return false; - } - std::string param = (char*)args; - - if (!param.empty()) - { - if (param == "on") - { - if (IpLocationRecord const* location = sIPLocation->GetLocationRecord(handler->GetSession()->GetRemoteAddress())) - { - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_ACCOUNT_LOCK_COUNTRY); - stmt->setString(0, location->CountryCode); - stmt->setUInt32(1, handler->GetSession()->GetAccountId()); - LoginDatabase.Execute(stmt); - handler->PSendSysMessage(LANG_COMMAND_ACCLOCKLOCKED); - } - else - { - handler->PSendSysMessage("IP2Location] No information"); - TC_LOG_DEBUG("server.authserver", "IP2Location] No information"); - } - } - else if (param == "off") + if (IpLocationRecord const* location = sIPLocation->GetLocationRecord(handler->GetSession()->GetRemoteAddress())) { PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_ACCOUNT_LOCK_COUNTRY); - stmt->setString(0, "00"); + stmt->setString(0, location->CountryCode); stmt->setUInt32(1, handler->GetSession()->GetAccountId()); LoginDatabase.Execute(stmt); - handler->PSendSysMessage(LANG_COMMAND_ACCLOCKUNLOCKED); - } - return true; - } - handler->SendSysMessage(LANG_USE_BOL); - handler->SetSentErrorMessage(true); - return false; - } - - static bool HandleAccountLockIpCommand(ChatHandler* handler, char const* args) - { - if (!*args) - { - handler->SendSysMessage(LANG_USE_BOL); - handler->SetSentErrorMessage(true); - return false; - } - - std::string param = (char*)args; - - if (!param.empty()) - { - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_ACCOUNT_LOCK); - - if (param == "on") - { - stmt->setBool(0, true); // locked handler->PSendSysMessage(LANG_COMMAND_ACCLOCKLOCKED); } - else if (param == "off") + else { - stmt->setBool(0, false); // unlocked - handler->PSendSysMessage(LANG_COMMAND_ACCLOCKUNLOCKED); + handler->PSendSysMessage("No IP2Location information - account not locked"); + handler->SetSentErrorMessage(true); + return false; } - - stmt->setUInt32(1, handler->GetSession()->GetAccountId()); - - LoginDatabase.Execute(stmt); - return true; } - - handler->SendSysMessage(LANG_USE_BOL); - handler->SetSentErrorMessage(true); - return false; + else + { + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_ACCOUNT_LOCK_COUNTRY); + stmt->setString(0, "00"); + stmt->setUInt32(1, handler->GetSession()->GetAccountId()); + LoginDatabase.Execute(stmt); + handler->PSendSysMessage(LANG_COMMAND_ACCLOCKUNLOCKED); + } + return true; } - static bool HandleAccountEmailCommand(ChatHandler* handler, char const* args) + static bool HandleAccountLockIpCommand(ChatHandler* handler, bool state) { - if (!*args) + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_ACCOUNT_LOCK); + + if (state) { - handler->SendSysMessage(LANG_CMD_SYNTAX); - handler->SetSentErrorMessage(true); - return false; + stmt->setBool(0, true); // locked + handler->PSendSysMessage(LANG_COMMAND_ACCLOCKLOCKED); + } + else + { + stmt->setBool(0, false); // unlocked + handler->PSendSysMessage(LANG_COMMAND_ACCLOCKUNLOCKED); } - char* oldEmail = strtok((char*)args, " "); - char* password = strtok(nullptr, " "); - char* email = strtok(nullptr, " "); - char* emailConfirmation = strtok(nullptr, " "); + stmt->setUInt32(1, handler->GetSession()->GetAccountId()); - if (!oldEmail || !password || !email || !emailConfirmation) - { - handler->SendSysMessage(LANG_CMD_SYNTAX); - handler->SetSentErrorMessage(true); - return false; - } + LoginDatabase.Execute(stmt); + return true; + } - if (!AccountMgr::CheckEmail(handler->GetSession()->GetAccountId(), std::string(oldEmail))) + static bool HandleAccountEmailCommand(ChatHandler* handler, std::string const& oldEmail, std::string const& password, std::string const& email, std::string const& emailConfirm) + { + if (!AccountMgr::CheckEmail(handler->GetSession()->GetAccountId(), oldEmail)) { handler->SendSysMessage(LANG_COMMAND_WRONGEMAIL); sScriptMgr->OnFailedEmailChange(handler->GetSession()->GetAccountId()); @@ -386,11 +304,11 @@ public: TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change email, but the provided email [%s] is not equal to registration email [%s].", handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().GetCounter(), - email, oldEmail); + email.c_str(), oldEmail.c_str()); return false; } - if (!AccountMgr::CheckPassword(handler->GetSession()->GetAccountId(), std::string(password))) + if (!AccountMgr::CheckPassword(handler->GetSession()->GetAccountId(), password)) { handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD); sScriptMgr->OnFailedEmailChange(handler->GetSession()->GetAccountId()); @@ -401,7 +319,7 @@ public: return false; } - if (strcmp(email, oldEmail) == 0) + if (email == oldEmail) { handler->SendSysMessage(LANG_OLD_EMAIL_IS_NEW_EMAIL); sScriptMgr->OnFailedEmailChange(handler->GetSession()->GetAccountId()); @@ -409,19 +327,20 @@ public: return false; } - if (strcmp(email, emailConfirmation) != 0) + + if (email != emailConfirm) { handler->SendSysMessage(LANG_NEW_EMAILS_NOT_MATCH); sScriptMgr->OnFailedEmailChange(handler->GetSession()->GetAccountId()); handler->SetSentErrorMessage(true); - TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change email, but the provided password is wrong.", + TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change email, but the confirm email does not match.", handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().GetCounter()); return false; } - AccountOpResult result = AccountMgr::ChangeEmail(handler->GetSession()->GetAccountId(), std::string(email)); + AccountOpResult result = AccountMgr::ChangeEmail(handler->GetSession()->GetAccountId(), email); switch (result) { case AccountOpResult::AOR_OK: @@ -430,7 +349,7 @@ public: TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Changed Email from [%s] to [%s].", handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().GetCounter(), - oldEmail, email); + oldEmail.c_str(), email.c_str()); break; case AccountOpResult::AOR_EMAIL_TOO_LONG: handler->SendSysMessage(LANG_EMAIL_TOO_LONG); @@ -446,37 +365,14 @@ public: return true; } - static bool HandleAccountPasswordCommand(ChatHandler* handler, char const* args) + + static bool HandleAccountPasswordCommand(ChatHandler* handler, std::string const& oldPassword, std::string const& newPassword, std::string const& confirmPassword, Optional const& confirmEmail) { - // If no args are given at all, we can return false right away. - if (!*args) - { - handler->SendSysMessage(LANG_CMD_SYNTAX); - handler->SetSentErrorMessage(true); - return false; - } - // First, we check config. What security type (sec type) is it ? Depending on it, the command branches out - uint32 pwConfig = sWorld->getIntConfig(CONFIG_ACC_PASSCHANGESEC); // 0 - PW_NONE, 1 - PW_EMAIL, 2 - PW_RBAC - - // Command is supposed to be: .account password [$oldpassword] [$newpassword] [$newpasswordconfirmation] [$emailconfirmation] - char* oldPassword = strtok((char*)args, " "); // This extracts [$oldpassword] - char* newPassword = strtok(nullptr, " "); // This extracts [$newpassword] - char* passwordConfirmation = strtok(nullptr, " "); // This extracts [$newpasswordconfirmation] - char const* emailConfirmation = strtok(nullptr, " "); // This defines the emailConfirmation variable, which is optional depending on sec type. - if (!emailConfirmation) // This extracts [$emailconfirmation]. If it doesn't exist, however... - emailConfirmation = ""; // ... it's simply "" for emailConfirmation. - - //Is any of those variables missing for any reason ? We return false. - if (!oldPassword || !newPassword || !passwordConfirmation) - { - handler->SendSysMessage(LANG_CMD_SYNTAX); - handler->SetSentErrorMessage(true); - return false; - } + uint32 const pwConfig = sWorld->getIntConfig(CONFIG_ACC_PASSCHANGESEC); // 0 - PW_NONE, 1 - PW_EMAIL, 2 - PW_RBAC // We compare the old, saved password to the entered old password - no chance for the unauthorized. - if (!AccountMgr::CheckPassword(handler->GetSession()->GetAccountId(), std::string(oldPassword))) + if (!AccountMgr::CheckPassword(handler->GetSession()->GetAccountId(), oldPassword)) { handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD); sScriptMgr->OnFailedPasswordChange(handler->GetSession()->GetAccountId()); @@ -489,7 +385,7 @@ public: // This compares the old, current email to the entered email - however, only... if ((pwConfig == PW_EMAIL || (pwConfig == PW_RBAC && handler->HasPermission(rbac::RBAC_PERM_EMAIL_CONFIRM_FOR_PASS_CHANGE))) // ...if either PW_EMAIL or PW_RBAC with the Permission is active... - && !AccountMgr::CheckEmail(handler->GetSession()->GetAccountId(), std::string(emailConfirmation))) // ... and returns false if the comparison fails. + && !AccountMgr::CheckEmail(handler->GetSession()->GetAccountId(), confirmEmail.get_value_or(""))) // ... and returns false if the comparison fails. { handler->SendSysMessage(LANG_COMMAND_WRONGEMAIL); sScriptMgr->OnFailedPasswordChange(handler->GetSession()->GetAccountId()); @@ -497,12 +393,12 @@ public: TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change password, but the entered email [%s] is wrong.", handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().GetCounter(), - emailConfirmation); + confirmEmail.get_value_or("").c_str()); return false; } // Making sure that newly entered password is correctly entered. - if (strcmp(newPassword, passwordConfirmation) != 0) + if (newPassword != confirmPassword) { handler->SendSysMessage(LANG_NEW_PASSWORDS_NOT_MATCH); sScriptMgr->OnFailedPasswordChange(handler->GetSession()->GetAccountId()); @@ -511,13 +407,13 @@ public: } // Changes password and prints result. - AccountOpResult result = AccountMgr::ChangePassword(handler->GetSession()->GetAccountId(), std::string(newPassword)); + AccountOpResult result = AccountMgr::ChangePassword(handler->GetSession()->GetAccountId(), newPassword); switch (result) { case AccountOpResult::AOR_OK: handler->SendSysMessage(LANG_COMMAND_PASSWORD); sScriptMgr->OnPasswordChange(handler->GetSession()->GetAccountId()); - TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Changed Password.", + TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) changed Password.", handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().GetCounter()); break; @@ -535,7 +431,8 @@ public: return true; } - static bool HandleAccountCommand(ChatHandler* handler, char const* /*args*/) + + static bool HandleAccountCommand(ChatHandler* handler) { // GM Level AccountTypes gmLevel = handler->GetSession()->GetSecurity(); @@ -547,8 +444,8 @@ public: handler->PSendSysMessage(LANG_ACCOUNT_SEC_TYPE, (pwConfig == PW_NONE ? "Lowest level: No Email input required." : pwConfig == PW_EMAIL ? "Highest level: Email input required." : - pwConfig == PW_RBAC ? "Special level: Your account may require email input depending on settings. That is the case if another lien is printed." : - "Unknown security level: Notify technician for details.")); + pwConfig == PW_RBAC ? "Special level: Your account may require email input depending on settings. That is the case if another line is printed." : + "Unknown security level: Config error?")); // RBAC required display - is not displayed for console if (pwConfig == PW_RBAC && handler->GetSession() && hasRBAC) @@ -575,46 +472,36 @@ public: } /// Set/Unset the expansion level for an account - static bool HandleAccountSetAddonCommand(ChatHandler* handler, char const* args) + static bool HandleAccountSetAddonCommand(ChatHandler* handler, Optional accountName, uint8 expansion) { - ///- Get the command line arguments - char* account = strtok((char*)args, " "); - char* exp = strtok(nullptr, " "); - - if (!account) - return false; - - std::string accountName; uint32 accountId; + if (accountName) + { + ///- Convert Account name to Upper Format + if (!Utf8ToUpperOnlyLatin(*accountName)) + { + handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName->c_str()); + handler->SetSentErrorMessage(true); + return false; + } - if (!exp) + accountId = AccountMgr::GetId(*accountName); + if (!accountId) + { + handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName->c_str()); + handler->SetSentErrorMessage(true); + return false; + } + + } + else { Player* player = handler->getSelectedPlayer(); if (!player) return false; - - accountId = player->GetSession()->GetAccountId(); - AccountMgr::GetName(accountId, accountName); - exp = account; - } - else - { - ///- Convert Account name to Upper Format - accountName = account; - if (!Utf8ToUpperOnlyLatin(accountName)) - { - handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str()); - handler->SetSentErrorMessage(true); - return false; - } - - accountId = AccountMgr::GetId(accountName); - if (!accountId) - { - handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str()); - handler->SetSentErrorMessage(true); - return false; - } + accountId = player->GetSession()->GetAccountId(); + accountName.emplace(); + AccountMgr::GetName(accountId, *accountName); } // Let set addon state only for lesser (strong) security level @@ -623,8 +510,7 @@ public: handler->HasLowerSecurityAccount(nullptr, accountId, true)) return false; - int expansion = atoi(exp); //get int anyway (0 if error) - if (expansion < 0 || uint8(expansion) > sWorld->getIntConfig(CONFIG_EXPANSION)) + if (expansion > sWorld->getIntConfig(CONFIG_EXPANSION)) return false; PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_EXPANSION); @@ -634,54 +520,33 @@ public: LoginDatabase.Execute(stmt); - handler->PSendSysMessage(LANG_ACCOUNT_SETADDON, accountName.c_str(), accountId, expansion); + handler->PSendSysMessage(LANG_ACCOUNT_SETADDON, accountName->c_str(), accountId, expansion); return true; } - static bool HandleAccountSetGmLevelCommand(ChatHandler* handler, char const* args) + static bool HandleAccountSetGmLevelCommand(ChatHandler* handler, Optional accountName, uint8 gmLevel, int32 realmId) { - if (!*args) + uint32 accountId; + if (accountName) { - handler->SendSysMessage(LANG_CMD_SYNTAX); - handler->SetSentErrorMessage(true); - return false; - } - - std::string targetAccountName; - uint32 targetAccountId = 0; - uint32 targetSecurity = 0; - uint32 gm = 0; - char* arg1 = strtok((char*)args, " "); - char* arg2 = strtok(nullptr, " "); - char* arg3 = strtok(nullptr, " "); - bool isAccountNameGiven = true; - - if (!arg3) - { - if (!handler->getSelectedPlayer()) - return false; - isAccountNameGiven = false; - } - - // Check for second parameter - if (!isAccountNameGiven && !arg2) - return false; - - // Check for account - if (isAccountNameGiven) - { - targetAccountName = arg1; - if (!Utf8ToUpperOnlyLatin(targetAccountName)) + if (!Utf8ToUpperOnlyLatin(*accountName) || !(accountId = AccountMgr::GetId(*accountName))) { - handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, targetAccountName.c_str()); + handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName->c_str()); handler->SetSentErrorMessage(true); return false; } } + else + { + Player* player = handler->getSelectedPlayer(); + if (!player) + return false; + accountId = player->GetSession()->GetAccountId(); + accountName.emplace(); + AccountMgr::GetName(accountId, *accountName); + } - // Check for invalid specified GM level. - gm = (isAccountNameGiven) ? atoi(arg2) : atoi(arg1); - if (gm > SEC_CONSOLE) + if (gmLevel >= SEC_CONSOLE) { handler->SendSysMessage(LANG_BAD_VALUE); handler->SetSentErrorMessage(true); @@ -689,18 +554,16 @@ public: } // handler->getSession() == nullptr only for console - targetAccountId = (isAccountNameGiven) ? AccountMgr::GetId(targetAccountName) : handler->getSelectedPlayer()->GetSession()->GetAccountId(); - int32 gmRealmID = (isAccountNameGiven) ? atoi(arg3) : atoi(arg2); uint32 playerSecurity; if (handler->GetSession()) - playerSecurity = AccountMgr::GetSecurity(handler->GetSession()->GetAccountId(), gmRealmID); + playerSecurity = AccountMgr::GetSecurity(handler->GetSession()->GetAccountId(), realmId); else playerSecurity = SEC_CONSOLE; // can set security level only for target with less security and to less security that we have // This also restricts setting handler's own security. - targetSecurity = AccountMgr::GetSecurity(targetAccountId, gmRealmID); - if (targetSecurity >= playerSecurity || gm >= playerSecurity) + uint32 targetSecurity = AccountMgr::GetSecurity(accountId, realmId); + if (targetSecurity >= playerSecurity || gmLevel >= playerSecurity) { handler->SendSysMessage(LANG_YOURS_SECURITY_IS_LOW); handler->SetSentErrorMessage(true); @@ -708,12 +571,12 @@ public: } // Check and abort if the target gm has a higher rank on one of the realms and the new realm is -1 - if (gmRealmID == -1 && !AccountMgr::IsConsoleAccount(playerSecurity)) + if (realmId == -1 && !AccountMgr::IsConsoleAccount(playerSecurity)) { PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_ACCESS_GMLEVEL_TEST); - stmt->setUInt32(0, targetAccountId); - stmt->setUInt8(1, uint8(gm)); + stmt->setUInt32(0, accountId); + stmt->setUInt8(1, gmLevel); PreparedQueryResult result = LoginDatabase.Query(stmt); @@ -726,39 +589,23 @@ public: } // Check if provided realmID has a negative value other than -1 - if (gmRealmID < -1) + if (realmId < -1) { handler->SendSysMessage(LANG_INVALID_REALMID); handler->SetSentErrorMessage(true); return false; } - rbac::RBACData* rbac = isAccountNameGiven ? nullptr : handler->getSelectedPlayer()->GetSession()->GetRBACData(); - sAccountMgr->UpdateAccountAccess(rbac, targetAccountId, uint8(gm), gmRealmID); + sAccountMgr->UpdateAccountAccess(nullptr, accountId, gmLevel, realmId); - handler->PSendSysMessage(LANG_YOU_CHANGE_SECURITY, targetAccountName.c_str(), gm); + + handler->PSendSysMessage(LANG_YOU_CHANGE_SECURITY, accountName->c_str(), gmLevel); return true; } /// Set password for account - static bool HandleAccountSetPasswordCommand(ChatHandler* handler, char const* args) + static bool HandleAccountSetPasswordCommand(ChatHandler* handler, std::string accountName, std::string const& password, std::string const& confirmPassword) { - if (!*args) - { - handler->SendSysMessage(LANG_CMD_SYNTAX); - handler->SetSentErrorMessage(true); - return false; - } - - ///- Get the command line arguments - char* account = strtok((char*)args, " "); - char* password = strtok(nullptr, " "); - char* passwordConfirmation = strtok(nullptr, " "); - - if (!account || !password || !passwordConfirmation) - return false; - - std::string accountName = account; if (!Utf8ToUpperOnlyLatin(accountName)) { handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str()); @@ -779,7 +626,7 @@ public: if (handler->HasLowerSecurityAccount(nullptr, targetAccountId, true)) return false; - if (strcmp(password, passwordConfirmation) != 0) + if (password != confirmPassword) { handler->SendSysMessage(LANG_NEW_PASSWORDS_NOT_MATCH); handler->SetSentErrorMessage(true); @@ -787,7 +634,6 @@ public: } AccountOpResult result = AccountMgr::ChangePassword(targetAccountId, password); - switch (result) { case AccountOpResult::AOR_OK: @@ -810,24 +656,8 @@ public: } /// Set normal email for account - static bool HandleAccountSetEmailCommand(ChatHandler* handler, char const* args) + static bool HandleAccountSetEmailCommand(ChatHandler* handler, std::string accountName, std::string const& email, std::string const& confirmEmail) { - if (!*args) - return false; - - ///- Get the command line arguments - char* account = strtok((char*)args, " "); - char* email = strtok(nullptr, " "); - char* emailConfirmation = strtok(nullptr, " "); - - if (!account || !email || !emailConfirmation) - { - handler->SendSysMessage(LANG_CMD_SYNTAX); - handler->SetSentErrorMessage(true); - return false; - } - - std::string accountName = account; if (!Utf8ToUpperOnlyLatin(accountName)) { handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str()); @@ -848,7 +678,7 @@ public: if (handler->HasLowerSecurityAccount(nullptr, targetAccountId, true)) return false; - if (strcmp(email, emailConfirmation) != 0) + if (email != confirmEmail) { handler->SendSysMessage(LANG_NEW_EMAILS_NOT_MATCH); handler->SetSentErrorMessage(true); @@ -861,7 +691,7 @@ public: case AccountOpResult::AOR_OK: handler->SendSysMessage(LANG_COMMAND_EMAIL); TC_LOG_INFO("entities.player.character", "ChangeEmail: Account %s [Id: %u] had it's email changed to %s.", - accountName.c_str(), targetAccountId, email); + accountName.c_str(), targetAccountId, email.c_str()); break; case AccountOpResult::AOR_NAME_NOT_EXIST: handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str()); @@ -881,29 +711,8 @@ public: } /// Change registration email for account - static bool HandleAccountSetRegEmailCommand(ChatHandler* handler, char const* args) + static bool HandleAccountSetRegEmailCommand(ChatHandler* handler, std::string accountName, std::string const& email, std::string const& confirmEmail) { - if (!*args) - return false; - - //- We do not want anything short of console to use this by default. - //- So we force that. - if (handler->GetSession()) - return false; - - ///- Get the command line arguments - char* account = strtok((char*)args, " "); - char* email = strtok(nullptr, " "); - char* emailConfirmation = strtok(nullptr, " "); - - if (!account || !email || !emailConfirmation) - { - handler->SendSysMessage(LANG_CMD_SYNTAX); - handler->SetSentErrorMessage(true); - return false; - } - - std::string accountName = account; if (!Utf8ToUpperOnlyLatin(accountName)) { handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str()); @@ -924,7 +733,7 @@ public: if (handler->HasLowerSecurityAccount(nullptr, targetAccountId, true)) return false; - if (strcmp(email, emailConfirmation) != 0) + if (email != confirmEmail) { handler->SendSysMessage(LANG_NEW_EMAILS_NOT_MATCH); handler->SetSentErrorMessage(true); @@ -937,7 +746,7 @@ public: case AccountOpResult::AOR_OK: handler->SendSysMessage(LANG_COMMAND_EMAIL); TC_LOG_INFO("entities.player.character", "ChangeRegEmail: Account %s [Id: %u] had it's Registration Email changed to %s.", - accountName.c_str(), targetAccountId, email); + accountName.c_str(), targetAccountId, email.c_str()); break; case AccountOpResult::AOR_NAME_NOT_EXIST: handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str()); diff --git a/src/server/scripts/Commands/cs_achievement.cpp b/src/server/scripts/Commands/cs_achievement.cpp index f3c8a43343..34fedc1ab2 100644 --- a/src/server/scripts/Commands/cs_achievement.cpp +++ b/src/server/scripts/Commands/cs_achievement.cpp @@ -47,20 +47,8 @@ public: return commandTable; } - static bool HandleAchievementAddCommand(ChatHandler* handler, char const* args) + static bool HandleAchievementAddCommand(ChatHandler* handler, AchievementEntry const* achievementEntry) { - if (!*args) - return false; - - uint32 achievementId = atoi((char*)args); - if (!achievementId) - { - if (char* id = handler->extractKeyFromLink((char*)args, "Hachievement")) - achievementId = atoul(id); - if (!achievementId) - return false; - } - Player* target = handler->getSelectedPlayer(); if (!target) { @@ -68,9 +56,7 @@ public: handler->SetSentErrorMessage(true); return false; } - - if (AchievementEntry const* achievementEntry = sAchievementMgr->GetAchievement(achievementId)) - target->CompletedAchievement(achievementEntry); + target->CompletedAchievement(achievementEntry); return true; } diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index b96dafb90f..d1abb2d9a7 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -34,8 +34,10 @@ EndScriptData */ #include "RBAC.h" #include "TicketMgr.h" #include "Transport.h" +#include "Util.h" #include "WorldSession.h" +using namespace Trinity::ChatCommands; class go_commandscript : public CommandScript { public: @@ -43,19 +45,31 @@ public: std::vector GetCommands() const override { + static std::vector goCreatureCommandTable = + { + { "id", rbac::RBAC_PERM_COMMAND_GO, false, &HandleGoCreatureCIdCommand, "" }, + { "", rbac::RBAC_PERM_COMMAND_GO, false, &HandleGoCreatureSpawnIdCommand, "" } + }; + + static std::vector goGameObjectCommandTable = + { + { "id", rbac::RBAC_PERM_COMMAND_GO, false, &HandleGoGameObjectGOIdCommand, "" }, + { "", rbac::RBAC_PERM_COMMAND_GO, false, &HandleGoGameObjectSpawnIdCommand, "" } + }; + static std::vector goCommandTable = { - { "creature", rbac::RBAC_PERM_COMMAND_GO_CREATURE, false, &HandleGoCreatureCommand, "" }, - { "graveyard", rbac::RBAC_PERM_COMMAND_GO_GRAVEYARD, false, &HandleGoGraveyardCommand, "" }, - { "grid", rbac::RBAC_PERM_COMMAND_GO_GRID, false, &HandleGoGridCommand, "" }, - { "object", rbac::RBAC_PERM_COMMAND_GO_OBJECT, false, &HandleGoObjectCommand, "" }, - { "taxinode", rbac::RBAC_PERM_COMMAND_GO_TAXINODE, false, &HandleGoTaxinodeCommand, "" }, - { "trigger", rbac::RBAC_PERM_COMMAND_GO_TRIGGER, false, &HandleGoTriggerCommand, "" }, - { "zonexy", rbac::RBAC_PERM_COMMAND_GO_ZONEXY, false, &HandleGoZoneXYCommand, "" }, - { "xyz", rbac::RBAC_PERM_COMMAND_GO_XYZ, false, &HandleGoXYZCommand, "" }, - { "ticket", rbac::RBAC_PERM_COMMAND_GO_TICKET, false, &HandleGoTicketCommand, "" }, - { "offset", rbac::RBAC_PERM_COMMAND_GO_OFFSET, false, &HandleGoOffsetCommand, "" }, - { "instance", rbac::RBAC_PERM_COMMAND_GO_INSTANCE, false, &HandleGoInstanceCommand, "" } + { "creature", rbac::RBAC_PERM_COMMAND_GO, false, nullptr, "", goCreatureCommandTable }, + { "gameobject", rbac::RBAC_PERM_COMMAND_GO, false, nullptr, "", goGameObjectCommandTable }, + { "graveyard", rbac::RBAC_PERM_COMMAND_GO, false, &HandleGoGraveyardCommand, "" }, + { "grid", rbac::RBAC_PERM_COMMAND_GO, false, &HandleGoGridCommand, "" }, + { "taxinode", rbac::RBAC_PERM_COMMAND_GO, false, &HandleGoTaxinodeCommand, "" }, + { "areatrigger", rbac::RBAC_PERM_COMMAND_GO, false, &HandleGoAreaTriggerCommand, "" }, + { "zonexy", rbac::RBAC_PERM_COMMAND_GO, false, &HandleGoZoneXYCommand, "" }, + { "xyz", rbac::RBAC_PERM_COMMAND_GO, false, &HandleGoXYZCommand, "" }, + { "ticket", rbac::RBAC_PERM_COMMAND_GO, false, &HandleGoTicketCommand, "" }, + { "offset", rbac::RBAC_PERM_COMMAND_GO, false, &HandleGoOffsetCommand, "" }, + { "instance", rbac::RBAC_PERM_COMMAND_GO, false, &HandleGoInstanceCommand, "" } }; static std::vector commandTable = @@ -65,123 +79,115 @@ public: return commandTable; } - /** \brief Teleport the GM to the specified creature - * - * .gocreature --> TP using creature.guid - * .gocreature azuregos --> TP player to the mob with this name - * Warning: If there is more than one mob with this name - * you will be teleported to the first one that is found. - * .gocreature id 6109 --> TP player to the mob, that has this creature_template.entry - * Warning: If there is more than one mob with this "id" - * you will be teleported to the first one that is found. - */ - //teleport to creature - static bool HandleGoCreatureCommand(ChatHandler* handler, char const* args) + static bool DoTeleport(ChatHandler* handler, WorldLocation loc) { - if (!*args) - return false; - Player* player = handler->GetSession()->GetPlayer(); - // "id" or number or [name] Shift-click form |color|Hcreature_entry:creature_id|h[name]|h|r - char* param1 = handler->extractKeyFromLink((char*)args, "Hcreature"); - if (!param1) - return false; - - std::ostringstream whereClause; - - // User wants to teleport to the NPC's template entry - if (strcmp(param1, "id") == 0) + if (!MapManager::IsValidMapCoord(loc) || sObjectMgr->IsTransportMap(loc.GetMapId())) { - // Get the "creature_template.entry" - // number or [name] Shift-click form |color|Hcreature_entry:creature_id|h[name]|h|r - char* tail = strtok(nullptr, ""); - if (!tail) - return false; - char* id = handler->extractKeyFromLink(tail, "Hcreature_entry"); - if (!id) - return false; - - uint32 entry = atoul(id); - if (!entry) - return false; - - whereClause << "WHERE id = '" << entry << '\''; - } - else - { - ObjectGuid::LowType guidLow = atoul(param1); - - // Number is invalid - maybe the user specified the mob's name - if (!guidLow) - { - std::string name = param1; - WorldDatabase.EscapeString(name); - whereClause << ", creature_template WHERE creature.id = creature_template.entry AND creature_template.name LIKE '" << name << '\''; - } - else - whereClause << "WHERE guid = '" << guidLow << '\''; - } - - QueryResult result = WorldDatabase.PQuery("SELECT position_x, position_y, position_z, orientation, map FROM creature %s", whereClause.str().c_str()); - if (!result) - { - handler->SendSysMessage(LANG_COMMAND_GOCREATNOTFOUND); + handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, loc.GetPositionX(), loc.GetPositionY(), loc.GetPositionZ()); handler->SetSentErrorMessage(true); return false; } - if (result->GetRowCount() > 1) - handler->SendSysMessage(LANG_COMMAND_GOCREATMULTIPLE); - - Field* fields = result->Fetch(); - float x = fields[0].GetFloat(); - float y = fields[1].GetFloat(); - float z = fields[2].GetFloat(); - float o = fields[3].GetFloat(); - uint32 mapId = fields[4].GetUInt16(); - - if (!MapManager::IsValidMapCoord(mapId, x, y, z, o) || sObjectMgr->IsTransportMap(mapId)) - { - handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapId); - handler->SetSentErrorMessage(true); - return false; - } - - // stop flight if need + // stop flight if need if (player->IsInFlight()) { player->GetMotionMaster()->MovementExpired(); player->CleanupAfterTaxiFlight(); } - // save only in non-flight case + else - player->SaveRecallPosition(); - - player->TeleportTo(mapId, x, y, z, o); + player->SaveRecallPosition(); // save only in non-flight case + player->TeleportTo(loc); return true; } - static bool HandleGoGraveyardCommand(ChatHandler* handler, char const* args) + static bool HandleGoCreatureSpawnIdCommand(ChatHandler* handler, Variant, ObjectGuid::LowType> spawnId) { - Player* player = handler->GetSession()->GetPlayer(); - - if (!*args) + CreatureData const* spawnpoint = sObjectMgr->GetCreatureData(spawnId); + if (!spawnpoint) + { + handler->SendSysMessage(LANG_COMMAND_GOCREATNOTFOUND); + handler->SetSentErrorMessage(true); return false; + } - char* gyId = strtok((char*)args, " "); - if (!gyId) + return DoTeleport(handler, spawnpoint->spawnPoint); + } + static bool HandleGoCreatureCIdCommand(ChatHandler* handler, Variant, uint32> cId) + { + CreatureData const* spawnpoint = nullptr; + for (auto const& pair : sObjectMgr->GetAllCreatureData()) + { + if (pair.second.id != *cId) + continue; + + if (!spawnpoint) + spawnpoint = &pair.second; + else + { + handler->SendSysMessage(LANG_COMMAND_GOCREATMULTIPLE); + break; + } + } + + if (!spawnpoint) + { + handler->SendSysMessage(LANG_COMMAND_GOCREATNOTFOUND); + handler->SetSentErrorMessage(true); return false; + } - uint32 graveyardId = atoul(gyId); + return DoTeleport(handler, spawnpoint->spawnPoint); + } - if (!graveyardId) + static bool HandleGoGameObjectSpawnIdCommand(ChatHandler* handler, uint32 spawnId) + { + GameObjectData const* spawnpoint = sObjectMgr->GetGameObjectData(spawnId); + if (!spawnpoint) + { + handler->SendSysMessage(LANG_COMMAND_GOOBJNOTFOUND); + handler->SetSentErrorMessage(true); return false; + } - WorldSafeLocsEntry const* gy = sWorldSafeLocsStore.LookupEntry(graveyardId); + return DoTeleport(handler, spawnpoint->spawnPoint); + } + + static bool HandleGoGameObjectGOIdCommand(ChatHandler* handler, uint32 goId) + { + GameObjectData const* spawnpoint = nullptr; + for (auto const& pair : sObjectMgr->GetAllGameObjectData()) + { + if (pair.second.id != goId) + continue; + + if (!spawnpoint) + spawnpoint = &pair.second; + else + { + handler->SendSysMessage(LANG_COMMAND_GOCREATMULTIPLE); + break; + } + } + + if (!spawnpoint) + { + handler->SendSysMessage(LANG_COMMAND_GOOBJNOTFOUND); + handler->SetSentErrorMessage(true); + return false; + } + + return DoTeleport(handler, spawnpoint->spawnPoint); + } + + static bool HandleGoGraveyardCommand(ChatHandler* handler, uint32 gyId) + { + WorldSafeLocsEntry const* gy = sWorldSafeLocsStore.LookupEntry(gyId); if (!gy) { - handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDNOEXIST, graveyardId); + handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDNOEXIST, gyId); handler->SetSentErrorMessage(true); return false; } @@ -193,6 +199,7 @@ public: return false; } + Player* player = handler->GetSession()->GetPlayer(); // stop flight if need if (player->IsInFlight()) { @@ -208,25 +215,15 @@ public: } //teleport to grid - static bool HandleGoGridCommand(ChatHandler* handler, char const* args) + static bool HandleGoGridCommand(ChatHandler* handler, float gridX, float gridY, Optional oMapId) { - if (!*args) - return false; - Player* player = handler->GetSession()->GetPlayer(); - char* gridX = strtok((char*)args, " "); - char* gridY = strtok(nullptr, " "); - char* id = strtok(nullptr, " "); - - if (!gridX || !gridY) - return false; - - uint32 mapId = id ? atoul(id) : player->GetMapId(); + uint32 mapId = oMapId.get_value_or(player->GetMapId()); // center of grid - float x = ((float)atof(gridX) - CENTER_GRID_ID + 0.5f) * SIZE_OF_GRIDS; - float y = ((float)atof(gridY) - CENTER_GRID_ID + 0.5f) * SIZE_OF_GRIDS; + float x = (gridX - CENTER_GRID_ID + 0.5f) * SIZE_OF_GRIDS; + float y = (gridY - CENTER_GRID_ID + 0.5f) * SIZE_OF_GRIDS; if (!MapManager::IsValidMapCoord(mapId, x, y)) { @@ -252,68 +249,8 @@ public: return true; } - //teleport to gameobject - static bool HandleGoObjectCommand(ChatHandler* handler, char const* args) + static bool HandleGoTaxinodeCommand(ChatHandler* handler, Variant, uint32> nodeId) { - if (!*args) - return false; - - Player* player = handler->GetSession()->GetPlayer(); - - // number or [name] Shift-click form |color|Hgameobject:go_guid|h[name]|h|r - char* id = handler->extractKeyFromLink((char*)args, "Hgameobject"); - if (!id) - return false; - - ObjectGuid::LowType guidLow = atoul(id); - if (!guidLow) - return false; - - // by DB guid - GameObjectData const* goData = sObjectMgr->GetGameObjectData(guidLow); - if (!goData) - { - handler->SendSysMessage(LANG_COMMAND_GOOBJNOTFOUND); - handler->SetSentErrorMessage(true); - return false; - } - - if (!MapManager::IsValidMapCoord(goData->spawnPoint) || sObjectMgr->IsTransportMap(goData->spawnPoint.GetMapId())) - { - handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, goData->spawnPoint.GetPositionX(), goData->spawnPoint.GetPositionY(), goData->spawnPoint.GetMapId()); - handler->SetSentErrorMessage(true); - return false; - } - - // stop flight if need - if (player->IsInFlight()) - { - player->GetMotionMaster()->MovementExpired(); - player->CleanupAfterTaxiFlight(); - } - // save only in non-flight case - else - player->SaveRecallPosition(); - - player->TeleportTo(goData->spawnPoint); - return true; - } - - static bool HandleGoTaxinodeCommand(ChatHandler* handler, char const* args) - { - Player* player = handler->GetSession()->GetPlayer(); - - if (!*args) - return false; - - char* id = handler->extractKeyFromLink((char*)args, "Htaxinode"); - if (!id) - return false; - - uint32 nodeId = atoul(id); - if (!nodeId) - return false; - TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(nodeId); if (!node) { @@ -322,44 +259,11 @@ public: return false; } - if ((node->x == 0.0f && node->y == 0.0f && node->z == 0.0f) || - !MapManager::IsValidMapCoord(node->map_id, node->x, node->y, node->z)) - { - handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, node->x, node->y, node->map_id); - handler->SetSentErrorMessage(true); - return false; - } - - // stop flight if need - if (player->IsInFlight()) - { - player->GetMotionMaster()->MovementExpired(); - player->CleanupAfterTaxiFlight(); - } - // save only in non-flight case - else - player->SaveRecallPosition(); - - player->TeleportTo(node->map_id, node->x, node->y, node->z, player->GetOrientation()); - return true; + return DoTeleport(handler, { node->map_id, { node->x, node->y, node->z } }); } - static bool HandleGoTriggerCommand(ChatHandler* handler, char const* args) + static bool HandleGoAreaTriggerCommand(ChatHandler* handler, Variant, uint32> areaTriggerId) { - Player* player = handler->GetSession()->GetPlayer(); - - if (!*args) - return false; - - char* id = strtok((char*)args, " "); - if (!id) - return false; - - uint32 areaTriggerId = atoul(id); - - if (!areaTriggerId) - return false; - AreaTriggerEntry const* at = sAreaTriggerStore.LookupEntry(areaTriggerId); if (!at) { @@ -368,25 +272,7 @@ public: return false; } - if (!MapManager::IsValidMapCoord(at->mapid, at->x, at->y, at->z)) - { - handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, at->x, at->y, at->mapid); - handler->SetSentErrorMessage(true); - return false; - } - - // stop flight if need - if (player->IsInFlight()) - { - player->GetMotionMaster()->MovementExpired(); - player->CleanupAfterTaxiFlight(); - } - // save only in non-flight case - else - player->SaveRecallPosition(); - - player->TeleportTo(at->mapid, at->x, at->y, at->z, player->GetOrientation()); - return true; + return DoTeleport(handler, { at->mapid, { at->x, at->y, at->z } }); } //teleport at coordinates @@ -463,32 +349,14 @@ public: } //teleport at coordinates, including Z and orientation - static bool HandleGoXYZCommand(ChatHandler* handler, char const* args) + static bool HandleGoXYZCommand(ChatHandler* handler, float x, float y, Optional z, Optional id, Optional o) { - if (!*args) - return false; - Player* player = handler->GetSession()->GetPlayer(); - char* goX = strtok((char*)args, " "); - char* goY = strtok(nullptr, " "); - char* goZ = strtok(nullptr, " "); - char* id = strtok(nullptr, " "); - char* port = strtok(nullptr, " "); - - if (!goX || !goY) - return false; - - float x = (float)atof(goX); - float y = (float)atof(goY); - float z; - float ort = port ? (float)atof(port) : player->GetOrientation(); - uint32 mapId = id ? atoul(id) : player->GetMapId(); - - if (goZ) + uint32 mapId = id.get_value_or(player->GetMapId()); + if (z) { - z = (float)atof(goZ); - if (!MapManager::IsValidMapCoord(mapId, x, y, z)) + if (!MapManager::IsValidMapCoord(mapId, x, y, *z)) { handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapId); handler->SetSentErrorMessage(true); @@ -507,33 +375,11 @@ public: z = std::max(map->GetHeight(PhasingHandler::GetEmptyPhaseShift(), x, y, MAX_HEIGHT), map->GetWaterLevel(PhasingHandler::GetEmptyPhaseShift(), x, y)); } - // stop flight if need - if (player->IsInFlight()) - { - player->GetMotionMaster()->MovementExpired(); - player->CleanupAfterTaxiFlight(); - } - // save only in non-flight case - else - player->SaveRecallPosition(); - - player->TeleportTo(mapId, x, y, z, ort); - return true; + return DoTeleport(handler, { mapId, { x, y, *z, o.get_value_or(0.0f) } }); } - static bool HandleGoTicketCommand(ChatHandler* handler, char const* args) + static bool HandleGoTicketCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - char* id = strtok((char*)args, " "); - if (!id) - return false; - - uint32 ticketId = atoul(id); - if (!ticketId) - return false; - GmTicket* ticket = sTicketMgr->GetTicket(ticketId); if (!ticket) { @@ -554,99 +400,47 @@ public: return true; } - static bool HandleGoOffsetCommand(ChatHandler* handler, char const* args) + static bool HandleGoOffsetCommand(ChatHandler* handler, float dX, Optional dY, Optional dZ, Optional dO) { - if (!*args) - return false; + WorldLocation loc = handler->GetSession()->GetPlayer()->GetWorldLocation(); + loc.RelocateOffset({ dX, dY.get_value_or(0.0f), dZ.get_value_or(0.0f), dO.get_value_or(0.0f) }); - Player* player = handler->GetSession()->GetPlayer(); - - char* goX = strtok((char*)args, " "); - char* goY = strtok(nullptr, " "); - char* goZ = strtok(nullptr, " "); - char* port = strtok(nullptr, " "); - - float x, y, z, o; - player->GetPosition(x, y, z, o); - if (goX) - x += atof(goX); - if (goY) - y += atof(goY); - if (goZ) - z += atof(goZ); - if (port) - o += atof(port); - - if (!Trinity::IsValidMapCoord(x, y, z, o)) - { - handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, player->GetMapId()); - handler->SetSentErrorMessage(true); - return false; - } - - // stop flight if need - if (player->IsInFlight()) - { - player->GetMotionMaster()->MovementExpired(); - player->CleanupAfterTaxiFlight(); - } - // save only in non-flight case - else - player->SaveRecallPosition(); - - player->TeleportTo(player->GetMapId(), x, y, z, o); - return true; + return DoTeleport(handler, loc); } - static bool HandleGoInstanceCommand(ChatHandler* handler, char const* args) + static bool HandleGoInstanceCommand(ChatHandler* handler, std::vector const& labels) { - if (!*args) - return false; - - char* pos = const_cast(args); - do *pos = tolower(*pos); - while (*(++pos)); - - Tokenizer labels(args, ' '); uint32 mapid = 0; - if (labels.size() == 1) + + std::multimap> matches; + for (auto const& pair : sObjectMgr->GetInstanceTemplates()) { - try { mapid = std::stoi(labels[0]); } - catch (...) {} + uint32 count = 0; + std::string const& scriptName = sObjectMgr->GetScriptName(pair.second.ScriptId); + for (auto const& label : labels) + if (StringContainsStringI(scriptName, label)) + ++count; + if (count) + matches.emplace(count, decltype(matches)::mapped_type({ pair.first, scriptName })); } - if (!mapid) + if (matches.empty()) { - std::multimap> matches; - for (auto const& pair : sObjectMgr->GetInstanceTemplates()) - { - uint32 count = 0; - std::string const& scriptName = sObjectMgr->GetScriptName(pair.second.ScriptId); - for (char const* label : labels) - if (scriptName.find(label) != std::string::npos) - ++count; - - if (count) - matches.emplace(count, decltype(matches)::mapped_type({ pair.first, scriptName })); - } - if (matches.empty()) - { - handler->SendSysMessage(LANG_COMMAND_NO_INSTANCES_MATCH); - return false; - } - auto it = matches.rbegin(); - uint32 maxCount = it->first; - mapid = it->second.first; - if (++it != matches.rend() && it->first == maxCount) - { - handler->SendSysMessage(LANG_COMMAND_MULTIPLE_INSTANCES_MATCH); - --it; - do - handler->PSendSysMessage(LANG_COMMAND_MULTIPLE_INSTANCES_ENTRY, it->second.first, it->second.second); - while (++it != matches.rend() && it->first == maxCount); - handler->SetSentErrorMessage(true); - return false; - } + handler->SendSysMessage(LANG_COMMAND_NO_INSTANCES_MATCH); + return false; + } + auto it = matches.rbegin(); + uint32 maxCount = it->first; + mapid = it->second.first; + if (++it != matches.rend() && it->first == maxCount) + { + handler->SendSysMessage(LANG_COMMAND_MULTIPLE_INSTANCES_MATCH); + --it; + do + handler->PSendSysMessage(LANG_COMMAND_MULTIPLE_INSTANCES_ENTRY, it->second.first, it->second.second); + while (++it != matches.rend() && it->first == maxCount); + handler->SetSentErrorMessage(true); + return false; } ASSERT(mapid); diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp index 912df3da81..5407b4ed00 100644 --- a/src/server/scripts/Commands/cs_tele.cpp +++ b/src/server/scripts/Commands/cs_tele.cpp @@ -36,6 +36,8 @@ EndScriptData */ #include "RBAC.h" #include "WorldSession.h" +using namespace Trinity::ChatCommands; + class tele_commandscript : public CommandScript { public: @@ -58,17 +60,12 @@ public: return commandTable; } - static bool HandleTeleAddCommand(ChatHandler* handler, char const* args) + static bool HandleTeleAddCommand(ChatHandler* handler, std::string const& name) { - if (!*args) - return false; - Player* player = handler->GetSession()->GetPlayer(); if (!player) return false; - std::string name = args; - if (sObjectMgr->GetGameTeleExactName(name)) { handler->SendSysMessage(LANG_COMMAND_TP_ALREADYEXIST); @@ -98,13 +95,8 @@ public: return true; } - static bool HandleTeleDelCommand(ChatHandler* handler, char const* args) + static bool HandleTeleDelCommand(ChatHandler* handler, GameTele const* tele) { - if (!*args) - return false; - - // id, or string, or [name] Shift-click form |color|Htele:id|h[name]|h|r - GameTele const* tele = handler->extractGameTeleFromLink((char*)args); if (!tele) { handler->SendSysMessage(LANG_COMMAND_TELE_NOTFOUND); @@ -215,10 +207,14 @@ public: } //Teleport group to given game_tele.entry - static bool HandleTeleGroupCommand(ChatHandler* handler, char const* args) + static bool HandleTeleGroupCommand(ChatHandler* handler, GameTele const* tele) { - if (!*args) + if (!tele) + { + handler->SendSysMessage(LANG_COMMAND_TELE_NOTFOUND); + handler->SetSentErrorMessage(true); return false; + } Player* target = handler->getSelectedPlayer(); if (!target) @@ -232,15 +228,6 @@ public: if (handler->HasLowerSecurity(target, ObjectGuid::Empty)) return false; - // id, or string, or [name] Shift-click form |color|Htele:id|h[name]|h|r - GameTele const* tele = handler->extractGameTeleFromLink((char*)args); - if (!tele) - { - handler->SendSysMessage(LANG_COMMAND_TELE_NOTFOUND); - handler->SetSentErrorMessage(true); - return false; - } - MapEntry const* map = sMapStore.LookupEntry(tele->mapId); if (!map || map->IsBattlegroundOrArena()) { @@ -298,16 +285,8 @@ public: return true; } - static bool HandleTeleCommand(ChatHandler* handler, char const* args) + static bool HandleTeleCommand(ChatHandler* handler, GameTele const* tele) { - if (!*args) - return false; - - Player* me = handler->GetSession()->GetPlayer(); - - // id, or string, or [name] Shift-click form |color|Htele:id|h[name]|h|r - GameTele const* tele = handler->extractGameTeleFromLink((char*)args); - if (!tele) { handler->SendSysMessage(LANG_COMMAND_TELE_NOTFOUND); @@ -315,6 +294,7 @@ public: return false; } + Player* me = handler->GetSession()->GetPlayer(); if (me->IsInCombat()) { handler->SendSysMessage(LANG_YOU_IN_COMBAT); diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index 2137e0c993..2579e7fc3d 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -1622,7 +1622,7 @@ public: case GOSSIP_ACTION_INFO_DEF + 1: CloseGossipMenuFor(player); uiStep = 1; - Start(true, false, player->GetGUID()); + Start(true, true, player->GetGUID()); break; } return true; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp index 327314c069..9e27d732c7 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp @@ -616,7 +616,7 @@ public: DoMeleeAttackIfReady(); } }; - + CreatureAI* GetAI(Creature* creature) const override { return GetHyjalAI(creature); @@ -1437,7 +1437,7 @@ public: DoMeleeAttackIfReady(); } }; - + CreatureAI* GetAI(Creature* creature) const override { return GetHyjalAI(creature); diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp index 8ea14ab909..79af033af9 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp @@ -23,7 +23,7 @@ enum Emotes { EMOTE_BERSERK = 0, - EMOTE_LEAP = 1 // Not in use + EMOTE_LEAP = 1 }; enum Spells @@ -107,15 +107,17 @@ class boss_archavon : public CreatureScript events.ScheduleEvent(EVENT_ROCK_SHARDS, 15000); break; case EVENT_CHOKING_CLOUD: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, -10.0f, true)) + { DoCast(target, SPELL_CRUSHING_LEAP, true); //10y~80y, ignore range + Talk(EMOTE_LEAP, target); + } events.ScheduleEvent(EVENT_CHOKING_CLOUD, 30000); break; case EVENT_STOMP: DoCastVictim(SPELL_STOMP); events.ScheduleEvent(EVENT_IMPALE, 3000); events.ScheduleEvent(EVENT_STOMP, 45000); - Talk(EMOTE_LEAP, me->GetVictim()); break; case EVENT_IMPALE: DoCastVictim(SPELL_IMPALE); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 07ad716712..924ecddae6 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1784,7 +1784,7 @@ class spell_ethereal_pet_aura : public AuraScript GetUnitOwner()->GetAllMinionsByEntry(minionList, NPC_ETHEREAL_SOUL_TRADER); for (Creature* minion : minionList) { - if (minion->IsAIEnabled) + if (minion->IsAIEnabled) { minion->AI()->Talk(SAY_STEAL_ESSENCE); minion->CastSpell(eventInfo.GetProcTarget(), SPELL_STEAL_ESSENCE_VISUAL); diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index e3f3a06873..9ddaa0ecb5 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -301,7 +301,7 @@ enum AuraOfMadness SAY_MADNESS = 21954 }; -// Item - 31859: Darkmoon Card: Madness +// Item - 31859: Darkmoon Card: Madness // 39446 - Aura of Madness class spell_item_aura_of_madness : public SpellScriptLoader { @@ -1113,7 +1113,7 @@ class spell_item_gnomish_death_ray : public SpellScriptLoader } }; -// Item 10721: Gnomish Harm Prevention Belt +// Item 10721: Gnomish Harm Prevention Belt // 13234 - Harm Prevention Belt enum HarmPreventionBelt { @@ -1371,8 +1371,8 @@ enum MarkOfConquest SPELL_MARK_OF_CONQUEST_ENERGIZE = 39599 }; -// Item - 27920: Mark of Conquest -// Item - 27921: Mark of Conquest +// Item - 27920: Mark of Conquest +// Item - 27921: Mark of Conquest // 33510 - Health Restore class spell_item_mark_of_conquest : public SpellScriptLoader { diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index b86ffc36bc..e1e11796be 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -952,10 +952,10 @@ Quests.EnableQuestTracker = 0 # Description: Level difference between player and quest level at which quests are # considered low-level and are not shown via exclamation mark (!) at quest # givers. -# Default: 4 - (Enabled, Hide quests that have 4 levels less than the character) +# Default: 10 - (Enabled, Hide quests that have 10 levels less than the character) # -1 - (Disabled, Show all available quest marks) -Quests.LowLevelHideDiff = 4 +Quests.LowLevelHideDiff = 10 # # Quests.HighLevelHideDiff diff --git a/src/tools/mmaps_generator/MapBuilder.cpp b/src/tools/mmaps_generator/MapBuilder.cpp index accc495748..a7cd22ee1e 100644 --- a/src/tools/mmaps_generator/MapBuilder.cpp +++ b/src/tools/mmaps_generator/MapBuilder.cpp @@ -827,7 +827,7 @@ namespace MMAP // DT_TILE_FREE_DATA tells detour to unallocate memory when the tile // is removed via removeTile() dtStatus dtResult = navMesh->addTile(navData, navDataSize, DT_TILE_FREE_DATA, 0, &tileRef); - + if (!tileRef || dtResult != DT_SUCCESS) { printf("%s Failed adding tile to navmesh! \n", tileString.c_str());