From c4ac6323b0bb4eb9f4f1729ce2a63ab1a8ebd523 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 20 Dec 2009 16:51:41 -0700 Subject: * 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 --- src/game/Level3.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/game/Level3.cpp') 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) -- cgit v1.2.3