From 9e35dba39f4fd45e3452d5e6d8e98b6a7d7839f7 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Mon, 29 Apr 2024 11:47:43 +0800 Subject: [PATCH 1/5] 1 --- webapp/models/User.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp/models/User.php b/webapp/models/User.php index cc6f3b3e..33e3232e 100644 --- a/webapp/models/User.php +++ b/webapp/models/User.php @@ -72,7 +72,10 @@ class User extends BaseModel { public static function show($row) { $heroDb = Hero::find($row['hero_id']); - $heroId = $heroDb['hero_id']; + $heroId = 0; + if ($heroDb){ + $heroId = $heroDb['hero_id']; + } $honorInfo = array(); if ($row['address']){ $honorInfo = UserHonor::info($row['address']); From 3b2a2fda02ebdb9c9963312f9411ca59c245fd3c Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Mon, 29 Apr 2024 11:58:26 +0800 Subject: [PATCH 2/5] 1 --- webapp/controller/FragmentController.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webapp/controller/FragmentController.class.php b/webapp/controller/FragmentController.class.php index 21951fae..b3ee0dd8 100644 --- a/webapp/controller/FragmentController.class.php +++ b/webapp/controller/FragmentController.class.php @@ -104,6 +104,7 @@ class FragmentController extends BaseAuthedController $this->_decItems($costItems); $propertyChgService = new services\PropertyChgService(); $propertyChgService->addBagChg(); + $propertyChgService->addUserChg(); $hashChance = \mt\Manufacture::hashChance($manufactureMeta['chance']); $weight = isset($hashChance[$itemNum]) ? $hashChance[$itemNum] : 0; @@ -193,6 +194,7 @@ class FragmentController extends BaseAuthedController $this->_decItems($costItems); $propertyChgService = new services\PropertyChgService(); $propertyChgService->addBagChg(); + $propertyChgService->addUserChg(); $hashChance = \mt\Manufacture::hashChance($manufactureMeta['chance']); $weight = isset($hashChance[$itemNum]) ? $hashChance[$itemNum] : 0; $rnd = rand(1,100); From fb47b4a4693a9327c78961fee009ef630d92962c Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Mon, 29 Apr 2024 14:45:09 +0800 Subject: [PATCH 3/5] 1 --- webapp/services/RoomBattleDataService.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/webapp/services/RoomBattleDataService.php b/webapp/services/RoomBattleDataService.php index f2dbb295..011f106f 100644 --- a/webapp/services/RoomBattleDataService.php +++ b/webapp/services/RoomBattleDataService.php @@ -225,16 +225,16 @@ class RoomBattleDataService extends BaseService { } //宝箱掉落 - $rand = $rewardMeta['chestLootProb'] * 100; - $rnd = rand(1,100); - if ($rnd <= $rand){ - $chestItems = LootService::dropOutItem($rewardMeta['chestLoot']); - foreach ($chestItems as $item){ - array_push($reward,$item); + if ($rewardMeta['chestLootProb'] > 0){ + $rand = $rewardMeta['chestLootProb'] * 100; + $rnd = rand(1,100); + if ($rnd <= $rand){ + $chestItems = LootService::dropOutItem($rewardMeta['chestLoot']); + foreach ($chestItems as $item){ + array_push($reward,$item); + } } } - - } } From 2b0ccc73b1073ba3f3f4aa51946416135e494e71 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Mon, 29 Apr 2024 16:00:27 +0800 Subject: [PATCH 4/5] 1 --- webapp/controller/InGameMallController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/controller/InGameMallController.class.php b/webapp/controller/InGameMallController.class.php index c7819ff0..8099103d 100644 --- a/webapp/controller/InGameMallController.class.php +++ b/webapp/controller/InGameMallController.class.php @@ -473,7 +473,7 @@ class InGameMallController extends BaseAuthedController { \mt\Item::CHIP_TYPE, \mt\Item::FRAGMENT_TYPE, \mt\Item::BATTLE_REWARD_BOX, - \mt\Item::GOLD_SYN, +// \mt\Item::GOLD_SYN, ))){ return true; }else{ From 71bd866466e0ee753a04868a0f308480c0a0a6d5 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Mon, 29 Apr 2024 17:34:41 +0800 Subject: [PATCH 5/5] 1 --- webapp/controller/HeroController.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/controller/HeroController.class.php b/webapp/controller/HeroController.class.php index c78c1c44..1df23e8f 100644 --- a/webapp/controller/HeroController.class.php +++ b/webapp/controller/HeroController.class.php @@ -258,6 +258,7 @@ class HeroController extends BaseAuthedController { $this->_decItems($costItems); $propertyChgService = new services\PropertyChgService(); $propertyChgService->addBagChg(); + $propertyChgService->addUserChg(); $hashChance = \mt\Manufacture::hashChance($manufactureMeta['chance']); $weight = isset($hashChance[$itemNum]) ? $hashChance[$itemNum] : 0; $rnd = rand(1,100);