mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 09:39:11 +00:00
feat(Core/Database): port TrinityCore database API (#5611)
This commit is contained in:
@@ -885,11 +885,11 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask, bool
|
||||
data.artKit = GetGoArtKit();
|
||||
|
||||
// Update in DB
|
||||
SQLTransaction trans = WorldDatabase.BeginTransaction();
|
||||
WorldDatabaseTransaction trans = WorldDatabase.BeginTransaction();
|
||||
|
||||
uint8 index = 0;
|
||||
|
||||
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_GAMEOBJECT);
|
||||
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_GAMEOBJECT);
|
||||
stmt->setUInt32(0, m_spawnId);
|
||||
trans->Append(stmt);
|
||||
|
||||
@@ -993,7 +993,7 @@ void GameObject::DeleteFromDB()
|
||||
GetMap()->RemoveGORespawnTime(m_spawnId);
|
||||
sObjectMgr->DeleteGOData(m_spawnId);
|
||||
|
||||
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_GAMEOBJECT);
|
||||
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_GAMEOBJECT);
|
||||
stmt->setUInt32(0, m_spawnId);
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user