|
@@ -60,16 +60,22 @@ class StoreProc {
|
|
|
//把 qual pos u一样的宝石开锁关锁
|
|
|
$gemStore = $user->store->gemStore;
|
|
|
$gem = $gemStore->$uid;
|
|
|
-
|
|
|
- $tag = $gem->isUnlock == 0?1:0;
|
|
|
- $gem->isUnlock = $tag;
|
|
|
-
|
|
|
+ $tag = 0;
|
|
|
+ if($gem->isUnlock == 0){
|
|
|
+ $gem->isUnlock = 1;
|
|
|
+ $tag = 1;
|
|
|
+ } else {
|
|
|
+ $gem->isUnlock = 0;
|
|
|
+ $tag = 0;
|
|
|
+ }
|
|
|
+ $gemStore->$uid = $gem;
|
|
|
foreach ($gemStore as $k => $ins_gem) {
|
|
|
if($ins_gem->typeId ==$gem->typeId && $ins_gem->predicateId == $gem->predicateId){
|
|
|
$gemStore->$k->isUnlock = $tag;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ $user->store->gemStore = $gemStore;
|
|
|
+
|
|
|
ctx($user);
|
|
|
UserProc::updateUserInfo();
|
|
|
return Resp::ok(array(
|