diff options
author | Wyrserth <wyrserth@protonmail.com> | 2019-07-03 16:09:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-03 16:09:21 +0200 |
commit | 858fa4d2ddab47a52fe98ff3b4b7f15c1a9b00e1 (patch) | |
tree | 5bab889427e761b03321eb0a682f514f6d06dece /src/server/game/Reputation/ReputationMgr.cpp | |
parent | f05891405ab40502cfa67fdcff0edb1391ff8719 (diff) |
Core/Reputation: don't allow quests to reward Honor Hold/Alliance Vanguard reputation to Horde players or Thrallmar reputation to Alliance players (#23552)
Diffstat (limited to 'src/server/game/Reputation/ReputationMgr.cpp')
-rw-r--r-- | src/server/game/Reputation/ReputationMgr.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index b565d31dd3d..b870f408019 100644 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -67,6 +67,21 @@ bool ReputationMgr::IsAtWar(FactionEntry const* factionEntry) const return false; } +bool ReputationMgr::IsReputationAllowedForTeam(TeamId team, uint32 factionId) const +{ + // @hack some quests give reputation to Alliance-only AND Horde-only factions, but DBC data does not allow to identify faction-only reputations + if (team == TEAM_HORDE && ( + factionId == 1037 || // Alliance Vanguard + factionId == 946)) // Honor Hold + return false; + + if (team == TEAM_ALLIANCE && + factionId == 947) // Thrallmar + return false; + + return true; +} + int32 ReputationMgr::GetReputation(uint32 faction_id) const { FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction_id); |