|
@@ -836,24 +836,24 @@ class PetProc {
|
|
ctx()->store(true)->petUids_supportFight_position->$index = $uid;
|
|
ctx()->store(true)->petUids_supportFight_position->$index = $uid;
|
|
}
|
|
}
|
|
|
|
|
|
- if ($type == 0 && $index == 0 && $uid != 0) {//上阵点击空白的地方
|
|
|
|
- if (ctx()->store(true)->petUid_fight_position == 0) {
|
|
|
|
- ctx()->store(true)->petUid_fight_position = $uid;
|
|
|
|
- } else {
|
|
|
|
- $list = StlUtil::dictToArray(ctx()->store(true)->petUids_supportFight_position);
|
|
|
|
- if (count($list) === 0) {
|
|
|
|
- $key = 1;
|
|
|
|
- ctx()->store(true)->petUids_supportFight_position->$key = $uid;
|
|
|
|
- } else {
|
|
|
|
- for ($i = 1; $i <= 2; $i++) {
|
|
|
|
- if (!StlUtil::dictHasProperty(ctx()->store(true)->petUids_supportFight_position, $i) || ctx()->store(true)->petUids_supportFight_position->$i == 0) {
|
|
|
|
- ctx()->store(true)->petUids_supportFight_position->$i = $uid;
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+// if ($type == 0 && $index == 0 && $uid != 0) {//上阵点击空白的地方
|
|
|
|
+// if (ctx()->store(true)->petUid_fight_position == 0) {
|
|
|
|
+// ctx()->store(true)->petUid_fight_position = $uid;
|
|
|
|
+// } else {
|
|
|
|
+// $list = StlUtil::dictToArray(ctx()->store(true)->petUids_supportFight_position);
|
|
|
|
+// if (count($list) === 0) {
|
|
|
|
+// $key = 1;
|
|
|
|
+// ctx()->store(true)->petUids_supportFight_position->$key = $uid;
|
|
|
|
+// } else {
|
|
|
|
+// for ($i = 1; $i <= 2; $i++) {
|
|
|
|
+// if (!StlUtil::dictHasProperty(ctx()->store(true)->petUids_supportFight_position, $i) || ctx()->store(true)->petUids_supportFight_position->$i == 0) {
|
|
|
|
+// ctx()->store(true)->petUids_supportFight_position->$i = $uid;
|
|
|
|
+// break;
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
return Resp::ok(array());
|
|
return Resp::ok(array());
|
|
@@ -875,4 +875,27 @@ class PetProc {
|
|
return Resp::ok(array());
|
|
return Resp::ok(array());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 6439 宠物休息
|
|
|
|
+ */
|
|
|
|
+ public static function RemoveFightPosition() {
|
|
|
|
+ list($uid) = req()->paras;
|
|
|
|
+
|
|
|
|
+ if (ctx()->store->petUid_fight_position == $uid)
|
|
|
|
+ {
|
|
|
|
+ ctx()->store->petUid_fight_position = 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for ($i = 1; $i <= 2; $i++) {
|
|
|
|
+ if (!StlUtil::dictHasProperty(ctx()->store->petUids_supportFight_position, $i) && ctx()->store->petUids_supportFight_position->$i == $uid)
|
|
|
|
+ {
|
|
|
|
+ ctx()->store->petUids_supportFight_position->$i = 0;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ UserProc::updateUserInfo();
|
|
|
|
+ return Resp::ok(array());
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|