Core/Misc: Various dynspawn cleanup and refactors split off from pooling rewrite:
- Map::RemoveRespawnTime(SpawnObjectType, LowType, doRespawn) split into Map::Respawn and Map::RemoveRespawnTime, without the extra boolean - Map::RemoveRespawnTime(RespawnInfo*) merged into Map::DeleteRespawnInfo(RespawnInfo*) and is now private - Map::DeleteRespawnInfo(void) renamed to Map::UnloadAllRespawnInfos to properly describe what it does - Map::ProcessRespawns now actually saves the delayed respawn time to DB if the respawn was delayed - Map::AddRespawnInfo now takes const reference, and returns success as a boolean - Map::AddRespawnInfo no longer offers an unused "replace" parameter - Map::DeleteRespawnInfo no longer offers a variety of unused private overloads - Map::SaveRespawnTime no longer offers a tantalizing writeDB parameter. Parameter is now called "startup" to properly describe what it does. - Map::SaveRespawnInfoDB now takes RespawnInfo reference instead of all the various fields. Still public because compatibility mode. QQ. - Map::GetWorldObjectBySpawnId sanitized - Map::GetXRespawnTime methods sanitized to all go through Map::GetRespawnTime ---------- Core/DB: Unify `creature_respawn` and `gameobject_respawn` into a single `respawn` table
This commit is contained in:
1 parent
f9184f026b
commit
90540d684b
15 files changed
+184
-236
No files matched your search
@@ -0,0 +1,20 @@
|
||||
--
|
||||
DROP TABLE IF EXISTS `respawn`;
|
||||
CREATE TABLE `respawn` (
|
||||
`type` smallint(10) unsigned NOT NULL,
|
||||
`spawnId` int(10) unsigned NOT NULL,
|
||||
`respawnTime` bigint(20) unsigned NOT NULL,
|
||||
`mapId` smallint(10) unsigned NOT NULL,
|
||||
`instanceId` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`type`,`spawnId`,`instanceId`),
|
||||
KEY `idx_instance` (`instanceId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stored respawn times';
|
||||
|
||||
INSERT INTO `respawn` (`type`,`spawnId`,`respawnTime`,`mapId`,`instanceId`)
|
||||
SELECT 0 as `type`,`guid`,`respawnTime`,`mapId`,`instanceId` FROM `creature_respawn`;
|
||||
|
||||
INSERT INTO `respawn` (`type`,`spawnId`,`respawnTime`,`mapId`,`instanceId`)
|
||||
SELECT 1 as `type`,`guid`,`respawnTime`,`mapId`,`instanceId` FROM `gameobject_respawn`;
|
||||
|
||||
DROP TABLE `creature_respawn`;
|
||||
DROP TABLE `gameobject_respawn`;
|
||||
Reference in new issue
Block a user