mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-13 07:24:52 +01:00
fix loading screen hang, only allow gacha tutorial once
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -456,3 +456,4 @@ $RECYCLE.BIN/
|
||||
# Allow pregenerated ssl cert
|
||||
!nksrv/site.pfx
|
||||
!ServerSelector/myCA.pfx
|
||||
!ServerSelector/sodium.dll
|
||||
@@ -1,5 +1,5 @@
|
||||
# nikke-server
|
||||
Private/local server for Nikke. NOTE: This project is in a very early state.
|
||||
Private/local server for Nikke. NOTE: This project is in a very early state so many features in the game do not work.
|
||||
|
||||
## Usage
|
||||
Download the latest release/GitHub actions build, and run ServerSelector.Desktop.exe as administrator (to modify DNS hosts file and install a CA cert). Make sure to close the game and launcher first. Select Local server, and then click save.
|
||||
@@ -10,7 +10,7 @@ You should be able to register an new account in the launcher (you can enter any
|
||||
|
||||
If the game does not get past the title screen, open an issue and send %appdata%\..\LocalLow\com.proximabeta\NIKKE\player.log file.
|
||||
|
||||
|
||||
Note that this was tested with the latest version (122.8.20c)
|
||||
|
||||
## Progress
|
||||
Stage, character, and story information is saved and works, as well as player nickname.
|
||||
|
||||
@@ -25,6 +25,8 @@ namespace nksrv.IntlServer
|
||||
if (item.Username == ep.account && item.Password == ep.password)
|
||||
{
|
||||
var tok = IntlHandler.CreateLauncherTokenForUser(item);
|
||||
item.LastLogin = DateTime.UtcNow;
|
||||
JsonDb.Save();
|
||||
WriteJsonString("{\"expire\":" + tok.ExpirationTime + ",\"is_login\":true,\"msg\":\"Success\",\"register_time\":" + item.RegisterTime + ",\"ret\":0,\"seq\":\"" + Seq + "\",\"token\":\"" + tok.Token + "\",\"uid\":\"" + item.ID + "\"}");
|
||||
|
||||
return;
|
||||
|
||||
@@ -19,19 +19,24 @@ namespace nksrv.LobbyServer.Msgs.Gacha
|
||||
var response = new ResExecuteGacha();
|
||||
|
||||
// TODO: Pick random character that player does not have unless it supports limit break.
|
||||
// TODO: Write character to user info.
|
||||
|
||||
// TODO implement
|
||||
// TODO implement reward
|
||||
response.Reward = new NetRewardData();
|
||||
foreach (var c in StaticDataParser.Instance.GetAllCharacterTids())
|
||||
|
||||
if (user.GachaTutorialPlayCount == 0)
|
||||
{
|
||||
response.Gacha.Add(new NetGachaEntityData() { Corporation = 0, PieceCount = 1, CurrencyValue = 5, Sn = 130201, Tid = c, Type = 1 });
|
||||
foreach (var c in StaticDataParser.Instance.GetAllCharacterTids())
|
||||
{
|
||||
response.Gacha.Add(new NetGachaEntityData() { Corporation = 0, PieceCount = 1, CurrencyValue = 5, Sn = 130201, Tid = c, Type = 1 });
|
||||
|
||||
user.Characters.Add(new Utils.Character() { CostumeId = 0, Csn = c, Grade = 0, Level = 1, Skill1Lvl = 1, Skill2Lvl= 1, Tid = c, UltimateLevel = 1 });
|
||||
user.Characters.Add(new Utils.Character() { CostumeId = 0, Csn = c, Grade = 0, Level = 1, Skill1Lvl = 1, Skill2Lvl = 1, Tid = c, UltimateLevel = 1 });
|
||||
|
||||
// response.Characters.Add(new NetUserCharacterDefaultData() { Lv = 1, Skill1Lv = 1, Grade = 0, Csn = 1, Tid = 130201 });
|
||||
// response.Characters.Add(new NetUserCharacterDefaultData() { Lv = 1, Skill1Lv = 1, Grade = 0, Csn = 1, Tid = 130201 });
|
||||
|
||||
}
|
||||
user.GachaTutorialPlayCount++;
|
||||
}
|
||||
|
||||
JsonDb.Save();
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace nksrv.LobbyServer.Msgs.Outpost
|
||||
var response = new ResGetOutpostData
|
||||
{
|
||||
OutpostBattleLevel = new NetOutpostBattleLevel() { Level = 1 },
|
||||
CommanderBgm = new NetUserJukeboxDataV2(),
|
||||
CommanderBgm = new NetUserJukeboxDataV2() { CommandBgm = new() { Type = NetJukeboxBgmType.JukeboxTableId, JukeboxTableId = 3012 } },
|
||||
BattleTime = 864000000000, Jukebox = new(), MaxBattleTime = 864000000000
|
||||
};
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace nksrv.LobbyServer.Msgs.User
|
||||
}
|
||||
response.MaxGachaCount = 10;
|
||||
// todo tutorial playcount of gacha
|
||||
response.TutorialGachaPlayCount = user.GachaTutorialPlayCount;
|
||||
|
||||
WriteData(response);
|
||||
}
|
||||
|
||||
@@ -87,6 +87,7 @@ namespace nksrv.Utils
|
||||
public DateTime BattleTime = DateTime.UtcNow;
|
||||
|
||||
public NetOutpostBattleLevel OutpostBattleLevel = new() { Level = 1 };
|
||||
public int GachaTutorialPlayCount = 0;
|
||||
|
||||
public void SetQuest(int tid, bool recieved)
|
||||
{
|
||||
@@ -107,14 +108,13 @@ namespace nksrv.Utils
|
||||
|
||||
public List<AccessToken> LauncherAccessTokens = [];
|
||||
|
||||
|
||||
public Dictionary<string, GameClientInfo> GameClientTokens = [];
|
||||
}
|
||||
internal class JsonDb
|
||||
{
|
||||
public static CoreInfo Instance { get; internal set; }
|
||||
public static byte[] ServerPrivateKey = Convert.FromBase64String("FSUY8Ohd942n5LWAfxn6slK3YGwc8OqmyJoJup9nNos=");
|
||||
public static byte[] ServerPublicKey = Convert.FromBase64String("04hFDd1e/BOEF2h4b0MdkX2h6W5REeqyW+0r9+eSeh0=");
|
||||
public static byte[] ServerPublicKey = Convert.FromBase64String("04hFDd1e/BOEF2h4b0MdkX2h6W5REeqyW+0r9+eSeh0="); // Note: change this in sodium
|
||||
|
||||
static JsonDb()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user