Регистратура объединяется со вкладкой кланы. #54. Closes #56.

This commit is contained in:
2023-07-19 15:36:13 +03:00
parent 1500eb9364
commit 92772463e6
22 changed files with 844 additions and 522 deletions
+54 -46
View File
@@ -318,7 +318,7 @@ const chat = {
gUser: function (data, ol) {
let rt = '';
// ["27205347","Merlin","8","1.99","Radminion","capitalcity","capitalcity","349","","","0","-4","0","0","","0",""]
function data_work(count) {
data[count] = data[count].replaceAll("\\", '\\\\');
data[count] = data[count].replaceAll("[s1;]", '"');
@@ -329,64 +329,66 @@ const chat = {
data[count] = data[count].replaceAll(">", '');
}
if (data[1] !== undefined) {
rt = data[1];
if (rt === 'Администратор') rt = this.efftxt('fire', rt);
if (ol === true) {
rt = `<a href="javascript:void(0)" onClick="chat.addto(\'${data[1]}\',\'to\')">${rt}</a>`;
} else rt = `<b>${rt}</b>`;
if (data[13] !== 0) rt = `<span class="uCss${data[13]}">${rt}</span>`;
if (data[1] === undefined) {
return '<i>невидимка</i>[??]'
}
rt = data[1];
if (rt === 'Администратор') rt = this.efftxt('fire', rt);
if (ol === true) {
rt = `<a href="javascript:void(0)" onClick="chat.addto(\'${data[1]}\',\'to\')">${rt}</a>`;
} else rt = `<b>${rt}</b>`;
if (parseInt(data[13]) !== 0) rt = `<span class="uCss${data[13]}">${rt}</span>`;
if (data[10] > 0) {
rt = `<s onmouseout="top.hic()" onmousedown="top.hic()" onmouseover="top.hi(this,\'Персонаж был заблокирован\',event,3,1,1,2,\'\')">${rt}</s>`;
}
if (parseInt(data[10]) > 0) {
rt = `<s onmouseout="top.hic()" onmousedown="top.hic()" onmouseover="top.hi(this,\'Персонаж был заблокирован\',event,3,1,1,2,\'\')">${rt}</s>`;
}
if (data[8] !== 0) data_work(8)
else if (data[9] !== 0) data_work(9)
if (data[8] !== undefined) data_work(8)
else if (data[9] !== undefined) data_work(9)
// тут
function rtData(count) {
return rt = `<img alt="Склонность" height="15" src="${c.img2}/i/align/align${data[count]}.gif">${rt}`;
}
// тут
function rtData(count) {
return rt = `<img alt="Склонность" height="15" src="${c.img2}/i/align/align${data[count]}.gif">${rt}`;
}
if (data[4] !== 0) {
rt = `<a href="/clan/${data[4]}" title="${data[4]}" target="_blank"><img alt="Клан" width="24" height="15" src="${c.img2}/i/clan/${data[4]}.gif"></a>${rt}`;
}
if (parseInt(data[4]) !== 0 && clanImage !== undefined) {
//data:${c.clanImage.mime_type};base64,${c.clanImage.img}
rt = `<a href="/clan/${data[4]}" title="${data[4]}" target="_blank"><img alt="Клан" width="24" height="15" src="${clanImage}"></a>${rt}`;
}
if (data[16] > 0) rtData(16)
if (parseInt(data[16]) > 0) rtData(16)
rtData(3)
rtData(3)
if (c.lvl > -1) {
if (c.city === data[6]) {
if (data[12] > 0) {
rt = `<a href="javascript:void(0)" onClick="chat.addto(\'${data[1]}\',\'private\')"><img alt="Персонаж сражается" title="Персонаж сражается" src="${c.img2}/i/lock1.gif" width="20" height="15"></a>${rt}`;
} else {
rt = `<a href="javascript:void(0)" onClick="chat.addto(\'${data[1]}\',\'private\')"><img alt="Приват" src="${c.img2}/i/lock.gif" width="20" height="15"></a>${rt}`;
}
if (c.lvl > -1) {
if (c.city === data[6]) {
if (parseInt(data[12]) > 0) {
rt = `<a href="javascript:void(0)" onClick="chat.addto(\'${data[1]}\',\'private\')"><img alt="Персонаж сражается" title="Персонаж сражается" src="${c.img2}/i/lock1.gif" width="20" height="15"></a>${rt}`;
} else {
rt = `<img alt="Город" style="padding-right:3px;" onmouseout="top.hic()" onmousedown="top.hic()" onmouseover="top.hi(this,\'Персонаж сейчас в ${data[6]}\',event,3,1,1,2,\'\')" src="${c.img2}/i/city_ico/${data[6]}.gif" width="17" height="15">${rt}`;
rt = `<a href="javascript:void(0)" onClick="chat.addto(\'${data[1]}\',\'private\')"><img alt="Приват" src="${c.img2}/i/lock.gif" width="20" height="15"></a>${rt}`;
}
} else {
rt = `<img alt="Город" style="padding-right:3px;" onmouseout="top.hic()" onmousedown="top.hic()" onmouseover="top.hi(this,\'Персонаж сейчас в ${data[6]}\',event,3,1,1,2,\'\')" src="${c.img2}/i/city_ico/${data[6]}.gif" width="17" height="15">${rt}`;
}
rt += `[${data[2]}]<a href="${c.https}/info/${data[0]}" target="_blank"><img alt="Инф. о ${data[1]}" style="vertical-align:baseline" width="12" height="11" src="${c.img2}/i/inf_${data[5]}.gif" title="Инф. о ${data[1]}" /></a>`;
}
rt += `[${data[2]}]<a href="${c.https}/info/${data[0]}" target="_blank"><img alt="Инф. о ${data[1]}" style="vertical-align:baseline" width="12" height="11" src="${c.img2}/i/inf_${data[5]}.gif" title="Инф. о ${data[1]}" /></a>`;
if (data[11] > c.time) {
rt += ` <img alt="Кляп" id="img_molch${data[1]}" width="24" height="15" style="cursor:help" src="${c.img2}/i/sleep2.gif" onmouseout="top.hic()" onmousedown="top.hic()" onmouseover="top.hi(this,\'На персонажа наложено заклятие молчания.<br>Будет молчать еще <span id=\\\'molch${data[0]}\\\'>${this.timeOut(data[11])}</span>\',event,3,1,1,2,\'\');chat.justRefMolch(${data[0]})">`;
this.addRefMolch(data[0], data[11]);
}
if (parseInt(data[11]) > c.time) {
rt += ` <img alt="Кляп" id="img_molch${data[1]}" width="24" height="15" style="cursor:help" src="${c.img2}/i/sleep2.gif" onmouseout="top.hic()" onmousedown="top.hic()" onmouseover="top.hi(this,\'На персонажа наложено заклятие молчания.<br>Будет молчать еще <span id=\\\'molch${data[0]}\\\'>${this.timeOut(data[11])}</span>\',event,3,1,1,2,\'\');chat.justRefMolch(${data[0]})">`;
this.addRefMolch(data[0], data[11]);
}
if (data[14] !== "") {
rt += ` <img alt="Травма" width="24" height="15" style="cursor:help" src="${c.img2}/i/travma2.gif" onmouseout="top.hic()" onmousedown="top.hic()" onmouseover="top.hi(this,\'У персонажа ${data[14]}\',event,3,1,1,2,\'\');">`;
if (data[14] !== "") {
rt += ` <img alt="Травма" width="24" height="15" style="cursor:help" src="${c.img2}/i/travma2.gif" onmouseout="top.hic()" onmousedown="top.hic()" onmouseover="top.hi(this,\'У персонажа ${data[14]}\',event,3,1,1,2,\'\');">`;
}
if (parseInt(data[13]) > 0) {
if (parseInt(data[13]) === 2) {
rt += ` <a target="main" href="/main.php?atak_user=${data[0]}" title="Кровавое нападение на ${data[1]}"><img alt="" width="13" height="13" src="${c.img2}/i/clear.gif"></a>`;
} else {
rt += ` <a target="main" href="/main.php?atak_user=${data[0]}" title="Напасть на ${data[1]}"><img alt="" width="13" height="13" src="${c.img2}/i/curse_attack.gif"></a>`;
}
if (data[13] > 0) {
if (data[13] === 2) {
rt += ` <a target="main" href="/main.php?atak_user=${data[0]}" title="Кровавое нападение на ${data[1]}"><img alt="" width="13" height="13" src="${c.img2}/i/clear.gif"></a>`;
} else {
rt += ` <a target="main" href="/main.php?atak_user=${data[0]}" title="Напасть на ${data[1]}"><img alt="" width="13" height="13" src="${c.img2}/i/curse_attack.gif"></a>`;
}
}
if (data[15] === 1) rt = `<span class=woman >${rt}</span>`
} else rt = '<i>невидимка</i>[??]'
}
if (parseInt(data[15]) === 1) rt = `<span class=woman >${rt}</span>`
return rt;
}, mlch: {},
@@ -937,6 +939,12 @@ const chat = {
if (data.list !== undefined && data.list !== null) { //делаем список людей онлайн
let jj;
i = 0;
/*{
"0":["27318846","Дмитрий","8","50","0","capitalcity","capitalcity","9","","","0","0","0","0","","0",""],
"1":["27205347","Merlin","8","1.99","Radminion","capitalcity","capitalcity","349","","","0","-4","0","0","","0",""]
} */
let ji = JSON.parse(data.list),
onll = '',
fSort = {},