Quest/Breadcrumbs

* implemented https://github.com/TrinityCore/TrinityCore/commit/5ed77113b63
 * fixed some engrish
 * fixed a typo in typecasting string searches
This commit is contained in:
Sarjuuk
2020-02-23 14:12:01 +01:00
parent eaa982e5b3
commit d4c0c0535a
6 changed files with 11 additions and 13 deletions

View File

@@ -774,14 +774,6 @@ trait profilerHelper
}
}
/*
roight!
just noticed, that the filters on pages originally pointed to ?filter=<pageName>
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;

View File

@@ -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",

View File

@@ -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, '!'])],

View File

@@ -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;

View File

@@ -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,

View File

@@ -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');