Jump to content
Sign in to follow this  
darksoke

Trinitycore gameobject/creatures fix guids

Recommended Posts

If you've done a heavy world build spawning and deleting creatures and gameobjects maybe your guids in CHARACTER / GAMEOBJECT table wen't crazzy well here is a little querry wich will do a rearrangement for you witouth affecting the default Blizz guides

DROP TABLE IF EXISTS `gameobject_temp`;
CREATE TABLE `gameobject_temp` (
`guid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Global Unique Identifier',
`id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Gameobject Identifier',
`map` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Map Identifier',
`spawnMask` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
`phaseMask` INT(10) UNSIGNED NOT NULL DEFAULT '1',
`position_x` FLOAT NOT NULL DEFAULT '0',
`position_y` FLOAT NOT NULL DEFAULT '0',
`position_z` FLOAT NOT NULL DEFAULT '0',
`orientation` FLOAT NOT NULL DEFAULT '0',
`rotation0` FLOAT NOT NULL DEFAULT '0',
`rotation1` FLOAT NOT NULL DEFAULT '0',
`rotation2` FLOAT NOT NULL DEFAULT '0',
`rotation3` FLOAT NOT NULL DEFAULT '0',
`spawntimesecs` INT(11) NOT NULL DEFAULT '0',
`animprogress` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
`state` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
`VerifiedBuild` SMALLINT(5) NULL DEFAULT '0',
PRIMARY KEY (`guid`)
)
COMMENT='Gameobject System'
COLLATE='utf8_general_ci'
ENGINE=MyISAM
ROW_FORMAT=FIXED
AUTO_INCREMENT=164235
;
REPLACE INTO `gameobject_temp` (`id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) select `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild` from gameobject WHERE `guid` > 164234;
DELETE FROM `gameobject` WHERE `guid` > 164234;
REPLACE INTO `gameobject` SELECT * FROM `gameobject_temp`;
DROP TABLE IF EXISTS `gameobject_temp`;
SELECT * FROM `gameobject` ORDER BY `guid` DESC LIMIT 1;

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

About us

MMO-Society is the Forum former known as Lordcraft, MMO-Society offers various of Resources to help you evolve your knowledge within Emulation, In the process we make sure to form a strong community bond in-between each other and thus we are proud to can admit that MMO-Society is possibly the friendliest Community Forum to currently exist.

Useful Quick-Links

×
×
  • Create New...