cyzhao před 1 rokem
rodič
revize
b602606ce7

+ 1 - 1
Gameserver/App/base/ErrCode.php

@@ -346,7 +346,7 @@ class ErrCode {
     /**
      * 奖励已经被领取
      */
-    const gate_GatePriceHasReceive = 3203;
+    //const gate_GatePriceHasReceive = 3203;
 
     /**
      * 不能扫荡

+ 3 - 2
Gameserver/App/model/User/Ins_GateInfo.php

@@ -18,9 +18,10 @@ class Ins_GateInfo {
     public $GateId = 0;
 
     /**
-     * 0: 未领取,1: 五分钟奖励已领取 ,2: 十分钟奖励已领取, 3: 通关奖励已领取 (这个必须顺序领取)
+     * 0: 未领取,1: 五分钟奖励已领取 ,2: 十分钟奖励已领取, 3: 通关奖励已领取
      */
-    public $FirstReward = 0;
+    #[ArrayType]
+    public $FirstReward = array();
 
     /**
      * 坚持生存的最长时间(单位秒)

+ 3 - 2
Gameserver/App/process/FightProc.php

@@ -543,8 +543,8 @@ class FightProc {
         }
 
         if ($tag) {
-            my_Assert($mask > $gateInfo->FirstReward, ErrCode::gate_GatePriceHasReceive);
-            $gateInfo->FirstReward = $mask;
+            my_Assert(!in_array($mask,$gateInfo->FirstReward), ErrCode::gate_GatePriceHasReceive);
+            $gateInfo->FirstReward[] = $mask;
             StoreProc::AddMultiItemInStore($prize);
         }
         ctx()->gates->GateList->$gateId = $gateInfo;
@@ -555,6 +555,7 @@ class FightProc {
             'store' => ctx()->store,
             'task' => ctx()->task,
             'gold' => ctx()->baseInfo->gold,
+            'reward'=> StoreProc::$reward,
         );
         return Resp::ok($ret);
     }

+ 1 - 0
Gameserver/App/process/ShopProc.php

@@ -469,6 +469,7 @@ class ShopProc {
                     'privateState' => $user->privateState,
                     'store' => $user->store,
                     'task'=> ctx()->task,
+                    'reward'=> StoreProc::$reward,
                     ));
     }
 

+ 6 - 0
Gameserver/App/process/StoreProc.php

@@ -718,6 +718,8 @@ class StoreProc {
                     //'cash' => $user->baseInfo->cash,
                     'store' => $user->store));
     }
+    
+    static $reward = array();
 
     /**
      * 具体奖励存入背包
@@ -735,6 +737,10 @@ class StoreProc {
 
             list($itemId, $num) = $val;                                         # ID, 数量           
             $itemMo = GameConfig::item_getItem($itemId);
+            if($itemMo->itemType != 701){
+                self::$reward[] = $val;                               
+            }           
+            
             switch ($itemMo->itemType) {
                 case 1:
                     ctx()->baseInfo->Add_Gold($num);

+ 1 - 0
Gameserver/App/process/TaskProc.php

@@ -109,6 +109,7 @@ class TaskProc {
         UserProc::updateUserInfo();
         return Resp::ok(array("task" => ctx()->task,
                     "store" => ctx()->store,
+                    'reward'=> StoreProc::$reward,
         ));
     }