mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/Scripts: multiple changes
- fixed non pch build - fixed some warnings - fixed some coverity issues - some random things here and there
This commit is contained in:
@@ -243,7 +243,7 @@ void ReputationMgr::Initialize()
|
||||
{
|
||||
FactionEntry const* factionEntry = sFactionStore.LookupEntry(i);
|
||||
|
||||
if (factionEntry && (factionEntry->ReputationIndex >= 0))
|
||||
if (factionEntry && factionEntry->CanHaveReputation())
|
||||
{
|
||||
FactionState newFaction;
|
||||
newFaction.ID = factionEntry->ID;
|
||||
@@ -395,7 +395,7 @@ void ReputationMgr::SetVisible(FactionTemplateEntry const* factionTemplateEntry)
|
||||
|
||||
void ReputationMgr::SetVisible(FactionEntry const* factionEntry)
|
||||
{
|
||||
if (factionEntry->ReputationIndex < 0)
|
||||
if (!factionEntry->CanHaveReputation())
|
||||
return;
|
||||
|
||||
FactionStateList::iterator itr = _factions.find(factionEntry->ReputationIndex);
|
||||
@@ -499,7 +499,7 @@ void ReputationMgr::LoadFromDB(PreparedQueryResult result)
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
FactionEntry const* factionEntry = sFactionStore.LookupEntry(fields[0].GetUInt16());
|
||||
if (factionEntry && (factionEntry->ReputationIndex >= 0))
|
||||
if (factionEntry && factionEntry->CanHaveReputation())
|
||||
{
|
||||
FactionState* faction = &_factions[factionEntry->ReputationIndex];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user