From 98ee92c347e6db3e76252a2684bceee442403472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B7=E5=8B=87?= Date: Mon, 13 Nov 2023 17:00:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=85=AC=E4=BC=9A=E6=B6=88?= =?UTF-8?q?=E8=80=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webapp/controller/BagController.class.php | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/webapp/controller/BagController.class.php b/webapp/controller/BagController.class.php index 25aa1e6a..66e19b1e 100644 --- a/webapp/controller/BagController.class.php +++ b/webapp/controller/BagController.class.php @@ -46,6 +46,32 @@ class BagController extends BaseAuthedController { )); } + public function createGuildConsume() + { + $consume = explode("|",mt\Parameter::getVal('create_club_cost')); + $costItems = array( + array( + 'item_id' => $consume[0], + 'item_num' => $consume[1] + ), + ); + $lackItem = null; + if (!$this->_hasEnoughItems($costItems, $lackItem)) { + $this->_rspErr(3, $this->_getLackItemErrMsg($lackItem)); + return; + } + $this->_decItems($costItems); + $this->_rspOk(); + } + + // 兑换水晶 + public function exchangeCrystal() + { + // step1. consume items + // step2. send rewards + $this->_rspOk(); + } + public function useItem() { $itemId = getReqVal('item_id', 0);