Заморозка фиксов.
This commit is contained in:
parent
65aa6fba8e
commit
70389921ea
@ -1524,13 +1524,14 @@ JS;
|
|||||||
$jstext = json_encode($log['text']);
|
$jstext = json_encode($log['text']);
|
||||||
$jsvars = json_encode($log['vars']);
|
$jsvars = json_encode($log['vars']);
|
||||||
|
|
||||||
$js = "add_log({$log['id']},0,$jstext,{$log['id_hod']},0,0,$jsvars)" . $js;
|
$js = "add_log({$log['id']},0,$jstext,{$log['id_hod']},$jsvars);" . $js;
|
||||||
}
|
}
|
||||||
|
|
||||||
Db::sql('update stats set alog = ? where id = ?', [$u->info['alog'], $u->info['id']]);
|
Db::sql('update stats set alog = ? where id = ?', [$u->info['alog'], $u->info['id']]);
|
||||||
$js .= "id_log=$pll;";
|
$js .= "id_log=$pll;";
|
||||||
|
|
||||||
return htmlspecialchars($js, ENT_QUOTES);
|
//return htmlspecialchars($js, ENT_QUOTES);
|
||||||
|
return $js;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1588,13 +1589,15 @@ JS;
|
|||||||
$jstext = json_encode($log['text']);
|
$jstext = json_encode($log['text']);
|
||||||
$jsvars = json_encode($log['vars']);
|
$jsvars = json_encode($log['vars']);
|
||||||
|
|
||||||
$js = "add_mlog({$log['id']},0,$jstext,{$log['id_hod']},0,0,$jsvars)" . $js;
|
//$js = "add_mlog({$log['id']},0,$jstext,{$log['id_hod']},$jsvars);" . $js;
|
||||||
|
$js = "add_mlog({$log['id']},0,'{$log['text']}',{$log['id_hod']},'{$log['vars']}');" . $js;
|
||||||
}
|
}
|
||||||
|
|
||||||
Db::sql('update stats set mlog = ? where id = ?', [$u->info['mlog'], $u->info['id']]);
|
Db::sql('update stats set mlog = ? where id = ?', [$u->info['mlog'], $u->info['id']]);
|
||||||
$js .= "id_mlog=$pll;";
|
$js .= "id_mlog=$pll;";
|
||||||
|
|
||||||
return htmlspecialchars($js, ENT_QUOTES);
|
//return htmlspecialchars($js, ENT_QUOTES);
|
||||||
|
return $js;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Считаем урон
|
//Считаем урон
|
||||||
|
114
js/btl_mini.js
114
js/btl_mini.js
@ -22,9 +22,6 @@ var eatk = 0;
|
|||||||
var ggcode = '2014';
|
var ggcode = '2014';
|
||||||
var irn = 0;
|
var irn = 0;
|
||||||
|
|
||||||
function magic_div(id, name, img, title) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function testClearZone() {
|
function testClearZone() {
|
||||||
if (top.slcbrc[4] == 0) {
|
if (top.slcbrc[4] == 0) {
|
||||||
@ -81,8 +78,8 @@ function change_radioKeys(id, cper) {
|
|||||||
jo = 0;
|
jo = 0;
|
||||||
while (j <= 5) {
|
while (j <= 5) {
|
||||||
var radio = document.getElementById(`atack_${i}_${j}`);
|
var radio = document.getElementById(`atack_${i}_${j}`);
|
||||||
if (radio != undefined) {
|
if (radio) {
|
||||||
if (radio.className != null && radio.className == "radio_on") jo++;
|
if (radio.className && radio.className == "radio_on") jo++;
|
||||||
}
|
}
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
@ -97,8 +94,8 @@ function change_radioKeys(id, cper) {
|
|||||||
var i = 1, jo = 0;
|
var i = 1, jo = 0;
|
||||||
while (i <= 5) {
|
while (i <= 5) {
|
||||||
var radio = document.getElementById(`block_1_${i}`);
|
var radio = document.getElementById(`block_1_${i}`);
|
||||||
if (radio != undefined) {
|
if (radio) {
|
||||||
if (radio.className != null && radio.className == "radio_on") jo++;
|
if (radio.className && radio.className == "radio_on") jo++;
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
@ -108,7 +105,7 @@ function change_radioKeys(id, cper) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((z == 0 || id == 0) && cper == false) {
|
if ((z == 0 || id == 0) && !cper) {
|
||||||
all_radio_off();
|
all_radio_off();
|
||||||
refleshPoints();
|
refleshPoints();
|
||||||
}
|
}
|
||||||
@ -203,7 +200,7 @@ function select_atack(id, r) {
|
|||||||
function radio_off(id, zone, type) {
|
function radio_off(id, zone, type) {
|
||||||
var i = 1;
|
var i = 1;
|
||||||
while (i <= 5) {
|
while (i <= 5) {
|
||||||
if (document.getElementById(`${type}_${id}_${i}`) != undefined && i != zone) {
|
if (document.getElementById(`${type}_${id}_${i}`) && i != zone) {
|
||||||
document.getElementById(`${type}_${id}_${i}`).className = "radio_off";
|
document.getElementById(`${type}_${id}_${i}`).className = "radio_off";
|
||||||
if (type == 'atack') zas[id] = 0;
|
if (type == 'atack') zas[id] = 0;
|
||||||
else zbs[id] = 0;
|
else zbs[id] = 0;
|
||||||
@ -297,13 +294,13 @@ function autobattle() {
|
|||||||
var i = 1;
|
var i = 1;
|
||||||
while (i <= za) {
|
while (i <= za) {
|
||||||
if (zas[i] == 0 || top.slcbrc[4] === 1) {
|
if (zas[i] == 0 || top.slcbrc[4] === 1) {
|
||||||
zas[i] = Math.floor(Math.random(5) * 5 + 1);
|
zas[i] = Math.floor(Math.random() * 5 + 1);
|
||||||
change_radio(i, zas[i], 'atack', 1);
|
change_radio(i, zas[i], 'atack', 1);
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
if (zbs[1] == 0 || top.slcbrc[4] === 1) {
|
if (zbs[1] == 0 || top.slcbrc[4] === 1) {
|
||||||
zbs[1] = Math.floor(Math.random(5) * 5 + 1);
|
zbs[1] = Math.floor(Math.random() * 5 + 1);
|
||||||
change_radio(1, zbs[1], 'block', 1);
|
change_radio(1, zbs[1], 'block', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -343,7 +340,6 @@ async function atack() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var g_iCount = Number();
|
|
||||||
var g_iCount = 45;
|
var g_iCount = 45;
|
||||||
var tmr0057 = null;
|
var tmr0057 = null;
|
||||||
|
|
||||||
@ -358,17 +354,17 @@ function startCountdown() {
|
|||||||
return tmr0057 = setTimeout('startCountdown()', 1000);
|
return tmr0057 = setTimeout('startCountdown()', 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
var img_battle = `<img src='https://${top.c.img}/i/battle/1.jpg'>`;
|
let img_battle = `<img src='https://${top.c.img}/i/battle/1.jpg' alt="Battle">`;
|
||||||
|
|
||||||
function mainstatus(id) {
|
function mainstatus(id) {
|
||||||
|
|
||||||
if (smnpty <= 0) {
|
if (smnpty <= 0) {
|
||||||
$('#btn_down_img2').css({'display': 'none'});
|
document.getElementById('btn_down_img2').style.display = 'none';
|
||||||
} else {
|
} else {
|
||||||
$('#btn_down_img2').css({'display': ''});
|
document.getElementById('btn_down_img2').style.display = '';
|
||||||
$('#btn_down_img2').attr('title', `Смена противника (${smnpty})`);
|
document.getElementById('btn_down_img2').title = `Смена противника (${smnpty})`
|
||||||
}
|
}
|
||||||
if (battleFinishData != -1) { // хуй знает че такое
|
if (battleFinishData !== -1) { // Объявляется аж в Finish.php
|
||||||
document.getElementById('mainpanel2').style.display = ''; // 4
|
document.getElementById('mainpanel2').style.display = ''; // 4
|
||||||
document.getElementById('go_btn').style.display = 'none'; // 4
|
document.getElementById('go_btn').style.display = 'none'; // 4
|
||||||
document.getElementById('mainpanel').style.display = 'none'; // 4
|
document.getElementById('mainpanel').style.display = 'none'; // 4
|
||||||
@ -379,11 +375,13 @@ function mainstatus(id) {
|
|||||||
document.getElementById('btn_down_img1').style.display = ''; // 2
|
document.getElementById('btn_down_img1').style.display = ''; // 2
|
||||||
document.getElementById('btn_down_img2').style.display = 'none'; // 2
|
document.getElementById('btn_down_img2').style.display = 'none'; // 2
|
||||||
|
|
||||||
document.getElementById("ref").innerHTML = `<center><font color='red'><b>${battleFinishData}</b></font></center>`;
|
document.getElementById('ref').style.textAlign = 'center';
|
||||||
|
document.getElementById('ref').style.color = 'red';
|
||||||
|
document.getElementById("ref").innerHTML = `<b>${battleFinishData}</b>`;
|
||||||
rand_img();
|
rand_img();
|
||||||
document.getElementById("player2").innerHTML = `<div style='margin-top:18px;' align='right'>${img_battle}</div>`;
|
document.getElementById("player2").innerHTML = `<div style='margin-top:18px; text-align: right;'>${img_battle}</div>`;
|
||||||
document.getElementById('player2_login').style.display = 'none';
|
document.getElementById('player2_login').style.display = 'none';
|
||||||
} else if (id == 1) //Можно ударить противника ( доступный удар )
|
} else if (id === 1) //Можно ударить противника ( доступный удар )
|
||||||
{
|
{
|
||||||
document.getElementById('mainpanel').style.display = ''; // 4
|
document.getElementById('mainpanel').style.display = ''; // 4
|
||||||
document.getElementById('player2_login').style.display = '';
|
document.getElementById('player2_login').style.display = '';
|
||||||
@ -394,10 +392,10 @@ function mainstatus(id) {
|
|||||||
document.getElementById('go_btn').setAttribute("class", "buttons btnnew btnnew2");
|
document.getElementById('go_btn').setAttribute("class", "buttons btnnew btnnew2");
|
||||||
document.getElementById('go_btn').setAttribute("onclick", "atackt();");
|
document.getElementById('go_btn').setAttribute("onclick", "atackt();");
|
||||||
|
|
||||||
if (document.getElementById('reflesh_btn') != undefined) {
|
if (document.getElementById('reflesh_btn')) {
|
||||||
document.getElementById('reflesh_btn').style.display = 'none';
|
document.getElementById('reflesh_btn').style.display = 'none';
|
||||||
}
|
}
|
||||||
} else if (id == 2) //Ожидаем хода противника ( обновить )
|
} else if (id === 2) //Ожидаем хода противника ( обновить )
|
||||||
{
|
{
|
||||||
document.getElementById('mainpanel').style.display = 'none'; // 4
|
document.getElementById('mainpanel').style.display = 'none'; // 4
|
||||||
document.getElementById('mainpanel222').style.display = 'none'; // 4
|
document.getElementById('mainpanel222').style.display = 'none'; // 4
|
||||||
@ -405,12 +403,12 @@ function mainstatus(id) {
|
|||||||
document.getElementById('go_btn').style.display = 'none'; // 4
|
document.getElementById('go_btn').style.display = 'none'; // 4
|
||||||
document.getElementById('reflesh_btn').style.display = ''; // 3
|
document.getElementById('reflesh_btn').style.display = ''; // 3
|
||||||
rand_img();
|
rand_img();
|
||||||
document.getElementById("player2").innerHTML = `<div style='margin-top:18px;' align='right'>${img_battle}</div>`;
|
document.getElementById("player2").innerHTML = `<div style='margin-top:18px; text-align: right;'>${img_battle}</div>`;
|
||||||
document.getElementById('player2_login').style.display = 'none';
|
document.getElementById('player2_login').style.display = 'none';
|
||||||
document.getElementById('btn_down_img1').setAttribute("onclick", "reflesht();");
|
document.getElementById('btn_down_img1').setAttribute("onclick", "reflesht();");
|
||||||
document.getElementById('reflesh_btn').setAttribute("class", "buttons btnnew btnnew2");
|
document.getElementById('reflesh_btn').setAttribute("class", "buttons btnnew btnnew2");
|
||||||
document.getElementById('reflesh_btn').setAttribute("onclick", "reflesht();");
|
document.getElementById('reflesh_btn').setAttribute("onclick", "reflesht();");
|
||||||
} else if (id == 3) // Проиграли. Ожидаем завершения поединка ( кнопка вернутся с поединка )
|
} else if (id === 3) // Проиграли. Ожидаем завершения поединка ( кнопка вернутся с поединка )
|
||||||
{
|
{
|
||||||
document.getElementById('mainpanel2').style.display = ''; // 4
|
document.getElementById('mainpanel2').style.display = ''; // 4
|
||||||
document.getElementById('go_btn').style.display = 'none'; // 4
|
document.getElementById('go_btn').style.display = 'none'; // 4
|
||||||
@ -426,104 +424,94 @@ function mainstatus(id) {
|
|||||||
document.getElementById('btn_down_img1').style.display = ''; // 2
|
document.getElementById('btn_down_img1').style.display = ''; // 2
|
||||||
document.getElementById('btn_down_img2').style.display = 'none'; // 2
|
document.getElementById('btn_down_img2').style.display = 'none'; // 2
|
||||||
|
|
||||||
document.getElementById("ref").innerHTML = "<font color='red'><b>Вы повержены. Ожидайте пока поединок завершат другие бойцы...</b></font>";
|
document.getElementById("ref").innerHTML = `<b style='color: red;'>Вы повержены. Ожидайте пока поединок завершат другие бойцы...</b>`;
|
||||||
document.getElementById("player2").innerHTML = `<div style='margin-top:18px;' align='right'>${img_battle}</div>`;
|
document.getElementById("player2").innerHTML = `<div style='margin-top:18px; text-align: right;'>${img_battle}</div>`;
|
||||||
document.getElementById('player2_login').style.display = 'none';
|
document.getElementById('player2_login').style.display = 'none';
|
||||||
}
|
}
|
||||||
if (document.getElementById('mainpanel').style.display == '') {
|
if (document.getElementById('mainpanel').style.display !== 'none') {
|
||||||
document.getElementById('mainpanel2').style.display = 'none';
|
document.getElementById('mainpanel2').style.display = 'none';
|
||||||
}
|
}
|
||||||
top.goSit(1);
|
top.goSit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function rand_img() {
|
function rand_img() {
|
||||||
if (level < 4) {
|
img_battle = `<img src='//img.new-combats.tech/i/battle/${(Math.floor(Math.random() * 44))}.jpg' alt="Battle">`;
|
||||||
img_battle = `<img src='//img.new-combats.tech/i/battle/${(Math.floor(Math.random(2) * 2))}.gif'>`;
|
|
||||||
return
|
|
||||||
}
|
|
||||||
img_battle = `<img src='//img.new-combats.tech/i/battle/${(Math.floor(Math.random(29) * 29))}.jpg'>`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var fstlh = 0;
|
let fstlh = 0;
|
||||||
var lsti = 0;
|
var lsti = 0;
|
||||||
var lsthd = [];
|
let lsthd = [];
|
||||||
var id_log_ar = [];
|
var id_log_ar = [];
|
||||||
var id_log;
|
var id_log;
|
||||||
var type_log = top.type_log;
|
var type_log = top.type_log;
|
||||||
|
|
||||||
function add_log(id, foryou, text, hod_id, my, last_hod, vars) {
|
function add_log(id, foryou, text, hod_id, vars) {
|
||||||
if (top.des == 1) type_log = 0
|
if (top.des === 1) type_log = 0
|
||||||
else type_log = 1;
|
else type_log = 1;
|
||||||
|
if (type_log === 1) {
|
||||||
if (type_log == 1) {
|
|
||||||
chsee = 'chsee2';
|
|
||||||
if (my == 1) chsee = 'chsee3'
|
|
||||||
//if(id_log_ar[id]!=id)
|
|
||||||
//{
|
|
||||||
text = looklogrep(text, vars);
|
text = looklogrep(text, vars);
|
||||||
id_log_ar[id] = id;
|
id_log_ar[id] = id;
|
||||||
id_log = id;
|
id_log = id;
|
||||||
// if (top.frames['main'].document.getElementById("battle_log_" + hod_id + "") == undefined && hod_id != 1) {
|
|
||||||
if (!top.frames['main'].document.getElementById(`battle_log_${hod_id}`) && hod_id != 1) {
|
if (!top.frames['main'].document.getElementById(`battle_log_${hod_id}`) && hod_id !== 1) {
|
||||||
if (fstlh == 0) fstlh = hod_id
|
if (fstlh === 0) fstlh = hod_id
|
||||||
lsthd[lsti] = hod_id;
|
lsthd[lsti] = hod_id;
|
||||||
lsti++;
|
lsti++;
|
||||||
$(top.frames['main'].document.getElementById('battle_logg')).prepend(`<div style="padding-top:2px;padding-bottom:2px;" id="battle_log_'${hod_id}" class="battle_hod_style"></div>`);
|
$(top.frames['main'].document.getElementById('battle_logg')).prepend(`<div style="padding-top:2px;padding-bottom:2px;" id="battle_log_'${hod_id}" class="battle_hod_style"></div>`);
|
||||||
} else if (!top.frames['main'].document.getElementById(`battle_log_${hod_id}`)) {
|
} else if (!top.frames['main'].document.getElementById(`battle_log_${hod_id}`)) {
|
||||||
top.frames['main'].document.getElementById('battle_logg').innerHTML = top.frames['main'].document.getElementById('battle_logg').innerHTML + `<div style="padding-top:2px;padding-bottom:2px;" id="battle_log_${hod_id}"></div>`;
|
top.frames['main'].document.getElementById('battle_logg').innerHTML += `<div style="padding-top:2px;padding-bottom:2px;" id="battle_log_${hod_id}"></div>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!top.frames['main'].document.getElementById(`log_id_${id}`)) {
|
if (!top.frames['main'].document.getElementById(`log_id_${id}`)) {
|
||||||
$(top.frames['main'].document.getElementById(`battle_log_${hod_id}`)).prepend(`<span id="log_id_${id}" class="foryou${foryou}">${text}</span><br>`);
|
$(top.frames['main'].document.getElementById(`battle_log_${hod_id}`)).prepend(`<span id="log_id_${id}" class="foryou${foryou}">${text}</span><br>`);
|
||||||
}
|
}
|
||||||
//}
|
|
||||||
if (top.frames['main'].document.getElementById(`battle_log_${hod_id - 25}`) != undefined) {
|
if (top.frames['main'].document.getElementById(`battle_log_${hod_id - 25}`)) {
|
||||||
top.rmve(`#battle_log_${hod_id - 25}`);
|
top.rmve(`#battle_log_${hod_id - 25}`);
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
chsee = 'chsee2';
|
|
||||||
if (my == 1) chsee = 'chsee3'
|
|
||||||
text = looklogrep(text, vars);
|
text = looklogrep(text, vars);
|
||||||
id_log_ar[id] = id;
|
id_log_ar[id] = id;
|
||||||
id_log = id;
|
id_log = id;
|
||||||
if (!top.document.getElementById(`battle_log_${hod_id}`) && hod_id != 1) {
|
if (!top.document.getElementById(`battle_log_${hod_id}`) && hod_id !== 1) {
|
||||||
if (fstlh == 0) {
|
if (fstlh === 0) {
|
||||||
fstlh = hod_id;
|
fstlh = hod_id;
|
||||||
}
|
}
|
||||||
lsthd[lsti] = hod_id;
|
lsthd[lsti] = hod_id;
|
||||||
lsti++;
|
lsti++;
|
||||||
$(top.document.getElementById('battle_logg')).prepend(`<div style="padding-top:2px;padding-bottom:2px;" id="battle_log_${hod_id}" tabindex="${0 - hod_id}" class="battle_hod_style"></div>`);
|
$(top.document.getElementById('battle_logg')).prepend(`<div style="padding-top:2px;padding-bottom:2px;" id="battle_log_${hod_id}" tabindex="${0 - hod_id}" class="battle_hod_style"></div>`);
|
||||||
} else if (top.document.getElementById("battle_log_" + hod_id + "") == undefined) {
|
} else if (!top.document.getElementById("battle_log_" + hod_id)) {
|
||||||
top.document.getElementById('battle_logg').innerHTML = top.document.getElementById('battle_logg').innerHTML + `<div style="padding-top:2px;padding-bottom:2px;" id="battle_log_${hod_id}"></div>`;
|
top.document.getElementById('battle_logg').insertAdjacentHTML('beforeend', `<div style="padding-top:2px;padding-bottom:2px;" id="battle_log_${hod_id}"></div>`);
|
||||||
}
|
}
|
||||||
if (!top.document.getElementById(`log_id_${id}`)) {
|
if (!top.document.getElementById(`log_id_${id}`)) {
|
||||||
$(top.document.getElementById(`battle_log_${hod_id}`)).prepend(`<span id="log_id_${id}" class="foryou${foryou}">${text}</span><br>`);
|
$(top.document.getElementById(`battle_log_${hod_id}`)).prepend(`<span id="log_id_${id}" class="foryou${foryou}">${text}</span><br>`);
|
||||||
}
|
}
|
||||||
if (top.document.getElementById(`battle_log_${hod_id - 7}`) != undefined) {
|
if (top.document.getElementById(`battle_log_${hod_id - 7}`)) {
|
||||||
top.rmve(`#battle_log_${hod_id - 7}`);
|
top.rmve(`#battle_log_${hod_id - 7}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-- Мой лог--------------------------------
|
//-- Мой лог--------------------------------
|
||||||
//-------------------------------------------
|
//-------------------------------------------
|
||||||
function add_mlog(id, foryou, text, hod_id, my, last_hod, vars) {
|
function add_mlog(id, foryou, text, hod_id, vars) {
|
||||||
chsee = 'chsee7';
|
|
||||||
text = looklogrep(text, vars);
|
text = looklogrep(text, vars);
|
||||||
id_log_ar[id] = id;
|
id_log_ar[id] = id;
|
||||||
id_log = id;
|
id_log = id;
|
||||||
if (!top.document.getElementById(`battle_mlog_${hod_id}`) && hod_id != 1) {
|
if (!top.document.getElementById(`battle_mlog_${hod_id}`) && hod_id !== 1) {
|
||||||
$(top.document.getElementById('battle_mlogg')).prepend(`<div style="padding-top:2px;padding-bottom:2px;" id="battle_mlog_${hod_id}" tabindex="${0 - hod_id}" class="battle_hod_style"></div>`);
|
$(top.document.getElementById('battle_mlogg')).prepend(`<div style="padding-top:2px;padding-bottom:2px;" id="battle_mlog_${hod_id}" tabindex="${0 - hod_id}" class="battle_hod_style"></div>`);
|
||||||
|
|
||||||
} else if (!top.document.getElementById(`battle_mlog_${hod_id}`)) {
|
} else if (!top.document.getElementById(`battle_mlog_${hod_id}`)) {
|
||||||
top.document.getElementById('battle_mlogg').innerHTML = top.document.getElementById('battle_mlogg').innerHTML + `<div style="padding-top:2px;padding-bottom:2px;" id="battle_mlog_${hod_id}"></div>`;
|
top.document.getElementById('battle_mlogg').innerHTML += `<div style="padding-top:2px;padding-bottom:2px;" id="battle_mlog_${hod_id}"></div>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!top.document.getElementById(`mlog_id_${id}`)) {
|
if (!top.document.getElementById(`mlog_id_${id}`)) {
|
||||||
$(top.document.getElementById(`battle_mlog_${hod_id}`)).prepend(`<span id="mlog_id_${id}" class="foryou${foryou}">${text}</span><br>`);
|
$(top.document.getElementById(`battle_mlog_${hod_id}`)).prepend(`<span id="mlog_id_${id}" class="foryou${foryou}">${text}</span><br>`);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (top.document.getElementById(`battle_mlog_${hod_id - 14}`) != undefined) {
|
if (top.document.getElementById(`battle_mlog_${hod_id - 14}`)) {
|
||||||
top.rmve(`#battle_mlog_${hod_id - 14}`);
|
top.rmve(`#battle_mlog_${hod_id - 14}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -578,9 +566,3 @@ function usePriem(id) {
|
|||||||
priem_use = id;
|
priem_use = id;
|
||||||
if (id != 0) reflesh()
|
if (id != 0) reflesh()
|
||||||
}
|
}
|
||||||
|
|
||||||
//document.onkeydown=key;
|
|
||||||
function key() {
|
|
||||||
//window.status=event.keyCode;
|
|
||||||
//if(event.keyCode==13){ atack(); }
|
|
||||||
}
|
|
@ -42,7 +42,6 @@ const chat = {
|
|||||||
efftxt: function (id, txt) {
|
efftxt: function (id, txt) {
|
||||||
return txt;
|
return txt;
|
||||||
},
|
},
|
||||||
|
|
||||||
ignore: function (login) {
|
ignore: function (login) {
|
||||||
if (this.ignoreList[login] !== undefined) {
|
if (this.ignoreList[login] !== undefined) {
|
||||||
if ($('#ignr_alu').attr('id') !== undefined) {
|
if ($('#ignr_alu').attr('id') !== undefined) {
|
||||||
@ -64,13 +63,10 @@ const chat = {
|
|||||||
ingr_alu.html(`${ingr_alu.html()}<div id="ignr_u_${this.ignoreList.x}"><b>${login}</b> <a target="_blank" href="/info/${login}"><img alt="Инф. о ${login}" src="${c.img2}/i/inf_capitalcity.gif" onMouseOver="top.hi(this,\'<b>Инф. о ${login}</b>\',event,5,-2,2,2,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();"></a> <small><a href="javascript:void(0)" onclick="chat.ignorUn(${this.ignoreList.x})">Clear</a></small></div>`);
|
ingr_alu.html(`${ingr_alu.html()}<div id="ignr_u_${this.ignoreList.x}"><b>${login}</b> <a target="_blank" href="/info/${login}"><img alt="Инф. о ${login}" src="${c.img2}/i/inf_capitalcity.gif" onMouseOver="top.hi(this,\'<b>Инф. о ${login}</b>\',event,5,-2,2,2,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();"></a> <small><a href="javascript:void(0)" onclick="chat.ignorUn(${this.ignoreList.x})">Clear</a></small></div>`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getRandom: function (a, b) {
|
getRandom: function (a, b) {
|
||||||
return a + ((b - a) * Math.random());
|
return a + ((b - a) * Math.random());
|
||||||
},
|
},
|
||||||
|
|
||||||
feerverk_id: 0,
|
feerverk_id: 0,
|
||||||
|
|
||||||
feerverk: function (name) {
|
feerverk: function (name) {
|
||||||
const frc = {
|
const frc = {
|
||||||
'name': 'fw04',
|
'name': 'fw04',
|
||||||
@ -86,7 +82,7 @@ const chat = {
|
|||||||
frc.left -= 35;
|
frc.left -= 35;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frc.name) {
|
if (frc.name !== undefined) {
|
||||||
const obj = top.frames.main.document.getElementById('frvrks');
|
const obj = top.frames.main.document.getElementById('frvrks');
|
||||||
if (obj !== undefined) {
|
if (obj !== undefined) {
|
||||||
let newhtml = '';
|
let newhtml = '';
|
||||||
@ -106,7 +102,6 @@ const chat = {
|
|||||||
if (zad > 0) {
|
if (zad > 0) {
|
||||||
setTimeout(`chat.feerverk_go(${id}, ${time_back}, "${img}", ${x}, 0);`, 500 * zad);
|
setTimeout(`chat.feerverk_go(${id}, ${time_back}, "${img}", ${x}, 0);`, 500 * zad);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
time_back--;
|
time_back--;
|
||||||
top.frames.main.document.getElementById(`frvanim_${id}`);
|
top.frames.main.document.getElementById(`frvanim_${id}`);
|
||||||
if (time_back > 0) {
|
if (time_back > 0) {
|
||||||
@ -262,12 +257,10 @@ const chat = {
|
|||||||
clearText: function () {
|
clearText: function () {
|
||||||
$('#textmsg').val('');
|
$('#textmsg').val('');
|
||||||
},
|
},
|
||||||
|
|
||||||
reflesh: function () {
|
reflesh: function () {
|
||||||
this.time = 0;
|
this.time = 0;
|
||||||
this.testTimer(true);
|
this.testTimer(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
reMoney: function () {
|
reMoney: function () {
|
||||||
$('#moneyGM').html(`${c.money} кр.`);
|
$('#moneyGM').html(`${c.money} кр.`);
|
||||||
},
|
},
|
||||||
@ -275,13 +268,13 @@ const chat = {
|
|||||||
clearTimeout(this.t);
|
clearTimeout(this.t);
|
||||||
if ($.cookie('btl') !== this.btl) {
|
if ($.cookie('btl') !== this.btl) {
|
||||||
if ($.cookie('btl') > 0) {
|
if ($.cookie('btl') > 0) {
|
||||||
if (!top.frames['main'].smnpty) {
|
if (top.frames['main'].smnpty === undefined) {
|
||||||
top.frames['main'].location.href = "main.php";
|
top.frames['main'].location.href = "main.php";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.btl = $.cookie('btl');
|
this.btl = $.cookie('btl');
|
||||||
}
|
}
|
||||||
if (this.rtime !== this.ct[$.cookie('chatCfg0')] && this.ct[$.cookie('chatCfg0')]) {
|
if (this.rtime !== this.ct[$.cookie('chatCfg0')] && this.ct[$.cookie('chatCfg0')] !== undefined) {
|
||||||
this.rtime = this.ct[$.cookie('chatCfg0')];
|
this.rtime = this.ct[$.cookie('chatCfg0')];
|
||||||
if (this.time > this.rtime) this.time = this.rtime;
|
if (this.time > this.rtime) this.time = this.rtime;
|
||||||
}
|
}
|
||||||
|
@ -3,16 +3,18 @@
|
|||||||
use Core\Config;
|
use Core\Config;
|
||||||
use Core\Db;
|
use Core\Db;
|
||||||
|
|
||||||
session_start();
|
//session_start();
|
||||||
$tm = microtime(true);
|
$tm = microtime(true);
|
||||||
|
|
||||||
if (!isset($CRON_CORE)) {
|
if (!isset($CRON_CORE)) {
|
||||||
require_once('../../_incl_data/__config.php');
|
require_once dirname(__DIR__,2) . DIRECTORY_SEPARATOR . '_incl_data/autoload.php';
|
||||||
|
//require_once '../../_incl_data/__config.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($CRON_CORE)) {
|
if (!isset($CRON_CORE)) {
|
||||||
define('GAME', true);
|
//define('GAME', true);
|
||||||
require_once('../../_incl_data/class/__db_connect.php');
|
require_once dirname(__DIR__,2) . DIRECTORY_SEPARATOR . '_incl_data/class/__db_connect.php';
|
||||||
|
//require_once('../../_incl_data/class/__db_connect.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
function e($t): void
|
function e($t): void
|
||||||
@ -207,12 +209,6 @@ if (!$isBattle) {
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$jslog = $btl->lookmLog() . $btl->lookLog();
|
|
||||||
if ($jslog != '') {
|
|
||||||
$js = $jslog . $js;
|
|
||||||
}
|
|
||||||
unset($jslog);
|
|
||||||
|
|
||||||
$atk1 = isset($btl->ga[$u->info['enemy']][$u->info['id']]) ? 1 : 0;
|
$atk1 = isset($btl->ga[$u->info['enemy']][$u->info['id']]) ? 1 : 0;
|
||||||
$nabito = floor($btl->users[$btl->uids[$u->info['id']]]['battle_yron']);
|
$nabito = floor($btl->users[$btl->uids[$u->info['id']]]['battle_yron']);
|
||||||
$expmaybe = floor($btl->users[$btl->uids[$u->info['id']]]['battle_exp']);
|
$expmaybe = floor($btl->users[$btl->uids[$u->info['id']]]['battle_exp']);
|
||||||
@ -232,8 +228,10 @@ if (!$isBattle) {
|
|||||||
$ggcode = PassGen::new();
|
$ggcode = PassGen::new();
|
||||||
$mypriems = $priem->seeMy();
|
$mypriems = $priem->seeMy();
|
||||||
|
|
||||||
|
$logs = $btl->lookmLog() . $btl->lookLog();
|
||||||
echo <<<HTML
|
echo <<<HTML
|
||||||
<script>
|
<script>
|
||||||
|
$logs
|
||||||
eatk = $atk1;
|
eatk = $atk1;
|
||||||
$('#nabito').html('$nabito');
|
$('#nabito').html('$nabito');
|
||||||
$('#expmaybe').html('$expmaybe');
|
$('#expmaybe').html('$expmaybe');
|
||||||
@ -259,10 +257,7 @@ if (!$isBattle) {
|
|||||||
tactic(7,'$tactic7');
|
tactic(7,'$tactic7');
|
||||||
smena_alls = '0';
|
smena_alls = '0';
|
||||||
ggcode='$ggcode';
|
ggcode='$ggcode';
|
||||||
|
|
||||||
|
|
||||||
$js
|
$js
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
HTML;
|
HTML;
|
||||||
|
|
||||||
|
@ -1050,18 +1050,9 @@ $allprice = Battle::getType($allprice, $thisBattle['smert'] == 1);
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="st1222" id="volna"></div>
|
<div class="st1222" id="volna"></div>
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
<div style="font-size:12px; margin: 0 260px; text-align: left;" id="battle_logg"></div>
|
||||||
<tr>
|
<div style="margin: 0 260px; text-align: left;">Полную версию лога боя смотрите <a href="/logs.php?log=<?= $u->info['battle'] ?>" target="blank_">здесь »»</a></div>
|
||||||
<td width="260"> </td>
|
<br>
|
||||||
<td>
|
|
||||||
<div style="font-size:12px;" id="battle_logg" align="left"></div>
|
|
||||||
<div align="left">Полную версию лога боя смотрите <a
|
|
||||||
href="/logs.php?log=<?php
|
|
||||||
echo $u->info['battle']; ?>" target="blank_">здесь »»</a></div>
|
|
||||||
<br/></td>
|
|
||||||
<td width="260"> </td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <script type="text/javascript" src="js/chat-engine.js"></script> -->
|
<!-- <script type="text/javascript" src="js/chat-engine.js"></script> -->
|
||||||
|
|
||||||
@ -1134,5 +1125,5 @@ $allprice = Battle::getType($allprice, $thisBattle['smert'] == 1);
|
|||||||
<?php
|
<?php
|
||||||
$priem = new Priems();
|
$priem = new Priems();
|
||||||
$btl = new Battle();
|
$btl = new Battle();
|
||||||
include('jx/battle/refresh1.php'); ?>
|
include('jx/battle/refresh.php'); ?>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user