outpost kind of works

This commit is contained in:
Mikhail Thompson
2024-07-02 13:38:18 -04:00
parent e81893c8f2
commit 76ecf031b5
10 changed files with 230 additions and 28 deletions

View File

@@ -1,4 +1,5 @@
using nksrv.LobbyServer.Msgs.Stage;
using nksrv.StaticInfo;
using nksrv.Utils;
using Swan.Logging;
using System;
@@ -20,7 +21,7 @@ namespace nksrv.LobbyServer.Msgs.Campaign
Console.WriteLine("Map ID: " + req.MapId);
var response = new ResGetCampaignFieldData();
response.Field = GetStage.CreateFieldInfo(user, GetChapterFromMapId(req.MapId));
response.Field = GetStage.CreateFieldInfo(user, StaticDataParser.Instance.GetNormalChapterNumberFromFieldName(req.MapId));
// todo save this data
response.Team = new NetUserTeamData() { LastContentsTeamNumber = 1, Type = 1 };
@@ -53,21 +54,5 @@ namespace nksrv.LobbyServer.Msgs.Campaign
WriteData(response);
}
public static int GetChapterFromMapId(string mapId)
{
switch (mapId)
{
case "fcbg_cityforest_000":
return 0;
case "fcbg_cityforest_003":
return 1;
case "fcbg_cityforest_001":
return 2;
default:
Logger.Warn("TODO: I don't know what chapter mapid " + mapId + " is");
return 101;
}
}
}
}