|
@@ -277,6 +277,7 @@ class ActiveProc {
|
|
|
//ctx()->store()->removeItem($itemId, $itemNum);
|
|
|
|
|
|
$cardId = self::RandCardReward();
|
|
|
+ my_Assert($cardId != 0, ErrCode::active_const_no_err);
|
|
|
$rewards = GameConfig::glc2()->FlipCardLottery_CardRewards;
|
|
|
$str = explode(';', $rewards);
|
|
|
$per = 0;
|
|
@@ -292,7 +293,7 @@ class ActiveProc {
|
|
|
foreach ($str as $key => $value) {
|
|
|
$s = explode(',', $value);
|
|
|
$end += $s[2];
|
|
|
- if ($randNum >= $start && $randNum < $end) {
|
|
|
+ if ($randNum > $start && $randNum <= $end) {
|
|
|
$rewardStr = $cardId . "-" . $s[0] . "-" . $s[1];
|
|
|
StoreProc::AddMultiItemInStore($s[0] . "," . $s[1]);
|
|
|
break;
|
|
@@ -418,18 +419,18 @@ class ActiveProc {
|
|
|
$rand = rand(1, $perNum);
|
|
|
$start = 0;
|
|
|
$end = 0;
|
|
|
- $grandId = null;
|
|
|
+ $grandId = 999;
|
|
|
foreach ($noflipArr as $k) {
|
|
|
$s = explode(',', $gList[$k]);
|
|
|
$end += $s[2];
|
|
|
- if ($rand >= $start && $rand < $end) {
|
|
|
+ if ($rand > $start && $rand <= $end) {
|
|
|
$grandId = $k;
|
|
|
break;
|
|
|
}
|
|
|
$start = $end;
|
|
|
}
|
|
|
|
|
|
- if ($grandId != null) {
|
|
|
+ if ($grandId != 999) {
|
|
|
$lineId = array_search($grandId, $randGrandReward);
|
|
|
$lineMo = GameConfig::activity_flipCardLottery_lineIds_getItem($lineId);
|
|
|
$str = explode(',', $lineMo->cardIds);
|