mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Disables
* display db-entries as disabled or unavailable if appropriate * affects now achievements and quests in addition to spells * flag items without source as unavailable * flag quests without starter als unavailable Privileges * i guess i forgott to add the template... ...among other things
This commit is contained in:
@@ -215,9 +215,9 @@ define('SOUND_TYPE_MP3', 2);
|
||||
define('CUSTOM_HAS_COMMENT', 0x01000000);
|
||||
define('CUSTOM_HAS_SCREENSHOT', 0x02000000);
|
||||
define('CUSTOM_HAS_VIDEO', 0x04000000);
|
||||
define('CUSTOM_DISABLED', 0x08000000);
|
||||
define('CUSTOM_DISABLED', 0x08000000); // contained in world.disables
|
||||
define('CUSTOM_SERVERSIDE', 0x10000000);
|
||||
define('CUSTOM_UNAVAILABLE', 0x20000000);
|
||||
define('CUSTOM_UNAVAILABLE', 0x20000000); // no source for X or questFlag
|
||||
define('CUSTOM_EXCLUDE_FOR_LISTVIEW', 0x40000000); // will not show up in search or on listPage (override for staff)
|
||||
|
||||
// Custom Flags (per type)
|
||||
|
||||
@@ -21,7 +21,7 @@ class Markup
|
||||
|
||||
public function parseGlobalsFromText(&$jsg = [])
|
||||
{
|
||||
if (preg_match_all('/(?<!\\\\)\[(npc|object|item|itemset|quest|spell|zone|faction|pet|achievement|statistic|title|event|class|race|skill|currency|emote|enchantment|money)=(-?\d+)[^\]]*\]/i', $this->text, $matches, PREG_SET_ORDER))
|
||||
if (preg_match_all('/(?<!\\\\)\[(npc|object|item|itemset|quest|spell|zone|faction|pet|achievement|statistic|title|event|class|race|skill|currency|emote|enchantment|money|sound)=(-?\d+)[^\]]*\]/i', $this->text, $matches, PREG_SET_ORDER))
|
||||
{
|
||||
foreach ($matches as $match)
|
||||
{
|
||||
|
||||
@@ -249,6 +249,8 @@ class QuestList extends BaseType
|
||||
|
||||
// if ($this->isRepeatable()) // dafuque..? says repeatable and is used as 'disabled'..?
|
||||
// $data[$this->id]['wflags'] |= QUEST_CU_REPEATABLE;
|
||||
if ($this->curTpl['cuFlags'] & (CUSTOM_UNAVAILABLE | CUSTOM_DISABLED))
|
||||
$data[$this->id]['wflags'] |= QUEST_CU_REPEATABLE;
|
||||
|
||||
if ($this->curTpl['flags'] & QUEST_FLAG_DAILY)
|
||||
{
|
||||
@@ -505,9 +507,9 @@ class QuestListFilter extends Filter
|
||||
if ($this->int2Bool($cr[1]))
|
||||
{
|
||||
if ($cr[1])
|
||||
return ['AND', [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0], [['flags', QUEST_FLAG_UNAVAILABLE, '&'], 0]];
|
||||
return [['cuFlags', CUSTOM_UNAVAILABLE | CUSTOM_DISABLED, '&'], 0];
|
||||
else
|
||||
return ['OR', ['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], ['flags', QUEST_FLAG_UNAVAILABLE, '&']];
|
||||
return ['cuFlags', CUSTOM_UNAVAILABLE | CUSTOM_DISABLED, '&'];
|
||||
}
|
||||
break;
|
||||
case 23: // itemchoices [op] [int]
|
||||
|
||||
Reference in New Issue
Block a user