Переглянути джерело

fix: 首冲翻倍的返回值提示

wanggangzero 8 місяців тому
батько
коміт
eb50d11b61
2 змінених файлів з 16 додано та 17 видалено
  1. 1 2
      Gameserver/App/process/PayProc.php
  2. 15 15
      Gameserver/App/process/ShopProc.php

+ 1 - 2
Gameserver/App/process/PayProc.php

@@ -401,8 +401,7 @@ class PayProc {
                     $cashMo = GameConfig::shop_cash_getItem($shopItem->shopItemTypeId);
                     my_Assert(null != $cashMo, ErrCode::err_const_no);
 //                    StoreProc::AddMultiItemInStore($cashMo->reward, "付费");
-                    ShopProc::BuyShop_Cash(EnumShopGift::Cash_Shop, $shopItem->shopItemTypeId, $order->product_count);
-                    self::$retArr[] = $cashMo->reward;
+                    self::$retArr[] = ShopProc::BuyShop_Cash(EnumShopGift::Cash_Shop, $shopItem->shopItemTypeId, $order->product_count);
                     break;
                 case 'monthcard':                                               # 月卡
                     $monthCardMo = GameConfig::shop_monthcard_getItem($shopItem->shopItemTypeId);

+ 15 - 15
Gameserver/App/process/ShopProc.php

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