feat(Core/Database): port TrinityCore database API (#5611)

This commit is contained in:
Kargatum
2021-06-22 11:21:07 +07:00
committed by GitHub
parent 2a2e54d8c5
commit 9ac6fddcae
155 changed files with 5818 additions and 4321 deletions

View File

@@ -87,7 +87,7 @@ bool Bag::Create(ObjectGuid::LowType guidlow, uint32 itemid, Player const* owner
return true;
}
void Bag::SaveToDB(SQLTransaction& trans)
void Bag::SaveToDB(CharacterDatabaseTransaction trans)
{
Item::SaveToDB(trans);
}
@@ -110,7 +110,7 @@ bool Bag::LoadFromDB(ObjectGuid::LowType guid, ObjectGuid owner_guid, Field* fie
return true;
}
void Bag::DeleteFromDB(SQLTransaction& trans)
void Bag::DeleteFromDB(CharacterDatabaseTransaction trans)
{
for (uint8 i = 0; i < MAX_BAG_SIZE; ++i)
if (m_bagslot[i])

View File

@@ -39,11 +39,11 @@ public:
// DB operations
// overwrite virtual Item::SaveToDB
void SaveToDB(SQLTransaction& trans) override;
void SaveToDB(CharacterDatabaseTransaction trans) override;
// overwrite virtual Item::LoadFromDB
bool LoadFromDB(ObjectGuid::LowType guid, ObjectGuid owner_guid, Field* fields, uint32 entry) override;
// overwrite virtual Item::DeleteFromDB
void DeleteFromDB(SQLTransaction& trans) override;
void DeleteFromDB(CharacterDatabaseTransaction trans) override;
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const override;