|
@@ -963,13 +963,32 @@ 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;
|
|
|
|
- foreach ($gemSetSlotDic as $slotId => $gemUid) {
|
|
|
|
- if($gemUid == 0){
|
|
|
|
- $go_index = $slotId;
|
|
|
|
|
|
+ $go_index = 0;
|
|
|
|
+ for ($i = 1; $i <= $mo->initNum_slot; $i++) {
|
|
|
|
+ if($gemSetSlotDic->$i == 0){
|
|
|
|
+ $go_index = $i;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if($go_index == 0){
|
|
|
|
+ $num = 5-$mo->buyNum_slot+1;
|
|
|
|
+ for ($i = $num; $i <= 5; $i++) {
|
|
|
|
+ if($gemSetSlotDic->$i == 0){
|
|
|
|
+ $go_index = $i;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+// foreach ($gemSetSlotDic as $slotId => $gemUid) {
|
|
|
|
+// if($gemUid == 0){
|
|
|
|
+// $go_index = $slotId;
|
|
|
|
+// break;
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
|
|
// 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)) {
|