This commit is contained in:
aozhiwei 2024-04-29 18:00:38 +08:00
commit 771e73c47c
5 changed files with 16 additions and 10 deletions

View File

@ -104,6 +104,7 @@ class FragmentController extends BaseAuthedController
$this->_decItems($costItems); $this->_decItems($costItems);
$propertyChgService = new services\PropertyChgService(); $propertyChgService = new services\PropertyChgService();
$propertyChgService->addBagChg(); $propertyChgService->addBagChg();
$propertyChgService->addUserChg();
$hashChance = \mt\Manufacture::hashChance($manufactureMeta['chance']); $hashChance = \mt\Manufacture::hashChance($manufactureMeta['chance']);
$weight = isset($hashChance[$itemNum]) ? $hashChance[$itemNum] : 0; $weight = isset($hashChance[$itemNum]) ? $hashChance[$itemNum] : 0;
@ -193,6 +194,7 @@ class FragmentController extends BaseAuthedController
$this->_decItems($costItems); $this->_decItems($costItems);
$propertyChgService = new services\PropertyChgService(); $propertyChgService = new services\PropertyChgService();
$propertyChgService->addBagChg(); $propertyChgService->addBagChg();
$propertyChgService->addUserChg();
$hashChance = \mt\Manufacture::hashChance($manufactureMeta['chance']); $hashChance = \mt\Manufacture::hashChance($manufactureMeta['chance']);
$weight = isset($hashChance[$itemNum]) ? $hashChance[$itemNum] : 0; $weight = isset($hashChance[$itemNum]) ? $hashChance[$itemNum] : 0;
$rnd = rand(1,100); $rnd = rand(1,100);

View File

@ -258,6 +258,7 @@ class HeroController extends BaseAuthedController {
$this->_decItems($costItems); $this->_decItems($costItems);
$propertyChgService = new services\PropertyChgService(); $propertyChgService = new services\PropertyChgService();
$propertyChgService->addBagChg(); $propertyChgService->addBagChg();
$propertyChgService->addUserChg();
$hashChance = \mt\Manufacture::hashChance($manufactureMeta['chance']); $hashChance = \mt\Manufacture::hashChance($manufactureMeta['chance']);
$weight = isset($hashChance[$itemNum]) ? $hashChance[$itemNum] : 0; $weight = isset($hashChance[$itemNum]) ? $hashChance[$itemNum] : 0;
$rnd = rand(1,100); $rnd = rand(1,100);

View File

@ -473,7 +473,7 @@ class InGameMallController extends BaseAuthedController {
\mt\Item::CHIP_TYPE, \mt\Item::CHIP_TYPE,
\mt\Item::FRAGMENT_TYPE, \mt\Item::FRAGMENT_TYPE,
\mt\Item::BATTLE_REWARD_BOX, \mt\Item::BATTLE_REWARD_BOX,
\mt\Item::GOLD_SYN, // \mt\Item::GOLD_SYN,
))){ ))){
return true; return true;
}else{ }else{

View File

@ -72,7 +72,10 @@ class User extends BaseModel {
public static function show($row) public static function show($row)
{ {
$heroDb = Hero::find($row['hero_id']); $heroDb = Hero::find($row['hero_id']);
$heroId = $heroDb['hero_id']; $heroId = 0;
if ($heroDb){
$heroId = $heroDb['hero_id'];
}
$honorInfo = array(); $honorInfo = array();
if ($row['address']){ if ($row['address']){
$honorInfo = UserHonor::info($row['address']); $honorInfo = UserHonor::info($row['address']);

View File

@ -225,16 +225,16 @@ class RoomBattleDataService extends BaseService {
} }
//宝箱掉落 //宝箱掉落
$rand = $rewardMeta['chestLootProb'] * 100; if ($rewardMeta['chestLootProb'] > 0){
$rnd = rand(1,100); $rand = $rewardMeta['chestLootProb'] * 100;
if ($rnd <= $rand){ $rnd = rand(1,100);
$chestItems = LootService::dropOutItem($rewardMeta['chestLoot']); if ($rnd <= $rand){
foreach ($chestItems as $item){ $chestItems = LootService::dropOutItem($rewardMeta['chestLoot']);
array_push($reward,$item); foreach ($chestItems as $item){
array_push($reward,$item);
}
} }
} }
} }
} }