From 5b29d5b5938456a11330ee90b28d3a32202f3ec7 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Fri, 27 May 2022 20:02:03 +0300 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=B4=D0=BC=D0=B8=D0=BD=D0=BA=D0=B0:=20?= =?UTF-8?q?=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B5=D0=B4=D0=BC=D0=B5=D1=82=D0=BE=D0=B2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/NewItem.php | 233 ++++++++++++++------------------- classes/Battles/Admin/Item.php | 49 +++++++ 2 files changed, 144 insertions(+), 138 deletions(-) create mode 100644 classes/Battles/Admin/Item.php diff --git a/admin/NewItem.php b/admin/NewItem.php index 98cd34e..a953114 100644 --- a/admin/NewItem.php +++ b/admin/NewItem.php @@ -1,143 +1,100 @@ -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Добавление вещей в магазин
Основное -
-
-
-
-
-
-
-
-
Требования -
-
-
-
-
-
-
-
Характеристики -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
+require_once '../config.php'; + +use Battles\Admin\Item; - +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Добавление вещей в игру
Основное +
+
+
+
+
+
+
+
+
Требования +
+
+
+
+
+
+
+
Характеристики +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+
\ No newline at end of file diff --git a/classes/Battles/Admin/Item.php b/classes/Battles/Admin/Item.php new file mode 100644 index 0000000..2efb5ee --- /dev/null +++ b/classes/Battles/Admin/Item.php @@ -0,0 +1,49 @@ + $params['name'] ?? uniqid(), + 'item_type' => $params['item_type'], + 'durability' => $params['durability'] ?? 1, + 'need_strength' => $params['need_strength'] ?? 0, + 'need_dexterity' => $params['need_dexterity'] ?? 0, + 'need_intuition' => $params['need_intuition'] ?? 0, + 'need_endurance' => $params['need_endurance'] ?? 0, + 'need_intelligence' => $params['need_intelligence'] ?? 0, + 'need_wisdom' => $params['need_wisdom'] ?? 0, + 'add_strength' => $params['add_strength'] ?? 0, + 'add_dexterity' => $params['add_dexterity'] ?? 0, + 'add_intuition' => $params['add_intuition'] ?? 0, + 'add_endurance' => $params['add_endurance'] ?? 0, + 'add_intelligence' => $params['add_intelligence'] ?? 0, + 'add_wisdom' => $params['add_wisdom'] ?? 0, + 'add_accuracy' => $params['add_accuracy'] ?? 0, + 'add_evasion' => $params['add_evasion'] ?? 0, + 'add_criticals' => $params['add_criticals'] ?? 0, + 'add_min_physical_damage' => $params['add_min_physical_damage'] ?? 0, + 'add_max_physical_damage' => $params['add_max_physical_damage'] ?? 0, + 'image' => $params['image'] ?? 'noitem.png', + 'weight' => $params['weight'] ?? 1, + ]; + Db::getInstance()->execute($query, $values); + } +} \ No newline at end of file