Each time any creature is made (snake traps’s snakes, someone resummons pet, mirror images) it’s increase in creature guid for currently running server.
If you add npc to world (.npc add) you get lastest guid, witch is next guid after last creature created and it’s saved to DB with this guid = gap.
If you consider that engineering dragon spam, then huge numbers are really easy to achieve
[CODE]“count(guid)”;“max(guid)”;“avg(guid)”
“1799”;“3171423”;“34641.4319”[/CODE]My creature table. As you can see- last added npc has guid 3kk over average
This is for older revision, but you will get the idea:
[CODE]DROP TABLE IF EXISTS creature_overflow_backup
;
ALTER TABLE creature
RENAME TO creature_overflow_backup
;
CREATE TABLE creature
LIKE creature_overflow_backup
;
INSERT INTO creature
(id
, map
, spawnMask
, phaseMask
, modelid
, equipment_id
, position_x
, position_y
, position_z
, orientation
, spawntimesecs
, spawndist
, currentwaypoint
, curhealth
, curmana
, DeathState
, MovementType
, npcflag
, unit_flags
, dynamicflags
) SELECT id
, map
, spawnMask
, phaseMask
, modelid
, equipment_id
, position_x
, position_y
, position_z
, orientation
, spawntimesecs
, spawndist
, currentwaypoint
, curhealth
, curmana
, DeathState
, MovementType
, npcflag
, unit_flags
, dynamicflags
FROM creature_overflow_backup
;[/CODE]Server, of course, must be offline
P.S.
Should implement overflow protection: on server startup check max(guid) in all those tables (creature, item_instance, gameobject) and if it’s bigger than 0x0FFFFFFF or so, then pack it back together