From 900cacdcaa43ff0f5536849e168879290e9f8a1d Mon Sep 17 00:00:00 2001 From: TATECK Date: Thu, 1 Dec 2022 00:07:40 +0900 Subject: [PATCH] =?UTF-8?q?=EC=83=81=EC=A0=90=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 상점에서 아이템 진열 시, 다수의 아이템을 소모하여 구매할 수 있도록 기능을 업데이트 하였습니다. ◇ 소모 아이템 : 소모 아이템 갯수 설정 가능 --- AvocadoEdition/adm/shop_form.php | 2 +- AvocadoEdition/adm/shop_form_update.php | 1 + AvocadoEdition/adm/shop_list.php | 183 ++++++++++++---------- AvocadoEdition/adm/shop_list_update.php | 1 + AvocadoEdition/shop/_ajax.shop_item.php | 11 +- AvocadoEdition/shop/_ajax.shop_update.php | 19 ++- 6 files changed, 122 insertions(+), 95 deletions(-) diff --git a/AvocadoEdition/adm/shop_form.php b/AvocadoEdition/adm/shop_form.php index 9c03ca0..bcab820 100644 --- a/AvocadoEdition/adm/shop_form.php +++ b/AvocadoEdition/adm/shop_form.php @@ -223,8 +223,8 @@ if($config['cf_class_title']) { +
- 소모여부 diff --git a/AvocadoEdition/adm/shop_form_update.php b/AvocadoEdition/adm/shop_form_update.php index e976db7..75df5bd 100644 --- a/AvocadoEdition/adm/shop_form_update.php +++ b/AvocadoEdition/adm/shop_form_update.php @@ -76,6 +76,7 @@ $sql_common = " sh_use_rank = '{$sh_use_rank}', sh_has_item = '{$sh_has_item}', sh_use_has_item = '{$sh_use_has_item}', + sh_has_item_count = '{$sh_has_item_count}', sh_has_title = '{$sh_has_title}', sh_use_has_title = '{$sh_use_has_title}', sh_use = '{$sh_use}', diff --git a/AvocadoEdition/adm/shop_list.php b/AvocadoEdition/adm/shop_list.php index e7c1778..8b3011d 100644 --- a/AvocadoEdition/adm/shop_list.php +++ b/AvocadoEdition/adm/shop_list.php @@ -47,7 +47,14 @@ $listall = '전체목록
@@ -98,51 +105,41 @@ $colspan = 13;
- - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + 수정'; $bg = 'bg'.($i%2); + + $is_order_limit = false; ?> - - - - - - - - - - + + + + + + + + + + + + - + - - - + - - - - - - - + "; + $msg .= $has_item_name.j($has_item_name, '이')." ".$item['sh_has_item_count']."개 있어야 살 수 있습니다.
"; $is_able_buy = false; } else if($item['sh_use_has_item']) { // 아이템 소모 - $use_inventory_item = $in['in_id']; + $use_inventory_item = $item['sh_has_item']; + $use_inventory_item_count = $item['sh_has_item_count']; } } @@ -146,10 +149,16 @@ if($character['ch_id'] && $character['ch_state'] == '승인') { $ex_point = $use_exp_point * -1; insert_exp($character['ch_id'], $ex_point, $ex_content, $action); } + if($use_inventory_item) { // 아이템 제거 - sql_query("delete from {$g5['inventory_table']} where in_id = '{$use_inventory_item}'"); + $item_result = sql_query("select in_id from {$g5['inventory_table']} where ch_id = '{$character['ch_id']}' and it_id = '{$use_inventory_item}' order by se_ch_name asc, in_id asc limit 0, {$use_inventory_item_count}"); + for($k = 0; $in = sql_fetch_array($item_result); $k++) { + // 인벤에서 제거 + delete_inventory($in['in_id'], 0); + } } + if($use_has_title) { // 타이틀 제거 sql_query("delete from {$g5['title_has_table']} where hi_id = '{$use_has_title}'");
목록
- + 분류아이템진열기간구매금액구매경험치교환아이템교환타이틀구매갯수순서관리
소모성소모성소모성소모성재고갯수분류아이템진열기간구매금액구매교환아이템교환타이틀구매갯수재고갯수순서관리
+ - + + - - + - -

~

- - -

시 ~

- - "; - $str_week = explode("||", $shop['sh_week']); - $add_str = ""; - for($k=0; $k < count($str_week); $k++) { - if($str_week[$k] == '') continue; - ?> - - "; } ?> -
- - - + + + +

~

+ + +

시 ~

+ + "; + $str_week = explode("||", $shop['sh_week']); + $add_str = ""; + for($k=0; $k < count($str_week); $k++) { + if($str_week[$k] == '') continue; + ?> + + "; } + + if(!$is_order_limit) { echo "상시판매"; } + ?> +
+ > + + + + > + + + + > + - - - - - + + + + 개 + + + + + + + > + - + - - + + - + + + + +
- > - - > - - > - - > - - -