Template:LootItem: Difference between revisions

No edit summary
No edit summary
 
(88 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>|-
|-
| {{#if:{{{IOU|}}}
| [[File:{{lc:{{{Item}}}}}.png|48px|link={{{Item}}}]]
| {{ItemIcon|{{{Item}}}|size=32px|IOU=1}}
| [[{{{Item}}}]]
| {{ItemIcon|{{{Item}}}|size=32px}}
| style="text-align: center;" | {{{Quantity|1}}}
}}
| style="text-align: center;" class="{{#switch:{{{Rarity|Unknown}}}
| [[{{{Item}}}]]{{#if:{{{IOU|}}}|&nbsp; {{IOU}}}}
| style="text-align: center;" | {{#if:{{{MaximumQuantity|}}}
  | {{#ifeq:{{{MinimumQuantity}}}|{{{MaximumQuantity}}}
      | {{formatnum:{{{MinimumQuantity}}}|en}}
      | {{formatnum:{{{MinimumQuantity}}}|en}}-{{formatnum:{{{MaximumQuantity}}}|en}}
    }}
  | {{formatnum:{{{MinimumQuantity}}}|en}}
}}
| style="text-align: center;" class="{{#switch:{{#invoke:RarityHandler|getCleanValue|{{{Rarity|Unknown}}}}}
   |Always=table-bg-always
   |Always=table-bg-always
   |Never=table-bg-fade
   |Never=table-bg-fade
   |#default={{#ifexpr:{{#pos:{{{Rarity}}}|1/}} > -1
   |#default={{#if:{{#invoke:RarityHandler|hasSlash|{{#invoke:RarityHandler|getCleanValue|{{{Rarity|Unknown}}}}}}}
    |{{#ifexpr:{{#sub:{{{Rarity}}}|2}} <= 25
    |{{#ifexpr:{{#explode:{{#invoke:RarityHandler|getCleanValue|{{{Rarity|Unknown}}}}}|/|1}} >= 5000
      |table-bg-common
      |table-bg-ultrarare
      |{{#ifexpr:{{#sub:{{{Rarity}}}|2}} <= 50
      |{{#ifexpr:{{#explode:{{#invoke:RarityHandler|getCleanValue|{{{Rarity|Unknown}}}}}|/|1}} <= 100
        |table-bg-uncommon
        |table-bg-common
        |{{#ifexpr:{{#sub:{{{Rarity}}}|2}} <= 100
        |{{#ifexpr:{{#explode:{{#invoke:RarityHandler|getCleanValue|{{{Rarity|Unknown}}}}}|/|1}} <= 500
          |table-bg-rare
          |table-bg-uncommon
          |table-bg-veryrare
          |{{#ifexpr:{{#explode:{{#invoke:RarityHandler|getCleanValue|{{{Rarity|Unknown}}}}}|/|1}} <= 1000
            |table-bg-rare
            |table-bg-veryrare
          }}
         }}
         }}
       }}
       }}
Line 20: Line 31:
     |table-bg-common
     |table-bg-common
   }}
   }}
}}" | {{{Rarity|Unknown}}}
}}" | {{#ifeq:{{#invoke:RarityHandler|normalizeDisplay|{{{Rarity|Unknown}}}}}|Always
| style="text-align: right;" | {{{GeneralBuy|?}}} {{CoinIcon|size=22px}}
  | Always
| style="text-align: right;" | {{{GeneralSell|?}}} {{CoinIcon|size=22px}}
  | {{#replace:{{#invoke:RarityHandler|normalizeDisplay|{{{Rarity|Unknown}}}}}|1/{{#explode:{{#invoke:RarityHandler|normalizeDisplay|{{{Rarity|Unknown}}}}}|/|1}}|1/{{formatnum:{{#explode:{{#invoke:RarityHandler|normalizeDisplay|{{{Rarity|Unknown}}}}}|/|1}}|en}}}}
|-
}}
</includeonly>
| style="text-align: right;" |
{{#invoke:PriceCalculator|renderPrice
  |price={{{Price|1}}}
  |min={{{MinimumQuantity|1}}}
  |max={{{MaximumQuantity|}}}
  |type=sell
}}
|-</includeonly>