Closes #2.
This commit is contained in:
@@ -389,7 +389,7 @@ if($u->room['file']=='remont')
|
||||
$re = '<div align="left">Подходящий предмет не найден в инвентаре</div>';
|
||||
}
|
||||
}elseif(isset($_GET['unrune'])) {
|
||||
require_once '../../_incl_data/class/Insallah/Runes/Runes.php';
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/_incl_data/class/Insallah/Runes/Runes.php';
|
||||
$ir = mysql_fetch_array(mysql_query('SELECT `im`.*,`iu`.* FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE `iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` LIKE "%rune_id%" AND `iu`.`id` = "'.mysql_real_escape_string((int)$_GET['unrune']).'" LIMIT 1'));
|
||||
if(isset($ir['id']) ) {
|
||||
$po = [];
|
||||
@@ -407,12 +407,12 @@ if($u->room['file']=='remont')
|
||||
$item_and_rune = \Insallah\Runes::removeRuneData($po);
|
||||
if (!empty($item_and_rune)) {
|
||||
# Добавляем предмет без руны
|
||||
mysql_query(sprintf("update items_users set data = %s where id = %d", $item_and_rune['item'], $ir['id']));
|
||||
mysql_query(sprintf("update items_users set data = '%s' where id = %d", $item_and_rune['item'], $ir['id']));
|
||||
# Отнимаем деньги
|
||||
$u->info['money'] -= $pcena;
|
||||
mysql_query(sprintf("update users set money = money - %d where id = %d", $u->info['money'], $u->info['id']));
|
||||
mysql_query(sprintf("update users set money = money - %f where id = %d", $pcena, $u->info['id']));
|
||||
# Добавляем руну
|
||||
$u->addItem($item_and_rune['rune_id'],$u->info['id'],$item_and_rune['rune']);
|
||||
$u->addItem($item_and_rune['rune_id'],$u->info['id'],$item_and_rune['rune'], null, null, true);
|
||||
} else {
|
||||
/** Если пытаемся извлечь любую руну кроме 6001, 6002, 6003. */
|
||||
$re = 'Руна слилась с предметом и не извлекается...';
|
||||
|
||||
Reference in New Issue
Block a user