12121
This commit is contained in:
@@ -715,20 +715,23 @@ public class MapController : ControllerBase
|
||||
|
||||
if (code == nameof(MapEnum.NpcEventCode.Magic_Event)) //魔城
|
||||
{
|
||||
var magicService = App.GetService<IGameMagicService>();
|
||||
bool isWin = false;
|
||||
if (TimeAssist.GetHourNum > 221000)
|
||||
{
|
||||
var onMapUser = await _mapService.GetMapUser(GameConfig.GameMagicMapId, areaId, 1, [userId], 1);
|
||||
if (onMapUser.Count == 0)
|
||||
{
|
||||
isWin = true;
|
||||
string time = TimeAssist.GetDateTimeYMDString(0);
|
||||
if (await magicService.IsHaveWin(areaId, time)==false)
|
||||
{
|
||||
isWin = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var magicService = App.GetService<IGameMagicService>();
|
||||
await magicService.UpdateUserMagicEndTime(userId, isWin);
|
||||
|
||||
await _mapService.UpdateUserOnMap(onMap, GameConfig.GameMagicInMapId);//设置地图
|
||||
await _mapService.UpdateUserOnMap(onMap, GameConfig.GameMagicInMapId); //设置地图
|
||||
return PoAction.Ok(0, "魔城成功退出!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user