Core/DBLayer: Prevent using prepared statements on wrong database

This commit is contained in:
Shauren authored and Ovahlord committed 2020-04-15 19:18:58 +02:00
1 parent eaee7b3cfa
commit d003ebd8e4
98 files changed
+569 -541

No files matched your search

@@ -903,7 +903,7 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask)
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);
@@ -1023,7 +1023,7 @@ bool GameObject::LoadFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap
// delete data from memory
sObjectMgr->DeleteGameObjectData(spawnId);
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_GAMEOBJECT);
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_GAMEOBJECT);
stmt->setUInt32(0, spawnId);
trans->Append(stmt);