mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Quest/Condition
* fix quest display for reputation restricted quests * also check sources from externaly added conditions
This commit is contained in:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user