Skip to content

Commit c2dc31d

Browse files
committed
Add new mecenaries for D2R.
#45
1 parent dacd0f4 commit c2dc31d

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

Diablo Edit2/DlgCharItems.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -817,11 +817,11 @@ void CDlgCharItems::ResetAll()
817817
Invalidate();
818818
}
819819

820-
static void loadTextMercCB(CComboBox & cb, int sz, function<CString (int i)> name) {
820+
static void loadTextMercCB(CComboBox & cb, int sz, function<CString (int i)> nameOf) {
821821
int sel = cb.GetCurSel(); //保存当前选中项
822822
cb.ResetContent(); //删除旧项
823823
for (int i = 0; i < sz; ++i) //更新文字
824-
cb.InsertString(i, name(i));
824+
cb.InsertString(i, nameOf(i));
825825
if (sz > 0) //重新设置选择项
826826
cb.SetCurSel(min(sel, sz - 1));
827827
}
@@ -1274,11 +1274,13 @@ void CDlgCharItems::OnItemRemove() {
12741274
Invalidate();
12751275
}
12761276

1277-
static int mercNameGroup(int type) {
1278-
if (type < 0)
1277+
static int mercNameGroup(int name) {
1278+
if (name < 0)
12791279
return - 1;
1280-
const int INDEX[] = {5, 14, 23};
1281-
return lower_bound(begin(INDEX), end(INDEX), type, less<int>()) - begin(INDEX);
1280+
const int NAME_INDEX[] = {5, 14, 23, 29, 35};
1281+
const int TYPE_INDEX[] = {0, 1, 2, 3, 1, 3};
1282+
int type = lower_bound(begin(NAME_INDEX), end(NAME_INDEX), name, less<int>()) - begin(NAME_INDEX);
1283+
return TYPE_INDEX[type];
12821284
}
12831285

12841286
void CDlgCharItems::OnCbnSelchangeComboMercType() {

Diablo Edit2/language.dat

161 Bytes
Binary file not shown.

Generate Data/language.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,15 @@
413413
Barbarian - Nightmare
414414
Barbarian - Hell
415415
Barbarian - Hell
416+
Mercenary - Prayer Arura (D2R only) 沙漠雇佣兵 - 祈祷光环 (D2R only)
417+
Mercenary - Defiance Arura (D2R only) 沙漠雇佣兵 - 反抗光环 (D2R only)
418+
Mercenary - Blessed Arura (D2R only) 沙漠雇佣兵 - 精准祝福光环 (D2R only)
419+
Mercenary - Thorns Arura (D2R only) 沙漠雇佣兵 - 荆棘光环 (D2R only)
420+
Mercenary - Holy Freeze Arura (D2R only) 沙漠雇佣兵 - 神圣冰冻光环 (D2R only)
421+
Mercenary - Might Arura (D2R only) 沙漠雇佣兵 - 力量光环 (D2R only)
422+
Barbarian - Frenzy (D2R only) 野蛮人 - 狂乱 (D2R only)
423+
Barbarian - Frenzy (D2R only) 野蛮人 - 狂乱 (D2R only)
424+
Barbarian - Frenzy (D2R only) 野蛮人 - 狂乱 (D2R only)
416425
*=======================物品种类名字
417426
General items 一般物品 一般物品
418427
Helmets 头盔 頭盔

0 commit comments

Comments
 (0)