Quest/Condition
* fix quest display for reputation restricted quests * also check sources from externaly added conditions
This commit is contained in:
parent
337eddcc0b
commit
4fe930cdca
2 changed files with 5 additions and 2 deletions
|
|
@ -288,6 +288,9 @@ class Conditions
|
|||
while (substr_count($groupKey, ':') < 3)
|
||||
$groupKey .= ':0'; // pad with missing srcEntry, SrcId, cndTarget to group key
|
||||
|
||||
if (!$this->prepareSource($srcType, ...explode(':', $groupKey)))
|
||||
return;
|
||||
|
||||
if ($c = $this->prepareCondition($cId, $cVal1, $cVal2, $cVal3))
|
||||
{
|
||||
if ($orGroup)
|
||||
|
|
|
|||
|
|
@ -1028,10 +1028,10 @@ class QuestPage extends GenericPage
|
|||
->prepare();
|
||||
|
||||
if ($_ = $this->subject->getField('reqMinRepFaction'))
|
||||
$cnd->addExternalCondition(Conditions::SRC_QUEST_AVAILABLE, $this->typeId, [Conditions::REPUTATION_RANK, $_, 1 << Game::getReputationLevelForPoints($this->subject->getField('reqMinRepValue'))]);
|
||||
$cnd->addExternalCondition(Conditions::SRC_QUEST_AVAILABLE, '0:'.$this->typeId, [Conditions::REPUTATION_RANK, $_, 1 << Game::getReputationLevelForPoints($this->subject->getField('reqMinRepValue'))]);
|
||||
|
||||
if ($_ = $this->subject->getField('reqMaxRepFaction'))
|
||||
$cnd->addExternalCondition(Conditions::SRC_QUEST_AVAILABLE, $this->typeId, [-Conditions::REPUTATION_RANK, $_, 1 << Game::getReputationLevelForPoints($this->subject->getField('reqMaxRepValue'))]);
|
||||
$cnd->addExternalCondition(Conditions::SRC_QUEST_AVAILABLE, '0:'.$this->typeId, [-Conditions::REPUTATION_RANK, $_, 1 << Game::getReputationLevelForPoints($this->subject->getField('reqMaxRepValue'))]);
|
||||
|
||||
if ($tab = $cnd->toListviewTab())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue