From e405ac5f4100cf9e544b80cf4503b107ecee8d50 Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 20 Jul 2016 13:27:04 +0200 Subject: Fixed nopch build and some leftover warnings --- src/server/game/Reputation/ReputationMgr.cpp | 10 ++++++++++ src/server/game/Reputation/ReputationMgr.h | 13 +++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'src/server/game/Reputation') diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index 46ceb14df3d..0a191b5f3f1 100644 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -45,6 +45,11 @@ ReputationRank ReputationMgr::ReputationToRank(int32 standing) return MIN_REPUTATION_RANK; } +FactionState const* ReputationMgr::GetState(FactionEntry const* factionEntry) const +{ + return factionEntry->CanHaveReputation() ? GetState(factionEntry->ReputationIndex) : NULL; +} + bool ReputationMgr::IsAtWar(uint32 faction_id) const { FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction_id); @@ -127,6 +132,11 @@ ReputationRank ReputationMgr::GetBaseRank(FactionEntry const* factionEntry) cons return ReputationToRank(reputation); } +ReputationRank const* ReputationMgr::GetForcedRankIfAny(FactionTemplateEntry const* factionTemplateEntry) const +{ + return GetForcedRankIfAny(factionTemplateEntry->Faction); +} + void ReputationMgr::ApplyForceReaction(uint32 faction_id, ReputationRank rank, bool apply) { if (apply) diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h index 3486a533d54..301f8833cce 100644 --- a/src/server/game/Reputation/ReputationMgr.h +++ b/src/server/game/Reputation/ReputationMgr.h @@ -25,6 +25,9 @@ #include "QueryResult.h" #include +struct FactionEntry; +struct FactionTemplateEntry; + static uint32 ReputationRankStrIndex[MAX_REPUTATION_RANK] = { LANG_REP_HATED, LANG_REP_HOSTILE, LANG_REP_UNFRIENDLY, LANG_REP_NEUTRAL, @@ -83,10 +86,7 @@ class TC_GAME_API ReputationMgr FactionStateList const& GetStateList() const { return _factions; } - FactionState const* GetState(FactionEntry const* factionEntry) const - { - return factionEntry->CanHaveReputation() ? GetState(factionEntry->ReputationIndex) : NULL; - } + FactionState const* GetState(FactionEntry const* factionEntry) const; FactionState const* GetState(RepListID id) const { @@ -108,10 +108,7 @@ class TC_GAME_API ReputationMgr return ReputationRankStrIndex[GetRank(factionEntry)]; }; - ReputationRank const* GetForcedRankIfAny(FactionTemplateEntry const* factionTemplateEntry) const - { - return GetForcedRankIfAny(factionTemplateEntry->Faction); - } + ReputationRank const* GetForcedRankIfAny(FactionTemplateEntry const* factionTemplateEntry) const; ReputationRank const* GetForcedRankIfAny(uint32 factionId) const { -- cgit v1.2.3