feat(Core/Database): port TrinityCore database API (#5611)
This commit is contained in:
parent
2a2e54d8c5
commit
9ac6fddcae
155 changed files with 5818 additions and 4321 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue