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); 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); 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{ 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']); 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); + } } } - - } }