mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 08:16:08 +00:00
feat(Core/Database): port TrinityCore database API (#5611)
This commit is contained in:
@@ -561,13 +561,13 @@ void ReputationMgr::LoadFromDB(PreparedQueryResult result)
|
||||
}
|
||||
}
|
||||
|
||||
void ReputationMgr::SaveToDB(SQLTransaction& trans)
|
||||
void ReputationMgr::SaveToDB(CharacterDatabaseTransaction trans)
|
||||
{
|
||||
for (FactionStateList::iterator itr = _factions.begin(); itr != _factions.end(); ++itr)
|
||||
{
|
||||
if (itr->second.needSave)
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_REPUTATION_BY_FACTION);
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_REPUTATION_BY_FACTION);
|
||||
stmt->setUInt32(0, _player->GetGUID().GetCounter());
|
||||
stmt->setUInt16(1, uint16(itr->second.ID));
|
||||
trans->Append(stmt);
|
||||
|
||||
@@ -56,7 +56,7 @@ public: // constructors and glob
|
||||
_visibleFactionCount(0), _honoredFactionCount(0), _reveredFactionCount(0), _exaltedFactionCount(0), _sendFactionIncreased(false) {}
|
||||
~ReputationMgr() {}
|
||||
|
||||
void SaveToDB(SQLTransaction& trans);
|
||||
void SaveToDB(CharacterDatabaseTransaction trans);
|
||||
void LoadFromDB(PreparedQueryResult result);
|
||||
public: // statics
|
||||
static const int32 PointsInRank[MAX_REPUTATION_RANK];
|
||||
|
||||
Reference in New Issue
Block a user