Path of Exile Wiki

Wiki поддерживается сообществом, поэтому подумайте над тем, чтобы внести свой вклад.

ПОДРОБНЕЕ

Path of Exile Wiki
Первая страница
Вторая страница
 
 
Строка 60: Строка 60:
   
 
args.parts = args.parts or {}
 
args.parts = args.parts or {}
return function (tpl_args)
+
return function (tpl_args, frame)
 
local base_values = {}
 
local base_values = {}
 
local temp_values = {}
 
local temp_values = {}
Строка 150: Строка 150:
 
end
 
end
 
end
 
end
hide = opt.hide(tpl_args, v)
+
hide = opt.hide(tpl_args, frame, v)
 
elseif opt.hide_default ~= nil then
 
elseif opt.hide_default ~= nil then
 
if opt.hide_default_key then
 
if opt.hide_default_key then
Строка 190: Строка 190:
 
options.color = 'value'
 
options.color = 'value'
 
end
 
end
parts[#parts+1] = m_util.html.format_value(tpl_args, value, options)
+
parts[#parts+1] = m_util.html.format_value(tpl_args, frame, value, options)
 
end
 
end
 
if args.sep then
 
if args.sep then
Строка 242: Строка 242:
 
function h.proc.factory.value(args)
 
function h.proc.factory.value(args)
 
args = args or {}
 
args = args or {}
return function (tpl_args, value)
+
return function (tpl_args, frame, value)
 
if value == nil then
 
if value == nil then
 
return nil
 
return nil
Строка 258: Строка 258:
 
function h.proc.factory.list(args)
 
function h.proc.factory.list(args)
 
args = args or {}
 
args = args or {}
return function (tpl_args, value)
+
return function (tpl_args, frame, value)
 
return m_util.cast.table(value, {
 
return m_util.cast.table(value, {
 
pattern = args.pattern,
 
pattern = args.pattern,
Строка 267: Строка 267:
   
 
function h.proc.factory.damage_html(args)
 
function h.proc.factory.damage_html(args)
return function (tpl_args, value)
+
return function (tpl_args, frame, value)
 
local keys = {
 
local keys = {
 
min = args.type .. '_damage_min',
 
min = args.type .. '_damage_min',
Строка 282: Строка 282:
 
}
 
}
 
}
 
}
}(tpl_args)
+
}(tpl_args, frame)
 
end
 
end
 
if range.min and range.max then
 
if range.min and range.max then
Строка 434: Строка 434:
 
inherit = false,
 
inherit = false,
 
field = 'html_extra',
 
field = 'html_extra',
type = 'Text',
 
func = nil,
 
},
 
infobox_html = {
 
inherit = false,
 
field = 'infobox_html',
 
type = 'Text',
 
func = nil,
 
},
 
metabox_html = {
 
inherit = false,
 
field = 'metabox_html',
 
 
type = 'Text',
 
type = 'Text',
 
func = nil,
 
func = nil,
Строка 452: Строка 440:
 
field = 'implicit_stat_text',
 
field = 'implicit_stat_text',
 
type = 'Text',
 
type = 'Text',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
return h.process_mod_stats(tpl_args, {is_implicit=true})
 
return h.process_mod_stats(tpl_args, {is_implicit=true})
 
end,
 
end,
Строка 459: Строка 447:
 
field = 'explicit_stat_text',
 
field = 'explicit_stat_text',
 
type = 'Text',
 
type = 'Text',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
local explicit = h.process_mod_stats(tpl_args, {is_implicit=false})
 
local explicit = h.process_mod_stats(tpl_args, {is_implicit=false})
 
if tpl_args.is_talisman or tpl_args.is_corrupted then
 
if tpl_args.is_talisman or tpl_args.is_corrupted then
Строка 474: Строка 462:
 
field = 'stat_text',
 
field = 'stat_text',
 
type = 'Text',
 
type = 'Text',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
local sep = ''
 
local sep = ''
 
if tpl_args.implicit_stat_text and tpl_args.explicit_stat_text then
 
if tpl_args.implicit_stat_text and tpl_args.explicit_stat_text then
Строка 501: Строка 489:
 
field = 'class',
 
field = 'class',
 
type = 'String',
 
type = 'String',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
local class = m_game.constants.item.classes[tpl_args.class_id]['long_upper']
 
local class = m_game.constants.item.classes[tpl_args.class_id]['long_upper']
 
-- Avoids errors with empty item class names later on
 
-- Avoids errors with empty item class names later on
Строка 526: Строка 514:
 
field = 'rarity',
 
field = 'rarity',
 
type = 'String',
 
type = 'String',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
return m_game.constants.rarities[tpl_args.rarity_id]['long_upper']
 
return m_game.constants.rarities[tpl_args.rarity_id]['long_upper']
 
end,
 
end,
Строка 552: Строка 540:
 
field = 'drop_rarity_ids',
 
field = 'drop_rarity_ids',
 
type = 'List (,) of String',
 
type = 'List (,) of String',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
-- Drop rarities only matter for base items.
 
-- Drop rarities only matter for base items.
 
if tpl_args.rarity_id ~= 'normal' then
 
if tpl_args.rarity_id ~= 'normal' then
Строка 571: Строка 559:
 
field = nil,
 
field = nil,
 
type = nil,
 
type = nil,
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
tpl_args.drop_rarities = nil
 
tpl_args.drop_rarities = nil
 
if true then return end
 
if true then return end
Строка 622: Строка 610:
 
field = 'drop_areas',
 
field = 'drop_areas',
 
type = 'List (,) of String',
 
type = 'List (,) of String',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
value = m_util.cast.table(value)
 
value = m_util.cast.table(value)
 
if value then
 
if value then
Строка 713: Строка 701:
 
field = 'required_level',
 
field = 'required_level',
 
type = 'Integer',
 
type = 'Integer',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
value = tpl_args.required_level
 
value = tpl_args.required_level
 
if value < cfg.base_item_required_level_threshold then
 
if value < cfg.base_item_required_level_threshold then
Строка 744: Строка 732:
 
field = 'inventory_icon',
 
field = 'inventory_icon',
 
type = 'String',
 
type = 'String',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
if not value then
 
if not value then
 
-- Certain types of items have default inventory icons
 
-- Certain types of items have default inventory icons
Строка 762: Строка 750:
 
field = 'alternate_art_inventory_icons',
 
field = 'alternate_art_inventory_icons',
 
type = 'List (,) of String',
 
type = 'List (,) of String',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
return m_util.cast.table(value, {
 
return m_util.cast.table(value, {
 
callback = function (value)
 
callback = function (value)
Строка 812: Строка 800:
 
type = 'String',
 
type = 'String',
 
--type = 'String(unique; size=200)',
 
--type = 'String(unique; size=200)',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
if value == nil then
 
if value == nil then
 
return nil
 
return nil
Строка 874: Строка 862:
 
field = 'is_replica',
 
field = 'is_replica',
 
type = 'Boolean',
 
type = 'Boolean',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
value = m_util.cast.boolean(value)
 
value = m_util.cast.boolean(value)
 
if value == true and tpl_args.rarity_id ~= 'unique' then
 
if value == true and tpl_args.rarity_id ~= 'unique' then
Строка 894: Строка 882:
 
field = 'is_relic',
 
field = 'is_relic',
 
type = 'Boolean',
 
type = 'Boolean',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
value = m_util.cast.boolean(value)
 
value = m_util.cast.boolean(value)
 
if value == true and tpl_args.rarity_id ~= 'unique' then
 
if value == true and tpl_args.rarity_id ~= 'unique' then
Строка 907: Строка 895:
 
field = 'is_fated',
 
field = 'is_fated',
 
type = 'Boolean',
 
type = 'Boolean',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
value = m_util.cast.boolean(value)
 
value = m_util.cast.boolean(value)
 
if value == true and tpl_args.rarity_id ~= 'unique' then
 
if value == true and tpl_args.rarity_id ~= 'unique' then
Строка 920: Строка 908:
 
field = nil,
 
field = nil,
 
type = nil,
 
type = nil,
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
tpl_args._flags.is_prophecy = (tpl_args.metadata_id == 'Metadata/Items/Currency/CurrencyItemisedProphecy' or tpl_args.base_item == cfg.prophecy_base_item or tpl_args.base_item_page == cfg.prophecy_base_item_page or tpl_args.base_item_id == 'Metadata/Items/Currency/CurrencyItemisedProphecy')
 
tpl_args._flags.is_prophecy = (tpl_args.metadata_id == 'Metadata/Items/Currency/CurrencyItemisedProphecy' or tpl_args.base_item == cfg.prophecy_base_item or tpl_args.base_item_page == cfg.prophecy_base_item_page or tpl_args.base_item_id == 'Metadata/Items/Currency/CurrencyItemisedProphecy')
 
return value
 
return value
Строка 929: Строка 917:
 
field = nil,
 
field = nil,
 
type = nil,
 
type = nil,
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
tpl_args._flags.is_blight_item = (tpl_args.blight_item_tier ~= nil)
 
tpl_args._flags.is_blight_item = (tpl_args.blight_item_tier ~= nil)
 
return value
 
return value
Строка 939: Строка 927:
 
type = 'Boolean',
 
type = 'Boolean',
 
func = h.proc.boolean,
 
func = h.proc.boolean,
default = function (tpl_args)
+
default = function (tpl_args, frame)
 
-- Generally items that are obtained only from specific monsters can't be obtained via cards or other means unless specifically specified
 
-- Generally items that are obtained only from specific monsters can't be obtained via cards or other means unless specifically specified
 
for _, key in ipairs({'is_talisman', 'is_essence', 'is_fated', 'is_replica', 'is_relic', 'drop_monsters'}) do
 
for _, key in ipairs({'is_talisman', 'is_essence', 'is_fated', 'is_replica', 'is_relic', 'drop_monsters'}) do
Строка 958: Строка 946:
 
field = nil,
 
field = nil,
 
type = nil,
 
type = nil,
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
local purchase_costs = {}
 
local purchase_costs = {}
 
for _, rarity_id in ipairs(m_game.constants.rarity_order) do
 
for _, rarity_id in ipairs(m_game.constants.rarity_order) do
Строка 989: Строка 977:
 
return purchase_costs
 
return purchase_costs
 
end,
 
end,
func_fetch = function (tpl_args)
+
func_fetch = function (tpl_args, frame)
 
if tpl_args.rarity_id ~= 'unique' then
 
if tpl_args.rarity_id ~= 'unique' then
 
return
 
return
Строка 1032: Строка 1020:
 
field = nil,
 
field = nil,
 
type = nil,
 
type = nil,
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
-- these variables are also used by mods when setting automatic sell prices
 
-- these variables are also used by mods when setting automatic sell prices
 
tpl_args.sell_prices = {}
 
tpl_args.sell_prices = {}
Строка 1074: Строка 1062:
 
field = 'quality',
 
field = 'quality',
 
type = 'Integer',
 
type = 'Integer',
-- Must copy to stat for the stat adjustments to work properly
+
-- Can be set manually, but default to Q20 for unique weapons/body armours
  +
-- Also must copy to stat for the stat adjustments to work properly
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
local quality = tonumber(value)
 
local quality = tonumber(value)
if quality then
+
if quality == nil then
local stat = {
+
if tpl_args.rarity_id ~= 'unique' then
min = quality,
+
quality = 0
  +
elseif cfg.class_groups.weapons.keys[tpl_args.class_id] or cfg.class_groups.armor.keys[tpl_args.class_id] then
max = quality,
 
avg = quality,
+
quality = 20
}
+
else
core.stats_update(tpl_args, 'quality', stat, nil, '_stats')
+
quality = 0
if tpl_args.class_id == 'UtilityFlask' or tpl_args.class_id == 'UtilityFlaskCritical' then
 
core.stats_update(tpl_args, 'quality_flask_duration', stat, nil, '_stats')
 
-- quality is added to quantity for maps
 
elseif tpl_args.class_id == 'Map' then
 
core.stats_update(tpl_args, 'map_item_drop_quantity_+%', stat, nil, '_stats')
 
 
end
 
end
 
end
 
local stat = {
  +
min = quality,
 
max = quality,
 
avg = quality,
 
}
  +
core.stats_update(tpl_args, 'quality', stat, nil, '_stats')
 
if tpl_args.class_id == 'UtilityFlask' or tpl_args.class_id == 'UtilityFlaskCritical' then
 
core.stats_update(tpl_args, 'quality_flask_duration', stat, nil, '_stats')
 
-- quality is added to quantity for maps
 
elseif tpl_args.class_id == 'Map' then
 
core.stats_update(tpl_args, 'map_item_drop_quantity_+%', stat, nil, '_stats')
 
end
 
end
 
return quality
 
return quality
 
end,
 
end,
default = 0,
 
 
},
 
},
 
-- amulets
 
-- amulets
Строка 1141: Строка 1136:
 
field = 'buff_values',
 
field = 'buff_values',
 
type = 'List (,) of Integer',
 
type = 'List (,) of Integer',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
local values = {}
 
local values = {}
 
local i = 0
 
local i = 0
Строка 1157: Строка 1152:
 
return value
 
return value
 
end,
 
end,
func_copy = function (tpl_args, value)
+
func_copy = function (tpl_args, frame, value)
 
tpl_args.buff_values = m_util.string.split(value, ',%s*')
 
tpl_args.buff_values = m_util.string.split(value, ',%s*')
 
end,
 
end,
Строка 1170: Строка 1165:
 
field = 'icon',
 
field = 'icon',
 
type = 'String',
 
type = 'String',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
return string.format(i18n.files.status_icon, tpl_args.name)
 
return string.format(i18n.files.status_icon, tpl_args.name)
 
end,
 
end,
Строка 1251: Строка 1246:
 
-- armor-type stuff
 
-- armor-type stuff
 
armour = {
 
armour = {
inherit = false,
 
 
field = 'armour',
 
field = 'armour',
type = nil,
 
func = nil,
 
},
 
armour_min = {
 
field = 'armour_min',
 
 
type = 'Integer',
 
type = 'Integer',
 
func = h.proc.number,
 
func = h.proc.number,
 
default = 0,
 
default = 0,
 
},
 
},
armour_max = {
+
energy_shield = {
field = 'armour_max',
+
field = 'energy_shield',
 
type = 'Integer',
 
type = 'Integer',
 
func = h.proc.number,
 
func = h.proc.number,
Строка 1269: Строка 1258:
 
},
 
},
 
evasion = {
 
evasion = {
inherit = false,
 
 
field = 'evasion',
 
field = 'evasion',
type = nil,
 
func = nil,
 
},
 
evasion_min = {
 
field = 'evasion_min',
 
type = 'Integer',
 
func = h.proc.number,
 
default = 0,
 
},
 
evasion_max = {
 
field = 'evasion_max',
 
type = 'Integer',
 
func = h.proc.number,
 
default = 0,
 
},
 
energy_shield = {
 
inherit = false,
 
field = 'energy_shield',
 
type = nil,
 
func = nil,
 
},
 
energy_shield_min = {
 
field = 'energy_shield_min',
 
type = 'Integer',
 
func = h.proc.number,
 
default = 0,
 
},
 
energy_shield_max = {
 
field = 'energy_shield_max',
 
 
type = 'Integer',
 
type = 'Integer',
 
func = h.proc.number,
 
func = h.proc.number,
Строка 1305: Строка 1264:
 
},
 
},
 
ward = {
 
ward = {
inherit = false,
 
 
field = 'ward',
 
field = 'ward',
type = nil,
 
func = nil,
 
},
 
ward_min = {
 
field = 'ward_min',
 
type = 'Integer',
 
func = h.proc.number,
 
default = 0,
 
},
 
ward_max = {
 
field = 'ward_max',
 
 
type = 'Integer',
 
type = 'Integer',
 
func = h.proc.number,
 
func = h.proc.number,
Строка 1359: Строка 1306:
 
field = 'primary_attribute',
 
field = 'primary_attribute',
 
type = 'String',
 
type = 'String',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
for _, attr in ipairs(m_game.constants.attribute_order) do
 
for _, attr in ipairs(m_game.constants.attribute_order) do
 
local val = tpl_args[attr .. '_percent']
 
local val = tpl_args[attr .. '_percent']
Строка 1390: Строка 1337:
 
field = 'support_gem_letter_html',
 
field = 'support_gem_letter_html',
 
type = 'Text',
 
type = 'Text',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
if tpl_args.support_gem_letter == nil then
 
if tpl_args.support_gem_letter == nil then
 
return nil
 
return nil
Строка 1435: Строка 1382:
 
type = 'String(size=1)',
 
type = 'String(size=1)',
 
func = nil,
 
func = nil,
func_copy = function (tpl_args, value)
+
func_copy = function (tpl_args, frame, value)
 
tpl_args.map_guild_character = value
 
tpl_args.map_guild_character = value
 
end,
 
end,
Строка 1443: Строка 1390:
 
type = 'String',
 
type = 'String',
 
func = nil, -- TODO: Validate against a query?
 
func = nil, -- TODO: Validate against a query?
func_copy = function (tpl_args, value)
+
func_copy = function (tpl_args, frame, value)
 
tpl_args.map_area_id = value
 
tpl_args.map_area_id = value
 
end,
 
end,
Строка 1451: Строка 1398:
 
type = 'Integer',
 
type = 'Integer',
 
func = h.proc.number,
 
func = h.proc.number,
func_copy = function (tpl_args, value)
+
func_copy = function (tpl_args, frame, value)
 
tpl_args.map_area_level = value
 
tpl_args.map_area_level = value
 
end,
 
end,
Строка 1458: Строка 1405:
 
field = 'series',
 
field = 'series',
 
type = 'String',
 
type = 'String',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
if tpl_args.rarity == 'normal' and value == nil then
 
if tpl_args.rarity == 'normal' and value == nil then
 
error(string.format(i18n.errors.generic_required_parameter, 'map_series'))
 
error(string.format(i18n.errors.generic_required_parameter, 'map_series'))
Строка 1564: Строка 1511:
 
field = nil,
 
field = nil,
 
type = nil,
 
type = nil,
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
value = {}
 
value = {}
 
local cont = true
 
local cont = true
Строка 1626: Строка 1573:
 
},
 
},
 
},
 
},
},
 
cosmetic_theme = {
 
field = 'theme',
 
type = 'String',
 
func = h.proc.text,
 
 
},
 
},
 
-- for essences
 
-- for essences
Строка 1674: Строка 1616:
 
field = 'type',
 
field = 'type',
 
type = 'String',
 
type = 'String',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
if tpl_args.seed_type_id ~= 'none' or tpl_args.seed_type_id ~= nil then
 
if tpl_args.seed_type_id ~= 'none' or tpl_args.seed_type_id ~= nil then
 
value = m_game.seed_types[tpl_args.seed_type_id]
 
value = m_game.seed_types[tpl_args.seed_type_id]
Строка 1684: Строка 1626:
 
field = nil,
 
field = nil,
 
type = nil,
 
type = nil,
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
if tpl_args.seed_type ~= nil then
 
if tpl_args.seed_type ~= nil then
 
value = m_util.html.poe_color(tpl_args.seed_type_id, tpl_args.seed_type)
 
value = m_util.html.poe_color(tpl_args.seed_type_id, tpl_args.seed_type)
Строка 1779: Строка 1721:
 
field = nil,
 
field = nil,
 
type = nil,
 
type = nil,
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
if tpl_args.heist_required_job_level then
 
if tpl_args.heist_required_job_level then
 
if tpl_args.heist_required_job_id then
 
if tpl_args.heist_required_job_id then
Строка 1810: Строка 1752:
 
type = 'Boolean',
 
type = 'Boolean',
 
func = h.proc.boolean,
 
func = h.proc.boolean,
 
},
 
master = {
 
field = 'master',
 
type = 'String',
 
func = h.proc.factory.value{
  +
validate = m_util.validate.factory.in_table_keys{
  +
tbl = m_util.table.column(m_game.constants.masters, 'long_upper', 'full'),
  +
errmsg = i18n.errors.invalid_master,
 
},
 
},
 
},
  +
master_level_requirement = {
 
field = 'level_requirement',
 
type = 'Integer',
 
func = h.proc.number,
 
},
  +
master_favour_cost = {
 
field = 'favour_cost',
 
type = 'Integer',
 
func = h.proc.number,
 
},
 
},
 
variation_count = {
 
variation_count = {
Строка 1846: Строка 1808:
 
field = 'card_art',
 
field = 'card_art',
 
type = 'Page',
 
type = 'Page',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
return string.format(i18n.files.divination_card_art, value or tpl_args.name)
 
return string.format(i18n.files.divination_card_art, value or tpl_args.name)
 
end,
 
end,
Строка 1859: Строка 1821:
 
field = 'base_item',
 
field = 'base_item',
 
type = 'String',
 
type = 'String',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
return tpl_args.base_item_data['items.name']
 
return tpl_args.base_item_data['items.name']
 
end,
 
end,
Строка 1867: Строка 1829:
 
field = 'base_item_id',
 
field = 'base_item_id',
 
type = 'String',
 
type = 'String',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
return tpl_args.base_item_data['items.metadata_id']
 
return tpl_args.base_item_data['items.metadata_id']
 
end,
 
end,
Строка 1875: Строка 1837:
 
field = 'base_item_page',
 
field = 'base_item_page',
 
type = 'Page',
 
type = 'Page',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
return tpl_args.base_item_data['items._pageName']
 
return tpl_args.base_item_data['items._pageName']
 
end,
 
end,
Строка 1883: Строка 1845:
 
field = 'name_list',
 
field = 'name_list',
 
type = 'List (�) of String',
 
type = 'List (�) of String',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
value = m_util.cast.table(value)
 
value = m_util.cast.table(value)
 
value[#value+1] = tpl_args.name
 
value[#value+1] = tpl_args.name
Строка 1894: Строка 1856:
 
field = 'frame_type',
 
field = 'frame_type',
 
type = 'String',
 
type = 'String',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
if value then
 
if value then
 
return value
 
return value
Строка 1919: Строка 1881:
 
func = nil,
 
func = nil,
 
default = {},
 
default = {},
func_fetch = function (tpl_args)
+
func_fetch = function (tpl_args, frame)
 
-- Fetch implicit mods from base item
 
-- Fetch implicit mods from base item
 
local results = m_cargo.query(
 
local results = m_cargo.query(
Строка 1979: Строка 1941:
 
field = 'damage_avg',
 
field = 'damage_avg',
 
type = 'Text',
 
type = 'Text',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
local dmg = {min=0, max=0}
 
local dmg = {min=0, max=0}
 
for key, _ in pairs(dmg) do
 
for key, _ in pairs(dmg) do
Строка 1994: Строка 1956:
 
field = 'damage_html',
 
field = 'damage_html',
 
type = 'Text',
 
type = 'Text',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
local text = {}
 
local text = {}
 
for _, dkey in ipairs(m_game.constants.damage_type_order) do
 
for _, dkey in ipairs(m_game.constants.damage_type_order) do
Строка 2018: Строка 1980:
 
field = 'radius_html',
 
field = 'radius_html',
 
type = 'Text',
 
type = 'Text',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
-- Get radius from stats
 
-- Get radius from stats
 
local radius = tpl_args._stats.local_jewel_effect_base_radius
 
local radius = tpl_args._stats.local_jewel_effect_base_radius
Строка 2040: Строка 2002:
 
field = 'drop_areas_html',
 
field = 'drop_areas_html',
 
type = 'Text',
 
type = 'Text',
func = function (tpl_args, value)
+
func = function (tpl_args, frame, value)
 
if tpl_args.drop_areas_data == nil then
 
if tpl_args.drop_areas_data == nil then
 
return value
 
return value
Строка 2319: Строка 2281:
 
html_fmt_options = {
 
html_fmt_options = {
 
fmt = '%i',
 
fmt = '%i',
 
},
 
},
 
block = {
 
field = 'block',
 
stats_add = {
 
'local_additional_block_chance_%',
 
},
 
minimum = 0,
 
html_fmt_options = {
 
fmt = '%i%%',
 
},
 
},
 
},
 
},
 
armour = {
 
armour = {
arg = {
 
min = 'armour_min',
 
max = 'armour_max',
 
},
 
 
field = 'armour',
 
field = 'armour',
 
stats_add = {
 
stats_add = {
Строка 2343: Строка 2311:
 
},
 
},
 
evasion = {
 
evasion = {
arg = {
 
min = 'evasion_min',
 
max = 'evasion_max',
 
},
 
 
field = 'evasion',
 
field = 'evasion',
 
stats_add = {
 
stats_add = {
Строка 2365: Строка 2329:
 
},
 
},
 
energy_shield = {
 
energy_shield = {
arg = {
 
min = 'energy_shield_min',
 
max = 'energy_shield_max',
 
},
 
 
field = 'energy_shield',
 
field = 'energy_shield',
 
stats_add = {
 
stats_add = {
Строка 2390: Строка 2350:
 
},
 
},
 
ward = {
 
ward = {
arg = {
 
min = 'ward_min',
 
max = 'ward_max',
 
},
 
 
field = 'ward',
 
field = 'ward',
 
stats_add = {
 
stats_add = {
Строка 2405: Строка 2361:
 
html_fmt_options = {
 
html_fmt_options = {
 
fmt = '%i',
 
fmt = '%i',
},
 
},
 
block = {
 
field = 'block',
 
stats_add = {
 
'local_additional_block_chance_%',
 
},
 
minimum = 0,
 
html_fmt_options = {
 
fmt = '%i%%',
 
 
},
 
},
 
},
 
},