From b4e5384d27f591cb99f0ca06c50b1ac36b42edee Mon Sep 17 00:00:00 2001 From: MitchesD Date: Sat, 4 Oct 2014 18:49:46 +0200 Subject: DB/SAI: fix more startup errors Updates https://github.com/TrinityCore/TrinityCore/issues/13256 --- sql/updates/world/2014_10_04_01_world.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sql/updates/world/2014_10_04_01_world.sql (limited to 'sql') diff --git a/sql/updates/world/2014_10_04_01_world.sql b/sql/updates/world/2014_10_04_01_world.sql new file mode 100644 index 00000000000..fa7f662ca82 --- /dev/null +++ b/sql/updates/world/2014_10_04_01_world.sql @@ -0,0 +1,6 @@ +UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry` IN(164885,164886,164887,164888,171939,171942,173284,173324,173327,174594,174595,174596,174597,174598,174599,174600,174601,174602,174603,174604,174605,174606,174607,174608,174684,174686,174708,174709,174712,174713,191124); +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry` IN(29525,29863,24198,23698,21611,21503); +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid` IN(8978,2706) AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_type`=61 WHERE `entryorguid` IN(4675,28156) AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=21057 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=25806 AND `source_type`=0 AND `id`=2; -- cgit v1.2.3 From d08c3776b71f8f73f6eb9144a06ee13d2d2cedb5 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 5 Oct 2014 00:04:53 +0200 Subject: DB/Gossips: Assigned some gossips to their BroadcastTextId By 41782992, closes https://github.com/TrinityCore/TrinityCore/issues/13239 --- sql/updates/world/2014_10_05_00_world.sql | 86 +++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sql/updates/world/2014_10_05_00_world.sql (limited to 'sql') diff --git a/sql/updates/world/2014_10_05_00_world.sql b/sql/updates/world/2014_10_05_00_world.sql new file mode 100644 index 00000000000..7d055e72f9f --- /dev/null +++ b/sql/updates/world/2014_10_05_00_world.sql @@ -0,0 +1,86 @@ +-- +UPDATE `gossip_menu_option` SET `OptionBroadcastTextID`=11038 WHERE `menu_id`=21278 AND `id`=0; + +-- BroadcastTextID0 +UPDATE `npc_text` SET `BroadcastTextID0`=3989 WHERE `ID`=1643; +UPDATE `npc_text` SET `BroadcastTextID0`=3991 WHERE `ID`=1644; +UPDATE `npc_text` SET `BroadcastTextID0`=3992 WHERE `ID`=1647; +UPDATE `npc_text` SET `BroadcastTextID0`=3993 WHERE `ID`=1648; +UPDATE `npc_text` SET `BroadcastTextID0`=3994 WHERE `ID`=1649; +UPDATE `npc_text` SET `BroadcastTextID0`=3996 WHERE `ID`=1650; +UPDATE `npc_text` SET `BroadcastTextID0`=4002 WHERE `ID`=1651; +UPDATE `npc_text` SET `BroadcastTextID0`=4004 WHERE `ID`=1652; +UPDATE `npc_text` SET `BroadcastTextID0`=4009 WHERE `ID`=1655; +UPDATE `npc_text` SET `BroadcastTextID0`=4011 WHERE `ID`=1656; +UPDATE `npc_text` SET `BroadcastTextID0`=4012 WHERE `ID`=1657; +UPDATE `npc_text` SET `BroadcastTextID0`=4083 WHERE `ID`=1693; +UPDATE `npc_text` SET `BroadcastTextID0`=4170 WHERE `ID`=1753; +UPDATE `npc_text` SET `BroadcastTextID0`=4171 WHERE `ID`=1754; +UPDATE `npc_text` SET `BroadcastTextID0`=4172 WHERE `ID`=1755; +UPDATE `npc_text` SET `BroadcastTextID0`=4173 WHERE `ID`=1756; +UPDATE `npc_text` SET `BroadcastTextID0`=4182 WHERE `ID`=1758; +UPDATE `npc_text` SET `BroadcastTextID0`=4184 WHERE `ID`=1759; + +-- BroadcastTextID1 +UPDATE `npc_text` SET `BroadcastTextID1`=2880 WHERE `ID`=882; +UPDATE `npc_text` SET `BroadcastTextID1`=6319 WHERE `ID`=905; +UPDATE `npc_text` SET `BroadcastTextID1`=6312 WHERE `ID`=922; +UPDATE `npc_text` SET `BroadcastTextID1`=6313 WHERE `ID`=923; +UPDATE `npc_text` SET `BroadcastTextID1`=6324 WHERE `ID`=928; +UPDATE `npc_text` SET `BroadcastTextID1`=5085 WHERE `ID`=2762; +UPDATE `npc_text` SET `BroadcastTextID1`=6343 WHERE `ID`=2769; +UPDATE `npc_text` SET `BroadcastTextID1`=5107 WHERE `ID`=2774; +UPDATE `npc_text` SET `BroadcastTextID1`=6349 WHERE `ID`=2775; +UPDATE `npc_text` SET `BroadcastTextID1`=6350 WHERE `ID`=2776; +UPDATE `npc_text` SET `BroadcastTextID1`=5116 WHERE `ID`=2794; +UPDATE `npc_text` SET `BroadcastTextID1`=6335 WHERE `ID`=2795; +UPDATE `npc_text` SET `BroadcastTextID1`=5365 WHERE `ID`=2797; +UPDATE `npc_text` SET `BroadcastTextID1`=6337 WHERE `ID`=2798; +UPDATE `npc_text` SET `BroadcastTextID1`=5132 WHERE `ID`=2801; +UPDATE `npc_text` SET `BroadcastTextID1`=6344 WHERE `ID`=2804; +UPDATE `npc_text` SET `BroadcastTextID1`=6347 WHERE `ID`=2807; +UPDATE `npc_text` SET `BroadcastTextID1`=5346 WHERE `ID`=3025; +UPDATE `npc_text` SET `BroadcastTextID1`=5358 WHERE `ID`=3036; +UPDATE `npc_text` SET `BroadcastTextID1`=5373 WHERE `ID`=3040; +UPDATE `npc_text` SET `BroadcastTextID1`=6361 WHERE `ID`=3042; +UPDATE `npc_text` SET `BroadcastTextID1`=6334 WHERE `ID`=3814; +UPDATE `npc_text` SET `BroadcastTextID1`=7053 WHERE `ID`=4310; +UPDATE `npc_text` SET `BroadcastTextID1`=10134 WHERE `ID`=7387; +UPDATE `npc_text` SET `BroadcastTextID1`=10367 WHERE `ID`=7484; +UPDATE `npc_text` SET `BroadcastTextID1`=10413 WHERE `ID`=7498; +UPDATE `npc_text` SET `BroadcastTextID1`=10418 WHERE `ID`=7500; +UPDATE `npc_text` SET `BroadcastTextID1`=10420 WHERE `ID`=7501; +UPDATE `npc_text` SET `BroadcastTextID1`=10391 WHERE `ID`=7502; +UPDATE `npc_text` SET `BroadcastTextID1`=10396 WHERE `ID`=7505; +UPDATE `npc_text` SET `BroadcastTextID1`=10399 WHERE `ID`=7506; +UPDATE `npc_text` SET `BroadcastTextID1`=10405 WHERE `ID`=7508; +UPDATE `npc_text` SET `BroadcastTextID1`=10407 WHERE `ID`=7509; +UPDATE `npc_text` SET `BroadcastTextID1`=10766 WHERE `ID`=15296; +UPDATE `npc_text` SET `BroadcastTextID1`=18268 WHERE `ID`=20551; +UPDATE `npc_text` SET `BroadcastTextID1`=18269 WHERE `ID`=20564; +UPDATE `npc_text` SET `BroadcastTextID1`=22227 WHERE `ID`=11256; +UPDATE `npc_text` SET `BroadcastTextID1`=45371 WHERE `ID`=16783; +UPDATE `npc_text` SET `BroadcastTextID1`=6111 WHERE `ID`=3668; +UPDATE `npc_text` SET `BroadcastTextID1`=10386 WHERE `ID`=7496; + +-- BroadcastTextID2 +UPDATE `npc_text` SET `BroadcastTextID2`=22228 WHERE `ID`=11256; +UPDATE `npc_text` SET `BroadcastTextID2`=18282 WHERE `ID`=20551; +UPDATE `npc_text` SET `BroadcastTextID2`=2909 WHERE `ID`=900; +UPDATE `npc_text` SET `BroadcastTextID2`=13816 WHERE `ID`=8893; + +-- BroadcastTextID3 +UPDATE `npc_text` SET `BroadcastTextID3`=2878 WHERE `ID`=879; + +-- BroadcastTextID4 +UPDATE `npc_text` SET `BroadcastTextID5`=13345 WHERE `ID`=8760; + +-- Misc +UPDATE `npc_text` SET `text7_0`='' WHERE `ID`=3297; +UPDATE `npc_text` SET `text7_0`='' WHERE `ID`=7530; +UPDATE `npc_text` SET `text7_0`='' WHERE `ID`=7635; +UPDATE `npc_text` SET `text7_0`='' WHERE `ID`=7669; +UPDATE `npc_text` SET `text7_0`='' WHERE `ID`=8061; +UPDATE `npc_text` SET `text7_0`='' WHERE `ID`=8480; +UPDATE `npc_text` SET `text7_0`='' WHERE `ID`=8484; +UPDATE `npc_text` SET `text7_0`='' WHERE `ID`=8934; -- cgit v1.2.3 From 2272c63c3516cef5b465d5980f9ca2b72c5b118b Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 5 Oct 2014 01:01:03 +0200 Subject: DB/Creature: Linda Ann Kastinglow & Arcanist Alec By Killyana. closes #12524 --- sql/updates/world/2014_10_05_01_world.sql | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sql/updates/world/2014_10_05_01_world.sql (limited to 'sql') diff --git a/sql/updates/world/2014_10_05_01_world.sql b/sql/updates/world/2014_10_05_01_world.sql new file mode 100644 index 00000000000..3e8b699dedc --- /dev/null +++ b/sql/updates/world/2014_10_05_01_world.sql @@ -0,0 +1,34 @@ +-- +SET @Linda :=32687; +SET @Alec :=32692; + +UPDATE creature_template SET `AIName`='SmartAI' WHERE entry IN (@Linda, @Alec); + +DELETE FROM `smart_scripts` WHERE `entryorguid` = @Linda AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` = @Linda*100 AND `source_type` = 9; +DELETE FROM `smart_scripts` WHERE `entryorguid` = @Linda*100+1 AND `source_type` = 9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@Linda, 0, 0, 0, 10, 0, 100, 0, 1, 10, 300000, 300000, 87, @Linda*100, @Linda*100+1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Linda - OOC_LOS - RANDOM_TIMED_ACTIONLIST'), +(@Linda*100,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Linda - RANDOM_TIMED_ACTIONLIST - talk'), +(@Linda*100+1,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,19,@Alec,5,0,0,0,0,0,'Linda - RANDOM_TIMED_ACTIONLIST - talk'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=1 AND `SourceEntry`=@Linda; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`, `ErrorTextId`,`ScriptName`,`Comment`) VALUES +(22,1,@Linda,0,5,1090,128,0,0,'','event require Kirin Tor Exalted'); + + +DELETE FROM creature_text WHERE entry IN (@Linda, @Alec); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES +(@Linda, 0, 0, 'There goes the finest $c I have the honor of knowing.', 12, 0, 100, 0, 0, 0, 'Linda Ann Kastinglow', 32866), +(@Linda, 0, 1, '$n, you''re an inspiration.', 12, 0, 100, 0, 0, 0, 'Linda Ann Kastinglow', 32867), +(@Linda, 0, 2, 'A fine example of a $g man:woman;, that $n.', 12, 0, 100, 0, 0, 0, 'Linda Ann Kastinglow', 32868), +(@Linda, 0, 3, 'You couldn''t ask for a finer person than $n, I say.', 12, 0, 100, 0, 0, 0, 'Linda Ann Kastinglow', 32869), +(@Linda, 0, 4, '$n, wonderful to see you. Wonderful.', 12, 0, 100, 0, 0, 0, 'Linda Ann Kastinglow', 32870), +(@Linda, 0, 5, '$n! Ah, fantastic to see you out and about. Busy as always, hm?', 12, 0, 100, 0, 0, 0, 'Linda Ann Kastinglow', 32871), + +(@Alec, 0, 0, 'There goes the finest $c I have the honor of knowing.', 12, 0, 100, 0, 0, 0, 'Arcanist Alec', 32866), +(@Alec, 0, 1, '$n, you''re an inspiration.', 12, 0, 100, 0, 0, 0, 'Arcanist Alec', 32867), +(@Alec, 0, 2, 'A fine example of a $g man:woman;, that $n.', 12, 0, 100, 0, 0, 0, 'Arcanist Alec', 32868), +(@Alec, 0, 3, 'You couldn''t ask for a finer person than $n, I say.', 12, 0, 100, 0, 0, 0, 'Arcanist Alec', 32869), +(@Alec, 0, 4, '$n, wonderful to see you. Wonderful.', 12, 0, 100, 0, 0, 0, 'Arcanist Alec', 32870), +(@Alec, 0, 5, '$n! Ah, fantastic to see you out and about. Busy as always, hm?', 12, 0, 100, 0, 0, 0, 'Arcanist Alec', 32871); -- cgit v1.2.3 From 5a8f27dda1c62ea609d425109caf6e3e424a34ed Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 5 Oct 2014 01:06:52 +0200 Subject: DB/Creature: K3 Perimeter Turret By cr4st, closes #13158 --- sql/updates/world/2014_10_05_02_world.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sql/updates/world/2014_10_05_02_world.sql (limited to 'sql') diff --git a/sql/updates/world/2014_10_05_02_world.sql b/sql/updates/world/2014_10_05_02_world.sql new file mode 100644 index 00000000000..09a8fc24895 --- /dev/null +++ b/sql/updates/world/2014_10_05_02_world.sql @@ -0,0 +1,8 @@ +-- +SET @ENTRY := 29483; +SET @SPELL_ENERGY_SURGE := 54559; +UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE `id` =@ENTRY; +UPDATE `creature_template` SET `unit_flags`=`unit_flags`|4|33554432, `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 0, 9, 0, 100, 0, 1, 20, 1000, 1000, 11, @SPELL_ENERGY_SURGE, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'K3 Perimeter Turret - Within 1-20 Range - Cast ''Energy Surge'''); -- cgit v1.2.3 From f989c7182c4cc30f1d0ffdc566c7624a5e108a2f Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Sun, 5 Oct 2014 01:56:16 +0200 Subject: Core/Misc: Added support for calculate zoneId/areaId for creature / gameoject table at loading (Slow server startup ca.3-4 sec.) --- sql/updates/world/2014_10_05_03_world.sql | 5 ++++ src/server/game/Globals/ObjectMgr.cpp | 28 ++++++++++++++++++++++ src/server/game/World/World.cpp | 3 +++ src/server/game/World/World.h | 2 ++ .../Database/Implementation/WorldDatabase.cpp | 2 ++ .../shared/Database/Implementation/WorldDatabase.h | 2 ++ src/server/worldserver/worldserver.conf.dist | 14 +++++++++++ 7 files changed, 56 insertions(+) create mode 100644 sql/updates/world/2014_10_05_03_world.sql (limited to 'sql') diff --git a/sql/updates/world/2014_10_05_03_world.sql b/sql/updates/world/2014_10_05_03_world.sql new file mode 100644 index 00000000000..30603214312 --- /dev/null +++ b/sql/updates/world/2014_10_05_03_world.sql @@ -0,0 +1,5 @@ +ALTER TABLE `creature` ADD `zoneId` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Zone Identifier' AFTER `map`; +ALTER TABLE `creature` ADD `areaId` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Area Identifier' AFTER `zoneId`; + +ALTER TABLE `gameobject` ADD `zoneId` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Zone Identifier' AFTER `map`; +ALTER TABLE `gameobject` ADD `areaId` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Area Identifier' AFTER `zoneId`; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 15c55a11be6..400a885d923 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1734,6 +1734,20 @@ void ObjectMgr::LoadCreatures() data.orientation = Position::NormalizeOrientation(data.orientation); } + if (sWorld->getBoolConfig(CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA)) + { + uint32 zoneId = sMapMgr->GetZoneId(data.mapid, data.posX, data.posY, data.posZ); + uint32 areaId = sMapMgr->GetAreaId(data.mapid, data.posX, data.posY, data.posZ); + + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_ZONE_AREA_DATA); + + stmt->setUInt32(0, zoneId); + stmt->setUInt32(1, areaId); + stmt->setUInt64(2, guid); + + WorldDatabase.Execute(stmt); + } + // Add to grid if not managed by the game event or pool system if (gameEvent == 0 && PoolId == 0) AddCreatureToGrid(guid, &data); @@ -2046,6 +2060,20 @@ void ObjectMgr::LoadGameobjects() data.phaseMask = 1; } + if (sWorld->getBoolConfig(CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA)) + { + uint32 zoneId = sMapMgr->GetZoneId(data.mapid, data.posX, data.posY, data.posZ); + uint32 areaId = sMapMgr->GetAreaId(data.mapid, data.posX, data.posY, data.posZ); + + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_GAMEOBJECT_ZONE_AREA_DATA); + + stmt->setUInt32(0, zoneId); + stmt->setUInt32(1, areaId); + stmt->setUInt64(2, guid); + + WorldDatabase.Execute(stmt); + } + if (gameEvent == 0 && PoolId == 0) // if not this is to be managed by GameEvent System or Pool system AddGameobjectToGrid(guid, &data); ++count; diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index a197ea7caa8..903e14f7506 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1261,6 +1261,9 @@ void World::LoadConfigSettings(bool reload) // AHBot m_int_configs[CONFIG_AHBOT_UPDATE_INTERVAL] = sConfigMgr->GetIntDefault("AuctionHouseBot.Update.Interval", 20); + m_bool_configs[CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA] = sConfigMgr->GetBoolDefault("Calculate.Creature.Zone.Area.Data", false); + m_bool_configs[CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA] = sConfigMgr->GetBoolDefault("Calculate.Gameoject.Zone.Area.Data", false); + // call ScriptMgr if we're reloading the configuration if (reload) sScriptMgr->OnConfigLoad(reload); diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index 9987b8ab62c..b9c30302f4d 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -158,6 +158,8 @@ enum WorldBoolConfigs CONFIG_INSTANCES_RESET_ANNOUNCE, CONFIG_IP_BASED_ACTION_LOGGING, CONFIG_ALLOW_TRACK_BOTH_RESOURCES, + CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA, + CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA, BOOL_CONFIG_VALUE_COUNT }; diff --git a/src/server/shared/Database/Implementation/WorldDatabase.cpp b/src/server/shared/Database/Implementation/WorldDatabase.cpp index e83901c8557..2adb575b780 100644 --- a/src/server/shared/Database/Implementation/WorldDatabase.cpp +++ b/src/server/shared/Database/Implementation/WorldDatabase.cpp @@ -89,4 +89,6 @@ void WorldDatabaseConnection::DoPrepareStatements() PrepareStatement(WORLD_INS_DISABLES, "INSERT INTO disables (entry, sourceType, flags, comment) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(WORLD_SEL_DISABLES, "SELECT entry FROM disables WHERE entry = ? AND sourceType = ?", CONNECTION_SYNCH); PrepareStatement(WORLD_DEL_DISABLES, "DELETE FROM disables WHERE entry = ? AND sourceType = ?", CONNECTION_ASYNC); + PrepareStatement(WORLD_UPD_CREATURE_ZONE_AREA_DATA, "UPDATE creature SET zoneId = ?, areaId = ? WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(WORLD_UPD_GAMEOBJECT_ZONE_AREA_DATA, "UPDATE gameobject SET zoneId = ?, areaId = ? WHERE guid = ?", CONNECTION_ASYNC); } diff --git a/src/server/shared/Database/Implementation/WorldDatabase.h b/src/server/shared/Database/Implementation/WorldDatabase.h index 8a5bd206021..a398b412c50 100644 --- a/src/server/shared/Database/Implementation/WorldDatabase.h +++ b/src/server/shared/Database/Implementation/WorldDatabase.h @@ -110,6 +110,8 @@ enum WorldDatabaseStatements WORLD_SEL_DISABLES, WORLD_INS_DISABLES, WORLD_DEL_DISABLES, + WORLD_UPD_CREATURE_ZONE_AREA_DATA, + WORLD_UPD_GAMEOBJECT_ZONE_AREA_DATA, MAX_WORLDDATABASE_STATEMENTS }; diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index 3fec13684da..c09d451592d 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -2649,6 +2649,20 @@ PlayerDump.DisallowOverwrite = 1 UI.ShowQuestLevelsInDialogs = 0 +# +# Calculate.Creature.Zone.Area.Data +# Description: Calculate at loading creature zoneId / areaId and save in creature table (WARNING: SLOW WORLD SERVER STARTUP) +# Default: 0 - (Do not show) + +Calculate.Creature.Zone.Area.Data = 0 + +# +# Calculate.Gameoject.Zone.Area.Data +# Description: Calculate at loading gameobject zoneId / areaId and save in gameobject table (WARNING: SLOW WORLD SERVER STARTUP) +# Default: 0 - (Do not show) + +Calculate.Gameoject.Zone.Area.Data = 0 + # ################################################################################################### -- cgit v1.2.3 From adefe39bf6acada75f39597116abc10015380068 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Sun, 5 Oct 2014 03:21:26 +0200 Subject: DB/Brewfest: Added missing brewfest spawn in shatttath --- sql/updates/world/2014_10_05_04_world.sql | 71 +++++++++++++++++++++++++++++++ src/server/game/Globals/ObjectMgr.cpp | 10 +++-- 2 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 sql/updates/world/2014_10_05_04_world.sql (limited to 'sql') diff --git a/sql/updates/world/2014_10_05_04_world.sql b/sql/updates/world/2014_10_05_04_world.sql new file mode 100644 index 00000000000..ed32e268a87 --- /dev/null +++ b/sql/updates/world/2014_10_05_04_world.sql @@ -0,0 +1,71 @@ +SET @CGUID :=74960; +SET @OGUID :=21104; + +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+12; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0 , 24545, 530, 1, 1, -1882.759, 5575.42, -12.3448, 4.677482, 120, 0, 0), -- Thunderbrew "Apprentice" (Area: Shattrath City) +(@CGUID+1 , 24484, 530, 1, 1, -1872.835, 5560.321, -12.3448, 2.748216, 120, 0, 0), -- Brewfest Reveler (Area: Shattrath City) (Auras: 43910 - Brewfest Reveler - Gnome) +(@CGUID+2 , 24484, 530, 1, 1, -1878.838, 5562.812, -12.3448, 5.889809, 120, 0, 0), -- Brewfest Reveler (Area: Shattrath City) (Auras: 43909 - Brewfest Reveler - Dwarf) +(@CGUID+3 , 24484, 530, 1, 1, -1878.618, 5556.088, -12.3448, 3.259485, 120, 0, 0), -- Brewfest Reveler (Area: Shattrath City) (Auras: 43910 - Brewfest Reveler - Gnome) +(@CGUID+4 , 24484, 530, 1, 1, -1897.398, 5558.127, -12.3448, 1.710423, 120, 0, 0), -- Brewfest Reveler (Area: Shattrath City) (Auras: 44004 - Brewfest Reveler - Goblin - Female) +(@CGUID+5 , 24484, 530, 1, 1, -1899.819, 5560.333, -12.3448, 0.3665192, 120, 0, 0), -- Brewfest Reveler (Area: Shattrath City) (Auras: 44003 - Brewfest Reveler - Goblin - Male) +(@CGUID+6 , 24484, 530, 1, 1, -1921.889, 5554.328, -12.34481, 0.04066804, 120, 0, 0), -- Brewfest Reveler (Area: Shattrath City) (Auras: 43916 - Brewfest Reveler - Troll) +(@CGUID+7 , 24484, 530, 1, 1, -1916.578, 5551.592, -12.34481, 2.666002, 120, 0, 0), -- Brewfest Reveler (Area: Shattrath City) (Auras: 43917 - Brewfest Reveler - Undead) +(@CGUID+8 , 24484, 530, 1, 1, -1924.595, 5549.645, -12.3448, 1.046868, 120, 0, 0), -- Brewfest Reveler (Area: Shattrath City) (Auras: 43914 - Brewfest Reveler - Orc) +(@CGUID+9 , 24484, 530, 1, 1, -1897.494, 5562.316, -12.3448, 4.433136, 120, 0, 0), -- Brewfest Reveler (Area: Shattrath City) (Auras: 44003 - Brewfest Reveler - Goblin - Male) +(@CGUID+10, 24501, 530, 1, 1, -1926.787, 5562.968, -12.3448, 5.061455, 120, 0, 0), -- Drohn's Distillery Apprentice (Area: Shattrath City) +(@CGUID+11, 24484, 530, 1, 1, -1895.234, 5560.195, -12.34481, 2.80998, 120, 0, 0), -- Brewfest Reveler (Area: Shattrath City) (Auras: 44003 - Brewfest Reveler - Goblin - Male) +(@CGUID+12, 23511, 530, 1, 1, -1906.297, 5569.852, -12.3448, 4.974188, 120, 0, 0); -- Gordok Brew Apprentice (Area: Shattrath City) + +DELETE FROM `creature_addon` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+12; +INSERT INTO `creature_addon` (`guid`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(@CGUID+1 , 0, 0x0, 0x101, '43910'), -- Brewfest Reveler - 43910 - Brewfest Reveler - Gnome +(@CGUID+2 , 0, 0x0, 0x101, '43909'), -- Brewfest Reveler - 43909 - Brewfest Reveler - Dwarf +(@CGUID+3 , 0, 0x0, 0x101, '43910'), -- Brewfest Reveler - 43910 - Brewfest Reveler - Gnome +(@CGUID+4 , 0, 0x0, 0x101, '44004'), -- Brewfest Reveler - 44004 - Brewfest Reveler - Goblin - Female +(@CGUID+5 , 0, 0x0, 0x101, '44003'), -- Brewfest Reveler - 44003 - Brewfest Reveler - Goblin - Male +(@CGUID+6 , 0, 0x0, 0x101, '43916'), -- Brewfest Reveler - 43916 - Brewfest Reveler - Troll +(@CGUID+7 , 0, 0x0, 0x101, '43917'), -- Brewfest Reveler - 43917 - Brewfest Reveler - Undead +(@CGUID+8 , 0, 0x0, 0x101, '43914'), -- Brewfest Reveler - 43914 - Brewfest Reveler - Orc +(@CGUID+9 , 0, 0x0, 0x101, '44003'), -- Brewfest Reveler - 44003 - Brewfest Reveler - Goblin - Male +(@CGUID+11, 0, 0x0, 0x101, '44003'); -- Brewfest Reveler - 44003 - Brewfest Reveler - Goblin - Male + +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+8; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID+0, 186259, 530, 1, 1, -1875.389, 5579.114, -12.42814, 1.605702, 0, 0, 0, 1, 120, 255, 1), -- Thunderbrew Festive Wagon (Area: Shattrath City) +(@OGUID+1, 180037, 530, 1, 1, -1909.218, 5569.716, -12.42814, 4.97419, 0, 0, 0, 1, 120, 255, 1), -- Haybail 01 (Area: Shattrath City) +(@OGUID+2, 180037, 530, 1, 1, -1906.963, 5573.009, -12.42814, 3.47321, 0, 0, 0, 1, 120, 255, 1), -- Haybail 01 (Area: Shattrath City) +(@OGUID+3, 178666, 530, 1, 1, -1882.575, 5582.089, -12.42814, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- Gypsy Wagon (Area: Shattrath City) +(@OGUID+4, 178666, 530, 1, 1, -1928.171, 5567.508, -12.42814, 3.38594, 0, 0, 0, 1, 120, 255, 1), -- Gypsy Wagon (Area: Shattrath City) +(@OGUID+5, 186255, 530, 1, 1, -1920.9, 5568.442, -12.42814, 1.884953, 0, 0, 0, 1, 120, 255, 1), -- Drohn's Distillery Festive Wagon (Area: Shattrath City) +(@OGUID+6, 186257, 530, 1, 1, -1900.552, 5575.883, -12.42814, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- Gordok Festive Wagon (Area: Shattrath City) +(@OGUID+7, 180037, 530, 1, 1, -1893.456, 5576.866, -12.42814, 4.223697, 0, 0, 0, 1, 120, 255, 1), -- Haybail 01 (Area: Shattrath City) +(@OGUID+8, 180037, 530, 1, 1, -1904.326, 5571.048, -12.42814, 1.902409, 0, 0, 0, 1, 120, 255, 1); -- Haybail 01 (Area: Shattrath City) + +DELETE FROM `game_event_creature` WHERE `eventEntry`=24 AND `guid` BETWEEN @CGUID+0 AND @CGUID+12; +INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES +(24, @CGUID+0), +(24, @CGUID+1), +(24, @CGUID+2), +(24, @CGUID+3), +(24, @CGUID+4), +(24, @CGUID+5), +(24, @CGUID+6), +(24, @CGUID+7), +(24, @CGUID+8), +(24, @CGUID+9), +(24, @CGUID+10), +(24, @CGUID+11), +(24, @CGUID+12); + +DELETE FROM `game_event_gameobject` WHERE `eventEntry`=24 AND `guid` BETWEEN @OGUID+0 AND @OGUID+8; +INSERT INTO `game_event_gameobject` (`eventEntry`, `guid`) VALUES +(24, @OGUID+0), +(24, @OGUID+1), +(24, @OGUID+2), +(24, @OGUID+3), +(24, @OGUID+4), +(24, @OGUID+5), +(24, @OGUID+6), +(24, @OGUID+7), +(24, @OGUID+8); diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 400a885d923..0fc8bcc73d3 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1736,8 +1736,9 @@ void ObjectMgr::LoadCreatures() if (sWorld->getBoolConfig(CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA)) { - uint32 zoneId = sMapMgr->GetZoneId(data.mapid, data.posX, data.posY, data.posZ); - uint32 areaId = sMapMgr->GetAreaId(data.mapid, data.posX, data.posY, data.posZ); + uint32 zoneId = 0; + uint32 areaId = 0; + sMapMgr->GetZoneAndAreaId(zoneId, areaId, data.mapid, data.posX, data.posY, data.posZ); PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_ZONE_AREA_DATA); @@ -2062,8 +2063,9 @@ void ObjectMgr::LoadGameobjects() if (sWorld->getBoolConfig(CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA)) { - uint32 zoneId = sMapMgr->GetZoneId(data.mapid, data.posX, data.posY, data.posZ); - uint32 areaId = sMapMgr->GetAreaId(data.mapid, data.posX, data.posY, data.posZ); + uint32 zoneId = 0; + uint32 areaId = 0; + sMapMgr->GetZoneAndAreaId(zoneId, areaId, data.mapid, data.posX, data.posY, data.posZ); PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_GAMEOBJECT_ZONE_AREA_DATA); -- cgit v1.2.3