|
@@ -47,7 +47,7 @@ class MapProc {
|
|
$y = req()->paras[2];
|
|
$y = req()->paras[2];
|
|
$z = req()->paras[3];
|
|
$z = req()->paras[3];
|
|
$newMap = ctx()->newMap(true);
|
|
$newMap = ctx()->newMap(true);
|
|
- $curMapId = $newMap->curMapId;
|
|
|
|
|
|
+ //$curMapId = $newMap->curMapId;
|
|
|
|
|
|
$itemId = 0;
|
|
$itemId = 0;
|
|
$dic = ctx()->store()->items;
|
|
$dic = ctx()->store()->items;
|
|
@@ -61,29 +61,32 @@ class MapProc {
|
|
my_Assert($itemId != 0, ErrCode::err_const_no);
|
|
my_Assert($itemId != 0, ErrCode::err_const_no);
|
|
|
|
|
|
StoreProc::removeItemFromStore(ctx()->store, $itemId);
|
|
StoreProc::removeItemFromStore(ctx()->store, $itemId);
|
|
-
|
|
|
|
- $gateZone = GameConfig::gate_zone();
|
|
|
|
- my_Assert($gateZone != null, ErrCode::err_const_no);
|
|
|
|
- foreach ($gateZone as $zoneid => $val) {
|
|
|
|
- $list = explode(',', $val->contains);
|
|
|
|
- if(in_array($curMapId, $list)){
|
|
|
|
- $mid = $list[0];
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- $newMap->curMapId = $mid;
|
|
|
|
|
|
+ //找据点,地图在gate_zone里有配置;没有的就算是副本--暂时先这么着
|
|
|
|
+// $gateZone = GameConfig::gate_zone();
|
|
|
|
+// my_Assert($gateZone != null, ErrCode::err_const_no);
|
|
|
|
+// foreach ($gateZone as $zoneid => $val) {
|
|
|
|
+// $list = explode(',', $val->contains);
|
|
|
|
+// if(in_array($curMapId, $list)){
|
|
|
|
+// $mid = $list[0];
|
|
|
|
+// break;
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+ $curFootholdId = $newMap->curFootholdId;
|
|
|
|
+ if($curFootholdId == null){
|
|
|
|
+ $curFootholdId = 503099;
|
|
|
|
+ }
|
|
|
|
+ $newMap->curMapId = $curFootholdId;
|
|
|
|
|
|
$data = new Ins_ChuansongzhenMapData();
|
|
$data = new Ins_ChuansongzhenMapData();
|
|
- $data->mapId = $mid;
|
|
|
|
|
|
+ $data->mapId = $curFootholdId;
|
|
$data->lastMapId = $mapId;
|
|
$data->lastMapId = $mapId;
|
|
$data->position_x = $x;
|
|
$data->position_x = $x;
|
|
$data->position_y = $y;
|
|
$data->position_y = $y;
|
|
$data->position_z = $z;
|
|
$data->position_z = $z;
|
|
-
|
|
|
|
$newMap->huichengquanRecord->$mapId = $data;
|
|
$newMap->huichengquanRecord->$mapId = $data;
|
|
- $newMap->lastMapId = $mapId;
|
|
|
|
|
|
|
|
|
|
+ $newMap->lastMapId = $mapId;
|
|
|
|
+
|
|
ctx()->newMap = $newMap;
|
|
ctx()->newMap = $newMap;
|
|
|
|
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
@@ -279,6 +282,15 @@ class MapProc {
|
|
public static function EnterFootHold() {
|
|
public static function EnterFootHold() {
|
|
$targetMapId = req()->paras[0]; # 提取参数
|
|
$targetMapId = req()->paras[0]; # 提取参数
|
|
$newMap = ctx()->newMap();
|
|
$newMap = ctx()->newMap();
|
|
|
|
+
|
|
|
|
+ if(!StlUtil::dictHasProperty($newMap->unlockedFootholds,$targetMapId)){
|
|
|
|
+ $mo = GameConfig::gate_getItem($targetMapId);
|
|
|
|
+ $footHold = new Ins_FootHold();
|
|
|
|
+ $footHold->mapId = $mo->gateId;
|
|
|
|
+ $footHold->curMapType = $mo->mapType;
|
|
|
|
+ $this->unlockedFootholds->$targetMapId = $footHold; # 初始化解锁新手村据点数据
|
|
|
|
+ }
|
|
|
|
+
|
|
# 检查目标地图是否已经解锁
|
|
# 检查目标地图是否已经解锁
|
|
my_Assert(isset($newMap->unlockedFootholds->$targetMapId), ErrCode::map_NotUnlocked);
|
|
my_Assert(isset($newMap->unlockedFootholds->$targetMapId), ErrCode::map_NotUnlocked);
|
|
$newMap->curMapId = $targetMapId;
|
|
$newMap->curMapId = $targetMapId;
|
|
@@ -291,10 +303,12 @@ class MapProc {
|
|
$mid = $list[0];
|
|
$mid = $list[0];
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- }
|
|
|
|
-
|
|
|
|
- $newMap->lastMapId = $mid;
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ if($mid != null){//更新据点id
|
|
|
|
+ $newMap->curFootholdId = $mid;
|
|
|
|
+ }
|
|
|
|
+
|
|
ctx()->newMap = $newMap;
|
|
ctx()->newMap = $newMap;
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
return Resp::ok($newMap);
|
|
return Resp::ok($newMap);
|