Skip to content

Commit

Permalink
v3.2.26 battle数据增加poi_slot_ex
Browse files Browse the repository at this point in the history
  • Loading branch information
Gizeta committed Aug 29, 2022
1 parent a043915 commit 7f994e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 4 additions & 2 deletions common.es
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,14 @@ const hashCode = val => val.split('').reduce((h, ch) => {
return h;
}, 0);

/** @type {(ship: {api_slot?: number[]; poi_slot: undefined}) => {api_slot?: number[]; poi_slot?: number[]}} */
/** @type {(ship: {api_slot?: number[]; api_slot_ex?: number;}) => any} */
const appendSlotitemDetail = (ship) => {
const { _slotitems } = window;
const ret = {...ship, poi_slot: undefined};
const ret = {...ship, poi_slot: undefined, poi_slot_ex: undefined};
if (ship.api_slot)
ret.poi_slot = ship.api_slot.map(x => _slotitems[x]);
if (ship.api_slot_ex && ship.api_slot_ex !== -1)
ret.poi_slot_ex = _slotitems[ship.api_slot_ex];
return ret;
}

Expand Down
4 changes: 1 addition & 3 deletions index.es
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let combined_type = 0, preEscape = [], escapeList = [], api_cell_data = 0;
let quest_clear_id = -1, questlist = [], questDate = 0; // 任务日期与任务列表同步更新
let friendly_status = { flag: 0, type: 0 }; // 友军状态,是否邀请,是否强力
let friendly_data = {} // 友军数据暂存 为了保存出击前后的喷火数,延迟发送
let version = '3.2.25'
let version = '3.2.26'
let formation = '' // 阵型选择
let api_xal01 = '' // 是否削甲
let firenumBefore = 0 // 进入海图时的喷火数量
Expand Down Expand Up @@ -231,7 +231,6 @@ let handleGameResponse = (e) => {
if(_item.api_slot_ex && _item.api_slot_ex !== -1) {
_item.api_slotitem_ex = _slotitems[_item.api_slot_ex].api_slotitem_id
_item.api_slotitem_level = _slotitems[_item.api_slot_ex].api_level
_item.poi_slot_ex = _slotitems[_item.api_slot_ex]
} else {
_item.api_slotitem_ex = -1
_item.api_slotitem_level = -1
Expand All @@ -246,7 +245,6 @@ let handleGameResponse = (e) => {
if(_item.api_slot_ex && _item.api_slot_ex !== -1) {
_item.api_slotitem_ex = _slotitems[_item.api_slot_ex].api_slotitem_id
_item.api_slotitem_level = _slotitems[_item.api_slot_ex].api_level
_item.poi_slot_ex = _slotitems[_item.api_slot_ex]
} else {
_item.api_slotitem_ex = -1
_item.api_slotitem_level = -1
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "poi-plugin-kcwiki-report",
"version": "3.2.25",
"version": "3.2.26",
"description": "Report game data for kcwiki",
"main": "index.es",
"scripts": {
Expand Down

0 comments on commit 7f994e8

Please sign in to comment.