From 9db31555e9973338b98ee5be178e4bbf8f960ce5 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 5 Oct 2014 09:02:10 +0200 Subject: [PATCH 1/6] DB/Creature: BroadcastTextID for npc_text By 41782992, closes #13275 --- sql/updates/world/2014_10_05_05_world.sql | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sql/updates/world/2014_10_05_05_world.sql diff --git a/sql/updates/world/2014_10_05_05_world.sql b/sql/updates/world/2014_10_05_05_world.sql new file mode 100644 index 00000000000..35775eaac70 --- /dev/null +++ b/sql/updates/world/2014_10_05_05_world.sql @@ -0,0 +1,38 @@ +-- +UPDATE `npc_text` SET `BroadcastTextID0`=5793 WHERE `ID`=3464; +UPDATE `npc_text` SET `BroadcastTextID0`=10046 WHERE `ID`=7339; +UPDATE `npc_text` SET `BroadcastTextID0`=10048 WHERE `ID`=7340; +UPDATE `npc_text` SET `BroadcastTextID0`=10053 WHERE `ID`=7341; +UPDATE `npc_text` SET `BroadcastTextID0`=10062 WHERE `ID`=7355; +UPDATE `npc_text` SET `BroadcastTextID0`=10065 WHERE `ID`=7356; +UPDATE `npc_text` SET `BroadcastTextID0`=10082 WHERE `ID`=7362; +UPDATE `npc_text` SET `BroadcastTextID0`=10086 WHERE `ID`=7363; +UPDATE `npc_text` SET `BroadcastTextID0`=10092 WHERE `ID`=7365; +UPDATE `npc_text` SET `BroadcastTextID0`=10210 WHERE `ID`=7437; +UPDATE `npc_text` SET `BroadcastTextID0`=10366 WHERE `ID`=7484; +UPDATE `npc_text` SET `BroadcastTextID0`=10412 WHERE `ID`=7498; +UPDATE `npc_text` SET `BroadcastTextID0`=10417 WHERE `ID`=7500; +UPDATE `npc_text` SET `BroadcastTextID0`=10419 WHERE `ID`=7501; +UPDATE `npc_text` SET `BroadcastTextID0`=10390 WHERE `ID`=7502; +UPDATE `npc_text` SET `BroadcastTextID0`=10395 WHERE `ID`=7505; +UPDATE `npc_text` SET `BroadcastTextID0`=10404 WHERE `ID`=7508; +UPDATE `npc_text` SET `BroadcastTextID0`=10406 WHERE `ID`=7509; +UPDATE `npc_text` SET `BroadcastTextID0`=10466 WHERE `ID`=7596; +UPDATE `npc_text` SET `BroadcastTextID0`=10468 WHERE `ID`=7597; +UPDATE `npc_text` SET `BroadcastTextID0`=10470 WHERE `ID`=7598; +UPDATE `npc_text` SET `BroadcastTextID0`=10475 WHERE `ID`=7614; +UPDATE `npc_text` SET `BroadcastTextID0`=10493 WHERE `ID`=7641; +UPDATE `npc_text` SET `BroadcastTextID0`=10543 WHERE `ID`=7674; +UPDATE `npc_text` SET `BroadcastTextID0`=10547 WHERE `ID`=7676; +UPDATE `npc_text` SET `BroadcastTextID0`=10548 WHERE `ID`=7677; +UPDATE `npc_text` SET `BroadcastTextID0`=10557 WHERE `ID`=7683; +UPDATE `npc_text` SET `BroadcastTextID0`=17814 WHERE `ID`=20201; +UPDATE `npc_text` SET `BroadcastTextID0`=27613 WHERE `ID`=13100; +UPDATE `npc_text` SET `BroadcastTextID0`=9499 WHERE `ID`=6938; +UPDATE `npc_text` SET `BroadcastTextID0`=6016 WHERE `ID`=447; +UPDATE `npc_text` SET `BroadcastTextID0`=20391 WHERE `ID`=10412; +UPDATE `npc_text` SET `BroadcastTextID0`=19868 WHERE `ID`=10616; +UPDATE `npc_text` SET `BroadcastTextID0`=14430 WHERE `ID`=9080; +UPDATE `npc_text` SET `BroadcastTextID0`=10567 WHERE `ID`=7692; +UPDATE `npc_text` SET `BroadcastTextID0`=6001 WHERE `ID`=3579; +UPDATE `npc_text` SET `BroadcastTextID0`=5035 WHERE `ID`=2725; From df516dd5ceff314f7d6f732d13657d18d50d4ffb Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 5 Oct 2014 09:49:41 +0200 Subject: [PATCH 2/6] DB/Creature: correct spawn of 5 creatures --- sql/updates/world/2014_10_05_06_world.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sql/updates/world/2014_10_05_06_world.sql diff --git a/sql/updates/world/2014_10_05_06_world.sql b/sql/updates/world/2014_10_05_06_world.sql new file mode 100644 index 00000000000..fa28f871d64 --- /dev/null +++ b/sql/updates/world/2014_10_05_06_world.sql @@ -0,0 +1,6 @@ +-- +UPDATE `creature` SET `map`=571 WHERE `guid`=101828 AND `id`=25434; +UPDATE `creature` SET `position_y`=-6381.79 WHERE `guid`=82822 AND `id`=16303; +UPDATE `creature` SET `position_y`=-6395.32 WHERE `guid`=82826 AND `id`=16303; +UPDATE `creature` SET `position_y`=-6343.51 WHERE `guid`=82827 AND `id`=16303; +UPDATE `creature` SET `map`=1 WHERE `guid`=40251 AND `id`=29346; From 6501da3c94319b7e563ab406b39f85750c83273e Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 5 Oct 2014 13:55:56 +0200 Subject: [PATCH 3/6] Core/Instances: Add assert to track down a crash Instance reset times are supposed to be initialized on server startup and then only updated when they expire. Refers to #11904 --- src/server/game/Instances/InstanceSaveMgr.cpp | 4 ++-- src/server/game/Instances/InstanceSaveMgr.h | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index 370d02631ba..8d5ae53f737 100644 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -389,7 +389,7 @@ void InstanceSaveManager::LoadResetTimes() if (oldresettime != newresettime) CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '%u' WHERE mapid = '%u' AND difficulty = '%u'", uint32(newresettime), mapid, difficulty); - SetResetTimeFor(mapid, difficulty, newresettime); + InitializeResetTimeFor(mapid, difficulty, newresettime); } while (result->NextRow()); } @@ -426,7 +426,7 @@ void InstanceSaveManager::LoadResetTimes() CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '" UI64FMTD "' WHERE mapid = '%u' AND difficulty= '%u'", (uint64)t, mapid, difficulty); } - SetResetTimeFor(mapid, difficulty, t); + InitializeResetTimeFor(mapid, difficulty, t); // schedule the global reset/warning uint8 type; diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h index 1bab66be1b8..60aeee25e1c 100644 --- a/src/server/game/Instances/InstanceSaveMgr.h +++ b/src/server/game/Instances/InstanceSaveMgr.h @@ -191,11 +191,20 @@ class InstanceSaveManager return itr != m_resetTimeByMapDifficulty.end() ? itr->second : 0; } - void SetResetTimeFor(uint32 mapid, Difficulty d, time_t t) + // Use this on startup when initializing reset times + void InitializeResetTimeFor(uint32 mapid, Difficulty d, time_t t) { m_resetTimeByMapDifficulty[MAKE_PAIR32(mapid, d)] = t; } + // Use this only when updating existing reset times + void SetResetTimeFor(uint32 mapid, Difficulty d, time_t t) + { + ResetTimeByMapDifficultyMap::iterator itr = m_resetTimeByMapDifficulty.find(MAKE_PAIR32(mapid, d)); + ASSERT(itr != m_resetTimeByMapDifficulty.end()); + itr->second = t; + } + ResetTimeByMapDifficultyMap const& GetResetTimeMap() const { return m_resetTimeByMapDifficulty; From 32903b080e17363583b352dee89dfdd9fdb31f74 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Sun, 5 Oct 2014 17:52:52 +0100 Subject: [PATCH 4/6] DB/Misc: Couple more scripts * Repeating eent between Harbinger Vurenn, General Arlos and Counselor Talbot in Valiance Keep * Script, text and conditions for Crusader of Virtue --- sql/updates/world/2014_10_05_07_world.sql | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sql/updates/world/2014_10_05_07_world.sql diff --git a/sql/updates/world/2014_10_05_07_world.sql b/sql/updates/world/2014_10_05_07_world.sql new file mode 100644 index 00000000000..4e2e84def5a --- /dev/null +++ b/sql/updates/world/2014_10_05_07_world.sql @@ -0,0 +1,30 @@ +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN(25285,31033); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(25285,31033) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` =2528500 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 +(25285, 0, 0, 0, 10, 0, 100, 0, 1, 50, 120000, 300000, 80, 2528500, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Harbinger Vurenn - OOC LOS - Run Script'), +(31033, 0, 0, 0, 10, 0, 100, 0, 1, 20, 600000, 900000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Crusader of Virtue - OOC LOS - Say Line'), +(2528500, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Harbinger Vurenn - Script - Say Line 0'), +(2528500, 9, 1, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 25301, 0, 0, 0, 0, 0, 0, 'Harbinger Vurenn - Script - Say Line 0 (Counselor Talbot)'), +(2528500, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 25250, 0, 0, 0, 0, 0, 0, 'Harbinger Vurenn - Script - Say Line 2 (General Arlos)'), +(2528500, 9, 3, 0, 0, 0, 100, 0, 12000, 12000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Harbinger Vurenn - Script - Say Line 1'); + +DELETE FROM `creature_text` WHERE `entry` IN(25301,25285,31033); +DELETE FROM `creature_text` WHERE `entry` =25250 AND `groupid`=2; + +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`,`BroadcastTextID`) VALUES +(25250, 2, 0, 'Your offer will be carefully considered, harbinger. In the meantime we will make use of your delegation in an advisory role.', 12, 7, 100, 1, 0, 0, 'General Arlos',24790), +(25301, 0, 0, 'Our troops, general, consist mostly of villagers and peasants. Good men, but not quite rid of the prejudices and superstitions of their upbringing. They''re not ready to fight alongside our more exotic allies.', 12, 7, 100, 1, 0, 0, 'Counselor Talbot',24789), +(25285, 0, 0, 'Give the word, general. I will have two regiments at your disposal in a month''s time.', 12, 7, 100, 0, 0, 0, 'Harbinger Vurenn',24787), +(25285, 1, 0, 'Very well, general. Should you change your mind, my people will be more than willing to provide military assistance.', 12, 7, 100, 0, 0, 0, 'Harbinger Vurenn',24788), +(31033, 0, 0, 'There goes the hero of the Vanguard!', 12, 0, 100, 66, 0, 0, 'Crusader of Virtue',31385), +(31033, 0, 1, '%s cheers at you.', 16, 1, 100, 71, 0, 0, 'Crusader of Virtue',25275), +(31033, 0, 2, 'We couldn''t have done it without you, $g sir:ma''am;.', 12, 0, 100, 66, 0, 0, 'Crusader of Virtue',31384), +(31033, 0, 3, 'You honor us with your presence, $n.', 12, 0, 100, 66, 0, 0, 'Crusader of Virtue',31386), +(31033, 0, 4, 'Thank you, $n. From the bottom of my heart. Thank you.', 12, 0, 100, 66, 0, 0, 'Crusader of Virtue',31388), +(31033, 0, 5, 'Call on me anytime, $n.', 12, 0, 100, 66, 0, 0, 'Crusader of Virtue',31389); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=31033; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 1, 31033, 0, 0, 8, 0, 13157, 0, 0, 0, 0, 0, '', 'Crusader of Virtue - Only run SAI if player is rewarded for quest 13157'); From 1b2b3278971aadba7778ef49b299c0c202b38af7 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 5 Oct 2014 20:18:26 +0200 Subject: [PATCH 5/6] Misc: Update some conf values/texts --- src/server/worldserver/worldserver.conf.dist | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index c09d451592d..ecdc8cf4b98 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -230,9 +230,9 @@ GridUnload = 1 # SocketTimeOutTime # Description: Time (in milliseconds) after which a connection being idle on the character # selection screen is disconnected. -# Default: 900000 - (15 minutes) +# Default: 90000 - (90 seconds) -SocketTimeOutTime = 900000 +SocketTimeOutTime = 90000 # # SessionAddDelay @@ -288,7 +288,7 @@ PlayerSave.Stats.SaveOnlyOnLogout = 1 # # mmap.enablePathFinding -# Description: Enable/Disable pathfinding using mmaps - experimental. +# Description: Enable/Disable pathfinding using mmaps - recommended. # Default: 0 - (Disabled) # 1 - (Enabled) @@ -2034,9 +2034,9 @@ AutoBroadcast.Center = 0 # # AutoBroadcast.Timer # Description: Timer (in milliseconds) for auto broadcasts. -# Default: 60000 - (60 seconds) +# Default: 60000 - (10 minutes) -AutoBroadcast.Timer = 60000 +AutoBroadcast.Timer = 600000 # ################################################################################################### From 986c1e7d2a742ff4cd83154d967a4264cb85c441 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 5 Oct 2014 20:37:45 +0200 Subject: [PATCH 6/6] Update worldserver.conf.dist stupid mistake.... --- src/server/worldserver/worldserver.conf.dist | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index ecdc8cf4b98..ac307a254e9 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -230,9 +230,9 @@ GridUnload = 1 # SocketTimeOutTime # Description: Time (in milliseconds) after which a connection being idle on the character # selection screen is disconnected. -# Default: 90000 - (90 seconds) +# Default: 900000 - (15 minutes) -SocketTimeOutTime = 90000 +SocketTimeOutTime = 900000 # # SessionAddDelay @@ -266,9 +266,9 @@ ChangeWeatherInterval = 600000 # # PlayerSaveInterval # Description: Time (in milliseconds) for player save interval. -# Default: 900000 - (15 min) +# Default: 90000 - (90 seconds) -PlayerSaveInterval = 900000 +PlayerSaveInterval = 90000 # # PlayerSave.Stats.MinLevel