#49: Удаление здания комиссионки.
This commit is contained in:
@@ -10,7 +10,6 @@ class City
|
||||
echo '<div style="position:relative; display: inline-block;" id="ione"><img alt="background" src="/i/city/spring_cap_cp_day.jpg">' .
|
||||
self::showBuilding(1, "spring_cap_club", 30, 235, self::$roomNames[1]) .
|
||||
self::showBuilding(2, "spring_cap_shop", 202, 171, self::$roomNames[22]) .
|
||||
self::showBuilding(3, "spring_cap_kom", 205, 105, self::$roomNames[25]) .
|
||||
self::showBuilding(4, "spring_cap_rem", 202, 290, self::$roomNames[23]) .
|
||||
self::showBuilding(6, "spring_cap_po4ta", 180, 540, self::$roomNames[27]) .
|
||||
self::showBuilding(7, "cap_arr_right", 260, 710, self::$roomNames[21]) .
|
||||
|
||||
@@ -141,4 +141,14 @@ class DBPDO
|
||||
{
|
||||
return $this->pdo->lastInsertId();
|
||||
}
|
||||
|
||||
function fetchColumn($query, $values = null) {
|
||||
if (is_null($values)) {
|
||||
$values = [];
|
||||
} elseif (!is_array($values)) {
|
||||
$values = [$values];
|
||||
}
|
||||
$stmt = $this->execute($query, $values);
|
||||
return $stmt->fetchColumn();
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,6 @@ trait Rooms
|
||||
22 => "Магазин",
|
||||
23 => "Ремонтная мастерская",
|
||||
24 => "Памятник Архангелу",
|
||||
25 => "Комиссионный магазин",
|
||||
26 => "Большая парковая улица",
|
||||
27 => "Почта",
|
||||
29 => "Банк",
|
||||
|
||||
@@ -42,8 +42,12 @@ class Shop
|
||||
$stmt = DBPDO::$db->ofetchall('select * from inventory where on_sale = 0 and dressed_slot = 0 and durability > 0 and owner_id = ?', User::$current->getId());
|
||||
|
||||
$iteminfo = [];
|
||||
$operationType = 'sellshop';
|
||||
if ($this->categoryType === self::BARTER_SHOP) {
|
||||
$operationType = 'setmarket';
|
||||
}
|
||||
foreach ($stmt as $item) {
|
||||
$iteminfo[] = new ShopItem($item, 'sellshop');
|
||||
$iteminfo[] = new ShopItem($item, $operationType);
|
||||
}
|
||||
return $this->strFromArr($iteminfo);
|
||||
}
|
||||
@@ -81,6 +85,6 @@ class Shop
|
||||
|
||||
public function getItemsList(): string
|
||||
{
|
||||
return $this->categoryType !== self::CATEGORY_SALE_ITEMS ? $this->showGoods() : $this->showUserSellItems();
|
||||
return $this->categoryType !== self::CATEGORY_SALE_ITEMS || $this->categoryType !== self::BARTER_SHOP ? $this->showGoods() : $this->showUserSellItems();
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,6 @@ class Travel
|
||||
21 => 'city.php',
|
||||
22 => 'shop.php',
|
||||
23 => 'repair.php',
|
||||
25 => 'comission.php',
|
||||
26 => 'city.php',
|
||||
27 => 'post.php',
|
||||
29 => 'bank.php',
|
||||
@@ -97,7 +96,6 @@ class Travel
|
||||
/*
|
||||
* 1 location: main.php?goto=arena
|
||||
* 2 Room 22 shop.php
|
||||
* 3 Room 25 comission.php
|
||||
* 4 Room 23 repair.php
|
||||
* 6 Room 27 posr.php
|
||||
* 7 Room 21 [STREET]
|
||||
@@ -105,8 +103,8 @@ class Travel
|
||||
* 13 location: quest_room.php
|
||||
* 222 Room 2702 [STREET]
|
||||
*/
|
||||
$room[20] = [1, 21, 22, 23, 25, 26, 27, 2702];
|
||||
$room[1] = $room[22] = $room[23] = $room[25] = $room[27] = [20];
|
||||
$room[20] = [1, 21, 22, 23, 26, 27, 2702];
|
||||
$room[1] = $room[22] = $room[23] = $room[27] = [20];
|
||||
/*
|
||||
* 3 Room 2111 [STREET]
|
||||
* 4 Room 20 [STREET]
|
||||
|
||||
Reference in New Issue
Block a user