mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
feat(Core/DBLayer): replace char const* to std::string_view (#10211)
* feat(Core/DBLayer): replace `char const*` to `std::string_view` * CString * 1 * chore(Core/Misc): code cleanup * cl * db fix * fmt style sql * to fmt * py * del old * 1 * 2 * 3 * 1 * 1
This commit is contained in:
@@ -1017,33 +1017,33 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask, bool
|
||||
uint8 index = 0;
|
||||
|
||||
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_GAMEOBJECT);
|
||||
stmt->setUInt32(0, m_spawnId);
|
||||
stmt->SetData(0, m_spawnId);
|
||||
trans->Append(stmt);
|
||||
|
||||
stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_GAMEOBJECT);
|
||||
stmt->setUInt32(index++, m_spawnId);
|
||||
stmt->setUInt32(index++, GetEntry());
|
||||
stmt->setUInt16(index++, uint16(mapid));
|
||||
stmt->setUInt8(index++, spawnMask);
|
||||
stmt->setUInt32(index++, GetPhaseMask());
|
||||
stmt->setFloat(index++, GetPositionX());
|
||||
stmt->setFloat(index++, GetPositionY());
|
||||
stmt->setFloat(index++, GetPositionZ());
|
||||
stmt->setFloat(index++, GetOrientation());
|
||||
stmt->setFloat(index++, m_localRotation.x);
|
||||
stmt->setFloat(index++, m_localRotation.y);
|
||||
stmt->setFloat(index++, m_localRotation.z);
|
||||
stmt->setFloat(index++, m_localRotation.w);
|
||||
stmt->setInt32(index++, int32(m_respawnDelayTime));
|
||||
stmt->setUInt8(index++, GetGoAnimProgress());
|
||||
stmt->setUInt8(index++, uint8(GetGoState()));
|
||||
stmt->SetData(index++, m_spawnId);
|
||||
stmt->SetData(index++, GetEntry());
|
||||
stmt->SetData(index++, uint16(mapid));
|
||||
stmt->SetData(index++, spawnMask);
|
||||
stmt->SetData(index++, GetPhaseMask());
|
||||
stmt->SetData(index++, GetPositionX());
|
||||
stmt->SetData(index++, GetPositionY());
|
||||
stmt->SetData(index++, GetPositionZ());
|
||||
stmt->SetData(index++, GetOrientation());
|
||||
stmt->SetData(index++, m_localRotation.x);
|
||||
stmt->SetData(index++, m_localRotation.y);
|
||||
stmt->SetData(index++, m_localRotation.z);
|
||||
stmt->SetData(index++, m_localRotation.w);
|
||||
stmt->SetData(index++, int32(m_respawnDelayTime));
|
||||
stmt->SetData(index++, GetGoAnimProgress());
|
||||
stmt->SetData(index++, uint8(GetGoState()));
|
||||
trans->Append(stmt);
|
||||
|
||||
if (saveAddon && !sObjectMgr->GetGameObjectAddon(m_spawnId))
|
||||
{
|
||||
index = 0;
|
||||
stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_GAMEOBJECT_ADDON);
|
||||
stmt->setUInt32(index++, m_spawnId);
|
||||
stmt->SetData(index++, m_spawnId);
|
||||
trans->Append(stmt);
|
||||
}
|
||||
|
||||
@@ -1121,11 +1121,11 @@ void GameObject::DeleteFromDB()
|
||||
sObjectMgr->DeleteGOData(m_spawnId);
|
||||
|
||||
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_GAMEOBJECT);
|
||||
stmt->setUInt32(0, m_spawnId);
|
||||
stmt->SetData(0, m_spawnId);
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_EVENT_GAMEOBJECT);
|
||||
stmt->setUInt32(0, m_spawnId);
|
||||
stmt->SetData(0, m_spawnId);
|
||||
WorldDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user