aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Reputation/ReputationMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Reputation/ReputationMgr.cpp')
-rw-r--r--src/server/game/Reputation/ReputationMgr.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 79afb239bbe..7e91191f413 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -452,7 +452,7 @@ void ReputationMgr::SetInactive(FactionState* faction, bool inactive)
faction->Changed = true;
}
-void ReputationMgr::LoadFromDB(QueryResult result)
+void ReputationMgr::LoadFromDB(PreparedQueryResult result)
{
// Set initial reputations (so everything is nifty before DB data load)
Initialize();
@@ -463,23 +463,21 @@ void ReputationMgr::LoadFromDB(QueryResult result)
{
do
{
- Field *fields = result->Fetch();
-
- FactionEntry const *factionEntry = sFactionStore.LookupEntry(fields[0].GetUInt32());
+ FactionEntry const *factionEntry = sFactionStore.LookupEntry(result->GetUInt32(0));
if (factionEntry && (factionEntry->reputationListID >= 0))
{
FactionState* faction = &m_factions[factionEntry->reputationListID];
// update standing to current
- faction->Standing = int32(fields[1].GetUInt32());
+ faction->Standing = int32(result->GetUInt32(1));
// update counters
int32 BaseRep = GetBaseReputation(factionEntry);
ReputationRank old_rank = ReputationToRank(BaseRep);
ReputationRank new_rank = ReputationToRank(BaseRep + faction->Standing);
- UpdateRankCounters(old_rank,new_rank);
+ UpdateRankCounters(old_rank, new_rank);
- uint32 dbFactionFlags = fields[2].GetUInt32();
+ uint32 dbFactionFlags = result->GetUInt32(2);
if (dbFactionFlags & FACTION_FLAG_VISIBLE)
SetVisible(faction); // have internal checks for forced invisibility