فهرست منبع

奖励返回加宝石uid

cyzhao 11 ماه پیش
والد
کامیت
d9786f7c79

+ 3 - 1
Gameserver/App/process/EmailProc.php

@@ -171,6 +171,7 @@ class EmailProc {
                     'num' => 1,
                     //'reward' => $mail->appendix
                     'reward' => $reward,
+                    'reward_Gem' => StoreProc::$reward_Gem,
         ));
     }
 
@@ -223,7 +224,8 @@ class EmailProc {
                     'store' => ctx()->store,
                     'hero' => ctx()->heros,
                     'num' => $n,
-                    'reward' => $reward,                  
+                    'reward' => $reward,
+                    'reward_Gem' => StoreProc::$reward_Gem,
         ));
     }
 

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

@@ -418,6 +418,7 @@ class FightProc {
             'gold' => ctx()->baseInfo->gold,
             'cash' => ctx()->baseInfo->cash,
             'reward' => StoreProc::$reward,
+            'reward_Gem' => StoreProc::$reward_Gem,
         );
         return Resp::ok($ret);
     }

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

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

+ 13 - 4
Gameserver/App/process/StoreProc.php

@@ -723,7 +723,7 @@ class StoreProc {
     }
     
     static $reward = array();
-
+    static $reward_Gem = array();
     /**
      * 具体奖励存入背包
      * @param type $goodsStr
@@ -740,8 +740,8 @@ class StoreProc {
 
             list($itemId, $num) = $val;                                         # ID, 数量           
             $itemMo = GameConfig::item_getItem($itemId);
-            if($itemMo->itemType != 701){
-                self::$reward[] = $value;                               
+            if($itemMo->itemType != 701 && $itemMo->itemType != 201){
+                self::$reward[] = $value;                                                   
             }           
             
             switch ($itemMo->itemType) {
@@ -768,7 +768,11 @@ class StoreProc {
                     }
                     break;
                 case 201://宝石                      
-                    self::PutGemInStore($itemId, $num);
+                    $gemUidArr = self::PutGemInStore($itemId, $num);
+                    if(count($gemUidArr) > 0){                      
+                        self::$reward_Gem = array_merge(self::$reward_Gem,$gemUidArr);                       
+                    }
+                    
                     break;
                 case 701://道具宝箱
                     for ($i = 0; $i < $num; $i++) {
@@ -888,11 +892,16 @@ class StoreProc {
      * 新宝石入库
      */
     public static function PutGemInStore($id, $num = 1) {
+        $gemUIdArr = array();
+        
         for ($i = 0; $i < $num; $i++) {
             $gem = self::initGem($id);
             $length = $gem->uid;
+            $gemUIdArr[] = $length;
             ctx()->store->gemStore->$length = $gem;
         }
+        
+        return $gemUIdArr;
     }
 
     public static function PutGemInStore2($gem, $num = 1) {

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

@@ -73,6 +73,7 @@ class TaskProc {
         return Resp::ok(array("task" => ctx()->task,
                     "store" => ctx()->store,
                     "reward" => StoreProc::$reward,
+                    'reward_Gem' => StoreProc::$reward_Gem,
         ));
     }
 
@@ -122,6 +123,7 @@ class TaskProc {
         return Resp::ok(array("task" => ctx()->task,
                     "store" => ctx()->store,
                     'reward' => StoreProc::$reward,
+                    'reward_Gem' => StoreProc::$reward_Gem,
                     'cash'=>ctx()->baseInfo->cash,
         ));
     }