Шаблон:Vendor table row result format — различия между версиями

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
 
 
Строка 1: Строка 1:
{{#vardefine:item_type|{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}}}<!--
+
<includeonly>{{#if: {{{1|}}} | <span class="small item-icon thumb-icon">[[{{#if:{{{3|}}} | {{{3}}} | File:{{{1}}}.png }}|20px|bottom|link={{{1}}}]]</span><!--
-->{{#ifeq:{{#var:showType}}  | true | {{!!}} style="text-align:center" {{!}} {{#if:{{#var:item_type}}|{{{1}}} [[{{#var:item_type}}]] | - }} }}<!--
+
-->&nbsp;{{#if: {{{2|}}} | [[{{{1}}}|{{{2|{{{1}}}}}}]] | [[{{{1}}}]] }} | ''item id: {{{id}}}'' }} <!--
-->{{#ifeq:{{#var:showRarity}} | true | {{!!}} style="text-align:center" {{!}} {{rarity|{{{7|-}}}}} }}<!--
+
-->{{#ifexpr: {{{quantity|0}}} > 1 | ({{{quantity}}}) }} {{#if: {{{per day|}}}| ({{{per day}}} per day)}} {{#if: {{{per week|}}}| ({{{per week}}} per week)}} {{#if: {{{per character|}}}| ({{{per character}}} per character)}} {{#if: {{{total|}}}| ({{{total}}} in total)}}<!--
-->{{#ifeq:{{#var:showLevel}}  | true | {{!!}} style="text-align:center" {{!}} {{#if:{{{8|}}}|{{{8}}}| - }} }}<!--
+
-->{{#ifeq:{{#var:showNotes}} | false | {{#if: {{{requirement|}}}{{{collection|}}} | {{Vendor table notes|requirement={{{requirement|}}}|collection={{{collection|}}}|intro=<br><small>(|outro=)</small>}}}}}}<!--
-->{{#ifeq:{{#var:showFacts}}  | true | {{!!}} {{#if:{{{9|}}}| {{item stat lookup|type={{#var:item_type}}|level={{{8|}}}|rarity={{{7|}}}|class={{{1|}}}}}{{prefix attributes|{{{9|}}}}}| - }}{{#if: {{{10|}}} | <br>{{item icon|{{{10}}}}} }} }}<noinclude>
+
-->{{#ifeq:{{#var:showType}}  | true | {{!!}} style="text-align:center" {{!}} {{#if: {{{5|}}} | {{#if: {{{4|}}} | {{{4}}} [[{{lcfirst:{{{5|}}}}}]] | {{#arraymap:{{{5|}}}|,|@@@|[[@@@]]|,<nowiki> </nowiki>}} }} | — }} }}<!--
This template pops up and provides the variables required for the complex formatting within {{tl|Vendor table row}} if the item id has been specified instead of an item name.
+
-->{{#ifeq:{{#var:showRarity}} | true | {{!!}} style="text-align:center" {{!}} {{#if: {{#if: {{{rarity|}}} | {{{rarity}}} | {{{6|}}} }} | {{#arraymap:{{#if: {{{rarity|}}} | {{{rarity}}} | {{{6}}} }}|,|@@@|{{rarity|@@@}}}}| — }} }}<!--
 +
-->{{#ifeq:{{#var:showLevel}}  | true | {{!!}} style="text-align:center" {{!}} {{#if: {{{7|}}} | {{{7}}} | — }} }}<!--
 +
-->{{#ifeq:{{#var:showPrefix}} | true | {{!!}} {{ucfirst:{{{8}}}}} }}<!--
 +
-->{{#ifeq:{{#var:showFacts}}  | true | {{!!}} {{#if: {{{8|}}} | {{#ifeq: {{{8}}} | selectable | This item allows selection of stats. | {{item stat lookup|class={{{4|}}}|type={{{5|}}}|rarity={{{6|}}}|level={{{7|}}}}}<!-- -->{{prefix attributes|{{{8|}}}|rarity={{#var:rarity_std}}|supertype={{#var:supertype}}}} | — }} }}{{#if: {{{9|}}} | <br>{{item icon|{{{9}}}}} }} }}
 +
| {{#if: {{{cost|}}} | data-sort-value="{{uc:{{#arraymap: {{{cost|}}} |+|@@@| {{#sub:@@@|{{#pos:@@@| }}}} {{padleft:{{#explode:@@@| |0}}|8}} |}}}}" {{#if:{{#var:showCostText}}||style="text-align:right"}} {{!}} {{#arraymap:{{{cost|}}} | + | @@@ | {{currency|{{#explode:@@@| |0}}|{{#sub:@@@|{{#pos:@@@| }}}}|text={{#if:{{#var:showCostText|}}|+}}}} | &nbsp;+&nbsp;}} }}<!--
 +
-->{{#ifeq:{{#var:showTP}}    | true |{{!!}} style="text-align:right" {{!}} {{#ifeq: {{{10|}}} | true | {{tp|{{#explode:{{{11|}}}|,|0}}|quantity={{{quantity|1}}} }} | <small>''(Account bound)''</small> }} }}<!--
 +
-->{{#ifeq:{{#var:showNotes}}  | true |{{!!}} {{#if: {{{requirement|}}}{{{collection|}}} | {{Vendor table notes|requirement={{{requirement|}}}|collection={{{collection|}}}}} }} }}
 +
</includeonly><noinclude>
 +
This template helps to format the row result for {{tl|Vendor table row}}.
  
 +
=== Parameters ===
 +
#(pagename)
 +
#Has canonical name
 +
#Has item icon
 
#Has armor weight class
 
#Has armor weight class
 
#Has item type
 
#Has item type
#Has armor type
 
#Has weapon type
 
#Has trinket type
 
#Has upgrade component type
 
 
#Has item rarity
 
#Has item rarity
 
#Has level requirement
 
#Has level requirement
 
#Has equipment prefix
 
#Has equipment prefix
 
#Has upgrade component
 
#Has upgrade component
 +
#Is tradable
 +
#Has game id#
 +
;Named parameters
 +
:*quantity
 +
:*requirement
 +
:*collection
 +
:*per day
 +
:*per week
 +
:*per character
 +
:*total
 +
:*rarity (overrides Has item rarity if specified)
  
[[Category:Vendor formatting templates]]
+
== Note ==
 +
* Also used by [[Template:Service table result format]].
 +
 
 +
[[Category:Vendor formatting templates]][[Category:Semantic result templates]]
 
</noinclude>
 
</noinclude>

Текущая версия на 18:01, 31 марта 2023

This template helps to format the row result for {{Vendor table row}}.

Parameters[править]

  1. (pagename)
  2. Has canonical name
  3. Has item icon
  4. Has armor weight class
  5. Has item type
  6. Has item rarity
  7. Has level requirement
  8. Has equipment prefix
  9. Has upgrade component
  10. Is tradable
  11. Has game id#
Named parameters
  • quantity
  • requirement
  • collection
  • per day
  • per week
  • per character
  • total
  • rarity (overrides Has item rarity if specified)

Note[править]