瀏覽代碼

装备宝石镶嵌bug修复

cyzhao 6 月之前
父節點
當前提交
8f2cf13258
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      Gameserver/App/process/StoreProc.php

+ 5 - 3
Gameserver/App/process/StoreProc.php

@@ -881,13 +881,15 @@ class StoreProc {
         switch ($type) {
         switch ($type) {
             case 1://镶嵌
             case 1://镶嵌
                 my_Assert($tag_gem == null, ErrCode::user_store_GemCanotSet);
                 my_Assert($tag_gem == null, ErrCode::user_store_GemCanotSet);
+                $go_index = 1;
                 for ($i = 1; $i <= $mo->initNum_slot + $mo->buyNum_slot; $i++) {
                 for ($i = 1; $i <= $mo->initNum_slot + $mo->buyNum_slot; $i++) {
-                    if (!StlUtil::dictHasProperty($gemSetSlotDic, $i)) {
+                    if (!StlUtil::dictHasProperty($gemSetSlotDic, $i) || $gemSetSlotDic->$i == 0) {
                         //$gemSetSlotDic->$i = $ins_gem;
                         //$gemSetSlotDic->$i = $ins_gem;
-                        $gemSetSlotDic->$i = $uid;
+                        $go_index = $i;
                         break;
                         break;
-                    }
+                    }                                      
                 }
                 }
+                $gemSetSlotDic->$go_index = $uid;
                 break;
                 break;
             case 2://替换
             case 2://替换
                 //满不满都高替低品阶  
                 //满不满都高替低品阶