mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Entities: Reworked guid scopes
* Added ObjectGuid traits to easily access whether guid type can be generated globally (ObjectMgr) or not * This adds separate (per map) guid sequences depending on object type * Ported map object container from cmangos/mangos-wotlk@a2d396eb0b * Added type container visitor for TypeUnorderedMapContainer * Implemented helper function to erase unique pairs from multimap containers * Moved object storage of all objects except players and transports to map level * Added containers linking database spawn id with creature/gameobject in world * Renamed DBTableGuid to spawnId * Added a separate spawn id sequence generator for creatures and gameobjects - this will be used in db tables * Moved building SMSG_UPDATE_OBJECT - updatefields changes broadcast to map update
This commit is contained in:
33
sql/updates/characters/2015_04_28_00_characters.sql
Normal file
33
sql/updates/characters/2015_04_28_00_characters.sql
Normal file
@@ -0,0 +1,33 @@
|
||||
DELETE FROM `corpse` WHERE `corpseType`=0;
|
||||
|
||||
DROP PROCEDURE IF EXISTS `CheckCorpseData`;
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE PROCEDURE CheckCorpseData()
|
||||
BEGIN
|
||||
DECLARE max_corpses_per_player int;
|
||||
SELECT MAX(`counts`) FROM (SELECT COUNT(`corpseGuid`) AS `counts` FROM `corpse` GROUP BY `guid`) AS `counted` INTO max_corpses_per_player;
|
||||
|
||||
IF max_corpses_per_player > 50000 THEN
|
||||
TRUNCATE `corpse`;
|
||||
END IF;
|
||||
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
||||
CALL CheckCorpseData();
|
||||
DROP PROCEDURE `CheckCorpseData`;
|
||||
|
||||
ALTER TABLE `corpse`
|
||||
DROP `corpseGuid`,
|
||||
DROP INDEX `idx_player`,
|
||||
ADD PRIMARY KEY (`guid`);
|
||||
|
||||
ALTER TABLE `corpse_phases`
|
||||
DROP PRIMARY KEY,
|
||||
DROP `Guid`,
|
||||
DROP `CorpseType`,
|
||||
DROP `Time`,
|
||||
CHANGE `OwnerGuid` `OwnerGuid` bigint(20) unsigned NOT NULL DEFAULT '0' FIRST,
|
||||
ADD PRIMARY KEY (`OwnerGuid`,`PhaseId`);
|
||||
Reference in New Issue
Block a user