|
@@ -75,12 +75,12 @@ class ShopProc {
|
|
list($type, $typeId, $buyNum) = req()->paras;
|
|
list($type, $typeId, $buyNum) = req()->paras;
|
|
$user = ctx();
|
|
$user = ctx();
|
|
|
|
|
|
- //$resultArr = array();
|
|
|
|
|
|
+ //$resultArr = array();
|
|
switch ($type) {
|
|
switch ($type) {
|
|
case EnumShopGift::GateGift_Shop://章节礼包
|
|
case EnumShopGift::GateGift_Shop://章节礼包
|
|
$gateGift = self::BuyShop_GateGift($type, $typeId, $buyNum);
|
|
$gateGift = self::BuyShop_GateGift($type, $typeId, $buyNum);
|
|
break;
|
|
break;
|
|
- case EnumShopGift::Daily_Shop://每日商店
|
|
|
|
|
|
+ case EnumShopGift::Daily_Shop://每日商店
|
|
self::BuyShop_Daily($type, $typeId, $buyNum);
|
|
self::BuyShop_Daily($type, $typeId, $buyNum);
|
|
break;
|
|
break;
|
|
|
|
|
|
@@ -99,7 +99,7 @@ class ShopProc {
|
|
break;
|
|
break;
|
|
|
|
|
|
case EnumShopGift::MonthCard_Shop:
|
|
case EnumShopGift::MonthCard_Shop:
|
|
- self::BuyShop_MonthCard($type, $typeId, $buyNum);
|
|
|
|
|
|
+ self::BuyShop_MonthCard($type, $typeId, $buyNum);
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
break;
|
|
break;
|
|
@@ -126,7 +126,7 @@ class ShopProc {
|
|
'reward_Gem' => StoreProc::$reward_Gem,
|
|
'reward_Gem' => StoreProc::$reward_Gem,
|
|
));
|
|
));
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* 商城章节礼包购买
|
|
* 商城章节礼包购买
|
|
*/
|
|
*/
|
|
@@ -163,7 +163,7 @@ class ShopProc {
|
|
}
|
|
}
|
|
ctx()->privateState->gateGiftReceived[] = $typeId;
|
|
ctx()->privateState->gateGiftReceived[] = $typeId;
|
|
ctx()->baseInfo->charge_amt += $mo->curPrice;
|
|
ctx()->baseInfo->charge_amt += $mo->curPrice;
|
|
-
|
|
|
|
|
|
+
|
|
return $gateGift;
|
|
return $gateGift;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -271,7 +271,7 @@ class ShopProc {
|
|
TaskProc::OnOpenNumBrightBox($typeId, $buyNum);
|
|
TaskProc::OnOpenNumBrightBox($typeId, $buyNum);
|
|
TaskProc::OnOpenNumAnyBox($buyNum);
|
|
TaskProc::OnOpenNumAnyBox($buyNum);
|
|
FightProc::funUnlock_Gem();
|
|
FightProc::funUnlock_Gem();
|
|
-
|
|
|
|
|
|
+
|
|
$perList = explode(';', $mo->percent);
|
|
$perList = explode(';', $mo->percent);
|
|
$allNum = 0;
|
|
$allNum = 0;
|
|
foreach ($perList as $key => $value) {
|
|
foreach ($perList as $key => $value) {
|
|
@@ -426,18 +426,19 @@ class ShopProc {
|
|
}
|
|
}
|
|
|
|
|
|
StoreProc::AddMultiItemInStore($reward);
|
|
StoreProc::AddMultiItemInStore($reward);
|
|
- ctx()->baseInfo->accumulateYuanBao += $addYuanbao;
|
|
|
|
- ctx()->baseInfo->charge_amt += $mo->price;
|
|
|
|
|
|
+ ctx()->baseInfo->accumulateYuanBao += $addYuanbao;
|
|
|
|
+ ctx()->baseInfo->charge_amt += $mo->price;
|
|
ctx()->privateState->cashShopReceived[] = $typeId;
|
|
ctx()->privateState->cashShopReceived[] = $typeId;
|
|
-
|
|
|
|
- if(ctx()->privateState->firstRecharge_receiveTag == 0){
|
|
|
|
|
|
+
|
|
|
|
+ if (ctx()->privateState->firstRecharge_receiveTag == 0) {
|
|
ctx()->privateState->firstRechargeUI_OpenTip = 1;
|
|
ctx()->privateState->firstRechargeUI_OpenTip = 1;
|
|
}
|
|
}
|
|
-
|
|
|
|
- if(ctx()->privateState->firstRecharge_receiveTag < 1){
|
|
|
|
|
|
+
|
|
|
|
+ if (ctx()->privateState->firstRecharge_receiveTag < 1) {
|
|
ctx()->privateState->firstRecharge_receiveTag = 1;
|
|
ctx()->privateState->firstRecharge_receiveTag = 1;
|
|
- }
|
|
|
|
|
|
+ }
|
|
TaskProc::OnRecharge();
|
|
TaskProc::OnRecharge();
|
|
|
|
+ return $reward;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -523,7 +524,7 @@ class ShopProc {
|
|
$mo = GameConfig::shop_monthcard_getItem($typeId);
|
|
$mo = GameConfig::shop_monthcard_getItem($typeId);
|
|
my_Assert($mo != null, ErrCode::err_const_no);
|
|
my_Assert($mo != null, ErrCode::err_const_no);
|
|
|
|
|
|
- //$user->privateState->monthCardShop_Received[] = $typeId;
|
|
|
|
|
|
+ //$user->privateState->monthCardShop_Received[] = $typeId;
|
|
if ($typeId == 1) {
|
|
if ($typeId == 1) {
|
|
my_Assert(ctx()->privateState->monthCardShop_ts == 0, ErrCode::err_const_no);
|
|
my_Assert(ctx()->privateState->monthCardShop_ts == 0, ErrCode::err_const_no);
|
|
ctx()->privateState->monthCardShop_ts = now();
|
|
ctx()->privateState->monthCardShop_ts = now();
|
|
@@ -649,5 +650,4 @@ class ShopProc {
|
|
ctx()->privateState->dailyShopRandItems = $result;
|
|
ctx()->privateState->dailyShopRandItems = $result;
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|