From c2d24c126d920121e64f0521af2419c5666d9222 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 9 Jul 2024 10:50:33 +0800 Subject: [PATCH] 1 --- webapp/controller/GMController.class.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/webapp/controller/GMController.class.php b/webapp/controller/GMController.class.php index ca5ce24a..40311a54 100644 --- a/webapp/controller/GMController.class.php +++ b/webapp/controller/GMController.class.php @@ -65,6 +65,9 @@ class GMController extends BaseAuthedController { '.addhero' => function () use($params) { $this->addHero($params); }, + '.dechp' => function () use($params) { + $this->decHP($params); + }, '.loot' => function () use($params) { $this->lootTest($params); } @@ -342,4 +345,17 @@ END myself()->_rspOk(); } + private function decHP($params) + { + $itemNum = getXVal($params, 0, 0); + $userInfo = myself()->_getUserInfo('gold'); + $oldGOld = myself()->_getItemCount(V_ITEM_GOLD, $userInfo); + $decItems = array( + array( + 'item_id' => V_ITEM_GOLD, + 'item_num' => $iteNum + ) + ); + } + }