* 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
This commit is contained in:
Brian
2009-12-20 16:51:41 -07:00
parent 8a5df265c2
commit c4ac6323b0
9 changed files with 148 additions and 76 deletions

View File

@@ -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)