|
@@ -860,7 +860,7 @@ class StoreProc {
|
|
|
my_Assert(StlUtil::dictHasProperty(ctx()->store->equip, $equipUid), ErrCode::user_store_NoEquip);
|
|
|
$ins_equip = new Ins_Equip(ctx()->store->equip->$equipUid);
|
|
|
$ins_gem = new Ins_Gem(ctx()->store->gemStore->$uid);
|
|
|
- my_Assert($ins_equip->mo()->position == $ins_gem->mo()->qual, ErrCode::user_store_PositionNotFit);
|
|
|
+ my_Assert($ins_equip->mo()->position == $ins_gem->mo()->position, ErrCode::user_store_PositionNotFit);
|
|
|
|
|
|
$gemSetSlotDic = $ins_equip->gemSetSlot;
|
|
|
$tag_index = 0;
|
|
@@ -880,7 +880,8 @@ class StoreProc {
|
|
|
my_Assert($tag_gem == null, ErrCode::user_store_GemCanotSet);
|
|
|
for ($i = 1; $i <= $mo->initNum_slot + $mo->buyNum_slot; $i++) {
|
|
|
if (!StlUtil::dictHasProperty($gemSetSlotDic, $i)) {
|
|
|
- $gemSetSlotDic->$i = $ins_gem;
|
|
|
+ //$gemSetSlotDic->$i = $ins_gem;
|
|
|
+ $gemSetSlotDic->$i = $uid;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -891,7 +892,8 @@ class StoreProc {
|
|
|
$gUid = $gemSetSlotDic->$replaceUId;
|
|
|
$replace_ins_Gem = new Ins_Gem(ctx()->store->gemStore->$gUid); //这个$replaceUId是坑位的index id
|
|
|
my_Assert($replace_ins_Gem->mo()->qual < $ins_gem->mo()->qual, ErrCode::user_store_NoExistGemReplace);
|
|
|
- $gemSetSlotDic->$replaceUId = $ins_gem;
|
|
|
+ //$gemSetSlotDic->$replaceUId = $ins_gem;
|
|
|
+ $gemSetSlotDic->$replaceUId = $uid;
|
|
|
break;
|
|
|
case 3://手动
|
|
|
my_Assert(count((array) $gemSetSlotDic) >= $mo->initNum_slot + $mo->buyNum_slot, ErrCode::user_store_GemCanotSet);
|
|
@@ -901,20 +903,21 @@ class StoreProc {
|
|
|
//$id = $replace_ins_Gem->uid;
|
|
|
if ($tag_gem != null) {//如果有u那
|
|
|
my_Assert($replace_ins_Gem->uid == $tag_gem->uid, ErrCode::user_store_SameGemCanotEquip); //点的不是u一样的,则提示同一件装备无法镶嵌多个技能相同的宝石 【错误】
|
|
|
- //有U一样的,则点击正好是这个直接替换
|
|
|
- //$user->store->gemStore->$id = $replace_ins_Gem;
|
|
|
- $gemSetSlotDic->$tag_index = $ins_gem;
|
|
|
+ //有U一样的,则点击正好是这个直接替换
|
|
|
+ //$gemSetSlotDic->$tag_index = $ins_gem;
|
|
|
+ $gemSetSlotDic->$tag_index = $uid;
|
|
|
} else {
|
|
|
- $go_index = 0;
|
|
|
- foreach ($gemSetSlotDic as $slotId => $gUid) {
|
|
|
- if ($gUid == $replaceUId) {
|
|
|
- $go_index = $slotId;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- my_Assert($go_index > 0, ErrCode::user_store_NoExistGemReplace);
|
|
|
- $gemSetSlotDic->$go_index = $ins_gem;
|
|
|
+// $go_index = 0;
|
|
|
+// foreach ($gemSetSlotDic as $slotId => $gemUid) {
|
|
|
+// if ($slotId == $replaceUId) {
|
|
|
+// $go_index = $slotId;
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// my_Assert($go_index > 0, ErrCode::user_store_NoExistGemReplace);
|
|
|
+ //$gemSetSlotDic->$go_index = $ins_gem;
|
|
|
+ $gemSetSlotDic->$replaceUId = $uid;
|
|
|
}
|
|
|
|
|
|
break;
|