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:
@@ -441,7 +441,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
|
||||
data << uint32(quest->GetRepObjectiveFaction()); // shown in quest log as part of quest objective
|
||||
data << uint32(quest->GetRepObjectiveValue()); // shown in quest log as part of quest objective
|
||||
|
||||
data << uint32(quest->GetRepObjectiveFaction2()); // shown in quest log as part of quest objective OPOSITE faction
|
||||
data << uint32(quest->GetRepObjectiveFaction2()); // shown in quest log as part of quest objective OPPOSITE faction
|
||||
data << uint32(quest->GetRepObjectiveValue2()); // shown in quest log as part of quest objective OPPOSITE faction
|
||||
|
||||
data << uint32(quest->GetNextQuestInChain()); // client will request this quest from NPC, if not 0
|
||||
|
||||
@@ -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