したらばTOP ■掲示板に戻る■ 全部 1-100 最新50 | メール | |
レス数が900を超えています。1000を超えると投稿できなくなるよ。

戦国IXA ツールスレPart48

357名無しさん:2023/04/11(火) 03:29:48 ID:iOR7Vu4I
>>355
上位訓練のこと完全に忘れていました
ついでに改善も入れて、結構すっきりして処理も早くなったと思います
完成形だけ置いておきます
前回の修正を追えていない方は>>350のURLの全文の方も更新したのでそちらを参考にしてください
ただ、例えば騎馬鉄砲が表示は8秒/兵となっているのに、標準機能で普通に訓練しようとして標準の方の確認ボタン押すと
どうみても7.2秒/兵になってるんですよね(レベル15、位階正一位、占い2)
施設と全支城のレベルが揃っていれば大きな問題にはなりませんがレベルに差があると実行時間が均等にならないかもしれません

// 各ページの情報収集
function getPageData(a, i, obj) {
var getVid = function(coord) {
return $('.sideBoxInner.my_capital, .sideBoxInner.my_country').find('li[data-village_x="' + coord[0] + '"][data-village_y="' + coord[1] + '"]').attr('data-village_id');
},
$table = $('span[onclick*="' + str + '"]').closest('table'),
$span = $table.find('span.create_unit_time'),
$select = $table.find('select');

$span.each(function() {
obj.time.push(millisecondConvert($(this).text()));
});
for (var n = 0; n < a.length; n++) {
obj.base.push($select.find('option').eq(n).text());
obj.lv.push($select.find('option').eq(n).text().match(/レベル\d+/)[0].match(/\d+/)[0]);
}

$.ajax({
type: 'post',
url: '/facility/unit_list.php',
beforeSend: xrwStatusText,
}).then(function(html) {
var $table = $(html).find('table.table_fightlist2:not(:eq(0))'),
$tr, len;
$.each(a, function(idx) {
$table.each(function() {
if (a[idx].vid == getVid($(this).find('th:first a').attr('href').match(/-?\d+/g))) {
$tr = $(this).find('tr:not(:eq(0))').filter(function() {
if ($(this).find('td:first').text().indexOf(document.title.split(' - ')[0]) != -1) {
return true;
}
else {
return false;
}
});
return false;
}
});
len = $tr ? $tr.length : 0;
obj.capa.push(10 - len);
});
return calculationRatio(obj);
});
}


新着レスの表示


名前: E-mail(省略可)

※書き込む際の注意事項はこちら

※画像アップローダーはこちら

(画像を表示できるのは「画像リンクのサムネイル表示」がオンの掲示板に限ります)

掲示板管理者へ連絡 無料レンタル掲示板