Types/Objects

* make traps their own category
 * move "trap for" from infobox to listview tabs as there can be a couple hundred GOs pointing to the same trap.
This commit is contained in:
Sarjuuk 2024-03-15 23:45:35 +01:00
parent ec1a2afc5f
commit d4a0abf704
16 changed files with 50 additions and 29 deletions

View file

@ -965,8 +965,8 @@ $lang = array(
),
'gameObject' => array(
'notFound' => "Dieses Objekt existiert nicht.",
'cat' => [0 => "Anderes", 9 => "Bücher", 3 => "Behälter", -5 => "Truhen", 25 => "Fischschwärme", -3 => "Kräuter", -4 => "Erzadern", -2 => "Quest", -6 => "Werkzeuge"],
'type' => [ 9 => "Buch", 3 => "Behälter", -5 => "Truhe", 25 => "", -3 => "Kraut", -4 => "Erzvorkommen", -2 => "Quest", -6 => ""],
'cat' => [0 => "Anderes", 3 => "Behälter", 6 => "Fallen", 9 => "Bücher", 25 => "Fischschwärme", -5 => "Truhen", -3 => "Kräuter", -4 => "Erzadern", -2 => "Quest", -6 => "Werkzeuge"],
'type' => [ 3 => "Behälter", 6 => "", 9 => "Buch", 25 => "", -5 => "Truhe", -3 => "Kraut", -4 => "Erzvorkommen", -2 => "Quest", -6 => ""],
'unkPosition' => "Der Standort dieses Objekts ist nicht bekannt.",
'npcLootPH' => 'Der Behälter <b>%s</b> beinhaltet die Beute vom Kampf gegen <a href="?npc=%d">%s</a>. Er erscheint nach seinem Tod.',
'key' => "Schlüssel",

View file

@ -965,8 +965,8 @@ $lang = array(
),
'gameObject' => array(
'notFound' => "This object doesn't exist.",
'cat' => [0 => "Other", 9 => "Books", 3 => "Containers", -5 => "Chests", 25 => "Fishing Pools", -3 => "Herbs", -4 => "Mineral Veins", -2 => "Quest", -6 => "Tools"],
'type' => [ 9 => "Book", 3 => "Container", -5 => "Chest", 25 => "", -3 => "Herb", -4 => "Mineral Vein", -2 => "Quest", -6 => ""],
'cat' => [0 => "Other", 3 => "Containers", 6 => "Traps", 9 => "Books", 25 => "Fishing Pools", -5 => "Chests", -3 => "Herbs", -4 => "Mineral Veins", -2 => "Quest", -6 => "Tools"],
'type' => [ 3 => "Container", 6 => "", 9 => "Book", 25 => "", -5 => "Chest", -3 => "Herb", -4 => "Mineral Vein", -2 => "Quest", -6 => ""], // used for tooltip
'unkPosition' => "The location of this object is unknown.",
'npcLootPH' => 'The <b>%s</b> contains the loot from the fight against <a href="?npc=%d">%s</a>. It spawns after this NPC dies.',
'key' => "Key",

View file

@ -965,8 +965,8 @@ $lang = array(
),
'gameObject' => array(
'notFound' => "Este entidad no existe.",
'cat' => [0 => "Otros", 9 => "Libros", 3 => "Contenedores", -5 => "Cofres", 25 => "Bancos de peces", -3 => "Hierbas", -4 => "Venas de minerales", -2 => "Misiones", -6 => "Herramientas"],
'type' => [ 9 => "Libro", 3 => "Contenedore", -5 => "Cofre", 25 => "", -3 => "Hierba", -4 => "Filóne de mineral", -2 => "Misión", -6 => ""],
'cat' => [0 => "Otros", 3 => "Contenedores", 6 => "Trampas", 9 => "Libros", 25 => "Bancos de peces", -5 => "Cofres", -3 => "Hierbas", -4 => "Venas de minerales", -2 => "Misiones", -6 => "Herramientas"],
'type' => [ 3 => "Contenedore", 6 => "", 9 => "Libro", 25 => "", -5 => "Cofre", -3 => "Hierba", -4 => "Filóne de mineral", -2 => "Misión", -6 => ""],
'unkPosition' => "No se conoce la ubicación de esta entidad.",
'npcLootPH' => 'El <b>%s</b> contiene el botín de la pelea contra <a href="?npc=%d">%s</a>. Aparece al morir.',
'key' => "Llave",

View file

@ -965,8 +965,8 @@ $lang = array(
),
'gameObject' => array(
'notFound' => "Cette entité n'existe pas.",
'cat' => [0 => "Autre", 9 => "Livres", 3 => "Conteneurs", -5 => "Coffres", 25 => "Bancs de poissons", -3 => "Herbes", -4 => "Filons de minerai", -2 => "Quêtes", -6 => "Outils"],
'type' => [ 9 => "Livre", 3 => "Conteneur", -5 => "Coffre", 25 => "", -3 => "Herbe", -4 => "Filon de minerai", -2 => "Quête", -6 => ""],
'cat' => [0 => "Autre", 3 => "Conteneurs", 6 => "Pièges", 9 => "Livres", 25 => "Bancs de poissons", -5 => "Coffres", -3 => "Herbes", -4 => "Filons de minerai", -2 => "Quêtes", -6 => "Outils"],
'type' => [ 3 => "Conteneur", 6 => "", 9 => "Livre", 25 => "", -5 => "Coffre", -3 => "Herbe", -4 => "Filon de minerai", -2 => "Quête", -6 => ""],
'unkPosition' => "L'emplacement de cette entité est inconnu.",
'npcLootPH' => 'Le <b>%s</b> contient les récompenses du combat contre <a href="?npc=%d">%s</a>. Il apparaît après sa mort.',
'key' => "Clé",

View file

@ -965,14 +965,14 @@ $lang = array(
),
'gameObject' => array(
'notFound' => "Такой объект не существует.",
'cat' => [0 => "Другое", 9 => "Книги", 3 => "Контейнеры", -5 => "Сундуки", 25 => "Рыболовные лунки",-3 => "Травы", -4 => "Полезные ископаемые", -2 => "Задания", -6 => "Инструменты"],
'type' => [ 9 => "Книга", 3 => "Контейнер", -5 => "Сундук", 25 => "", -3 => "Растение", -4 => "Полезное ископаемое", -2 => "Задание", -6 => ""],
'cat' => [0 => "Другое", 3 => "Контейнеры", 6 => "Ловушки", 9 => "Книги", 25 => "Рыболовные лунки", -5 => "Сундуки", -3 => "Травы", -4 => "Полезные ископаемые", -2 => "Задания", -6 => "Инструменты"],
'type' => [ 3 => "Контейнер", 6 => "", 9 => "Книга", 25 => "", -5 => "Сундук", -3 => "Растение", -4 => "Полезное ископаемое", -2 => "Задание", -6 => ""],
'unkPosition' => "Местонахождение этого объекта неизвестно.",
'npcLootPH' => '[The <b>%s</b> contains the loot from the fight against <a href="?npc=%d">%s</a>. It spawns after his death.]',
'key' => "Ключ",
'focus' => "[Spell Focus]",
'focusDesc' => "[Spells requiring this Focus can be cast near this Object]",
'trap' => "Ловушки",
'trap' => "Ловушка",
'triggeredBy' => "Срабатывает от",
'capturePoint' => "Точка захвата",
'foundIn' => "Этот НИП может быть найден в следующих зонах:",

View file

@ -964,8 +964,8 @@ $lang = array(
),
'gameObject' => array(
'notFound' => "这个对象不存在。",
'cat' => [0 => "其他", 9 => "书籍", 3 => "容器", -5 => "宝箱", 25 => "钓鱼点", -3 => "草药", -4 => "矿脉", -2 => "任务", -6 => "工具"],
'type' => [ 9 => "书籍", 3 => "容器", -5 => "宝箱", 25 => "", -3 => "草药", -4 => "矿脉", -2 => "任务", -6 => ""],
'cat' => [0 => "其他", 3 => "容器", 6 => "陷阱", 9 => "书籍", 25 => "钓鱼点", -5 => "宝箱", -3 => "草药", -4 => "矿脉", -2 => "任务", -6 => "工具"],
'type' => [ 3 => "容器", 6 => "", 9 => "书籍", 25 => "", -5 => "宝箱", -3 => "草药", -4 => "矿脉", -2 => "任务", -6 => ""],
'unkPosition' => "这个对象的位置未知。",
'npcLootPH' => '这个<b>%s</b>包含战利品,与<a href="?npc=%d">%s</a>的作战后,在他/她/它死亡后刷新。',
'key' => "钥匙",

View file

@ -132,13 +132,7 @@ class ObjectPage extends GenericPage
$infobox[] = Lang::gameObject('trap').Lang::main('colon').'[object='.$_.']';
}
// trap for
$trigger = new GameObjectList(array(['linkedTrap', $this->typeId]));
if (!$trigger->error)
{
$this->extendGlobalData($trigger->getJSGlobals());
$infobox[] = Lang::gameObject('triggeredBy').Lang::main('colon').'[object='.$trigger->id.']';
}
// trap for X (note: moved to lv-tabs)
// SpellFocus
if ($_ = $this->subject->getField('spellFocusId'))
@ -483,6 +477,20 @@ class ObjectPage extends GenericPage
}
}
// tab: trap for X
$trigger = new GameObjectList(array(['linkedTrap', $this->typeId]));
if (!$trigger->error)
{
$this->extendGlobalData($trigger->getJSGlobals());
$this->lvTabs[] = [GameObjectList::$brickFile, array(
'data' => array_values($trigger->getListviewData()),
'name' => Lang::gameObject('triggeredBy'),
'id' => 'triggerd-by',
'note' => sprintf(Util::$filterResultString, '?objects=6')
)];
}
// tab: Same model as .. whats the fucking point..?
$sameModel = new GameObjectList(array(['displayId', $this->subject->getField('displayId')], ['id', $this->typeId, '!']));
if (!$sameModel->error)

View file

@ -15,14 +15,14 @@ class ObjectsPage extends GenericPage
protected $path = [0, 5];
protected $tabId = 0;
protected $mode = CACHE_TYPE_PAGE;
protected $validCats = [-2, -3, -4, -5, -6, 0, 3, 9, 25];
protected $validCats = [-2, -3, -4, -5, -6, 0, 3, 6, 9, 25];
protected $scripts = [[SC_JS_FILE, 'js/filters.js']];
protected $_get = ['filter' => ['filter' => FILTER_UNSAFE_RAW]];
public function __construct($pageCall, $pageParam)
{
$this->getCategoryFromUrl($pageParam);;
$this->getCategoryFromUrl($pageParam);
$this->filterObj = new GameObjectListFilter(false, ['parentCats' => $this->category]);
parent::__construct($pageCall, $pageParam);

View file

@ -23,7 +23,7 @@ SqlGen::register(new class extends SetupScript
IF(`type` = 2, -2, -- quests 1
IF(`type` = 8 AND Data0 IN (1, 2, 3, 4, 1552), -6, -- tools
IF(`type` = 3 AND IFNULL(gqi.ItemId, 0) <> 0, -2, -- quests 2
IF(`type` IN (3, 9, 25), `type`, 0)))), -- regular chests, books, pools
IF(`type` IN (3, 6, 9, 25), `type`, 0)))), -- regular chests, traps, books, fishing pools
0 AS event, -- linked worldevent
displayId,
go.name,

View file

@ -0,0 +1 @@
UPDATE `aowow_dbversion` SET `sql` = CONCAT(IFNULL(`sql`, ''), ' objects');

View file

@ -325,7 +325,8 @@ var mn_objects = [
[-3,"Kräuter"],
[-4,"Erzadern"],
[-2,"Quest"],
[-6,"Werkzeuge"]
[-6,"Werkzeuge"],
[6,"Fallen"]
];
var mn_quests = [
[,"Kontinent"],
@ -1449,6 +1450,7 @@ var g_object_types = {
0: 'Anderes',
9: 'Buch',
3: 'Behälter',
6: 'Falle',
"-5": 'Truhe',
25: 'Fischschwarm',
"-3": 'Kraut',

View file

@ -325,7 +325,8 @@ var mn_objects = [
[-3,"Herbs"],
[-4,"Mineral Veins"],
[-2,"Quest"],
[-6,"Tools"]
[-6,"Tools"],
[6,"Traps"]
];
var mn_quests = [
[,"Continents"],
@ -1496,6 +1497,7 @@ var g_object_types = {
0: 'Other',
9: 'Book',
3: 'Container',
6: 'Trap',
"-5": 'Chest',
25: 'Fishing Pool',
"-3": 'Herb',

View file

@ -325,7 +325,8 @@ var mn_objects = [
[-3,"Hierbas"],
[-4,"Venas de minerales"],
[-2,"Misión"],
[-6,"Herramientas"]
[-6,"Herramientas"],
[6,"Trampas"]
];
var mn_quests = [
[,"Continentes"],
@ -1449,6 +1450,7 @@ var g_object_types = {
0: 'Otros',
9: 'Libro',
3: 'Contenedore',
6: 'Trampa',
"-5": 'Cofre',
25: '[Fishing Pool]',
"-3": 'Hierba',

View file

@ -325,7 +325,8 @@ var mn_objects = [
[-3,"Herbes"],
[-4,"Filons de minerai"],
[-2,"Quête"],
[-6,"Outils"]
[-6,"Outils"],
[6,"Pièges"]
];
var mn_quests = [
[,"Continents"],
@ -1449,6 +1450,7 @@ var g_object_types = {
0: 'Autre',
9: 'Livre',
3: 'Conteneur',
6: 'Piège',
"-5": 'Coffre',
25: 'Banc de poissons',
"-3": 'Herbe',

View file

@ -325,7 +325,8 @@ var mn_objects = [
[-3,"Травы"],
[-4,"Полезные ископаемые"],
[-2,"Задание"],
[-6,"Инструменты"]
[-6,"Инструменты"],
[6,"Ловушки"]
];
var mn_quests = [
[,"Континенты"],
@ -1449,6 +1450,7 @@ var g_object_types = {
0: 'Другое',
9: 'Книга',
3: 'Контейнер',
6: 'Ловушка',
"-5": 'Сундук',
25: 'Рыболовные лунки',
"-3": 'Растение',

View file

@ -325,7 +325,8 @@ var mn_objects = [
[-3,"草药"],
[-4,"矿点"],
[-2,"任务"],
[-6,"工具"]
[-6,"工具"],
[6,"陷阱"]
];
var mn_quests = [
[,"大陆"],
@ -1495,6 +1496,7 @@ var g_object_types = {
0: '其他',
9: "书籍",
3: "容器",
6: "陷阱",
"-5": "提箱",
25: "钓鱼水池",
"-3": "草药",