Шаблон:Default item parameter — различия между версиями

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
 
(не показаны 2 промежуточные версии 2 участников)
Строка 18: Строка 18:
 
;[[Character#Progression|Треб. уровень]]  
 
;[[Character#Progression|Треб. уровень]]  
 
:{{#arraymap: {{{level}}} |,|@@@|[[Has level requirement::@@@]]}}
 
:{{#arraymap: {{{level}}} |,|@@@|[[Has level requirement::@@@]]}}
}}{{ #if: {{{race|}}} |  
+
}}{{#if: {{{race|}}} |  
 
;[[Playable races|Треб. раса]] :[[Is for race::{{ucfirst:{{{race|}}}}}]]
 
;[[Playable races|Треб. раса]] :[[Is for race::{{ucfirst:{{{race|}}}}}]]
 
}}{{#ifeq: {{{unique}}} | y | {{#set:Is unique=Y}}
 
}}{{#ifeq: {{{unique}}} | y | {{#set:Is unique=Y}}
 
;[[Unique|Уникальность]]
 
;[[Unique|Уникальность]]
 
:Yes
 
:Yes
| {{#set:Is unique=N}} }}{{#vardefine:tradable|{{#var:tradable|{{#if:{{{tradable|}}}|{{{tradable}}}|yes}}}}}}{{#if:{{{bound|}}}|{{#ifeq: {{lc:{{{bound}}}}} | no | |
+
| {{#switch: {{lc:{{{rarity|}}}}} | pink | ascended = {{#set:Is unique=N}} }} }}{{#vardefine:tradable|{{#var:tradable|{{#if:{{{tradable|}}}|{{{tradable}}}|yes}}}}}}{{#if:{{{bound|}}}|{{#ifeq: {{lc:{{{bound}}}}} | no | |
 
;[[Binding|Привязка]]
 
;[[Binding|Привязка]]
 
:{{#switch: {{lc:{{{bound}}}}}
 
:{{#switch: {{lc:{{{bound}}}}}
 
|u|use|on use = [[Soulbound|Привязка к персонажу]] при использовании {{#set:Has item binding=SoulBindOnUse}}
 
|u|use|on use = [[Soulbound|Привязка к персонажу]] при использовании {{#set:Has item binding=SoulBindOnUse}}
|a|acquire|on acquire = [[Soulbound|Привязка к персонажу]] при получении{{#vardefine:tradable|no}} {{#set:Has item binding=SoulbindOnAcquire}}
+
|a|acquire|on acquire = [[Soulbound|Привязка к персонажу]] при получении {{#vardefine:tradable|no}} {{#set:Has item binding=SoulbindOnAcquire}}
|ab|account|account bound|account bound on acquire = [[Account Bound|Привязка к аккаунту]]{{#vardefine:tradable|no}} {{#set:Has item binding=AccountBound}}
+
|ab|account|account bound|account bound on acquire = [[Account Bound|Привязка к аккаунту]] {{#vardefine:tradable|no}} {{#set:Has item binding=AccountBound}}
|absb|accountsoul|account soul = [[Account Bound|Привязка к аккаунту]]<br>[[Soulbound|Привязка к персонажу]] при использовании{{#vardefine:tradable|no}} {{#set:Has item binding=AccountBound,SoulBindOnUse|+sep=,}}
+
|absb|accountsoul|account soul = [[Account Bound|Привязка к аккаунту]]<br>[[Soulbound|Привязка к персонажу]] при использовании {{#vardefine:tradable|no}} {{#set:Has item binding=AccountBound,SoulBindOnUse|+sep=,}}
 
|abu|accountuse|account on use = [[Account Bound|Привязка к аккаунту]] при использовании {{#set:Has item binding=AccountBindOnUse}}
 
|abu|accountuse|account on use = [[Account Bound|Привязка к аккаунту]] при использовании {{#set:Has item binding=AccountBindOnUse}}
 
|#default = ''Unknown''
 
|#default = ''Unknown''
}} }} }}{{ #if: {{{cost|}}} |  
+
}} }} }}{{#if: {{{cost|}}} |  
 
;[[Currency#Cost versus Value|Стоимость]]  
 
;[[Currency#Cost versus Value|Стоимость]]  
:{{{cost|}}}}}{{ #if: {{{value|}}} |  
+
:{{{cost|}}}
 +
}}{{#if: {{{value|}}} |  
 
;[[Currency#Cost versus Value|Ценность]]{{#set:Has vendor value={{{value|}}}}}
 
;[[Currency#Cost versus Value|Ценность]]{{#set:Has vendor value={{{value|}}}}}
 
:{{coin|{{{value|}}}}}
 
:{{coin|{{{value|}}}}}
}}
+
}}{{#if: {{{id|}}} |
{{#if: {{{id|}}} |
 
 
;[[Chat link format|{{#if:{{{skin id|}}}|Ссылка на предмет|Игр. ссылка}}]]
 
;[[Chat link format|{{#if:{{{skin id|}}}|Ссылка на предмет|Игр. ссылка}}]]
 
:{{#arraymap:{{{id}}}|,|@@@|{{#set:Has game id=@@@}}{{item link|@@@}}|<br>}}
 
:{{#arraymap:{{{id}}}|,|@@@|{{#set:Has game id=@@@}}{{item link|@@@}}|<br>}}
Строка 44: Строка 44:
 
;[[Chat link format|Ссылка на шкурку]]
 
;[[Chat link format|Ссылка на шкурку]]
 
:{{#arraymap:{{{skin id}}}|,|@@@| {{skin link|@@@}} |<br>}}
 
:{{#arraymap:{{{skin id}}}|,|@@@| {{skin link|@@@}} |<br>}}
}}
+
}}{{#if: {{{id|}}} |
{{#if: {{{id|}}} |
+
{{#ifeq:{{#var:tradable}}|yes|{{#ifeq: {{#switch: {{{status|}}} | unimplemented | future | historical = true | #default = false }} |false|<!-- only show if it's not historical, they'd only lead to 404's otherwise -->{{#vardefine:firstId|{{#explode:{{{id}}}|,|0}}}}
{{#ifeq:{{#var:tradable}}|yes|{{#ifeq:{{#show:{{PAGENAME}}|?Is historical}}|нет|<!-- only show if it's not historical, they'd only lead to 404's otherwise -->
 
{{#vardefine:firstId|{{#explode:{{{id}}}|,|0}}}}
 
 
;Торговый пост  
 
;Торговый пост  
 
:<span class="gw2-tpprice" data-id="{{#var:firstId}}">…</span>
 
:<span class="gw2-tpprice" data-id="{{#var:firstId}}">…</span>
}}}}}}{{#if:{{{id|}}}|
+
}}}}}}{{#if:{{#varexists:firstId}}|
<dt class="api hide">You have</dt><!--
 
--><dd class="api hide api-youhave" data-itemid="{{{id|}}}">…</dd>
 
}}{{#if:{{#varexists:firstId}}|
 
 
;Внешние ссылки  
 
;Внешние ссылки  
:[https://www.gw2bltc.com/en/item/{{#var:firstId}} GW2BLTC]<br>[http://www.gw2shinies.com/item/{{#var:firstId}} GW2Shinies]<br>[http://www.gw2spidy.com/item/{{#var:firstId}} GW2Spidy]<br>[http://www.gw2tp.com/item/{{#var:firstId}} GW2TP]
+
:[https://www.gw2bltc.com/en/item/{{#var:firstId}} GW2BLTC]<br>[https://www.gw2spidy.com/item/{{#var:firstId}} GW2Spidy]<br>[https://www.gw2tp.com/item/{{#var:firstId}} GW2TP]
 
}}{{#if: {{{other ids|}}} | {{#arraymap:{{{other ids}}}|,|@@@|{{#set:Has game id=@@@}}|}}
 
}}{{#if: {{{other ids|}}} | {{#arraymap:{{{other ids}}}|,|@@@|{{#set:Has game id=@@@}}|}}
 
}}<noinclude>
 
}}<noinclude>
Строка 64: Строка 59:
 
<pre>
 
<pre>
 
{{default item parameter
 
{{default item parameter
 +
| status =
 
| collection =
 
| collection =
 
| rarity =
 
| rarity =
Строка 77: Строка 73:
  
 
===Parameters===
 
===Parameters===
{{:Template:Default item parameter/documentation}}
+
{{Default item parameter/documentation}}
  
 
=== Implemented on ===
 
=== Implemented on ===
Строка 87: Строка 83:
 
* {{tl|Item infobox}} for general items
 
* {{tl|Item infobox}} for general items
 
* {{tl|Trinket infobox}} for accessories
 
* {{tl|Trinket infobox}} for accessories
 +
* {{tl|Upgrade component infobox}} for upgrade components
 
* {{tl|Weapon infobox}} for weapons
 
* {{tl|Weapon infobox}} for weapons
  
 
[[Category:Infobox subtemplates|Default item parameter]]
 
[[Category:Infobox subtemplates|Default item parameter]]
 
</noinclude>
 
</noinclude>

Текущая версия на 16:26, 20 октября 2018


Documentation[править]

Usage[править]

This template defines values available on all items and is implemented as a subtemplate on all infobox templates for items.

{{default item parameter
| status =
| collection =
| rarity =
| level =
| race = 
| unique =
| bound =
| cost =
| value =
| id =
| skin id =
}}

Parameters[править]

The following parameters are handled by the {{Default item parameter}} template:

collection 
Optional. If the item is part of any collections.
rarity 
Specified rarity: junk, basic, fine, masterwork, rare, exotic, ascended, legendary. Will be set to Unspecified per default.
level 
Optional. Required level to use the item.
race 
Optional. Required race to use item. Currently only used for cultural armor and cultural weapons.
unique 
Optional. Whether the item is unique. "y" for yes, omit parameter if no.
bound 
Optional. Under what conditions the item becomes bound: no binding (default), use (soulbound on use), acquire (soulbound on acquisition), account, account soul (account bound on acquire, soul bound on use)
cost
Optional. Currency cost of the item when purchased from a vendor. To match it to the display in any vendor window, use the amount and the appropriate icon template, e.g. {{coin|500}}, 500 {{item icon|zhaitaffy}}, or 500 {{token|Guild Commendation}}
value
Optional. The number of Медная монета coins a vendor will pay for this item; use only the number, since the template assumes copper coins.
id
Optional. The item id. Does allow multiple ids to be set by using a comma-separated list.
other ids
Optional. Other item ids that are not displayed as chat links.
skin id
Optional. If given, an additional skin chat link will be displayed above the item chat link.


Implemented on[править]