1
This commit is contained in:
parent
6267ef51a7
commit
b6f62d22b4
@ -20,19 +20,13 @@ class BattleBoxService {
|
||||
$currPhase = self::getCurrentPhase();
|
||||
$allocableNum = self::getDailyPhaseAllocNum($currPhase, myself()->_getNowDaySeconds());
|
||||
$alreadyAllocNum = self::getDailyPhaseAlreadyAllocNum($currPhase, myself()->_getNowDaySeconds());
|
||||
if ($allocNum > 0) {
|
||||
if ($allocableNum > 0) {
|
||||
$lstVal = mt\Parameter::getListValue('battle_event_loot_per_game');
|
||||
if ($allocableNum <= 0 || empty($lstVal) || count($lstVal) < 2) {
|
||||
myself()->_rspData(array(
|
||||
'box_num' => 0
|
||||
));
|
||||
return;
|
||||
}
|
||||
$rnd = rand($lstVal[0], $lstVal[1]);
|
||||
if ($rnd <= 0) {
|
||||
myself()->_rspData(array(
|
||||
'box_num' => 0
|
||||
));
|
||||
return;
|
||||
}
|
||||
$boxNum = min($rnd, $allocableNum);
|
||||
|
Loading…
x
Reference in New Issue
Block a user