mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(DB): set game_event_* tables to use smallint (#22309)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
--
|
||||
ALTER TABLE `game_event_creature` MODIFY COLUMN `eventEntry` smallint NOT NULL COMMENT 'Entry of the game event. Put negative entry to remove during event.';
|
||||
ALTER TABLE `game_event_gameobject` MODIFY COLUMN `eventEntry` smallint NOT NULL COMMENT 'Entry of the game event. Put negative entry to remove during event.';
|
||||
ALTER TABLE `game_event_model_equip` MODIFY COLUMN `eventEntry` tinyint unsigned NOT NULL COMMENT 'Entry of the game event.';
|
||||
ALTER TABLE `game_event_npc_vendor` MODIFY COLUMN `eventEntry` smallint NOT NULL COMMENT 'Entry of the game event.';
|
||||
ALTER TABLE `game_event_pool` MODIFY COLUMN `eventEntry` smallint NOT NULL COMMENT 'Entry of the game event. Put negative entry to remove during event.';
|
||||
@@ -512,7 +512,7 @@ void GameEventMgr::LoadEventCreatureData()
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
ObjectGuid::LowType guid = fields[0].Get<uint32>();
|
||||
int16 eventId = fields[1].Get<int8>();
|
||||
int16 eventId = fields[1].Get<int16>();
|
||||
|
||||
CreatureData const* data = sObjectMgr->GetCreatureData(guid);
|
||||
if (!data)
|
||||
@@ -562,7 +562,7 @@ void GameEventMgr::LoadEventGameObjectData()
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
ObjectGuid::LowType guid = fields[0].Get<uint32>();
|
||||
int16 eventId = fields[1].Get<int8>();
|
||||
int16 eventId = fields[1].Get<int16>();
|
||||
|
||||
int32 internal_event_id = _gameEvent.size() + eventId - 1;
|
||||
|
||||
@@ -1020,7 +1020,7 @@ void GameEventMgr::LoadEventPoolData()
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
uint32 entry = fields[0].Get<uint32>();
|
||||
int16 eventId = fields[1].Get<int8>();
|
||||
int16 eventId = fields[1].Get<int16>();
|
||||
|
||||
int32 internal_event_id = _gameEvent.size() + eventId - 1;
|
||||
|
||||
|
||||
@@ -2317,7 +2317,7 @@ void ObjectMgr::LoadCreatures()
|
||||
data.movementType = fields[15].Get<uint8>();
|
||||
data.spawnMask = fields[16].Get<uint8>();
|
||||
data.phaseMask = fields[17].Get<uint32>();
|
||||
int16 gameEvent = fields[18].Get<int8>();
|
||||
int16 gameEvent = fields[18].Get<int16>();
|
||||
uint32 PoolId = fields[19].Get<uint32>();
|
||||
data.npcflag = fields[20].Get<uint32>();
|
||||
data.unit_flags = fields[21].Get<uint32>();
|
||||
@@ -2709,7 +2709,7 @@ void ObjectMgr::LoadGameobjects()
|
||||
LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: {} Entry: {}) that has wrong spawn mask {} including not supported difficulty modes for map (Id: {}), skip", guid, data.id, data.spawnMask, data.mapid);
|
||||
|
||||
data.phaseMask = fields[15].Get<uint32>();
|
||||
int16 gameEvent = fields[16].Get<int8>();
|
||||
int16 gameEvent = fields[16].Get<int16>();
|
||||
uint32 PoolId = fields[17].Get<uint32>();
|
||||
|
||||
if (data.rotation.x < -1.0f || data.rotation.x > 1.0f)
|
||||
|
||||
Reference in New Issue
Block a user