Quellcode durchsuchen

礼包商城bug修复

cyzhao vor 1 Jahr
Ursprung
Commit
1ad03512ac

+ 2 - 0
Gameserver/App/model/User/EnumItemType.php

@@ -22,4 +22,6 @@ class EnumItemType extends Enum{
     
     
     const tuzhi = 103;
+    
+    const tuzhiBox = 701;
 }

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

@@ -48,12 +48,12 @@ class ShopProc {
                 $price = explode(';', $mo->reward);
                 foreach ($price as $value) {
                     $item = explode(',', $value);
-                    if($item[0] == 99999){
+                    if(GameConfig::item_getItem($item[0])->itemType == EnumItemType::tuzhiBox){
                         $dic = GameConfig::item();
                         $list = array();
-                        foreach ($dic as $id => $item) {
-                            if($item->itemType == EnumItemType::tuzhi){
-                                $list[] = $item->typeId;
+                        foreach ($dic as $id => $val) {
+                            if($val->itemType == EnumItemType::tuzhi){
+                                $list[] = $val->typeId;
                             }
                         }
                         
@@ -62,12 +62,12 @@ class ShopProc {
                         $gateGift[] = $tuzhiId.',1';
                         
                     } else {
-                        $gateGift[] = $item;
+                        $gateGift[] = $value;
                     }                                       
                 }
                 
                 foreach ($gateGift as $str) {
-                    StoreProc::AddMultiItemInStore($mo->reward);
+                    StoreProc::AddMultiItemInStore($str);
                 }
                                                                
                 ctx()->privateState->gateGiftReceived[] = $typeId;