This commit is contained in:
Ivor Barhansky 2024-02-09 21:41:54 +02:00
parent be537b5dfc
commit 4470f80098
9 changed files with 1501 additions and 1492 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1376,9 +1376,9 @@ class Priems
return $r; 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']); $tr = Conversion::dataStringToArray($pl['tr']);
$d2 = Conversion::dataStringToArray($pl['date2']); $d2 = Conversion::dataStringToArray($pl['date2']);
$x = 1; $x = 1;
@ -2100,118 +2100,79 @@ class Priems
public function getTechniquesInfo(?int $id = null): array 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)) { if (isset($id)) {
return Db::getRow( return Db::getRow('select * from priems where level <= ? and activ > 0 and id = ? order by img,level', [$this->u->info['level'], $id]);
'select * from techniques_categories left join priems on techniques_categories.technique_id = priems.id // return Db::getRow(
where priems.level <= ? and priems.activ > 0 and priems.id = ? order by priems.img,priems.level', [User::start()->info['level'], $id] // '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( return Db::getRows('select * from priems where level <= ? and activ > 0 order by img,level', [$this->u->info['level']]);
'select * from techniques_categories left join priems on techniques_categories.technique_id = priems.id // return Db::getRows(
where priems.level <= ? and priems.activ > 0 order by priems.img,priems.level', [User::start()->info['level']] // '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
{ {
global $btl;
$i = 0; $i = 0;
$p = explode('|', $this->u->info['priems']); $p = explode('|', $this->u->info['priems']);
$lvar = '';
$pr = ''; $pr = '';
$all = (int)$_GET['all'];
while ($i < $this->u->info['priemslot']) { while ($i < $this->u->info['priemslot']) {
if ($p[$i] > 0) { if ($p[$i] > 0) {
$pl = mysql_fetch_assoc( $pl = Db::getRow('select * from priems where level <= ? and activ > 0 and id = ?', [$this->u->info['level'], $p[$i]]);
mysql_query( $lvar = $this->priemInfo($pl, $i);
'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);
$pz = $lvar[1];
$lvar = $lvar[0]; $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'];
} else {
$oninuser = $this->u->info['login'];
}
} else {
if ($btl->users[$btl->uids[$this->u->info['enemy']]]['login2'] != '') {
$oninuser = $btl->users[$btl->uids[$this->u->info['enemy']]]['login2'];
} else {
$oninuser = $btl->users[$btl->uids[$this->u->info['enemy']]]['login'];
}
}
$cl = 'href="javascript:void(0);" onClick="top.priemOnUser(' . $i . ',1,\'' . $pl['name'] . '\',\'' . $oninuser . '\',\'' . $pl['img'] . '\');"';
unset($oninuser);
} else {
$cl = 'href="javascript:void(0);" onClick="usepriem(' . $i . ',1,\'' . $pl['img'] . '\');"';
}
} elseif ($pl['type'] == 2) {
//длительное
$cl = 'href="javascript:void(0);" onClick="usepriem(' . $i . ',1,\'' . $pl['img'] . '\');"';
} elseif ($pl['type'] == 3) {
$cl = 'href="javascript:void(0);" onClick="alert(\'Возможно используем?\');"';
}
}
$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']) {
$cli2 = ' class="nopriemuse" ';
}
$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'])) { 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>'; $cl = "location.href='/main.php?all=$all&skills=1&rz=4&p_raz=all'";
} else { } else {
$pr .= '<img style="margin-top:4px; margin-left:4px;" src="//img.new-combats.tech/i/items/w/clearPriem.gif" width="55" height="35" />'; $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++; $i++;
} }
if ($this->u->info['animal'] > 0 && $t == 2) {
$use_lst = $this->u->testAction( echo '<div>' . $pr . '</div>';
'`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>';
} 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" />';
}
}
if ($t == 1) {
echo '<div>' . $pr . '</div>';
} elseif ($t == 2) {
return str_replace('"', '\\"', $pr);
}
} }
public function priemInfo($pl, $t, $id = false) /**
* Летит в js, двойные кавычки не использовать.
* @param array $pl
* @param int $id
* @return array
*/
private function priemInfo(array $pl, int $id = -1): array
{ {
global $btl; global $btl;
$pz = explode('|', $this->u->info['priems_z']); $pz = explode('|', $this->u->info['priems_z']);
@ -2223,7 +2184,7 @@ class Priems
$n = $this->statnames->sysRequirementNames[$x]; $n = $this->statnames->sysRequirementNames[$x];
if (isset($tr['tr_' . $n])) { if (isset($tr['tr_' . $n])) {
if ($tr['tr_' . $n] > $this->u->stats[$n]) { if ($tr['tr_' . $n] > $this->u->stats[$n]) {
$trs .= '<span style="color: red">'; $trs .= "<span style='color: red;'>";
} }
$trs .= '<br>• '; $trs .= '<br>• ';
$trs .= $this->statnames->requirementNames[$n] . ': ' . $tr['tr_' . $n]; $trs .= $this->statnames->requirementNames[$n] . ': ' . $tr['tr_' . $n];
@ -2239,10 +2200,7 @@ class Priems
$nm = [1 => 'hit', 2 => 'krit', 3 => 'counter', 4 => 'block', 5 => 'parry', 6 => 'hp', 7 => 'spirit']; $nm = [1 => 'hit', 2 => 'krit', 3 => 'counter', 4 => 'block', 5 => 'parry', 6 => 'hp', 7 => 'spirit'];
while ($j <= 6) { while ($j <= 6) {
if ($pl['tt' . $j] > 0) { if ($pl['tt' . $j] > 0) {
$lvar .= '<img src=//img.new-combats.tech/i/micro/' . $nm[$j] . '.gif width=8 height=8 /> ' . round( $lvar .= '<img src=//img.new-combats.tech/i/micro/' . $nm[$j] . '.gif> ' . round($pl['tt' . $j], 2) . ' &nbsp; ';
$pl['tt' . $j],
2
) . ' &nbsp; ';
} }
$j++; $j++;
} }
@ -2263,7 +2221,7 @@ class Priems
if (isset($tr['tr_mpNow']) && $tr['tr_mpNow'] > 0) { if (isset($tr['tr_mpNow']) && $tr['tr_mpNow'] > 0) {
$tr['tr_mpNow'] -= round($tr['tr_mpNow'] / 100 * $this->u->stats['min_use_mp']); $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'])) { 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>'; $lvar .= '<span style="color: red;">• Расход маны: ' . $tr['tr_mpNow'] . '</span><br>';
} else { } else {
$lvar .= '• Расход маны: ' . $tr['tr_mpNow'] . '<br>'; $lvar .= '• Расход маны: ' . $tr['tr_mpNow'] . '<br>';
} }
@ -2282,6 +2240,90 @@ class Priems
return [0 => $lvar, 1 => $pz]; return [0 => $lvar, 1 => $pz];
} }
public function seeMy(): string
{
global $btl;
$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]]);
$cl = '';
$lvar = $this->priemInfo($pl, $i);
$pz = $lvar[1];
$lvar = $lvar[0];
if ($pl['type'] == 1) {
//моментально
if ($pl['onUser'] == 1) {
if ($pl['team'] == 1) {
if ($this->u->info['login2'] != '') {
$oninuser = $this->u->info['login2'];
} else {
$oninuser = $this->u->info['login'];
}
} else {
if ($btl->users[$btl->uids[$this->u->info['enemy']]]['login2'] != '') {
$oninuser = $btl->users[$btl->uids[$this->u->info['enemy']]]['login2'];
} else {
$oninuser = $btl->users[$btl->uids[$this->u->info['enemy']]]['login'];
}
}
$cl = 'href="javascript:void(0);" onClick="top.priemOnUser(' . $i . ',1,\'' . $pl['name'] . '\',\'' . $oninuser . '\',\'' . $pl['img'] . '\');"';
unset($oninuser);
} else {
$cl = 'href="javascript:void(0);" onClick="usepriem(' . $i . ',1,\'' . $pl['img'] . '\');"';
}
} elseif ($pl['type'] == 2) {
//длительное
$cl = 'href="javascript:void(0);" onClick="usepriem(' . $i . ',1,\'' . $pl['img'] . '\');"';
} elseif ($pl['type'] == 3) {
$cl = 'href="javascript:void(0);" onClick="alert(\'Возможно используем?\');"';
}
$notr = $this->testpriem($pl, 2);
$cli2 = '';
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;
} else {
if (isset($_GET['inv'])) {
$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" alt="">';
}
}
$i++;
}
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'])) {
$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 {
$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" />';
}
}
return str_replace('"', '\\"', $pr);
}
//Мощность / подавление / сопротивление и т.д. //Мощность / подавление / сопротивление и т.д.
public function getByCategory(?int $category_id = null) public function getByCategory(?int $category_id = null)
@ -2300,9 +2342,7 @@ class Priems
echo echo
<<< HTML <<< HTML
<a href="javascript:void(0)" onclick="location.href='main.php?skills=1&rz=4&use_priem=$priem[id]';"> <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( <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" />
$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" />
</a> </a>
HTML; HTML;
} }

View File

@ -281,8 +281,8 @@ class User
); );
$this->addAction( $this->addAction(
time(), 'frg', '[ ' . $this->info['login'] . ' ] ' . date( time(), 'frg', '[ ' . $this->info['login'] . ' ] ' . date(
'd.m.Y H:i:s' 'd.m.Y H:i:s'
) . ' [true] , balance: ' . $sb . ' / ' . $this->info['catch'] . ' / ' . $this->info['frg'] . ' ' ) . ' [true] , balance: ' . $sb . ' / ' . $this->info['catch'] . ' / ' . $this->info['frg'] . ' '
); );
} else { } else {
mysql_query( mysql_query(
@ -293,8 +293,8 @@ class User
if ($sb - 10 > $this->info['catch'] - $this->info['frg']) { if ($sb - 10 > $this->info['catch'] - $this->info['frg']) {
$this->addAction( $this->addAction(
time(), 'frgfalse', '[ ' . $this->info['login'] . ' ] ' . date( time(), 'frgfalse', '[ ' . $this->info['login'] . ' ] ' . date(
'd.m.Y H:i:s' 'd.m.Y H:i:s'
) . ' [false] , [' . ($sb - ($this->info['catch'] - $this->info['frg'])) . '] , balance: ' . $sb . ' | ' . $this->info['catch'] . ' | ' . $this->info['frg'] . ' ' ) . ' [false] , [' . ($sb - ($this->info['catch'] - $this->info['frg'])) . '] , balance: ' . $sb . ' | ' . $this->info['catch'] . ' | ' . $this->info['frg'] . ' '
); );
} }
} }
@ -382,8 +382,7 @@ class User
'UPDATE `items_users` SET `use_text` = "' . $itm['use_text'] . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' 'UPDATE `items_users` SET `use_text` = "' . $itm['use_text'] . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1'
); );
mysql_query( mysql_query(
'INSERT INTO `items_text` (`item_id`,`time`,`login`,`text`,`city`,`x`) VALUES ("' . $itm['id'] . '","' . time( 'INSERT INTO `items_text` (`item_id`,`time`,`login`,`text`,`city`,`x`) VALUES ("' . $itm['id'] . '","' . time() . '","' . $this->info['login'] . '","' . mysql_real_escape_string(
) . '","' . $this->info['login'] . '","' . mysql_real_escape_string(
htmlspecialchars($txt, null) htmlspecialchars($txt, null)
) . '","' . $this->info['city'] . '","' . $sx . '")' ) . '","' . $this->info['city'] . '","' . $sx . '")'
); );
@ -429,8 +428,7 @@ class User
$this->error = 'Персонаж уже проводит сделку'; $this->error = 'Персонаж уже проводит сделку';
} else { } else {
$ins = mysql_query( $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( '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(
) . '","' . mysql_real_escape_string(
htmlspecialchars($_POST['textarea'], null) htmlspecialchars($_POST['textarea'], null)
) . '","' . time() . '")' ) . '","' . time() . '")'
); );
@ -754,6 +752,12 @@ class User
return $result ?: []; 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() private function infoTasks()
{ {
if (empty($this->info)) { 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) public function getUserInfoById($id)
{ {
return Db::getRow('select * from users left join stats on users.id = stats.id where users.id = ?', [$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') { if ($po['sudba'] == '0') {
$is2 .= ' <img title="Этот предмет будет связан общей судьбой с первым, кто наденет его. Никто другой не сможет его использовать." src="' . Config::img() . '/i/destiny0.gif">'; $is2 .= ' <img title="Этот предмет будет связан общей судьбой с первым, кто наденет его. Никто другой не сможет его использовать." src="' . Config::img() . '/i/destiny0.gif">';
} elseif ($po['sudba'] == '1') { } elseif ($po['sudba'] == '1') {
$is2 .= ' <img title="Этот предмет будет связан общей судьбой с первым, кто возьмет предмет. Никто другой не сможет его использовать." src="' . Config::img( $is2 .= ' <img title="Этот предмет будет связан общей судьбой с первым, кто возьмет предмет. Никто другой не сможет его использовать." src="' . Config::img() . '/i/destiny0.gif">';
) . '/i/destiny0.gif">';
} else { } else {
$is2 .= ' <img title="Этот предмет связан общей судьбой с ' . $po['sudba'] . '. Никто другой не сможет его использовать." src="' . Config::img() . '/i/desteny.gif">'; $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]; $tr .= '<br>• Броня ' . $bn[$i] . ': ' . $po['add_mib' . $i] . '-' . $po['add_mab' . $i];
if (isset($po['mf_mib']) && $po['mf_mib'] > 0) { 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( $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/up.gif" width="11" height="11"></a>';
} }
} }
$i++; $i++;
@ -3530,11 +3526,7 @@ class User
if (isset($po['free_stats']) && $po['free_stats'] > 0) { if (isset($po['free_stats']) && $po['free_stats'] > 0) {
$is2 .= '<br><strong>Распределение статов:</strong>'; $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( $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>';
) . '/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'] . ''; $is2 .= '&bull; Осталось распределений: ' . $po['free_stats'] . '';
} }
@ -3586,28 +3578,17 @@ class User
} else { } else {
$is2 .= '<div style="margin-left:20px;"><small> $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_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( Мастерство владения дубинами, булавами: ' . (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>
) . '/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_a3']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=3"><img src="' . Config::img( Мастерство владения топорами, секирами: ' . (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>
) . '/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_a4']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=4"><img src="' . Config::img( Мастерство владения стихией Огня: ' . (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>
) . '/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_a5']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=5"><img src="' . Config::img( Мастерство владения стихией Воды: ' . (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>
) . '/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_mg1']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=6"><img src="' . Config::img( Мастерство владения магией Света: ' . (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>
) . '/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_mg2']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=7"><img src="' . Config::img( Мастерство владения серой магией: ' . (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>
) . '/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>'; </small></div>';
$is2 .= 'Осталось распределений: ' . $mx1; $is2 .= 'Осталось распределений: ' . $mx1;
} }
@ -3760,16 +3741,14 @@ class User
mysql_query('SELECT * FROM `clan` WHERE `id` = "' . $po['toclan1'][0] . '" LIMIT 1') mysql_query('SELECT * FROM `clan` WHERE `id` = "' . $po['toclan1'][0] . '" LIMIT 1')
); );
if (isset($clpo['id'])) { if (isset($clpo['id'])) {
$is2 .= '<div style="color:brown;">Предмет принадлежит клану <img style="vertical-align:bottom" src="' . Config::img( $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>';
) . '/i/clan/' . $clpo['name_mini'] . '.gif" width="24" height"15"> <strong>' . $clpo['name'] . '</strong>';
$plpo = mysql_fetch_array( $plpo = mysql_fetch_array(
mysql_query( mysql_query(
'SELECT `id`,`login`,`cityreg` FROM `users` WHERE `id` = "' . $po['toclan1'][1] . '" LIMIT 1' 'SELECT `id`,`login`,`cityreg` FROM `users` WHERE `id` = "' . $po['toclan1'][1] . '" LIMIT 1'
) )
); );
if (isset($plpo['id'])) { if (isset($plpo['id'])) {
$is2 .= ' <span style="color: grey;">(Дар игрока <strong>' . $plpo['login'] . '</strong><a href="info/' . $plpo['id'] . '" target="_blank"><img src="' . Config::img( $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>';
) . '/i/inf_' . $plpo['cityreg'] . '.gif" width="9"></a>)</span>';
if ($plpo['login'] == $this->info['login']) { if ($plpo['login'] == $this->info['login']) {
if (isset($_GET['backmyitm'])) { if (isset($_GET['backmyitm'])) {
$pl['inOdet'] = 0; $pl['inOdet'] = 0;
@ -3911,8 +3890,7 @@ class User
) . '" LIMIT 1' ) . '" LIMIT 1'
) )
); );
$is1 .= '<small>Предмет у игрока<br><strong>' . $yui['login'] . '</strong><a href="info/' . $yui['id'] . '" target="_blank"><img width="10" src="' . Config::img( $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>';
) . '/i/inf_' . $yui['cityreg'] . '.gif"></a></small>';
if ($this->info['tt'][14][0] == 1 || ($this->info['id'] == $us_1)) { 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>'; $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) { 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( $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>';
) . '/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']) . '\');'; $useUrl = 'top.useiteminv(\'' . (0 + $pl['id']) . '\',\'' . $pl['img'] . '\',\'' . $pl['img'] . '\',1,\'' . $pldate . '\',\'' . (0 + $_GET['otdel']) . '\');';
} elseif ($pl['magic_inc'] && $pl['type'] == 29) { //используем заклятие } elseif ($pl['magic_inc'] && $pl['type'] == 29) { //используем заклятие
if (isset($po['useOnLogin']) && !isset($po['zazuby'])) { //на персонажа 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 . '\');'; $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 { //просто использование (на себя, либо без указания предмета\логина) } 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( $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>';
) . '/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']) . ');'; $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) { if ($pl['group'] > 0) {
$is1 .= '<br>'; $is1 .= '<br>';
if ($this->itemsX($pl['id']) < $pl['group_max']) { 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( $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>';
) . '/i/stack.gif" /></a>';
} }
if ($this->itemsX($pl['id']) > 1) { 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"> $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 ($d[1] == 1) { //можно выкинуть
if (!isset($po['nodelete'])) { 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( $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(
) . '/i/items/' . $pl['img'] . '\\\'></td><td align=\\\'left\\\'>Предмет <strong>' . $pl['name'] . '</strong> будет утерян, вы уверены ?</td></tr></table>\',\'' . intval(
$_GET['otdel'] $_GET['otdel']
) . Config::img() . ' / i / clear . gif"></a>'; ) . Config::img() . ' / i / clear . gif"></a>';
} }
@ -4630,8 +4604,7 @@ class User
$itm['data'] = Conversion::dataStringToArray($itm['data']); $itm['data'] = Conversion::dataStringToArray($itm['data']);
unset($itm['data']['frompisher']); unset($itm['data']['frompisher']);
$itm['data'] = Conversion::arrayToDataString($itm['data']); $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( 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']) {
)) && $pl['gift'] == $itm['gift']) {
$upd = mysql_query( $upd = mysql_query(
'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `inGroup` = "' . $itm['inGroup'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1' 'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `inGroup` = "' . $itm['inGroup'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1'
); );
@ -4730,12 +4703,12 @@ class User
$notr++; $notr++;
} }
} }
if (isset($itm['iznosNOW'], $itm['iznosMAX'], $itm['iznosMAXi']) && if (isset($itm['iznosnow'], $itm['iznosmax'], $itm['iznosmaxi']) &&
$itm['iznosNOW'] >= ceil($itm['iznosMAX']) && $itm['iznosnow'] >= ceil($itm['iznosmax']) &&
$itm['iznosMAXi'] != 999999999) { $itm['iznosmaxi'] != 999999999) {
$notr++; $notr++;
} }
if ($notr > 0 && $itm['inOdet'] != 0) { if ($notr > 0 && $itm['inodet'] != 0) {
//снимаем предмет //снимаем предмет
$this->snatItem($itm['id'], $u['id']); $this->snatItem($itm['id'], $u['id']);
$snIt++; $snIt++;
@ -4793,16 +4766,16 @@ class User
ItemsModel::itemDecay($itm['id'], $itm['overType'], $u['id'], (int)$po['musor2'], $itm['type'], $itm['name']); ItemsModel::itemDecay($itm['id'], $itm['overType'], $u['id'], (int)$po['musor2'], $itm['type'], $itm['name']);
$notr++; $notr++;
} }
if ($itm['iznosNOW'] >= ceil($itm['iznosMAX']) && $itm['iznosMAXi'] != 999999999) { if ($itm['iznosnow'] >= ceil($itm['iznosmax']) && $itm['iznosmaxi'] != 999999999) {
$notr++; $notr++;
} }
if ($notr > 0 && $itm['inOdet'] != 0) { if ($notr > 0 && $itm['inodet'] != 0) {
//снимаем предмет //снимаем предмет
$this->snatItem($itm['id'], $u['id']); $this->snatItem($itm['id'], $u['id']);
$snIt++; $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']); $this->itemDestroy($itm['id'], $u['id'], (int)$po['musor']);
} }
@ -5232,8 +5205,7 @@ class User
); );
$this->error = 'Вам нехорошо...'; $this->error = 'Вам нехорошо...';
} elseif (mysql_query( } elseif (mysql_query(
'UPDATE `items_users` SET `uid` = "' . $this->info['id'] . '",`lastUPD` = "' . time( 'UPDATE `items_users` SET `uid` = "' . $this->info['id'] . '",`lastUPD` = "' . time() . '",`gift` = "' . $itm['gift'] . '",`gtxt1` = "' . $itm['gtxt1'] . '",`gtxt2` = "Предмет из упаковки. Дата запаковки: ' . date(
) . '",`gift` = "' . $itm['gift'] . '",`gtxt1` = "' . $itm['gtxt1'] . '",`gtxt2` = "Предмет из упаковки. Дата запаковки: ' . date(
'd.m.Y H:i:s', $itmin['time_create'] 'd.m.Y H:i:s', $itmin['time_create']
) . '" WHERE `id` = "' . $itmin['id'] . '" LIMIT 1' ) . '" WHERE `id` = "' . $itmin['id'] . '" LIMIT 1'
)) { )) {
@ -5264,8 +5236,7 @@ class User
$pid = ItemsModel::addItem($s['id'], $this->info['id']); $pid = ItemsModel::addItem($s['id'], $this->info['id']);
if ($pid > 0) { if ($pid > 0) {
mysql_query( mysql_query(
'UPDATE `items_users` SET `lastUPD` = "' . time( 'UPDATE `items_users` SET `lastUPD` = "' . time() . '",`gift` = "' . $itm['gift'] . '" WHERE `id` = "' . $pid . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1'
) . '",`gift` = "' . $itm['gift'] . '" WHERE `id` = "' . $pid . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1'
); );
} }
$j++; $j++;
@ -5580,16 +5551,14 @@ LIMIT 1'
); );
$col = $col[0]; $col = $col[0];
mysql_query( mysql_query(
'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time( '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
) . '" 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) . ')" выброшены'; $this->error = 'Предметы "' . $itm['name'] . ' (x' . ($col + 1) . ')" выброшены';
Delo::add( Delo::add(
1, 1,
'System.inventory', 'System.inventory',
$uid, $uid,
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Предметы &quot;<strong>' . $itm['name'] . ' (x' . $col . ')</strong>&quot; [itm:' . $itm['id'] . '=' . time( '&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Предметы &quot;<strong>' . $itm['name'] . ' (x' . $col . ')</strong>&quot; [itm:' . $itm['id'] . '=' . time() . '] были <strong>выброшены</strong>.',
) . '] были <strong>выброшены</strong>.',
); );
} else { } else {
$this->error = 'Предмет "' . $itm['name'] . '" выброшен'; $this->error = 'Предмет "' . $itm['name'] . '" выброшен';
@ -6061,8 +6030,7 @@ LIMIT 1'
$r = '<font color="#FF0000"><strong>Вы успешно изъяли предмет &quot;' . $itm_['name'] . '&quot;</strong></font><br />'; $r = '<font color="#FF0000"><strong>Вы успешно изъяли предмет &quot;' . $itm_['name'] . '&quot;</strong></font><br />';
$col = $this->itemsX(((int)$id)); $col = $this->itemsX(((int)$id));
mysql_query( mysql_query(
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time( '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'] . '")'
) . '", "6", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] | У персонажа : [' . $itm_['uid'] . ']", "' . $user['id'] . '")'
); );
mysql_query( mysql_query(
'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "-21' . $res['id'] . '" ' . $o . ' WHERE `id` = "' . $id . '" LIMIT 1' '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) { if ($user['inTurnir'] == 0 && $user['inTurnirnew'] == 0) {
$col = $this->itemsX(((int)$id)); $col = $this->itemsX(((int)$id));
mysql_query( mysql_query(
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time( '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'] . '")'
) . '", "5", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] Хозяин : [' . $cls . ']", "' . $user['id'] . '")'
); );
mysql_query( mysql_query(
'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "' . $user['id'] . '" WHERE `id` = "' . $id . '" LIMIT 1' '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'] . '"' 'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "' . $user['id'] . '", `data` = "' . $pl['data'] . '" WHERE `id` = "' . $pl['id'] . '"'
); );
mysql_query( mysql_query(
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time( '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'] . '")'
) . '", "' . $type . '", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")'
); );
} elseif ($pl['uid'] == $user['id']) { } elseif ($pl['uid'] == $user['id']) {
$col = $this->itemsX(((int)$pl['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'] . '"' 'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "-21' . $user['clan'] . '" WHERE `id` = "' . $pl['id'] . '"'
); );
mysql_query( mysql_query(
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time( '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'] . '")'
) . '", "9", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")'
); );
} }
} }

View File

@ -87,7 +87,7 @@ class Item
'iznosNOW' => $iNow, 'iznosNOW' => $iNow,
'iznosMAX' => $iMax, 'iznosMAX' => $iMax,
] = $item; ] = $item;
$this->durability = $iMax - $iNow; $this->durability = (int)$iMax - (int)$iNow;
$stat = new Stat(); $stat = new Stat();
$stat->getBonus(); $stat->getBonus();
$dataArr = Conversion::dataStringToArray(strtolower($this->data)); $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(); $jslog = $btl->lookmLog() . $btl->lookLog();
if ($jslog != '') { if ($jslog != '') {
$js = $jslog . $js; $js = $jslog . $js;

View File

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

View File

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

View File

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

View File

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