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);
$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);

View File

@ -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);

View File

@ -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{

View File

@ -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']);

View File

@ -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);
}
}
}
}
}