diff --git a/includes/basetype.class.php b/includes/basetype.class.php index 114aa089..b919d940 100644 --- a/includes/basetype.class.php +++ b/includes/basetype.class.php @@ -774,14 +774,6 @@ trait profilerHelper } } -/* - roight! - just noticed, that the filters on pages originally pointed to ?filter= - wich probably checked for correctness of inputs and redirected the correct values as a get-request - .. - well, as it is now, its working .. and you never change a running system .. -*/ - abstract class Filter { private static $wCards = ['*' => '%', '?' => '_']; @@ -1143,7 +1135,7 @@ abstract class Filter else if (gettype($valid) == 'double') $val = floatval($val); else /* if (gettype($valid) == 'string') */ - $var = strval($val); + $val = strval($val); if ($valid == $val) return true; diff --git a/localization/locale_enus.php b/localization/locale_enus.php index 6edf95f7..263bec07 100644 --- a/localization/locale_enus.php +++ b/localization/locale_enus.php @@ -1020,7 +1020,7 @@ $lang = array( 'reqOneQ' => "Requires one of", 'reqOneQDesc' => "To take this quest, you must complete one of the following quests", 'opensQ' => "Opens Quests", - 'opensQDesc' => "Completing this quest is requires to take this quests", + 'opensQDesc' => "Completing this quest will make the following quests available", 'closesQ' => "Closes Quests", 'closesQDesc' => "After completing this quest, you will not be able to take these quests", 'enablesQ' => "Enables", diff --git a/pages/quest.php b/pages/quest.php index ac73d7e7..648c949a 100644 --- a/pages/quest.php +++ b/pages/quest.php @@ -332,10 +332,10 @@ class QuestPage extends GenericPage ['reqQ', array('OR', ['AND', ['nextQuestId', $this->typeId], ['exclusiveGroup', 0, '<']], ['AND', ['id', $this->subject->getField('prevQuestId')], ['nextQuestIdChain', $this->typeId, '!']])], // Requires one of these quests (Requires one of the quests to choose from) - ['reqOneQ', array(['exclusiveGroup', 0, '>'], ['nextQuestId', $this->typeId])], + ['reqOneQ', array('OR', ['AND', ['exclusiveGroup', 0, '>'], ['nextQuestId', $this->typeId]], ['breadCrumbForQuestId', $this->typeId])], // Opens Quests (Quests that become available only after complete this quest (optionally only one)) - ['opensQ', array('OR', ['AND', ['prevQuestId', $this->typeId], ['id', $this->subject->getField('nextQuestIdChain'), '!']], ['id', $this->subject->getField('nextQuestId')])], + ['opensQ', array('OR', ['AND', ['prevQuestId', $this->typeId], ['id', $this->subject->getField('nextQuestIdChain'), '!']], ['id', $this->subject->getField('nextQuestId')], ['id', $this->subject->getField('breadcrumbForQuestId')])], // Closes Quests (Quests that become inaccessible after completing this quest) ['closesQ', array(['exclusiveGroup', 0, '>'], ['exclusiveGroup', $this->subject->getField('exclusiveGroup')], ['id', $this->typeId, '!'])], diff --git a/setup/db_structure.sql b/setup/db_structure.sql index d27143b6..140a4915 100644 --- a/setup/db_structure.sql +++ b/setup/db_structure.sql @@ -1961,6 +1961,7 @@ CREATE TABLE `aowow_quests` ( `eventId` smallint(5) unsigned NOT NULL DEFAULT 0, `prevQuestId` mediumint(8) NOT NULL DEFAULT 0, `nextQuestId` mediumint(8) NOT NULL DEFAULT 0, + `breadcrumbForQuestId` mediumint(8) NOT NULL DEFAULT 0, `exclusiveGroup` mediumint(8) NOT NULL DEFAULT 0, `nextQuestIdChain` mediumint(8) unsigned NOT NULL DEFAULT 0, `flags` int(10) unsigned NOT NULL DEFAULT 0, @@ -3119,7 +3120,7 @@ UNLOCK TABLES; LOCK TABLES `aowow_dbversion` WRITE; /*!40000 ALTER TABLE `aowow_dbversion` DISABLE KEYS */; -INSERT INTO `aowow_dbversion` VALUES (1543774779,0,NULL,NULL); +INSERT INTO `aowow_dbversion` VALUES (1582485391,0,NULL,NULL); /*!40000 ALTER TABLE `aowow_dbversion` ENABLE KEYS */; UNLOCK TABLES; diff --git a/setup/tools/sqlgen/quests.func.php b/setup/tools/sqlgen/quests.func.php index a6eb64c2..33ef6ce0 100644 --- a/setup/tools/sqlgen/quests.func.php +++ b/setup/tools/sqlgen/quests.func.php @@ -31,6 +31,7 @@ SqlGen::register(new class extends SetupScript IFNULL(gesqr.eventEntry, 0) AS eventId, IFNULL(qa.PrevQuestId, 0), IFNULL(qa.NextQuestId, 0), + IFNULL(qa.BreadcrumbForQuestId, 0), IFNULL(qa.ExclusiveGroup, 0), RewardNextQuest, q.Flags, diff --git a/setup/updates/1582485391_01.sql b/setup/updates/1582485391_01.sql new file mode 100644 index 00000000..57b3b7f3 --- /dev/null +++ b/setup/updates/1582485391_01.sql @@ -0,0 +1,4 @@ +ALTER TABLE `aowow_quests` + ADD COLUMN `breadcrumbForQuestId` MEDIUMINT(8) NOT NULL DEFAULT '0' AFTER `nextQuestId`; + +UPDATE `aowow_dbversion` SET `sql` = CONCAT(IFNULL(`sql`, ''), ' quests');