mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Instance: stop updating the instance resettimes based on creature respawns
- Rather update normal instance reset time to 2 hours after last creature kill
- This fixes yet another integer overflow due to the possibility of having time_t max showing up
- Also change respawntime and resettime fields to bigint on respawn/instance related tables
- Start using prepared statements on the InstanceSaveMgr
(cherry picked from commit 4c593f12ca)
This commit is contained in:
@@ -1895,7 +1895,7 @@ DROP TABLE IF EXISTS `creature_respawn`;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `creature_respawn` (
|
||||
`guid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier',
|
||||
`respawnTime` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`respawnTime` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`mapId` smallint(10) unsigned NOT NULL DEFAULT '0',
|
||||
`instanceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Instance Identifier',
|
||||
PRIMARY KEY (`guid`,`instanceId`),
|
||||
@@ -1969,7 +1969,7 @@ DROP TABLE IF EXISTS `gameobject_respawn`;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `gameobject_respawn` (
|
||||
`guid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier',
|
||||
`respawnTime` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`respawnTime` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`mapId` smallint(10) unsigned NOT NULL DEFAULT '0',
|
||||
`instanceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Instance Identifier',
|
||||
PRIMARY KEY (`guid`,`instanceId`),
|
||||
@@ -2616,7 +2616,7 @@ DROP TABLE IF EXISTS `instance`;
|
||||
CREATE TABLE `instance` (
|
||||
`id` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`map` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`resettime` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`resettime` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`difficulty` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`completedEncounters` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`data` tinytext NOT NULL,
|
||||
@@ -2647,7 +2647,7 @@ DROP TABLE IF EXISTS `instance_reset`;
|
||||
CREATE TABLE `instance_reset` (
|
||||
`mapid` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`difficulty` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`resettime` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`resettime` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`mapid`,`difficulty`),
|
||||
KEY `difficulty` (`difficulty`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
@@ -3773,7 +3773,8 @@ INSERT INTO `updates` VALUES
|
||||
('2020_04_20_00_characters.sql','977B5E0C894E0A7E80B2A9626F17CA636A69BD22','RELEASED','2020-04-20 19:08:18',0),
|
||||
('2020_04_24_00_characters.sql','85E2E0395A9457A53D73A9E0A7BB39B7E4C429BF','RELEASED','2020-04-24 22:04:59',0),
|
||||
('2020_04_25_00_characters_2017_04_03_00_characters.sql','00FA3EFADAF807AC96619A3FE47216E21C3FCB19','RELEASED','2020-04-25 00:00:00',0),
|
||||
('2020_04_26_00_characters_2017_04_12_00_characters.sql','86AA94DA9B1EA283101100886C10F648C0CE6494','RELEASED','2020-04-26 00:00:00',0);
|
||||
('2020_04_26_00_characters_2017_04_12_00_characters.sql','86AA94DA9B1EA283101100886C10F648C0CE6494','RELEASED','2020-04-26 00:00:00',0),
|
||||
('2020_04_26_01_characters_2017_04_12_01_characters.sql','5A8A1215E3A2356722F52CD7A64BBE03D21FBEA3','RELEASED','2020-04-26 00:00:00',0);
|
||||
|
||||
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE `creature_respawn` CHANGE `respawnTime` `respawnTime` bigint(20) unsigned NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `gameobject_respawn` CHANGE `respawnTime` `respawnTime` bigint(20) unsigned NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `instance` CHANGE `resettime` `resettime` bigint(20) unsigned NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `instance_reset` CHANGE `resettime` `resettime` bigint(20) unsigned NOT NULL DEFAULT '0';
|
||||
Reference in New Issue
Block a user