Merge remote-tracking branch 'origin/dev-battle-fighterclass' into dev-battle-fighterclass

# Conflicts:
#	_incl_data/class/Battle.php
This commit is contained in:
Ivor Barhansky 2024-02-09 22:08:35 +02:00
commit 7986d33ab6
9 changed files with 963 additions and 1429 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1379,9 +1379,9 @@ class Priems
return $r;
}
public function testpriem($pl, $t = 1, $o = 0)
private function testpriem($pl, $t = 1, $o = 0): int
{
global $c, $u, $code, $btl;
global $btl;
$tr = Conversion::dataStringToArray($pl['tr']);
$d2 = Conversion::dataStringToArray($pl['date2']);
$x = 1;
@ -2103,49 +2103,164 @@ class Priems
public function getTechniquesInfo(?int $id = null): array
{
# SELECT * FROM `priems` WHERE `level`<="' . $this->u->info['level'] . '" AND `activ` > "0" AND `id` = "' . $id . '" LIMIT 1
if (isset($id)) {
return Db::getRow(
'select * from techniques_categories left join priems on techniques_categories.technique_id = priems.id
where priems.level <= ? and priems.activ > 0 and priems.id = ? order by priems.img,priems.level', [User::start()->info['level'], $id]
);
return Db::getRow('select * from priems where level <= ? and activ > 0 and id = ? order by img,level', [$this->u->info['level'], $id]);
// return Db::getRow(
// 'select * from techniques_categories left join priems on techniques_categories.technique_id = priems.id
// where priems.level <= ? and priems.activ > 0 and priems.id = ? order by priems.img,priems.level', [User::start()->info['level'], $id]
// );
}
return Db::getRows(
'select * from techniques_categories left join priems on techniques_categories.technique_id = priems.id
where priems.level <= ? and priems.activ > 0 order by priems.img,priems.level', [User::start()->info['level']]
);
return Db::getRows('select * from priems where level <= ? and activ > 0 order by img,level', [$this->u->info['level']]);
// return Db::getRows(
// 'select * from techniques_categories left join priems on techniques_categories.technique_id = priems.id
// where priems.level <= ? and priems.activ > 0 order by priems.img,priems.level', [User::start()->info['level']]
// );
}
public function seeMy($t)
public function seeMyPriems(): void
{
$i = 0;
$p = explode('|', $this->u->info['priems']);
$pr = '';
$all = (int)$_GET['all'];
while ($i < $this->u->info['priemslot']) {
if ($p[$i] > 0) {
$pl = Db::getRow('select * from priems where level <= ? and activ > 0 and id = ?', [$this->u->info['level'], $p[$i]]);
$lvar = $this->priemInfo($pl, $i);
$lvar = $lvar[0];
if (isset($_GET['inv'])) {
$cl = "location.href='/main.php?all=$all&skills=1&rz=4&p_raz=all'";
} else {
$cl = "location.href='/main.php?all=$all&skills=1&unuse_priem=$i&rz=4&p_raz=' + p_raz";
}
$cl = 'onclick="' . $cl . '"';
$cli2 = '';
if ((isset($this->u->stats['nopriems']) && $pl['nosh'] == 0) || isset($this->u->stats['notuse_last_pr']) && $this->u->stats['notuse_last_pr'] == $pl['id']) {
$cli2 = ' class="nopriemuse" ';
}
/// ТУТ!
$priemName = $pl['name'];
$priemImg = $pl['img'];
$pr .= <<<HTML
<a onmouseover="let a = `<b>$priemName</b><br>$lvar`; top.hi(this,a,event,3,0,1,1,'width: 240px;')" onmouseout="top.hic();" onmousedown="top.hic();" href="javascript:void(0)" $cl>
<img $cli2 style="margin-top: 3px; margin-left: 4px;" src="//img.new-combats.tech/i/eff/$priemImg.gif" alt=""></a>
</a>
HTML;
} elseif (isset($_GET['inv'])) {
$pr .= <<<HTML
<a title="Перейти к настройкам приемов" href="javascript:void(0)" onclick="location.href='/main.php?all=$all&skills=1&rz=4&p_raz=all'">
<img style="margin-top:4px; margin-left:4px;" src="//img.new-combats.tech/i/items/w/clearPriem.gif" alt="">
</a>
HTML;
} else {
$pr .= '<img style="margin-top:4px; margin-left:4px;" src="//img.new-combats.tech/i/items/w/clearPriem.gif" alt="">';
}
$i++;
}
echo '<div>' . $pr . '</div>';
}
/**
* Летит в js, двойные кавычки не использовать.
* @param array $pl
* @param int $id
* @return array
*/
private function priemInfo(array $pl, int $id = -1): array
{
global $btl;
$pz = explode('|', $this->u->info['priems_z']);
$tr = Conversion::dataStringToArray($pl['tr']);
$trs = '';
$x = 0;
while ($x < count($this->statnames->sysRequirementNames)) {
$n = $this->statnames->sysRequirementNames[$x];
if (isset($tr['tr_' . $n])) {
if ($tr['tr_' . $n] > $this->u->stats[$n]) {
$trs .= "<span style='color: red;'>";
}
$trs .= '<br>• ';
$trs .= $this->statnames->requirementNames[$n] . ': ' . $tr['tr_' . $n];
if ($tr['tr_' . $n] > $this->u->stats[$n]) {
$trs .= '</span>';
}
}
$x++;
}
$lvar = '';
$j = 1;
$nm = [1 => 'hit', 2 => 'krit', 3 => 'counter', 4 => 'block', 5 => 'parry', 6 => 'hp', 7 => 'spirit'];
while ($j <= 6) {
if ($pl['tt' . $j] > 0) {
$lvar .= '<img src=//img.new-combats.tech/i/micro/' . $nm[$j] . '.gif> ' . round($pl['tt' . $j], 2) . ' &nbsp; ';
}
$j++;
}
if ($pl['tt7'] > 0) {
if ($lvar != '') {
$lvar .= '<br>';
}
$lvar .= 'Сила духа: ' . round($pl['tt' . $j], 2) . '<br>';
}
$lvar .= '<br>';
if ($pl['zad'] > 0) {
$lvar .= 'Задержка: ' . $pl['zad'];
if ($pz[$id] > 0) {
$lvar .= ' (еще ' . $pz[$id] . ')';
}
$lvar .= '<br>';
}
if (isset($tr['tr_mpNow']) && $tr['tr_mpNow'] > 0) {
$tr['tr_mpNow'] -= round($tr['tr_mpNow'] / 100 * $this->u->stats['min_use_mp']);
if ($this->u->info['mpNow'] < $tr['tr_mpNow'] || (isset($btl->stats[$btl->uids[$this->u->info['id']]]) && $btl->stats[$btl->uids[$this->u->info['id']]]['mpNow'] < $tr['tr_mpNow'])) {
$lvar .= '<span style="color: red;">• Расход маны: ' . $tr['tr_mpNow'] . '</span><br>';
} else {
$lvar .= '• Расход маны: ' . $tr['tr_mpNow'] . '<br>';
}
}
if ($pl['tr_hod'] > 0) {
$lvar .= '• Прием тратит ход<br>';
}
if ($trs != '') {
$lvar .= '<b>Требования:</b>' . $trs . '<br><br>';
} else {
$lvar .= '<br>';
}
$pl['info'] = preg_replace_callback("!(#)(.*?)(#)!is", [$this, 'getDynamicInfo'], $pl['info']);
$lvar .= $pl['info'];
return [0 => $lvar, 1 => $pz];
}
public function seeMy(): string
{
global $btl;
$i = 0;
$p = explode('|', $this->u->info['priems']);
$lvar = '';
$pr = '';
$all = (int)$_GET['all'];
while ($i < $this->u->info['priemslot']) {
if ($p[$i] > 0) {
$pl = mysql_fetch_assoc(
mysql_query(
'SELECT * FROM `priems` WHERE `level`<="' . $this->u->info['level'] . '" AND `activ` > "0" AND `id` = "' . mysql_real_escape_string(
$p[$i]
) . '" LIMIT 1'
)
);
$lvar = $this->priemInfo($pl, $t, $i);
$pl = Db::getRow('select * from priems where level <= ? and activ > 0 and id = ?', [$this->u->info['level'], $p[$i]]);
$cl = '';
$lvar = $this->priemInfo($pl, $i);
$pz = $lvar[1];
$lvar = $lvar[0];
if ($t == 1) {
if (isset($_GET['inv'])) {
$cl = 'href="javascript:void(0)" onclick="location.href=\'main.php?all=' . ((int)$_GET['all']) . '&skills=1&rz=4&p_raz=all\'"';
} else {
$cl = 'href="javascript:void(0)" onclick="location.href=\'main.php?all=' . ((int)$_GET['all']) . '&skills=1&unuse_priem=' . $i . '&rz=4&p_raz=\' + p_raz"';
}
} else {
if ($pl['type'] == 1) {
//моментально
if ($pl['onUser'] == 1) {
$oninuser = '';
if ($pl['team'] == 1) {
if ($this->u->info['login2'] != '') {
$oninuser = $this->u->info['login2'];
@ -2170,120 +2285,47 @@ class Priems
} elseif ($pl['type'] == 3) {
$cl = 'href="javascript:void(0);" onClick="alert(\'Возможно используем?\');"';
}
}
$notr = $this->testpriem($pl, 2);
$notr = $this->testpriem($pl, $t);
$cl2 = '';
$cli2 = '';
if ((($pz[$i] > 0 || $notr > 0) && $t == 2) || (isset($this->u->stats['nopriems']) && $pl['nosh'] == 0) || $this->u->stats['notuse_last_pr'] == $pl['id']) {
if (($pz[$i] > 0 || $notr > 0) || (isset($this->u->stats['nopriems']) && $pl['nosh'] == 0) || $this->u->stats['notuse_last_pr'] == $pl['id']) {
$cli2 = ' class="nopriemuse" ';
}
/// ТУТ!
$priemName = $pl['name'];
$priemImg = $pl['img'];
$pr .= <<<HTML
<a onmouseover="let a = `<b>$priemName</b><br>$lvar`; top.hi(this,a,event,3,0,1,1,'width: 240px;')" onmouseout="top.hic();" onmousedown="top.hic();" $cl>
<img $cli2 style="margin-top: 3px; margin-left: 4px;" src="//img.new-combats.tech/i/eff/$priemImg.gif" alt=""></a>
</a>
HTML;
$pr .= '<a onMouseOver="top.hi(this,\'<b>' . $pl['name'] . '</b><Br>' . $lvar . '\',event,3,0,1,1,\'width:240px\');" onMouseOut="top.hic();" onMouseDown="top.hic();" ' . $cl . '><img ' . $cli2 . ' style="margin-top:3px; ' . $cl2 . ' margin-left:4px;" src="//img.new-combats.tech/i/eff/' . $pl['img'] . '.gif" width="55" height="35" /></a>';
} else {
if (isset($_GET['inv'])) {
$pr .= '<a title="Перейти к настройкам приемов" href="javascript:void(0)" onclick="location.href=\'main.php?all=' . ((int)$_GET['all']) . '&skills=1&rz=4&p_raz=all\'"><img style="margin-top:4px; margin-left:4px;" src="//img.new-combats.tech/i/items/w/clearPriem.gif" width="55" height="35" /></a>';
$pr .= '<a title="Перейти к настройкам приемов" href="javascript:void(0)" onclick="location.href=\'main.php?all=' . $all . '&skills=1&rz=4&p_raz=all\'"><img style="margin-top:4px; margin-left:4px;" src="//img.new-combats.tech/i/items/w/clearPriem.gif" alt=""></a>';
} else {
$pr .= '<img style="margin-top:4px; margin-left:4px;" src="//img.new-combats.tech/i/items/w/clearPriem.gif" width="55" height="35" />';
$pr .= '<img style="margin-top:4px; margin-left:4px;" src="//img.new-combats.tech/i/items/w/clearPriem.gif" alt="">';
}
}
$i++;
}
if ($this->u->info['animal'] > 0 && $t == 2) {
if ($this->u->info['animal'] > 0) {
$use_lst = $this->u->testAction(
'`uid` = "' . $this->u->info['id'] . '" AND `vars` = "animal_use' . $btl->i->id . '" LIMIT 1',
1
);
if (!isset($use_lst['id'])) {
$cl2 = '';
$pr .= '<a onMouseOver="top.hi(this,\'<b>Выпустить зверя</b><Br>Ваш зверь вмешивается в поединок. Можно применять один раз за бой.\',event,3,0,1,1,\'width:240px\');" onMouseOut="top.hic();" onMouseDown="top.hic();" href="javascript:void(0);" onClick="usepriem(100500,1,\'\');"><img style="margin-top:1px; ' . $cl2 . ' margin-left:3px;" src="//img.new-combats.tech/i/eff/pet_unleash.gif" width="40" height="25" /></a>';
$pr .= '<a onMouseOver="top.hi(this,\'<b>Выпустить зверя</b><Br>Ваш зверь вмешивается в поединок. Можно применять один раз за бой.\',event,3,0,1,1,\'width:240px\');" onMouseOut="top.hic();" onMouseDown="top.hic();" href="javascript:void(0);" onClick="usepriem(100500,1,\'\');"><img style="margin-top:1px; margin-left:3px;" src="//img.new-combats.tech/i/eff/pet_unleash.gif" width="40" height="25" /></a>';
} else {
$cl2 = '" class="nopriemuse';
$pr .= '<img onMouseOver="top.hi(this,\'<b>Выпустить зверя</b><Br>Ваш зверь вмешивается в поединок. Можно применять один раз за бой.\',event,3,0,1,1,\'width:240px\');" onMouseOut="top.hic();" onMouseDown="top.hic();" style="margin-top:1px; margin-left:2px;' . $cl2 . '" src="//img.new-combats.tech/i/eff/pet_unleash.gif" width="40" height="25" />';
$pr .= '<img onMouseOver="top.hi(this,\'<b>Выпустить зверя</b><Br>Ваш зверь вмешивается в поединок. Можно применять один раз за бой.\',event,3,0,1,1,\'width:240px\');" onMouseOut="top.hic();" onMouseDown="top.hic();" style="margin-top:1px; margin-left:2px;" class="nopriemuse" src="//img.new-combats.tech/i/eff/pet_unleash.gif" width="40" height="25" />';
}
}
if ($t == 1) {
echo '<div>' . $pr . '</div>';
} elseif ($t == 2) {
return str_replace('"', '\\"', $pr);
}
}
public function priemInfo($pl, $t, $id = false)
{
global $btl;
$pz = explode('|', $this->u->info['priems_z']);
$tr = Conversion::dataStringToArray($pl['tr']);
$trs = '';
$x = 0;
while ($x < count($this->statnames->sysRequirementNames)) {
$n = $this->statnames->sysRequirementNames[$x];
if (isset($tr['tr_' . $n])) {
if ($tr['tr_' . $n] > $this->u->stats[$n]) {
$trs .= '<span style="color: red">';
}
$trs .= '<br>• ';
$trs .= $this->statnames->requirementNames[$n] . ': ' . $tr['tr_' . $n];
if ($tr['tr_' . $n] > $this->u->stats[$n]) {
$trs .= '</span>';
}
}
$x++;
}
$lvar = '';
$j = 1;
$nm = [1 => 'hit', 2 => 'krit', 3 => 'counter', 4 => 'block', 5 => 'parry', 6 => 'hp', 7 => 'spirit'];
while ($j <= 6) {
if ($pl['tt' . $j] > 0) {
$lvar .= '<img src=//img.new-combats.tech/i/micro/' . $nm[$j] . '.gif width=8 height=8 /> ' . round(
$pl['tt' . $j],
2
) . ' &nbsp; ';
}
$j++;
}
if ($pl['tt7'] > 0) {
if ($lvar != '') {
$lvar .= '<br>';
}
$lvar .= 'Сила духа: ' . round($pl['tt' . $j], 2) . '<br>';
}
$lvar .= '<br>';
if ($pl['zad'] > 0) {
$lvar .= 'Задержка: ' . $pl['zad'];
if ($pz[$id] > 0) {
$lvar .= ' (еще ' . $pz[$id] . ')';
}
$lvar .= '<br>';
}
if (isset($tr['tr_mpNow']) && $tr['tr_mpNow'] > 0) {
$tr['tr_mpNow'] -= round($tr['tr_mpNow'] / 100 * $this->u->stats['min_use_mp']);
if ($this->u->info['mpNow'] < $tr['tr_mpNow'] || (isset($btl->stats[$btl->uids[$this->u->info['id']]]) && $btl->stats[$btl->uids[$this->u->info['id']]]['mpNow'] < $tr['tr_mpNow'])) {
$lvar .= '<font color=red>• Расход маны: ' . $tr['tr_mpNow'] . '</font><br>';
} else {
$lvar .= '• Расход маны: ' . $tr['tr_mpNow'] . '<br>';
}
}
if ($pl['tr_hod'] > 0) {
$lvar .= '• Прием тратит ход<br>';
}
if ($trs != '') {
$lvar .= '<b>Требования:</b>' . $trs . '<br><br>';
} else {
$lvar .= '<br>';
}
$pl['info'] = preg_replace_callback("!(#)(.*?)(#)!is", [$this, 'getDynamicInfo'], $pl['info']);
$lvar .= $pl['info'];
return [0 => $lvar, 1 => $pz];
}
//Мощность / подавление / сопротивление и т.д.
@ -2303,9 +2345,7 @@ class Priems
echo
<<< HTML
<a href="javascript:void(0)" onclick="location.href='main.php?skills=1&rz=4&use_priem=$priem[id]';">
<img class="pwq$priem[category_id] pwqall" onMouseOver="top.popup(this, '(#$priem[id]) <b>$priem[name]</b><Br>{$this->priemInfo(
$priem, 1
)[0]}');" onMouseOut="top.hic();" onMouseDown="top.hic();" style="display:none;margin-top:2px; $cl margin-left:1px;" src="//img.new-combats.tech/i/eff/$priem[img].gif" width="40" height="25" />
<img class="pwq$priem[category_id] pwqall" onMouseOver="top.popup(this, '(#$priem[id]) <b>$priem[name]</b><Br>{$this->priemInfo($priem)[0]}');" onMouseOut="top.hic();" onMouseDown="top.hic();" style="display:none;margin-top:2px; $cl margin-left:1px;" src="//img.new-combats.tech/i/eff/$priem[img].gif" width="40" height="25" />
</a>
HTML;
}

View File

@ -382,8 +382,7 @@ class User
'UPDATE `items_users` SET `use_text` = "' . $itm['use_text'] . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1'
);
mysql_query(
'INSERT INTO `items_text` (`item_id`,`time`,`login`,`text`,`city`,`x`) VALUES ("' . $itm['id'] . '","' . time(
) . '","' . $this->info['login'] . '","' . mysql_real_escape_string(
'INSERT INTO `items_text` (`item_id`,`time`,`login`,`text`,`city`,`x`) VALUES ("' . $itm['id'] . '","' . time() . '","' . $this->info['login'] . '","' . mysql_real_escape_string(
htmlspecialchars($txt, null)
) . '","' . $this->info['city'] . '","' . $sx . '")'
);
@ -429,8 +428,7 @@ class User
$this->error = 'Персонаж уже проводит сделку';
} else {
$ins = mysql_query(
'INSERT INTO `transfers` (`uid1`,`uid2`,`city`,`room`,`time`,`text`,`start1`) VALUES ("' . $this->info['id'] . '","' . $t['id'] . '","' . $this->info['city'] . '","' . $this->info['room'] . '","' . time(
) . '","' . mysql_real_escape_string(
'INSERT INTO `transfers` (`uid1`,`uid2`,`city`,`room`,`time`,`text`,`start1`) VALUES ("' . $this->info['id'] . '","' . $t['id'] . '","' . $this->info['city'] . '","' . $this->info['room'] . '","' . time() . '","' . mysql_real_escape_string(
htmlspecialchars($_POST['textarea'], null)
) . '","' . time() . '")'
);
@ -754,6 +752,12 @@ class User
return $result ?: [];
}
public function getStats($uid, $i1 = null, $res = 0, $reimg = false, $btl_cache = false, $minimal = false): array
{
$result = new Stats($this);
return $result->getStats($uid, $i1, $reimg, $btl_cache);
}
private function infoTasks()
{
if (empty($this->info)) {
@ -813,12 +817,6 @@ class User
}
}
public function getStats($uid, $i1 = null, $res = 0, $reimg = false, $btl_cache = false, $minimal = false): array
{
$result = new Stats($this);
return $result->getStats($uid, $i1, $reimg, $btl_cache);
}
public function getUserInfoById($id)
{
return Db::getRow('select * from users left join stats on users.id = stats.id where users.id = ?', [$id]);
@ -3228,8 +3226,7 @@ class User
if ($po['sudba'] == '0') {
$is2 .= ' <img title="Этот предмет будет связан общей судьбой с первым, кто наденет его. Никто другой не сможет его использовать." src="' . Config::img() . '/i/destiny0.gif">';
} elseif ($po['sudba'] == '1') {
$is2 .= ' <img title="Этот предмет будет связан общей судьбой с первым, кто возьмет предмет. Никто другой не сможет его использовать." src="' . Config::img(
) . '/i/destiny0.gif">';
$is2 .= ' <img title="Этот предмет будет связан общей судьбой с первым, кто возьмет предмет. Никто другой не сможет его использовать." src="' . Config::img() . '/i/destiny0.gif">';
} else {
$is2 .= ' <img title="Этот предмет связан общей судьбой с ' . $po['sudba'] . '. Никто другой не сможет его использовать." src="' . Config::img() . '/i/desteny.gif">';
}
@ -3400,8 +3397,7 @@ class User
$tr .= '<br>• Броня ' . $bn[$i] . ': ' . $po['add_mib' . $i] . '-' . $po['add_mab' . $i];
if (isset($po['mf_mib']) && $po['mf_mib'] > 0) {
$tr .= ' <a href="/main.php?inv=1&otdel=' . $_GET['otdel'] . '&rstv=' . $pl['id'] . '&mf=mib' . $i . '"><img src="' . Config::img(
) . '/i/up.gif" width="11" height="11"></a>';
$tr .= ' <a href="/main.php?inv=1&otdel=' . $_GET['otdel'] . '&rstv=' . $pl['id'] . '&mf=mib' . $i . '"><img src="' . Config::img() . '/i/up.gif" width="11" height="11"></a>';
}
}
$i++;
@ -3530,11 +3526,7 @@ class User
if (isset($po['free_stats']) && $po['free_stats'] > 0) {
$is2 .= '<br><strong>Распределение статов:</strong>';
$is2 .= '<div style="margin-left:20px;"><small>Сила: ' . $po['add_s1'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=1"><img src="' . Config::img(
) . '/i/plus.gif"></a><br>Ловкость: ' . $po['add_s2'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=2"><img src="' . Config::img(
) . '/i/plus.gif"></a><br>Интуиция: ' . $po['add_s3'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=3"><img src="' . Config::img(
) . '/i/plus.gif"></a><br>Интеллект: ' . $po['add_s5'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=5"><img src="' . Config::img(
) . '/i/plus.gif"></a></small></div>';
$is2 .= '<div style="margin-left:20px;"><small>Сила: ' . $po['add_s1'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=1"><img src="' . Config::img() . '/i/plus.gif"></a><br>Ловкость: ' . $po['add_s2'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=2"><img src="' . Config::img() . '/i/plus.gif"></a><br>Интуиция: ' . $po['add_s3'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=3"><img src="' . Config::img() . '/i/plus.gif"></a><br>Интеллект: ' . $po['add_s5'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=5"><img src="' . Config::img() . '/i/plus.gif"></a></small></div>';
$is2 .= '&bull; Осталось распределений: ' . $po['free_stats'] . '';
}
@ -3586,28 +3578,17 @@ class User
} else {
$is2 .= '<div style="margin-left:20px;"><small>
Мастерство владения мечами: ' . (0 + $po['add_a1']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=1"><img src="' . Config::img() . '/i/plus.gif"></a><br>
Мастерство владения дубинами, булавами: ' . (0 + $po['add_a2']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=2"><img src="' . Config::img(
) . '/i/plus.gif"></a><br>
Мастерство владения ножами, кастетами: ' . (0 + $po['add_a3']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=3"><img src="' . Config::img(
) . '/i/plus.gif"></a><br>
Мастерство владения топорами, секирами: ' . (0 + $po['add_a4']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=4"><img src="' . Config::img(
) . '/i/plus.gif"></a><br>
Мастерство владения магическими посохами: ' . (0 + $po['add_a5']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=5"><img src="' . Config::img(
) . '/i/plus.gif"></a><br>
Мастерство владения стихией Огня: ' . (0 + $po['add_mg1']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=6"><img src="' . Config::img(
) . '/i/plus.gif"></a><br>
Мастерство владения стихией Воздуха: ' . (0 + $po['add_mg2']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=7"><img src="' . Config::img(
) . '/i/plus.gif"></a><br>
Мастерство владения стихией Воды: ' . (0 + $po['add_mg3']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=8"><img src="' . Config::img(
) . '/i/plus.gif"></a><br>
Мастерство владения стихией Земли: ' . (0 + $po['add_mg4']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=9"><img src="' . Config::img(
) . '/i/plus.gif"></a><br>
Мастерство владения магией Света: ' . (0 + $po['add_mg5']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=10"><img src="' . Config::img(
) . '/i/plus.gif"></a><br>
Мастерство владения магией Тьмы: ' . (0 + $po['add_mg6']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=11"><img src="' . Config::img(
) . '/i/plus.gif"></a><br>
Мастерство владения серой магией: ' . (0 + $po['add_mg7']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=12"><img src="' . Config::img(
) . '/i/plus.gif"></a><br>
Мастерство владения дубинами, булавами: ' . (0 + $po['add_a2']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=2"><img src="' . Config::img() . '/i/plus.gif"></a><br>
Мастерство владения ножами, кастетами: ' . (0 + $po['add_a3']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=3"><img src="' . Config::img() . '/i/plus.gif"></a><br>
Мастерство владения топорами, секирами: ' . (0 + $po['add_a4']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=4"><img src="' . Config::img() . '/i/plus.gif"></a><br>
Мастерство владения магическими посохами: ' . (0 + $po['add_a5']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=5"><img src="' . Config::img() . '/i/plus.gif"></a><br>
Мастерство владения стихией Огня: ' . (0 + $po['add_mg1']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=6"><img src="' . Config::img() . '/i/plus.gif"></a><br>
Мастерство владения стихией Воздуха: ' . (0 + $po['add_mg2']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=7"><img src="' . Config::img() . '/i/plus.gif"></a><br>
Мастерство владения стихией Воды: ' . (0 + $po['add_mg3']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=8"><img src="' . Config::img() . '/i/plus.gif"></a><br>
Мастерство владения стихией Земли: ' . (0 + $po['add_mg4']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=9"><img src="' . Config::img() . '/i/plus.gif"></a><br>
Мастерство владения магией Света: ' . (0 + $po['add_mg5']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=10"><img src="' . Config::img() . '/i/plus.gif"></a><br>
Мастерство владения магией Тьмы: ' . (0 + $po['add_mg6']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=11"><img src="' . Config::img() . '/i/plus.gif"></a><br>
Мастерство владения серой магией: ' . (0 + $po['add_mg7']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=12"><img src="' . Config::img() . '/i/plus.gif"></a><br>
</small></div>';
$is2 .= 'Осталось распределений: ' . $mx1;
}
@ -3760,16 +3741,14 @@ class User
mysql_query('SELECT * FROM `clan` WHERE `id` = "' . $po['toclan1'][0] . '" LIMIT 1')
);
if (isset($clpo['id'])) {
$is2 .= '<div style="color:brown;">Предмет принадлежит клану <img style="vertical-align:bottom" src="' . Config::img(
) . '/i/clan/' . $clpo['name_mini'] . '.gif" width="24" height"15"> <strong>' . $clpo['name'] . '</strong>';
$is2 .= '<div style="color:brown;">Предмет принадлежит клану <img style="vertical-align:bottom" src="' . Config::img() . '/i/clan/' . $clpo['name_mini'] . '.gif" width="24" height"15"> <strong>' . $clpo['name'] . '</strong>';
$plpo = mysql_fetch_array(
mysql_query(
'SELECT `id`,`login`,`cityreg` FROM `users` WHERE `id` = "' . $po['toclan1'][1] . '" LIMIT 1'
)
);
if (isset($plpo['id'])) {
$is2 .= ' <span style="color: grey;">(Дар игрока <strong>' . $plpo['login'] . '</strong><a href="info/' . $plpo['id'] . '" target="_blank"><img src="' . Config::img(
) . '/i/inf_' . $plpo['cityreg'] . '.gif" width="9"></a>)</span>';
$is2 .= ' <span style="color: grey;">(Дар игрока <strong>' . $plpo['login'] . '</strong><a href="info/' . $plpo['id'] . '" target="_blank"><img src="' . Config::img() . '/i/inf_' . $plpo['cityreg'] . '.gif" width="9"></a>)</span>';
if ($plpo['login'] == $this->info['login']) {
if (isset($_GET['backmyitm'])) {
$pl['inOdet'] = 0;
@ -3911,8 +3890,7 @@ class User
) . '" LIMIT 1'
)
);
$is1 .= '<small>Предмет у игрока<br><strong>' . $yui['login'] . '</strong><a href="info/' . $yui['id'] . '" target="_blank"><img width="10" src="' . Config::img(
) . '/i/inf_' . $yui['cityreg'] . '.gif"></a></small>';
$is1 .= '<small>Предмет у игрока<br><strong>' . $yui['login'] . '</strong><a href="info/' . $yui['id'] . '" target="_blank"><img width="10" src="' . Config::img() . '/i/inf_' . $yui['cityreg'] . '.gif"></a></small>';
if ($this->info['tt'][14][0] == 1 || ($this->info['id'] == $us_1)) {
$is1 .= '<br><small style=""><a href="?clan&deposit&ungive_itm=' . $pl['id'] . '">Изъять предмет</a></small>';
}
@ -4260,15 +4238,13 @@ class User
}
if ($pl['magic_inc'] && $pl['type'] == 30) {
//используем эликсир
$pldate = '<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2 width=\\\'80\\\' valign=\\\'middle\\\'><div align=\\\'center\\\'><img src=\\\'' . Config::img(
) . '/i/items/' . $pl['img'] . '\\\'></div></td><td valign=\\\'middle\\\' align=\\\'left\\\'>&quot;<strong>' . $pl['name'] . '</strong>&quot;<br>Использовать сейчас?</td></tr></table>';
$pldate = '<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2 width=\\\'80\\\' valign=\\\'middle\\\'><div align=\\\'center\\\'><img src=\\\'' . Config::img() . '/i/items/' . $pl['img'] . '\\\'></div></td><td valign=\\\'middle\\\' align=\\\'left\\\'>&quot;<strong>' . $pl['name'] . '</strong>&quot;<br>Использовать сейчас?</td></tr></table>';
$useUrl = 'top.useiteminv(\'' . (0 + $pl['id']) . '\',\'' . $pl['img'] . '\',\'' . $pl['img'] . '\',1,\'' . $pldate . '\',\'' . (0 + $_GET['otdel']) . '\');';
} elseif ($pl['magic_inc'] && $pl['type'] == 29) { //используем заклятие
if (isset($po['useOnLogin']) && !isset($po['zazuby'])) { //на персонажа
$useUrl = 'top.useMagic(\'' . $pl['name'] . '\',' . (0 + $pl['id']) . ',\'' . $pl['img'] . '\',1,\'main.php?' . $inv1 . 'otdel=' . ((int)$_GET['otdel']) . '&use_pid=' . $pl['id'] . '&rnd=' . $code . '\');';
} else { //просто использование (на себя, либо без указания предмета\логина)
$pldate = '<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2 width=\\\'80\\\' valign=\\\'middle\\\'><div align=\\\'center\\\'><img src=\\\'' . Config::img(
) . '/i/items/' . $pl['img'] . '\\\'></div></td><td valign=\\\'middle\\\' align=\\\'left\\\'>&quot;<strong>' . $pl['name'] . '</strong>&quot;<br>Использовать сейчас?</td></tr></table>';
$pldate = '<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2 width=\\\'80\\\' valign=\\\'middle\\\'><div align=\\\'center\\\'><img src=\\\'' . Config::img() . '/i/items/' . $pl['img'] . '\\\'></div></td><td valign=\\\'middle\\\' align=\\\'left\\\'>&quot;<strong>' . $pl['name'] . '</strong>&quot;<br>Использовать сейчас?</td></tr></table>';
$useUrl = 'top.useiteminv(\'' . (0 + $pl['id']) . '\',\'' . $pl['img'] . '\',\'' . $pl['img'] . '\',1,\'' . $pldate . '\',\'' . (0 + $_GET['otdel']) . '\',' . (0 + $_GET['otdel']) . ');';
}
//на предмет
@ -4315,8 +4291,7 @@ class User
if ($pl['group'] > 0) {
$is1 .= '<br>';
if ($this->itemsX($pl['id']) < $pl['group_max']) {
$is1 .= '<a href="main.php?inv=1&otdel=' . ((int)$_GET['otdel']) . '&stack=' . $pl['id'] . '&rnd=' . $code . '" title="Собрать"><img src="' . Config::img(
) . '/i/stack.gif" /></a>';
$is1 .= '<a href="main.php?inv=1&otdel=' . ((int)$_GET['otdel']) . '&stack=' . $pl['id'] . '&rnd=' . $code . '" title="Собрать"><img src="' . Config::img() . '/i/stack.gif" /></a>';
}
if ($this->itemsX($pl['id']) > 1) {
$tbl = '<table style="border: 0; width: 100%;" cellspacing="0" cellpadding="5"><tr><td style="text-align: center; width: 70px;" rowspan="2">
@ -4343,8 +4318,7 @@ class User
if ($d[1] == 1) { //можно выкинуть
if (!isset($po['nodelete'])) {
$is1 .= ' <a onClick="top.drop(' . $pl['id'] . ',\'' . $pl['img'] . '\',\'' . $pl['name'] . '\',1,\'<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2><img src=\\\'' . Config::img(
) . '/i/items/' . $pl['img'] . '\\\'></td><td align=\\\'left\\\'>Предмет <strong>' . $pl['name'] . '</strong> будет утерян, вы уверены ?</td></tr></table>\',\'' . intval(
$is1 .= ' <a onClick="top.drop(' . $pl['id'] . ',\'' . $pl['img'] . '\',\'' . $pl['name'] . '\',1,\'<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2><img src=\\\'' . Config::img() . '/i/items/' . $pl['img'] . '\\\'></td><td align=\\\'left\\\'>Предмет <strong>' . $pl['name'] . '</strong> будет утерян, вы уверены ?</td></tr></table>\',\'' . intval(
$_GET['otdel']
) . Config::img() . ' / i / clear . gif"></a>';
}
@ -4630,8 +4604,7 @@ class User
$itm['data'] = Conversion::dataStringToArray($itm['data']);
unset($itm['data']['frompisher']);
$itm['data'] = Conversion::arrayToDataString($itm['data']);
if ($pl['data'] == $itm['data'] && $pl['name'] == $itm['name'] && $itm['iznosMAX'] == $pl['iznosMAX'] && $pl['iznosNOW'] == 0 && ($pl['timeOver'] == 0 || $pl['timeOver'] > time(
)) && $pl['gift'] == $itm['gift']) {
if ($pl['data'] == $itm['data'] && $pl['name'] == $itm['name'] && $itm['iznosMAX'] == $pl['iznosMAX'] && $pl['iznosNOW'] == 0 && ($pl['timeOver'] == 0 || $pl['timeOver'] > time()) && $pl['gift'] == $itm['gift']) {
$upd = mysql_query(
'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `inGroup` = "' . $itm['inGroup'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1'
);
@ -4730,12 +4703,12 @@ class User
$notr++;
}
}
if (isset($itm['iznosNOW'], $itm['iznosMAX'], $itm['iznosMAXi']) &&
$itm['iznosNOW'] >= ceil($itm['iznosMAX']) &&
$itm['iznosMAXi'] != 999999999) {
if (isset($itm['iznosnow'], $itm['iznosmax'], $itm['iznosmaxi']) &&
$itm['iznosnow'] >= ceil($itm['iznosmax']) &&
$itm['iznosmaxi'] != 999999999) {
$notr++;
}
if ($notr > 0 && $itm['inOdet'] != 0) {
if ($notr > 0 && $itm['inodet'] != 0) {
//снимаем предмет
$this->snatItem($itm['id'], $u['id']);
$snIt++;
@ -4793,16 +4766,16 @@ class User
ItemsModel::itemDecay($itm['id'], $itm['overType'], $u['id'], (int)$po['musor2'], $itm['type'], $itm['name']);
$notr++;
}
if ($itm['iznosNOW'] >= ceil($itm['iznosMAX']) && $itm['iznosMAXi'] != 999999999) {
if ($itm['iznosnow'] >= ceil($itm['iznosmax']) && $itm['iznosmaxi'] != 999999999) {
$notr++;
}
if ($notr > 0 && $itm['inOdet'] != 0) {
if ($notr > 0 && $itm['inodet'] != 0) {
//снимаем предмет
$this->snatItem($itm['id'], $u['id']);
$snIt++;
}
//проверяем срок годности
if ($itm['iznosNOW'] >= ceil($itm['iznosMAX']) && $itm['iznosMAXi'] != 999999999 && isset($po['musor']) && $po['musor'] > 0) {
if ($itm['iznosnow'] >= ceil($itm['iznosmax']) && $itm['iznosmaxi'] != 999999999 && isset($po['musor']) && $po['musor'] > 0) {
//предмет сломался
$this->itemDestroy($itm['id'], $u['id'], (int)$po['musor']);
}
@ -5232,8 +5205,7 @@ class User
);
$this->error = 'Вам нехорошо...';
} elseif (mysql_query(
'UPDATE `items_users` SET `uid` = "' . $this->info['id'] . '",`lastUPD` = "' . time(
) . '",`gift` = "' . $itm['gift'] . '",`gtxt1` = "' . $itm['gtxt1'] . '",`gtxt2` = "Предмет из упаковки. Дата запаковки: ' . date(
'UPDATE `items_users` SET `uid` = "' . $this->info['id'] . '",`lastUPD` = "' . time() . '",`gift` = "' . $itm['gift'] . '",`gtxt1` = "' . $itm['gtxt1'] . '",`gtxt2` = "Предмет из упаковки. Дата запаковки: ' . date(
'd.m.Y H:i:s', $itmin['time_create']
) . '" WHERE `id` = "' . $itmin['id'] . '" LIMIT 1'
)) {
@ -5264,8 +5236,7 @@ class User
$pid = ItemsModel::addItem($s['id'], $this->info['id']);
if ($pid > 0) {
mysql_query(
'UPDATE `items_users` SET `lastUPD` = "' . time(
) . '",`gift` = "' . $itm['gift'] . '" WHERE `id` = "' . $pid . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1'
'UPDATE `items_users` SET `lastUPD` = "' . time() . '",`gift` = "' . $itm['gift'] . '" WHERE `id` = "' . $pid . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1'
);
}
$j++;
@ -5580,16 +5551,14 @@ LIMIT 1'
);
$col = $col[0];
mysql_query(
'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time(
) . '" WHERE `item_id`="' . $itm['item_id'] . '" AND `inOdet` = 0 AND `delete` < 100000 AND `uid` = "' . $itm['uid'] . '" AND `data` NOT LIKE "%nodelete%"' . $whr
'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '" WHERE `item_id`="' . $itm['item_id'] . '" AND `inOdet` = 0 AND `delete` < 100000 AND `uid` = "' . $itm['uid'] . '" AND `data` NOT LIKE "%nodelete%"' . $whr
);
$this->error = 'Предметы "' . $itm['name'] . ' (x' . ($col + 1) . ')" выброшены';
Delo::add(
1,
'System.inventory',
$uid,
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Предметы &quot;<strong>' . $itm['name'] . ' (x' . $col . ')</strong>&quot; [itm:' . $itm['id'] . '=' . time(
) . '] были <strong>выброшены</strong>.',
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Предметы &quot;<strong>' . $itm['name'] . ' (x' . $col . ')</strong>&quot; [itm:' . $itm['id'] . '=' . time() . '] были <strong>выброшены</strong>.',
);
} else {
$this->error = 'Предмет "' . $itm['name'] . '" выброшен';
@ -6061,8 +6030,7 @@ LIMIT 1'
$r = '<font color="#FF0000"><strong>Вы успешно изъяли предмет &quot;' . $itm_['name'] . '&quot;</strong></font><br />';
$col = $this->itemsX(((int)$id));
mysql_query(
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time(
) . '", "6", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] | У персонажа : [' . $itm_['uid'] . ']", "' . $user['id'] . '")'
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "6", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] | У персонажа : [' . $itm_['uid'] . ']", "' . $user['id'] . '")'
);
mysql_query(
'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "-21' . $res['id'] . '" ' . $o . ' WHERE `id` = "' . $id . '" LIMIT 1'
@ -6093,8 +6061,7 @@ LIMIT 1'
if ($user['inTurnir'] == 0 && $user['inTurnirnew'] == 0) {
$col = $this->itemsX(((int)$id));
mysql_query(
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time(
) . '", "5", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] Хозяин : [' . $cls . ']", "' . $user['id'] . '")'
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "5", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] Хозяин : [' . $cls . ']", "' . $user['id'] . '")'
);
mysql_query(
'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "' . $user['id'] . '" WHERE `id` = "' . $id . '" LIMIT 1'
@ -6136,8 +6103,7 @@ LIMIT 1'
'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "' . $user['id'] . '", `data` = "' . $pl['data'] . '" WHERE `id` = "' . $pl['id'] . '"'
);
mysql_query(
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time(
) . '", "' . $type . '", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")'
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "' . $type . '", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")'
);
} elseif ($pl['uid'] == $user['id']) {
$col = $this->itemsX(((int)$pl['id']));
@ -6148,8 +6114,7 @@ LIMIT 1'
'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "-21' . $user['clan'] . '" WHERE `id` = "' . $pl['id'] . '"'
);
mysql_query(
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time(
) . '", "9", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")'
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "9", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")'
);
}
}

View File

@ -87,7 +87,7 @@ class Item
'iznosNOW' => $iNow,
'iznosMAX' => $iMax,
] = $item;
$this->durability = $iMax - $iNow;
$this->durability = (int)$iMax - (int)$iNow;
$stat = new Stat();
$stat->getBonus();
$dataArr = Conversion::dataStringToArray(strtolower($this->data));

View File

@ -208,7 +208,7 @@ if (!$isBattle) {
}
$js .= '$("#priems").html("' . $priem->seeMy(2) . '");';
$js .= '$("#priems").html("' . $priem->seeMy() . '");';
$jslog = $btl->lookmLog() . $btl->lookLog();
if ($jslog != '') {
$js = $jslog . $js;

View File

@ -190,7 +190,7 @@ if (!$isBattle) {
$rehtml = '';
if (!isset($CRON_CORE)) {
$js .= '$("#priems").html("' . $priem->seeMy(2) . '");';
$js .= '$("#priems").html("' . $priem->seeMy() . '");';
$jslog = $btl->lookmLog();
$jslog .= $btl->lookLog();
if ($jslog != '') {

View File

@ -193,7 +193,7 @@ if (isset($_POST['atack'], $_POST['block']) || (isset($_POST['id']) && $_POST['i
$rehtml = '';
if (!isset($CRON_CORE)) {
$js .= '$("#priems").html("' . $priem->seeMy(2) . '");';
$js .= '$("#priems").html("' . $priem->seeMy() . '");';
//if(!isset($_POST['usepriem'])) {
$jslog = $btl->lookLog();
if ($jslog != '') {

View File

@ -94,8 +94,7 @@ if (isset($_POST['compname'])) {
if (!isset($tcm['id'])) {
//добавляем новый комплект
$ins = mysql_query(
'INSERT INTO `save_com` (`uid`,`time`,`name`,`val`,`type`) VALUES ("' . $u->info['id'] . '","' . time(
) . '","' . mysql_real_escape_string($_POST['compname']) . '","' . $ptst . '","0")'
'INSERT INTO `save_com` (`uid`,`time`,`name`,`val`,`type`) VALUES ("' . $u->info['id'] . '","' . time() . '","' . mysql_real_escape_string($_POST['compname']) . '","' . $ptst . '","0")'
);
if ($ins) {
$u->error = 'Комплект &quot;' . $_POST['compname'] . '&quot; был успешно сохранен';
@ -117,8 +116,7 @@ if (isset($_POST['compname'])) {
}
} elseif (isset($_GET['delc1'])) {
$cmpl = mysql_query(
'UPDATE `save_com` SET `delete` = "' . time(
) . '" WHERE `uid` = "' . $u->info['id'] . '" AND `delete` = "0" AND `id` = "' . mysql_real_escape_string(
'UPDATE `save_com` SET `delete` = "' . time() . '" WHERE `uid` = "' . $u->info['id'] . '" AND `delete` = "0" AND `id` = "' . mysql_real_escape_string(
$_GET['delc1']
) . '" LIMIT 1'
);
@ -433,13 +431,10 @@ if (isset($_GET['mAjax'])) {
echo $usee ? $usee[0] : 'information is lost.';
$priem = new Priems();
echo '<br>';
$priem->seeMy(1);
$priem->seeMyPriems();
echo '<br>' . $u->info_remont();
?>
</div>
<div style="text-align: center">
<?= $c['counters']; ?>
</div>
</td>
<td width="287" style="padding-right:7px;" valign="top" align="left">
<?php include('stats_inv.php'); ?>

View File

@ -9,6 +9,7 @@ use Core\Config;
use DarksLight2\Battle\Techniques\TechniqueCategoryEntity;
use DarksLight2\Training\TrainingManager;
use Helper\Conversion;
use Model\Constant\Stat;
if (!defined('GAME')) {
die();
@ -161,7 +162,7 @@ $tma = '';
<body>
<SCRIPT>
var clevel = '';
let clevel = '';
var currentID = <?= time(); ?>;
var newrz = <?= $rzsee; ?>;
@ -170,10 +171,10 @@ $tma = '';
}
function highl(nm, i) {
if (clevel == nm) {
if (clevel === nm) {
document.getElementById(nm).className = 'tzSet'
} else {
if (i == 1) {
if (i === 1) {
document.getElementById(nm).className = 'tzOver'
} else {
document.getElementById(nm).className = 'tz'
@ -182,12 +183,13 @@ $tma = '';
}
function setlevel(nm) {
if (clevel != '') {
if (clevel) {
document.getElementById(clevel).className = 'tz';
document.getElementById('d' + clevel).style.display = 'none';
}
clevel = nm || 'L1';
document.getElementById(clevel).className = 'tzSet';
document.getElementById('d' + clevel).style.display = 'inline';
newrz = nm.split('L');
@ -202,35 +204,31 @@ $tma = '';
<?php
echo User::getLogin($u->info['id']);
$st = Conversion::dataStringToArray($u->info['stats']);
if (
$_GET['dec_transfer'] ||
$_GET['dec_travma'] ||
$_GET['fast_homeworld'] ||
$_GET['inc_expr'] ||
$_GET['inc_friends'] ||
$_GET['inc_hobby'] ||
$_GET['max_inventory'] ||
$_GET['num_transfer'] ||
$_GET['speed_HP'] ||
$_GET['speed_MP'] ||
$_GET['speed_debuff']
) {
$summs = floor(
$_GET['dec_transfer'] +
$_GET['dec_travma'] +
$_GET['fast_homeworld'] +
$_GET['inc_expr'] +
$_GET['inc_friends'] +
$_GET['inc_hobby'] +
$_GET['max_inventory'] +
$_GET['num_transfer'] +
$_GET['speed_HP'] +
$_GET['speed_MP'] +
$_GET['speed_debuff']
);
if (!is_numeric($summs)) {
$summs = 0;
}
$os1 = $_GET['dec_transfer'] ??= 0;
$os2 = $_GET['dec_travma'] ??= 0;
$os3 = $_GET['fast_homeworld'] ??= 0;
$os4 = $_GET['inc_expr'] ??= 0;
$os5 = $_GET['inc_friends'] ??= 0;
$os6 = $_GET['inc_hobby'] ??= 0;
$os7 = $_GET['max_inventory'] ??= 0;
$os8 = $_GET['num_transfer'] ??= 0;
$os9 = $_GET['speed_HP'] ??= 0;
$os10 = $_GET['speed_MP'] ??= 0;
$os11 = $_GET['speed_debuff'] ??= 0;
$summs = $os1 + $os2 + $os3 + $os4 + $os5 + $os6 + $os7 + $os8 + $os9 + $os10 + $os11;
$st['os1'] ??= 0;
$st['os2'] ??= 0;
$st['os3'] ??= 0;
$st['os4'] ??= 0;
$st['os5'] ??= 0;
$st['os6'] ??= 0;
$st['os7'] ??= 0;
$st['os8'] ??= 0;
$st['os9'] ??= 0;
$st['os10'] ??= 0;
$st['os11'] ??= 0;
if ($summs > 1) {
$summs = 0;
@ -238,29 +236,29 @@ $tma = '';
} elseif ($summs < 0) {
$summs = 0;
echo '&nbsp; &nbsp;<span style="color: red; ">При вскрытие сейфа выяснилось, что он был вскрыт до Вас ;)</span><br>';
} elseif (($st['os1'] + $_GET['dec_transfer'] <= 5 && $_GET['dec_transfer'] > 0) ||
($st['os2'] + $_GET['dec_travma'] <= 5 && $_GET['dec_travma'] > 0) ||
($st['os3'] + $_GET['fast_homeworld'] <= 5 && $_GET['fast_homeworld'] > 0) ||
($st['os4'] + $_GET['inc_expr'] <= 5 && $_GET['inc_expr'] > 0) ||
($st['os5'] + $_GET['inc_friends'] <= 5 && $_GET['inc_friends'] > 0) ||
($st['os6'] + $_GET['inc_hobby'] <= 5 && $_GET['inc_hobby'] > 0) ||
($st['os7'] + $_GET['max_inventory'] <= 5 && $_GET['max_inventory'] > 0) ||
($st['os8'] + $_GET['num_transfer'] <= 5 && $_GET['num_transfer'] > 0) ||
($st['os9'] + $_GET['speed_HP'] <= 5 && $_GET['speed_HP'] > 0) ||
($st['os10'] + $_GET['speed_MP'] <= 5 && $_GET['speed_MP'] > 0) ||
($st['os11'] + $_GET['speed_debuff'] <= 5 && $_GET['speed_debuff'] > 0) && $u->info['id'] == $_GET['s4i']
} elseif (($st['os1'] + $os1 <= 5 && $os1 > 0) ||
($st['os2'] + $os2 <= 5 && $os2 > 0) ||
($st['os3'] + $os3 <= 5 && $os3 > 0) ||
($st['os4'] + $os4 <= 5 && $os4 > 0) ||
($st['os5'] + $os5 <= 5 && $os5 > 0) ||
($st['os6'] + $os6 <= 5 && $os6 > 0) ||
($st['os7'] + $os7 <= 5 && $os7 > 0) ||
($st['os8'] + $os8 <= 5 && $os8 > 0) ||
($st['os9'] + $os9 <= 5 && $os9 > 0) ||
($st['os10'] + $os10 <= 5 && $os10 > 0) ||
($st['os11'] + $os11 <= 5 && $os11 > 0) && $u->info['id'] == $_GET['s4i']
) {
$st['os1'] += (int)$_GET['dec_transfer'];
$st['os2'] += (int)$_GET['dec_travma'];
$st['os3'] += (int)$_GET['fast_homeworld'];
$st['os4'] += (int)$_GET['inc_expr'];
$st['os5'] += (int)$_GET['inc_friends'];
$st['os6'] += (int)$_GET['inc_hobby'];
$st['os7'] += (int)$_GET['max_inventory'];
$st['os8'] += (int)$_GET['num_transfer'];
$st['os9'] += (int)$_GET['speed_HP'];
$st['os10'] += (int)$_GET['speed_MP'];
$st['os11'] += (int)$_GET['speed_debuff'];
$st['os1'] += $os1;
$st['os2'] += $os2;
$st['os3'] += $os3;
$st['os4'] += $os4;
$st['os5'] += $os5;
$st['os6'] += $os6;
$st['os7'] += $os7;
$st['os8'] += $os8;
$st['os9'] += $os9;
$st['os10'] += $os10;
$st['os11'] += $os11;
$u->info['stats'] = Conversion::arrayToDataString($st);
}
if ($u->info['sskills'] - (int)$summs < 0) {
@ -281,44 +279,43 @@ $tma = '';
return "&nbsp; &nbsp;<span style='color: red;'>\"$name\"</span><br>";
}
if ($_GET['dec_transfer'] == 1) {
if ($os1 == 1) {
echo getstatusumenie('Изворотливый', $st['os1']);
}
if ($_GET['dec_travma'] == 1) {
if ($os2 == 1) {
echo getstatusumenie('Стойкий', $st['os2']);
}
if ($_GET['fast_homeworld'] == 1) {
if ($os3 == 1) {
echo getstatusumenie('Быстрый', $st['os3']);
}
if ($_GET['inc_expr'] == 1) {
if ($os4 == 1) {
echo getstatusumenie('Сообразительный', $st['os4']);
}
if ($_GET['inc_friends'] == 1) {
if ($os5 == 1) {
echo getstatusumenie('Дружелюбный', $st['os5']);
}
if ($_GET['inc_hobby'] == 1) {
if ($os6 == 1) {
echo getstatusumenie('Общительный', $st['os6']);
}
if ($_GET['max_inventory'] == 1) {
if ($os7 == 1) {
echo getstatusumenie('Запасливый', $st['os7']);
}
if ($_GET['num_transfer'] == 1) {
if ($os8 == 1) {
echo getstatusumenie('Коммуникабельный', $st['os8']);
}
if ($_GET['speed_HP'] == 1) {
if ($os9 == 1) {
echo getstatusumenie('Двужильный', $st['os9']);
}
if ($_GET['speed_MP'] == 1) {
if ($os10 == 1) {
echo getstatusumenie('Здравомыслящий', $st['os10']);
}
if ($_GET['speed_debuff'] == 1) {
if ($os11 == 1) {
echo getstatusumenie('Здоровый сон', $st['os11']);
}
$u->info['sskills'] -= $summs;
}
}
if ($_GET['upr']) {
if (isset($_GET['upr'])) {
/*-----Проверяем сумму статов и умений-----*/
if (!isset($_GET['energy']) || $_GET['energy'] < 0) {
$_GET['energy'] = 0;
@ -767,10 +764,40 @@ $tma = '';
"bonus4" => "0,4 кр.",
"bonus5" => "0,5 кр.",
];
$os["os3"] = ["name" => "Быстрый", "opt" => "fast_homeworld", "descr" => "Кнопка \"Возврат\" появляется раньше на ", "nlevel" => 4, "bonus1" => "5 минут", "bonus2" => "10 минут", "bonus3" => "15 минут", "bonus4" => "20 минут", "bonus5" => "25 минут"];
$os["os4"] = ["name" => "Сообразительный", "opt" => "inc_expr", "descr" => "Получаемый опыт больше на ", "nlevel" => 4, "bonus1" => "1 %", "bonus2" => "2 %", "bonus3" => "3 %", "bonus4" => "4 %", "bonus5" => "5 %"];
$os["os5"] = ["name" => "Дружелюбный", "opt" => "inc_friends", "descr" => "Cписок друзей больше на ", "bonus1" => 5, "bonus2" => 10, "bonus3" => 15, "bonus4" => 20, "bonus5" => 25];
$os["os6"] = ["name" => "Общительный", "opt" => "inc_hobby", "descr" => "Увеличение максимального размера раздела \"Увлечения / хобби\" на ", "bonus1" => "200 символов", "bonus2" => "400 символов", "bonus3" => "600 символов", "bonus4" => "800 символов", "bonus5" => "1000 символов"];
$os["os3"] = ["name" => "Быстрый",
"opt" => "fast_homeworld",
"descr" => "Кнопка \"Возврат\" появляется раньше на ",
"nlevel" => 4,
"bonus1" => "5 минут",
"bonus2" => "10 минут",
"bonus3" => "15 минут",
"bonus4" => "20 минут",
"bonus5" => "25 минут"];
$os["os4"] = ["name" => "Сообразительный",
"opt" => "inc_expr",
"descr" => "Получаемый опыт больше на ",
"nlevel" => 4,
"bonus1" => "1 %",
"bonus2" => "2 %",
"bonus3" => "3 %",
"bonus4" => "4 %",
"bonus5" => "5 %"];
$os["os5"] = ["name" => "Дружелюбный",
"opt" => "inc_friends",
"descr" => "Cписок друзей больше на ",
"bonus1" => 5,
"bonus2" => 10,
"bonus3" => 15,
"bonus4" => 20,
"bonus5" => 25];
$os["os6"] = ["name" => "Общительный",
"opt" => "inc_hobby",
"descr" => "Увеличение максимального размера раздела \"Увлечения / хобби\" на ",
"bonus1" => "200 символов",
"bonus2" => "400 символов",
"bonus3" => "600 символов",
"bonus4" => "800 символов",
"bonus5" => "1000 символов"];
$os["os7"] = ["name" => "Запасливый", "opt" => "max_inventory", "descr" => "Больше места в рюкзаке на ", "nlevel" => 4, "bonus1" => "10 единиц", "bonus2" => "20 единиц", "bonus3" => "30 единиц", "bonus4" => "40 единиц", "bonus5" => "50 единиц"];
$os["os9"] = ["name" => "Двужильный", "opt" => "speed_HP", "descr" => "Здоровье восстанавливается быстрее на ", "npower" => 10, "bonus1" => "+5%", "bonus2" => "+10%", "bonus3" => "+15%", "bonus4" => "+20%", "bonus5" => "+30%"];
$os["os10"] = ["name" => "Здравомыслящий", "opt" => "speed_MP", "descr" => "Мана восстанавливается быстрее на ", "nwis" => 20, "bonus1" => "+5%", "bonus2" => "+10%", "bonus3" => "+15%", "bonus4" => "+20%", "bonus5" => "+25%"];
@ -1041,7 +1068,7 @@ $tma = '';
</TABLE>
<TABLE border=0 cellspacing=1 cellpadding=0 width=100%>
<tr>
<TD width=100% style='padding-left: 7'>
<TD width=100% style='padding-left: 7px;'>
<div class='dtz' ID='dL1'>
<table>
<tr>
@ -1302,13 +1329,16 @@ $tma = '';
/*---Особенности---*/
foreach ($os as $k => $v) {
$good = 1;
if ($v["nlevel"] && $v["nlevel"] + $st[$k] > $u->info["level"]) {
if (empty($st[$k])) {
$st[$k] = 0;
}
if (isset($v["nlevel"]) && $v["nlevel"] + $st[$k] > $u->info["level"]) {
$good = 0;
}
if ($v["npower"] && $v["npower"] + ($st[$k] * 5) > $st['s4']) {
if (isset($v["npower"], $st['s4']) && $v["npower"] + ($st[$k] * 5) > $st['s4']) {
$good = 0;
}
if ($v["nwis"] && $v["nwis"] + ($st[$k] * 5) > $st['s6']) {
if (isset($v["nwis"], $st['s6']) && $v["nwis"] + ($st[$k] * 5) > $st['s6']) {
$good = 0;
}
if ($good && $st[$k] < 5) {
@ -1317,9 +1347,13 @@ $tma = '';
}
}
echo "<br>";
echo "<b>Выбранные особенности:</b><br>";
$first = true;
foreach ($os as $k => $v) {
if ($st[$k]) {
if (!empty($st[$k])) {
if ($first) {
echo "<b>Выбранные особенности:</b><br>";
$first = false;
}
echo "&bull; " . $v['name'] . " " . ($st[$k] > 1 ? " - " . $st[$k] : "") . "<br>";
}
}
@ -1327,7 +1361,7 @@ $tma = '';
?>
</div>
<div class="dtz" ID='dL4'>
<script type="text/javascript" src="js/jquery.js"></script>
<script src="/js/jquery.js"></script>
<SCRIPT>
var p_name;
@ -1397,18 +1431,18 @@ $tma = '';
<input type="button" class="btn" value="Очистить слоты"
onclick="window.location.href = '/main.php?skills=1&rz=4&all=<?= $_GET['all'] ?>&clear_abil=1'; return false;">
<?php $priem->seeMy(1); ?>
<?php $priem->seeMyPriems(); ?>
</fieldset>
</div>
<div style="display: flex; width: 100%">
<fieldset style="width: 50%">
<legend><b>Категории</b></legend>
<div
style="display: flex; flex-wrap: wrap; flex-direction: column; justify-content: center;">
<div style="display: flex; flex-wrap: wrap; flex-direction: column; justify-content: center;">
<?php
// недописанный огрызок неизвестно чего
$categories = TechniqueCategoryEntity::getInstance()->findAll();
var_dump($categories);
foreach ($categories as $category) {
?>
<div style='margin-right: 10px;height: 20px'>
@ -1432,11 +1466,13 @@ $tma = '';
</td>
</tr>
</table>
</div>
<div class="dtz" ID='dL5'>
<div style="margin:5px;">
<?php
$statnames = new \Model\Constant\Stat();
$statnames = new Stat();
$statnames->getBonus();
//D5D5D5 , C7C7C7
@ -2037,7 +2073,7 @@ $tma = '';
skillsArr["m_magic7"] = <?=$st['mg7']?>;
function SetAllSkills(isOn) {
var arrSkills = ["str", "dex", "inst", "power", "intel", "wis", "spirit", "will", "freedom", "god"];
var arrSkills = ["str", "dex", "inst", "power", "intel", "wis", "spirit"];
for (var i in arrSkills) {
var clname = (isOn) ? "skill" : "nonactive";
if (oNode = document.getElementById("plus_" + arrSkills[i])) oNode.className = clname;