Core/DBLayer: Prevent committing transactions started on a different database
This commit is contained in:
1 parent
d003ebd8e4
commit
47acc59f49
75 files changed
+406
-379
No files matched your search
@@ -3169,7 +3169,7 @@ void Map::DoRespawn(SpawnObjectType type, ObjectGuid::LowType spawnId, uint32 gr
|
||||
}
|
||||
}
|
||||
|
||||
void Map::Respawn(RespawnInfo* info, SQLTransaction dbTrans)
|
||||
void Map::Respawn(RespawnInfo* info, CharacterDatabaseTransaction dbTrans)
|
||||
{
|
||||
if (!CheckRespawn(info))
|
||||
{
|
||||
@@ -3248,7 +3248,7 @@ void Map::UnloadAllRespawnInfos() // delete everything from memory
|
||||
_gameObjectRespawnTimesBySpawnId.clear();
|
||||
}
|
||||
|
||||
void Map::DeleteRespawnInfo(RespawnInfo* info, SQLTransaction dbTrans)
|
||||
void Map::DeleteRespawnInfo(RespawnInfo* info, CharacterDatabaseTransaction dbTrans)
|
||||
{
|
||||
// Delete from all relevant containers to ensure consistency
|
||||
ASSERT(info);
|
||||
@@ -4397,7 +4397,7 @@ void Map::UpdateIteratorBack(Player* player)
|
||||
m_mapRefIter = m_mapRefIter->nocheck_prev();
|
||||
}
|
||||
|
||||
void Map::SaveRespawnTime(SpawnObjectType type, ObjectGuid::LowType spawnId, uint32 entry, time_t respawnTime, uint32 gridId, SQLTransaction dbTrans, bool startup)
|
||||
void Map::SaveRespawnTime(SpawnObjectType type, ObjectGuid::LowType spawnId, uint32 entry, time_t respawnTime, uint32 gridId, CharacterDatabaseTransaction dbTrans, bool startup)
|
||||
{
|
||||
if (!spawnId)
|
||||
return;
|
||||
@@ -4426,7 +4426,7 @@ void Map::SaveRespawnTime(SpawnObjectType type, ObjectGuid::LowType spawnId, uin
|
||||
SaveRespawnInfoDB(ri, dbTrans);
|
||||
}
|
||||
|
||||
void Map::SaveRespawnInfoDB(RespawnInfo const& info, SQLTransaction dbTrans)
|
||||
void Map::SaveRespawnInfoDB(RespawnInfo const& info, CharacterDatabaseTransaction dbTrans)
|
||||
{
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_RESPAWN);
|
||||
stmt->setUInt16(0, info.type);
|
||||
@@ -4598,7 +4598,7 @@ Corpse* Map::ConvertCorpseToBones(ObjectGuid const& ownerGuid, bool insignia /*=
|
||||
RemoveCorpse(corpse);
|
||||
|
||||
// remove corpse from DB
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
corpse->DeleteFromDB(trans);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
|
||||
Reference in new issue
Block a user