diff options
author | QAston <qaston@gmail.com> | 2011-09-15 17:44:03 +0200 |
---|---|---|
committer | QAston <qaston@gmail.com> | 2011-09-15 17:44:03 +0200 |
commit | e07535c3e3b9df05c894557b675ccf95bf7a622b (patch) | |
tree | 69af39ede1eb45c822abd0a293b281192208962b /src/server/game/Reputation/ReputationMgr.h | |
parent | af05915b9e36497eda8f2f061c29ffee0c8042b6 (diff) |
Core/Entities: Add new functions: Unit::GetReactionTo and Unit::GetFactionReactionTo for more direct reaction checks than Unit::IsFriendly/HostileTo (those functions have many duplicated code and have many checks unrelated to unit reaction).
Diffstat (limited to 'src/server/game/Reputation/ReputationMgr.h')
-rwxr-xr-x | src/server/game/Reputation/ReputationMgr.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h index bb22f46585a..59ec826f0c5 100755 --- a/src/server/game/Reputation/ReputationMgr.h +++ b/src/server/game/Reputation/ReputationMgr.h @@ -86,7 +86,7 @@ class ReputationMgr FactionState const* GetState(FactionEntry const* factionEntry) const { - return factionEntry->reputationListID >= 0 ? GetState(factionEntry->reputationListID) : NULL; + return factionEntry->CanHaveReputation() ? GetState(factionEntry->reputationListID) : NULL; } FactionState const* GetState(RepListID id) const @@ -95,6 +95,9 @@ class ReputationMgr return repItr != m_factions.end() ? &repItr->second : NULL; } + bool IsAtWar(uint32 faction_id) const; + bool IsAtWar(FactionEntry const* factionEntry) const; + int32 GetReputation(uint32 faction_id) const; int32 GetReputation(FactionEntry const* factionEntry) const; int32 GetBaseReputation(FactionEntry const* factionEntry) const; |