|
@@ -65,25 +65,39 @@ class MapProc {
|
|
|
$newMap->unlockMapTypeList = new \stdClass();
|
|
|
}
|
|
|
|
|
|
- $mapid = explode('_', $unlockStr)[0];
|
|
|
+ $mapid = explode('_', $unlockStr)[0];
|
|
|
+ $type = explode('_', $unlockStr)[1];
|
|
|
+ $typeid = explode('_', $unlockStr)[2];
|
|
|
if (!StlUtil::dictHasProperty($newMap->unlockMapTypeList, $mapid)) {
|
|
|
$newMap->unlockMapTypeList->$mapid = array();
|
|
|
}
|
|
|
- $newMap->unlockMapTypeList->$mapid[] = $unlockStr;
|
|
|
+ $tag = 1;
|
|
|
+ $tylist = $newMap->unlockMapTypeList->$mapid;
|
|
|
+ foreach ($tylist as $str) {
|
|
|
+ $slist = explode('_', $str);
|
|
|
+ if($slist[0] == $mapid && $slist[1] == $type && $slist[2]==$typeid){
|
|
|
+ $tag = 0;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if($tag){
|
|
|
+ $newMap->unlockMapTypeList->$mapid[] = $unlockStr;
|
|
|
|
|
|
- my_Assert(StlUtil::dictHasProperty($newMap->unlockedFootholds,$mapid), ErrCode::map_Unlocked);
|
|
|
+ my_Assert(StlUtil::dictHasProperty($newMap->unlockedFootholds,$mapid), ErrCode::map_Unlocked);
|
|
|
|
|
|
- $explorerNum = self::countFootHoldExplorerNum($mapid, $newMap);
|
|
|
- $newMap->unlockedFootholds->$mapid->curExploreProgress = $explorerNum;
|
|
|
+ $explorerNum = self::countFootHoldExplorerNum($mapid, $newMap);
|
|
|
+ $newMap->unlockedFootholds->$mapid->curExploreProgress = $explorerNum;
|
|
|
|
|
|
- $type = explode('_', $unlockStr)[1];
|
|
|
- if ($type == 6 && $newMap->unlockedFootholds->$mapid->transmissionIsOk == false) {//临时代码,6代表传送带
|
|
|
- $newMap->unlockedFootholds->$mapid->transmissionIsOk = true;
|
|
|
+ //$type = explode('_', $unlockStr)[1];
|
|
|
+ if ($type == 6 && $newMap->unlockedFootholds->$mapid->transmissionIsOk == false) {//临时代码,6代表传送带
|
|
|
+ $newMap->unlockedFootholds->$mapid->transmissionIsOk = true;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
ctx()->newMap = $newMap;
|
|
|
UserProc::updateUserInfo();
|
|
|
- return Resp::ok($newMap);
|
|
|
+ return Resp::ok(array("newMap"=>$newMap,"tag"=>$tag,));
|
|
|
}
|
|
|
|
|
|
/*
|