關於擴張版的問題,在 github 上已經有人提出 issue:
https://github.com/nekopanda/logbook/issues/38
在 logbook.internal.Ship.java 666行:
/** 改造最終艦のID */
public static int getCharId(ShipInfoDto shipinfo) {
int charId = shipinfo.getShipId();
int afterShipId = shipinfo.getAftershipid();
while (afterShipId != 0) {
charId = afterShipId;
afterShipId = Ship.get(String.valueOf(afterShipId)).getAftershipid();
}
return charId;
}
因為 翔鶴改二改造後 = 翔鶴改二甲
翔鶴改二甲改造後 = 翔鶴改二
造成了無窮迴圈,導致航海日誌擴張版無法正常運作。
(航海日誌原版沒有這樣的設計)
如果會自行編譯的板友可以稍微修改一下:
import java.util.Vector;
(中略)
/** 改造最終艦のID */
public static int getCharId(ShipInfoDto shipinfo) {
int charId = shipinfo.getShipId();
int afterShipId = shipinfo.getAftershipid();
Vector<Integer> seenId = new Vector<>();
while (afterShipId != 0) {
boolean seen = false;
for (int i : seenId) {
if (i == afterShipId) {
seen = true;
break;
}
}
if (seen)
break;
seenId.add (afterShipId);
charId = afterShipId;
afterShipId = Ship.get(String.valueOf(afterShipId)).getAftershipid();
}
return charId;
}
應該算是一個比較通用的暫時解法吧...
不過其實蠻無用的,會自行編譯的人應該都有辦法自己改...