diff --git a/webapp/controller/ChipController.class.php b/webapp/controller/ChipController.class.php index 29325094..130e20b5 100644 --- a/webapp/controller/ChipController.class.php +++ b/webapp/controller/ChipController.class.php @@ -184,27 +184,24 @@ class ChipController extends BaseAuthedController $stone = $lv3[1]; };break; } - //校验枪械水晶数量 - $num = Bag::getItemCount(V_ITEM_CHIP_META); - if ($num < $stone){ - $this->_rspErr(3, "Lack of chip crystal"); - return; - } $costItems = array( array( 'item_id' => V_ITEM_GOLD, 'item_num' => $gold ), + array( + 'item_id' => V_ITEM_CHIP_META, + 'item_num' => $stone + ), ); $lackItem = null; if (!$this->_hasEnoughItems($costItems, $lackItem)) { $this->_rspErr(3, $this->_getLackItemErrMsg($lackItem)); return; } - $this->_decItems($costItems); - Bag::decItem(V_ITEM_CHIP_META,$stone); +// Bag::decItem(V_ITEM_CHIP_META,$stone); { //埋点 diff --git a/webapp/controller/HeroController.class.php b/webapp/controller/HeroController.class.php index 5174ec35..418cec43 100644 --- a/webapp/controller/HeroController.class.php +++ b/webapp/controller/HeroController.class.php @@ -314,20 +314,15 @@ class HeroController extends BaseAuthedController { return; } - - //校验英雄水晶数量 - $num = Bag::getItemCount(V_ITEM_HERO_META); - if ($num < $nextLevelMeta['serum']){ - $this->_rspErr(3, "Lack of hero crystal"); - return; - } - - //校验用户gold数量 $costItems = array( array( 'item_id' => V_ITEM_GOLD, 'item_num' => $nextLevelMeta['gold'] ), + array( + 'item_id' => V_ITEM_HERO_META, + 'item_num' => $nextLevelMeta['serum'] + ), ); $lackItem = null; if (!$this->_hasEnoughItems($costItems, $lackItem)) { @@ -335,7 +330,7 @@ class HeroController extends BaseAuthedController { return; } $this->_decItems($costItems); - Bag::decItem(V_ITEM_HERO_META,$nextLevelMeta['serum']); +// Bag::decItem(V_ITEM_HERO_META,$nextLevelMeta['serum']); { //埋点 $event = [