From 549f138dd966b134c6f1685881d86894c2bf7b6a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 9 Jul 2024 11:16:04 +0800 Subject: [PATCH 1/7] 1 --- doc/Annc.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc/Annc.py diff --git a/doc/Annc.py b/doc/Annc.py new file mode 100644 index 00000000..3883501d --- /dev/null +++ b/doc/Annc.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + +import _common + +class Annc(object): + + def __init__(self): + self.apis = [ + { + 'name': 'getAnnc', + 'desc': '获取背包物品列表', + 'group': 'Bag', + 'url': 'webapp/index.php?c=Annc&a=getAnnc', + 'params': [ + _common.ReqHead(), + ], + 'response': [ + _common.RspHead(), + ['id', '', 'id'], + ['tile', '', '标题'], + ['content', '', '正文'], + ] + } + ] From 9fdcb801b8af1739e2095270d7ef005fa100e475 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 9 Jul 2024 11:38:25 +0800 Subject: [PATCH 2/7] 1 --- doc/Annc.py | 4 ++-- webapp/controller/AnncController.class.php | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 webapp/controller/AnncController.class.php diff --git a/doc/Annc.py b/doc/Annc.py index 3883501d..56f5a84b 100644 --- a/doc/Annc.py +++ b/doc/Annc.py @@ -8,8 +8,8 @@ class Annc(object): self.apis = [ { 'name': 'getAnnc', - 'desc': '获取背包物品列表', - 'group': 'Bag', + 'desc': '获取公告', + 'group': 'Annc', 'url': 'webapp/index.php?c=Annc&a=getAnnc', 'params': [ _common.ReqHead(), diff --git a/webapp/controller/AnncController.class.php b/webapp/controller/AnncController.class.php new file mode 100644 index 00000000..34cbaf77 --- /dev/null +++ b/webapp/controller/AnncController.class.php @@ -0,0 +1,10 @@ + Date: Tue, 9 Jul 2024 11:41:56 +0800 Subject: [PATCH 3/7] 1 --- config/annc.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 config/annc.php diff --git a/config/annc.php b/config/annc.php new file mode 100644 index 00000000..faa28647 --- /dev/null +++ b/config/annc.php @@ -0,0 +1,23 @@ + 2024070901, + 'title' => $title, + 'content' => $content +); From 96117b773abe3e82e6b9d467b693ef3d589d9b67 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 9 Jul 2024 11:42:48 +0800 Subject: [PATCH 4/7] 1 --- webapp/controller/AnncController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/controller/AnncController.class.php b/webapp/controller/AnncController.class.php index 34cbaf77..e11a2e4d 100644 --- a/webapp/controller/AnncController.class.php +++ b/webapp/controller/AnncController.class.php @@ -4,7 +4,7 @@ class AnncController extends BaseController { public function getAnnc() { - + myself()->_rspData(require('../config/annc.php')); } } From de378a8286407ea477b1a4241b42e9344582b041 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 9 Jul 2024 13:35:45 +0800 Subject: [PATCH 5/7] 1 --- webapp/controller/BattleController.class.php | 7 ++-- webapp/mt/MapMode.php | 35 +++++++++++++++++++- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/webapp/controller/BattleController.class.php b/webapp/controller/BattleController.class.php index 4786c182..c30edb15 100644 --- a/webapp/controller/BattleController.class.php +++ b/webapp/controller/BattleController.class.php @@ -1123,8 +1123,11 @@ class BattleController extends BaseAuthedController { private function checkTicket($r, $customData, $mapModeMeta) { - if ($mapModeMeta['mapMode'] == 501) { - error_log("checkTick error :501"); + if (!mt\MapMode::checkLimitTime($mapModeMeta)) { + error_log(json_encode(array( + 'msg' => 'MapMode::CheckLimitTime error', + 'meta' => $mapModeMeta + ))); return false; } $itemId = $mapModeMeta['admission_item_id']; diff --git a/webapp/mt/MapMode.php b/webapp/mt/MapMode.php index 0d8d87e5..e468ec0b 100644 --- a/webapp/mt/MapMode.php +++ b/webapp/mt/MapMode.php @@ -1,8 +1,9 @@ Date: Tue, 9 Jul 2024 13:48:11 +0800 Subject: [PATCH 6/7] 1 --- webapp/controller/GMController.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/controller/GMController.class.php b/webapp/controller/GMController.class.php index 08aeea3a..e1ff18fc 100644 --- a/webapp/controller/GMController.class.php +++ b/webapp/controller/GMController.class.php @@ -65,8 +65,8 @@ class GMController extends BaseAuthedController { '.addhero' => function () use($params) { $this->addHero($params); }, - '.dechp' => function () use($params) { - $this->decHP($params); + '.decgold' => function () use($params) { + $this->decGold($params); }, '.loot' => function () use($params) { $this->lootTest($params); @@ -345,7 +345,7 @@ END myself()->_rspOk(); } - private function decHP($params) + private function decGold($params) { $itemNum = getXVal($params, 0, 0); $userInfo = myself()->_getUserInfo('gold'); From f608bd4ec80cf96711f0f90c847a960beaf73d01 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 9 Jul 2024 13:57:29 +0800 Subject: [PATCH 7/7] 1 --- webapp/controller/GMController.class.php | 11 ++++++++--- webapp/mt/MapMode.php | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/webapp/controller/GMController.class.php b/webapp/controller/GMController.class.php index e1ff18fc..c8bff8c1 100644 --- a/webapp/controller/GMController.class.php +++ b/webapp/controller/GMController.class.php @@ -348,20 +348,25 @@ END private function decGold($params) { $itemNum = getXVal($params, 0, 0); - $userInfo = myself()->_getUserInfo('gold'); + $userInfo = myself()->_getUserInfo(array('gold')); $oldGold = myself()->_getItemCount(V_ITEM_GOLD, $userInfo); $decItems = array( array( 'item_id' => V_ITEM_GOLD, - 'item_num' => $iteNum + 'item_num' => $itemNum ) ); - $newUserInfo = myself()->_getUserInfo('gold'); + myself()->_decItems($decItems); + $newUserInfo = myself()->_getUserInfo(array('gold')); $newGold = myself()->_getItemCount(V_ITEM_GOLD, $newUserInfo); + $propertyChgService = new services\PropertyChgService(); + $propertyChgService->addUserChg(); + myself()->_rspData(array( 'oldGold' => $oldGold, 'newGold' => $newGold, 'itemNum' => $itemNum, + 'property_chg' => $propertyChgService->toDto() )); } diff --git a/webapp/mt/MapMode.php b/webapp/mt/MapMode.php index e468ec0b..c1349b93 100644 --- a/webapp/mt/MapMode.php +++ b/webapp/mt/MapMode.php @@ -37,7 +37,7 @@ class MapMode public static function checkLimitTime($meta) { - switch (!$meta['limit_time']) { + switch ($meta['limit_time']) { case 1: { if ($meta['mapMode'] == self::RANKING_MODE) {