Skip to content

Commit 5c4a40f

Browse files
committed
xrGame/ui/ui_af_params: reorder artefact params order to match SOC
1 parent d66471d commit 5c4a40f

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/xrGame/ui/ui_af_params.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ bool CUIArtefactParams::InitFromXml(CUIXml& xml)
7676
m_disp_condition = CreateItem(xml, "condition", "ui_inv_af_condition");
7777
//-Alundaio
7878

79-
for (auto [id, section, caption, magnitude, sign_inverse, unit] : af_immunity)
80-
{
81-
m_immunity_item[id] = CreateItem(xml, section, magnitude, sign_inverse, unit, caption);
82-
}
8379
for (auto [id, section, caption, magnitude, sign_inverse, unit] : af_restore)
8480
{
8581
m_restore_item[id] = CreateItem(xml, section, magnitude, sign_inverse, unit, caption);
8682
}
83+
for (auto [id, section, caption, magnitude, sign_inverse, unit] : af_immunity)
84+
{
85+
m_immunity_item[id] = CreateItem(xml, section, magnitude, sign_inverse, unit, caption);
86+
}
8787
m_additional_weight = CreateItem(xml, "additional_weight", "ui_inv_weight", "ui_inv_outfit_additional_weight");
8888

8989
xml.SetLocalRoot(stored_root);
@@ -164,6 +164,19 @@ void CUIArtefactParams::SetInfo(const CInventoryItem& pInvItem)
164164
setValue(m_disp_condition, pInvItem.GetCondition());
165165
//-Alundaio
166166

167+
for (auto [id, restore_section, restore_caption, magnitude, sign_inverse, unit] : af_restore)
168+
{
169+
if (!m_restore_item[id])
170+
continue;
171+
172+
float val = pSettings->r_float(af_section, restore_section);
173+
if (fis_zero(val))
174+
continue;
175+
176+
val *= pInvItem.GetCondition();
177+
setValue(m_restore_item[id], val);
178+
}
179+
167180
for (auto [id, immunity_section, immunity_caption, magnitude, sign_inverse, unit] : af_immunity)
168181
{
169182
if (!m_immunity_item[id])
@@ -190,19 +203,6 @@ void CUIArtefactParams::SetInfo(const CInventoryItem& pInvItem)
190203
}
191204
}
192205

193-
for (auto [id, restore_section, restore_caption, magnitude, sign_inverse, unit] : af_restore)
194-
{
195-
if (!m_restore_item[id])
196-
continue;
197-
198-
float val = pSettings->r_float(af_section, restore_section);
199-
if (fis_zero(val))
200-
continue;
201-
202-
val *= pInvItem.GetCondition();
203-
setValue(m_restore_item[id], val);
204-
}
205-
206206
SetHeight(h);
207207
}
208208

0 commit comments

Comments
 (0)