Core/Quests: Fix quests with RepObjective2 set. Closes #2901.
Misc: Correct a file name, move a spell error to error log and a small typo in trinity_string
This commit is contained in:
@@ -14630,10 +14630,6 @@ bool Player::CanCompleteQuest(uint32 quest_id)
|
||||
if (repFacId && GetReputationMgr().GetReputation(repFacId) < qInfo->GetRepObjectiveValue())
|
||||
return false;
|
||||
|
||||
uint32 repFacId2 = qInfo->GetRepObjectiveFaction2();
|
||||
if (repFacId2 && GetReputationMgr().GetReputation(repFacId2) < qInfo->GetRepObjectiveValue2())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -15266,6 +15262,16 @@ bool Player::SatisfyQuestReputation(Quest const* qInfo, bool msg)
|
||||
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
|
||||
return false;
|
||||
}
|
||||
|
||||
// ReputationObjective2 does not seem to be an objective requirement but a requirement
|
||||
// to be able to accept the quest
|
||||
uint32 fIdObj = qInfo->GetRepObjectiveFaction2();
|
||||
if (fIdObj && GetReputationMgr().GetReputation(fIdObj) >= qInfo->GetRepObjectiveValue2())
|
||||
{
|
||||
if (msg)
|
||||
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user