Quellcode durchsuchen

装备宝石镶嵌bug修复

cyzhao vor 6 Monaten
Ursprung
Commit
8f2cf13258
1 geänderte Dateien mit 5 neuen und 3 gelöschten Zeilen
  1. 5 3
      Gameserver/App/process/StoreProc.php

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

@@ -881,13 +881,15 @@ class StoreProc {
         switch ($type) {
             case 1://镶嵌
                 my_Assert($tag_gem == null, ErrCode::user_store_GemCanotSet);
+                $go_index = 1;
                 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 = $uid;
+                        $go_index = $i;
                         break;
-                    }
+                    }                                      
                 }
+                $gemSetSlotDic->$go_index = $uid;
                 break;
             case 2://替换
                 //满不满都高替低品阶