mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
* 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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user