|
@@ -29,9 +29,9 @@ class MapProc {
|
|
return self::unlockInfoSva();
|
|
return self::unlockInfoSva();
|
|
case CmdCode::map_reviceExplorerReward: # [7506] 领取探索奖励cmd_store_huichengQuanUse
|
|
case CmdCode::map_reviceExplorerReward: # [7506] 领取探索奖励cmd_store_huichengQuanUse
|
|
return self::reviceExplorerReward();
|
|
return self::reviceExplorerReward();
|
|
- case CmdCode::cmd_store_huichengQuanUse: # [7507]
|
|
|
|
|
|
+ case CmdCode::map_huichengQuanUse: # [7507]
|
|
return self::huichengQuanUse();
|
|
return self::huichengQuanUse();
|
|
- case CmdCode::cmd_store_huichengQuanEnd: # [7508]
|
|
|
|
|
|
+ case CmdCode::map_huichengQuanEnd: # [7508]
|
|
return self::huichengQuanEnd();
|
|
return self::huichengQuanEnd();
|
|
default: # err: 未知的命令码
|
|
default: # err: 未知的命令码
|
|
return Resp::err(ErrCode::cmd_err);
|
|
return Resp::err(ErrCode::cmd_err);
|
|
@@ -42,12 +42,21 @@ class MapProc {
|
|
* @return Resp
|
|
* @return Resp
|
|
*/
|
|
*/
|
|
public static function huichengQuanUse() {
|
|
public static function huichengQuanUse() {
|
|
- $itemId = req()->paras[0]; # 提取参数
|
|
|
|
|
|
+ $mapId = req()->paras[0];
|
|
|
|
+ $itemId = req()->paras[1]; # 提取参数
|
|
$newMap = ctx()->newMap(true);
|
|
$newMap = ctx()->newMap(true);
|
|
|
|
|
|
StoreProc::removeItemFromStore(ctx()->store, $itemId);
|
|
StoreProc::removeItemFromStore(ctx()->store, $itemId);
|
|
|
|
+
|
|
|
|
+ $zoneId = GameConfig::map_scene_getItem($mapId)->zoneId;
|
|
|
|
+ $dic = GameConfig::map_scene();
|
|
|
|
+ my_Assert($dic != null, ErrCode::err_const_no);
|
|
|
|
+
|
|
|
|
+ $item = GameConfig::map_scene_zoneid_getItemArray($zoneId)[0];
|
|
|
|
+
|
|
|
|
+ $newMap->curMapId = $item->mapId;
|
|
|
|
+ $newMap->huichengquanRecord[] = $item->mapId;
|
|
|
|
|
|
- $newMap->huichengquanRecord[] = 1;
|
|
|
|
ctx()->newMap = $newMap;
|
|
ctx()->newMap = $newMap;
|
|
|
|
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
@@ -57,17 +66,19 @@ class MapProc {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * [7508]
|
|
|
|
|
|
+ * [7508] 回城券的传送阵结束
|
|
* @return Resp
|
|
* @return Resp
|
|
*/
|
|
*/
|
|
public static function huichengQuanEnd() {
|
|
public static function huichengQuanEnd() {
|
|
- //$mapid = req()->paras[0]; # 提取参数
|
|
|
|
|
|
+ $mapid = req()->paras[0]; # 提取参数
|
|
$newMap = ctx()->newMap();
|
|
$newMap = ctx()->newMap();
|
|
- $zoneid = 1;
|
|
|
|
- my_Assert(in_array($zoneid,$newMap->huichengquanRecord), ErrCode::map_NotChuanSongZhen);
|
|
|
|
|
|
+ //$initMapid = 1001;
|
|
|
|
+// my_Assert(in_array($mapid,$newMap->huichengquanRecord), ErrCode::map_NotChuanSongZhen);
|
|
|
|
|
|
- StlUtil::arrayRemove($newMap->huichengquanRecord, $zoneid);
|
|
|
|
-
|
|
|
|
|
|
+ if(in_array($mapid, $newMap->huichengquanRecord)){
|
|
|
|
+ StlUtil::arrayRemove($newMap->huichengquanRecord, $mapid);
|
|
|
|
+ }
|
|
|
|
+
|
|
ctx()->newMap = $newMap;
|
|
ctx()->newMap = $newMap;
|
|
|
|
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|