|
@@ -67,15 +67,15 @@ class MapProc {
|
|
$newMap->unlockMapTypeList->$mapid = array();
|
|
$newMap->unlockMapTypeList->$mapid = array();
|
|
}
|
|
}
|
|
$newMap->unlockMapTypeList->$mapid[] = $unlockStr;
|
|
$newMap->unlockMapTypeList->$mapid[] = $unlockStr;
|
|
-
|
|
|
|
- $explorerNum = self::countFootHoldExplorerNum($mapid, $newMap);
|
|
|
|
|
|
+
|
|
|
|
+ $explorerNum = self::countFootHoldExplorerNum($mapid, $newMap);
|
|
$newMap->unlockedFootholds->$mapid->curExploreProgress = $explorerNum;
|
|
$newMap->unlockedFootholds->$mapid->curExploreProgress = $explorerNum;
|
|
|
|
|
|
$type = explode('_', $unlockStr)[1];
|
|
$type = explode('_', $unlockStr)[1];
|
|
if ($type == 6 && $newMap->unlockedFootholds->$mapid->transmissionIsOk == false) {//临时代码,6代表传送带
|
|
if ($type == 6 && $newMap->unlockedFootholds->$mapid->transmissionIsOk == false) {//临时代码,6代表传送带
|
|
$newMap->unlockedFootholds->$mapid->transmissionIsOk = true;
|
|
$newMap->unlockedFootholds->$mapid->transmissionIsOk = true;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
ctx()->newMap = $newMap;
|
|
ctx()->newMap = $newMap;
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
return Resp::ok($newMap);
|
|
return Resp::ok($newMap);
|
|
@@ -88,22 +88,22 @@ class MapProc {
|
|
public static function countFootHoldExplorerNum($mapid, $newMap) {
|
|
public static function countFootHoldExplorerNum($mapid, $newMap) {
|
|
$explorer = 0;
|
|
$explorer = 0;
|
|
if (StlUtil::dictHasProperty($newMap->unlockMapTypeList, $mapid)) {
|
|
if (StlUtil::dictHasProperty($newMap->unlockMapTypeList, $mapid)) {
|
|
- $list = $newMap->unlockMapTypeList->$mapId;
|
|
|
|
- $mapList = GameConfig::map_explorer_getItemArray($mapid);
|
|
|
|
|
|
+ $list = $newMap->unlockMapTypeList->$mapid;
|
|
|
|
+ $mapList = GameConfig::map_explorer_getItemArray($mapid);
|
|
if ($mapList != null) {
|
|
if ($mapList != null) {
|
|
- foreach ($map as $item) {
|
|
|
|
|
|
+ foreach ($mapList as $item) {
|
|
$cmd = $item->cmd;
|
|
$cmd = $item->cmd;
|
|
- $parasList = explode(',', $item->paras);
|
|
|
|
- foreach ($list as $para) {
|
|
|
|
- $strList = explode('_', $para);
|
|
|
|
|
|
+ $parasList = explode(',', $item->paras);
|
|
|
|
+ foreach ($list as $para) {
|
|
|
|
+ $strList = explode('_', $para);
|
|
if ($strList[1] == $cmd && $strList[2] == $parasList[0]) {
|
|
if ($strList[1] == $cmd && $strList[2] == $parasList[0]) {
|
|
$explorer += $parasList[1];
|
|
$explorer += $parasList[1];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
- return intval($explorer / 100);
|
|
|
|
|
|
+ }
|
|
|
|
+ return $explorer;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|