aboutsummaryrefslogtreecommitdiff
path: root/src/game/Level3.cpp
diff options
context:
space:
mode:
authorBrian <runningnak3d@gmail.com>2009-12-20 16:51:41 -0700
committerBrian <runningnak3d@gmail.com>2009-12-20 16:51:41 -0700
commitc4ac6323b0bb4eb9f4f1729ce2a63ab1a8ebd523 (patch)
treedcd9ed61403d11cad7482aac0220b15587411e23 /src/game/Level3.cpp
parent8a5df265c2d3e9e47464f172dd3d79efba748686 (diff)
* Added support for RepObjectiveFaction2 / RepObjectiveValue2 (opposite
* faction) IE: need to LOSE reputation with that faction. * Original patch by Brian / Ported to latest rev. by Kudlaty -- THANKS! --HG-- branch : trunk
Diffstat (limited to 'src/game/Level3.cpp')
-rw-r--r--src/game/Level3.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index 04705c880b4..e29c21c0bb2 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -5742,6 +5742,16 @@ bool ChatHandler::HandleQuestComplete(const char *args)
player->GetReputationMgr().SetReputation(factionEntry,repValue);
}
+ // If the quest requires a SECOND reputation to complete
+ if(uint32 repFaction = pQuest->GetRepObjectiveFaction2())
+ {
+ uint32 repValue2 = pQuest->GetRepObjectiveValue2();
+ uint32 curRep = player->GetReputationMgr().GetReputation(repFaction);
+ if(curRep < repValue2)
+ if(FactionEntry const *factionEntry = sFactionStore.LookupEntry(repFaction))
+ player->GetReputationMgr().SetReputation(factionEntry,repValue2);
+ }
+
// If the quest requires money
int32 ReqOrRewMoney = pQuest->GetRewOrReqMoney();
if(ReqOrRewMoney < 0)