2 Commits

Author SHA1 Message Date
Mikhail Tyukin
cbbefeb51a fix find/replace mistakes 2025-09-29 21:18:46 -04:00
Mikhail Tyukin
076f987681 Revert "remove li pass popup"
This reverts commit 996b585500.
2025-09-29 18:46:25 -04:00
12 changed files with 20 additions and 19 deletions

View File

@@ -33,7 +33,7 @@ namespace EpinelPS.Controllers
{
// todo: they use another token here, but we will reuse the same one.
// todo: use a class for this, this is a mess
return "{\"birthday\":\"1970-01\",\"channel_info\":{\"account\":\"" + user.Username + "\",\"account_plat_type\":131,\"account_token\":\"" + req.channel_info.account_token + "\",\"account_type\":1,\"account_uid\":\"" + user.ID + "\",\"expire_ts\":1721667004,\"is_login\":true,\"lang_type\":\"en\",\"phone_area_code\":\"\",\"token\":\"" + req.channel_info.account_token + "\"},\"del_account_info\":\"{\\\"ret\\\":0,\\\"msg\\\":\\\"\\\",\\\"status\\\":0,\\\"created_at\\\":\\\"0\\\",\\\"target_destroy_at\\\":\\\"0\\\",\\\"destroyed_at\\\":\\\"0\\\",\\\"err_code\\\":0,\\\"seq\\\":\\\"1719075066-0339089836-025921-1161847390\\\"}\",\"del_account_status\":0,\"del_li_account_status\":0,\"email\":\"" + user.Username + "\",\"extra_json\":{\"del_li_account_info\":\"{\\\"ret\\\":0,\\\"msg\\\":\\\"\\\",\\\"status\\\":0,\\\"created_at\\\":\\\"0\\\",\\\"target_destroy_at\\\":\\\"0\\\",\\\"destroyed_at\\\":\\\"0\\\",\\\"err_code\\\":0,\\\"seq\\\":\\\"" + seq + "\\\"}\",\"get_status_rsp\":{\"adult_age\":14,\"adult_age_map\":{},\"adult_check_status\":1,\"adult_check_status_expiration\":\"0\",\"adult_status_map\":{},\"certificate_type\":3,\"email\":\"\",\"eu_user_agree_status\":0,\"game_grade\":0,\"game_grade_map\":{},\"is_dma\":true,\"is_eea\":false,\"is_need_li_cert\":false,\"msg\":\"success\",\"need_parent_control\":0,\"need_realname_auth\":0,\"parent_certificate_status\":0,\"parent_certificate_status_expiration\":\"0\",\"parent_control_map\":{},\"qr_code_ret\":0,\"realname_auth_status\":0,\"region\":\"724\",\"ret\":0,\"ts\":\"1719075065\"},\"need_notify_rsp\":{\"game_sacc_openid\":\"\",\"game_sacc_uid\":\"\",\"has_game_sacc_openid\":false,\"has_game_sacc_uid\":false,\"has_li_openid\":true,\"has_li_uid\":true,\"is_receive_email\":1,\"is_receive_email_in_night\":0,\"li_openid\":\"" + user.ID + "\",\"li_uid\":\"2752409592679849\",\"need_notify\":false,\"user_agreed_game_dma\":\"2\",\"user_agreed_game_pp\":\"1\",\"user_agreed_game_tos\":\"1\",\"user_agreed_li_dt\":\"\",\"user_agreed_li_pp\":\"1\",\"user_agreed_li_tos\":\"1\"}},\"first_login\":0,\"gender\":0,\"msg\":\"success\",\"need_name_auth\":false,\"openid\":\"" + user.ID + "\",\"pf\":\"LevelInfinite_LevelInfinite-Windows-windows-Windows-LevelInfinite-09af79d65d6e4fdf2d2569f0d365739d-" + user.ID + "\",\"pf_key\":\"abc\",\"picture_url\":\"\",\"reg_channel_dis\":\"Windows\",\"ret\":0,\"seq\":\"29080-2d28ea26-d71f-4822-9118-0156f1e2dba4-1719075060-99\",\"token\":\"" + tok.Token + "\",\"token_expire_time\":" + tok.ExpirationTime + ",\"uid\":\"" + user.ID + "\",\"user_name\":\"" + user.PlayerName + "\"}";
return "{\"birthday\":\"1970-01\",\"channel_info\":{\"account\":\"" + user.Username + "\",\"account_plat_type\":131,\"account_token\":\"" + req.channel_info.account_token + "\",\"account_type\":1,\"account_uid\":\"" + user.ID + "\",\"expire_ts\":1721667004,\"is_login\":true,\"lang_type\":\"en\",\"phone_area_code\":\"\",\"token\":\"" + req.channel_info.account_token + "\"},\"del_account_info\":\"{\\\"ret\\\":0,\\\"msg\\\":\\\"\\\",\\\"status\\\":0,\\\"created_at\\\":\\\"0\\\",\\\"target_destroy_at\\\":\\\"0\\\",\\\"destroyed_at\\\":\\\"0\\\",\\\"err_code\\\":0,\\\"seq\\\":\\\"1719075066-0339089836-025921-1161847390\\\"}\",\"del_account_status\":0,\"del_li_account_status\":0,\"email\":\"" + user.Username + "\",\"extra_json\":{\"del_li_account_info\":\"{\\\"ret\\\":0,\\\"msg\\\":\\\"\\\",\\\"status\\\":0,\\\"created_at\\\":\\\"0\\\",\\\"target_destroy_at\\\":\\\"0\\\",\\\"destroyed_at\\\":\\\"0\\\",\\\"err_code\\\":0,\\\"seq\\\":\\\"" + seq + "\\\"}\",\"get_status_rsp\":{\"adult_age\":14,\"adult_age_map\":{},\"adult_check_status\":1,\"adult_check_status_expiration\":\"0\",\"adult_status_map\":{},\"certificate_type\":3,\"email\":\"\",\"eu_user_agree_status\":0,\"game_grade\":0,\"game_grade_map\":{},\"is_dma\":true,\"is_eea\":false,\"is_need_li_cert\":false,\"msg\":\"success\",\"need_parent_control\":0,\"need_realname_auth\":0,\"parent_certificate_status\":0,\"parent_certificate_status_expiration\":\"0\",\"parent_control_map\":{},\"qr_code_ret\":0,\"realname_auth_status\":0,\"region\":\"724\",\"ret\":0,\"ts\":\"1719075065\"},\"need_notify_rsp\":{\"game_sacc_openid\":\"\",\"game_sacc_uid\":\"\",\"has_game_sacc_openid\":false,\"has_game_sacc_uid\":false,\"has_li_openid\":true,\"has_li_uid\":true,\"is_receive_email\":1,\"is_receive_email_in_night\":0,\"li_openid\":\"" + user.ID + "\",\"li_uid\":\"2752409592679849\",\"need_notify\":false,\"user_agreed_game_dma\":\"2\",\"user_agreed_game_pp\":\"1\",\"user_agreed_game_tos\":\"1\",\"user_agreed_li_dt\":\"\",\"user_agreed_li_pp\":\"1\",\"user_agreed_li_tos\":\"\"}},\"first_login\":0,\"gender\":0,\"msg\":\"success\",\"need_name_auth\":false,\"openid\":\"" + user.ID + "\",\"pf\":\"LevelInfinite_LevelInfinite-Windows-windows-Windows-LevelInfinite-09af79d65d6e4fdf2d2569f0d365739d-" + user.ID + "\",\"pf_key\":\"abc\",\"picture_url\":\"\",\"reg_channel_dis\":\"Windows\",\"ret\":0,\"seq\":\"29080-2d28ea26-d71f-4822-9118-0156f1e2dba4-1719075060-99\",\"token\":\"" + tok.Token + "\",\"token_expire_time\":" + tok.ExpirationTime + ",\"uid\":\"" + user.ID + "\",\"user_name\":\"" + user.PlayerName + "\"}";
}
break;
@@ -53,7 +53,7 @@ namespace EpinelPS.Controllers
return "{\"del_account_info\":\"{\\\"ret\\\":0,\\\"msg\\\":\\\"\\\",\\\"status\\\":0,\\\"created_at\\\":\\\"0\\\",\\\"target_destroy_at\\\":\\\"0\\\",\\\"destroyed_at\\\":\\\"0\\\",\\\"err_code\\\":0,\\\"seq\\\":\\\"" + seq + "\\\"}\",\"del_account_status\":0,\"del_li_account_status\":0,\"extra_json\":{\"del_li_account_info\":\"{\\\"ret\\\":0,\\\"msg\\\":\\\"\\\",\\\"status\\\":0,\\\"created_at\\\":\\\"0\\\",\\\"target_destroy_at\\\":\\\"0\\\",\\\"destroyed_at\\\":\\\"0\\\",\\\"err_code\\\":0,\\\"seq\\\":\\\"" + seq + "\\\"}\",\"get_status_msg\":\"success\",\"get_status_ret\":0,\"get_status_rsp\":{\"adult_age\":14,\"adult_age_map\":{},\"adult_check_status\":1,\"adult_check_status_expiration\":\"0\",\"adult_status_map\":{},\"certificate_type\":3,\"email\":\"\",\"eu_user_agree_status\":0,\"game_grade\":0,\"game_grade_map\":{},\"is_dma\":true,\"is_eea\":false,\"is_need_li_cert\":false,\"msg\":\"success\",\"need_parent_control\":0,\"need_realname_auth\":0,\"parent_certificate_status\":0,\"parent_certificate_status_expiration\":\"0\",\"parent_control_map\":{},\"qr_code_ret\":0,\"realname_auth_status\":0,\"region\":\"724\",\"ret\":0,\"ts\":\"" + DateTimeOffset.UtcNow.ToUnixTimeSeconds()
+ "\"},\"need_notify_msg\":\"success\",\"need_notify_ret\":0,\"need_notify_rsp\":{\"has_bind_li\":true,\"is_receive_email\":1,\"is_receive_email_in_night\":0,\"user_agreed_game_dma\":\"2\",\"user_agreed_game_pp\":\"1\",\"user_agreed_game_tos\":\"1\",\"user_agreed_li_dt\":\"\",\"user_agreed_li_pp\":\"1\",\"user_agreed_li_tos\":\"1\"}},\"msg\":\"success\",\"ret\":0,\"seq\":\"" + seq + "\"}";
+ "\"},\"need_notify_msg\":\"success\",\"need_notify_ret\":0,\"need_notify_rsp\":{\"has_bind_li\":true,\"is_receive_email\":1,\"is_receive_email_in_night\":0,\"user_agreed_game_dma\":\"2\",\"user_agreed_game_pp\":\"1\",\"user_agreed_game_tos\":\"1\",\"user_agreed_li_dt\":\"\",\"user_agreed_li_pp\":\"1\",\"user_agreed_li_tos\":\"\"}},\"msg\":\"success\",\"ret\":0,\"seq\":\"" + seq + "\"}";
}
[HttpPost]
@@ -81,7 +81,7 @@ namespace EpinelPS.Controllers
if ((user = NetUtils.GetUser(req.channel_info.token).Item1) == null) return BadAuthToken;
// Pretend that code is valid
return "{\"game_sacc_openid\":\"\",\"game_sacc_uid\":\"\",\"has_game_sacc_openid\":false,\"has_game_sacc_uid\":false,\"has_li_openid\":false,\"has_li_uid\":true,\"is_receive_email\":-1,\"is_receive_email_in_night\":-1,\"li_openid\":\"\",\"li_uid\":\"" + user.ID + "\",\"msg\":\"success\",\"need_notify\":false,\"ret\":0,\"seq\":\"" + seq + "\",\"user_agreed_game_dma\":\"\",\"user_agreed_game_pp\":\"\",\"user_agreed_game_tos\":\"\",\"user_agreed_li_dt\":\"\",\"user_agreed_li_pp\":\"\",\"user_agreed_li_tos\":\"1\"}";
return "{\"game_sacc_openid\":\"\",\"game_sacc_uid\":\"\",\"has_game_sacc_openid\":false,\"has_game_sacc_uid\":false,\"has_li_openid\":false,\"has_li_uid\":true,\"is_receive_email\":-1,\"is_receive_email_in_night\":-1,\"li_openid\":\"\",\"li_uid\":\"" + user.ID + "\",\"msg\":\"success\",\"need_notify\":false,\"ret\":0,\"seq\":\"" + seq + "\",\"user_agreed_game_dma\":\"\",\"user_agreed_game_pp\":\"\",\"user_agreed_game_tos\":\"\",\"user_agreed_li_dt\":\"\",\"user_agreed_li_pp\":\"\",\"user_agreed_li_tos\":\"\"}";
}

View File

@@ -22,7 +22,7 @@ namespace EpinelPS.LobbyServer.Character
}
// TODO: ValIdate response from real server and pull info from user info
// TODO: Validate response from real server and pull info from user info
await WriteDataAsync(response);
}
}

View File

@@ -8,7 +8,7 @@ namespace EpinelPS.LobbyServer.Character
{
protected override async Task HandleAsync()
{
// Broken protocol so we dIdn't valIdate request data.
// Broken protocol so we dIdn't validate request data.
// May fix later.
ReqSynchroAddSlot req = await ReadData<ReqSynchroAddSlot>();

View File

@@ -1,4 +1,5 @@
using EpinelPS.Utils;
using EpinelPS.Data;
using EpinelPS.Utils;
namespace EpinelPS.LobbyServer.Event
{
[PacketPath("/event/getjoinedevent")]

View File

@@ -30,7 +30,7 @@ namespace EpinelPS.LobbyServer.FavoriteItem
if (req.ItemData == null)
{
throw new BadHttpRequestException($"No material item provIded", 400);
throw new BadHttpRequestException($"No material item provided", 400);
}
ItemData? userItem = user.Items.FirstOrDefault(x => x.Isn == req.ItemData.Isn);

View File

@@ -20,13 +20,13 @@ namespace EpinelPS.LobbyServer.FavoriteItem
throw new BadHttpRequestException("Favorite item not found", 400);
}
int srItemTId = rFavoriteItem.Tid + 1;
int srItemTid = rFavoriteItem.Tid + 1;
NetUserFavoriteItemData? srInventoryItem = user.FavoriteItems.FirstOrDefault(f => f.Tid == srItemTId && f.Csn == 0);
NetUserFavoriteItemData? srInventoryItem = user.FavoriteItems.FirstOrDefault(f => f.Tid == srItemTid && f.Csn == 0);
if (srInventoryItem == null)
{
throw new BadHttpRequestException($"No SR-grade favorite item (TID: {srItemTId}) available in inventory for exchange", 400);
throw new BadHttpRequestException($"No SR-grade favorite item (TID: {srItemTid}) available in inventory for exchange", 400);
}
(int NewLevel, int RemainingExp, double ConversionRate) expConversion = CalculateExpConversion(rFavoriteItem.Lv, rFavoriteItem.Exp);
@@ -43,7 +43,7 @@ namespace EpinelPS.LobbyServer.FavoriteItem
NetUserFavoriteItemData newSrFavoriteItem = new NetUserFavoriteItemData
{
FavoriteItemId = user.GenerateUniqueItemId(),
Tid = srItemTId,
Tid = srItemTid,
Csn = equippedCharacterCsn, // Maintain equipment status
Lv = expConversion.NewLevel,
Exp = expConversion.RemainingExp

View File

@@ -3,7 +3,7 @@ using EpinelPS.Utils;
namespace EpinelPS.LobbyServer.Jukebox
{
[PacketPath("/jukebox/set/tableId")]
[PacketPath("/jukebox/set/tableid")]
public class SetTableId : LobbyMsgHandler
{
protected override async Task HandleAsync()

View File

@@ -14,7 +14,7 @@ namespace EpinelPS.LobbyServer.Misc
if (user.GachaTutorialPlayCount > 0)
response.Unavailables.Add(3);
// TODO: ValIdate response from real server and pull info from user info
// TODO: Validate response from real server and pull info from user info
await WriteDataAsync(response);
}
}

View File

@@ -11,7 +11,7 @@ namespace EpinelPS.LobbyServer.Shop.InApp
ResGetCustomPackageSetupData response = new();
// TODO: ValIdate response from real server and pull info from user info
// TODO: Validate response from real server and pull info from user info
await WriteDataAsync(response);
}
}

View File

@@ -11,7 +11,7 @@ namespace EpinelPS.LobbyServer.Shop.PackageShop
ResGetCampaignPackage response = new();
// TODO: ValIdate response from real server and pull info from user info
// TODO: Validate response from real server and pull info from user info
await WriteDataAsync(response);
}
}

View File

@@ -180,7 +180,7 @@ namespace EpinelPS.Models
public string Location = "";
public long Seq;
public BadgeContents BadgeContent;
public string BadgeGuId = "";
public string BadgeGuid = "";
public BadgeModel() { }
public BadgeModel(NetBadge badge)
@@ -188,7 +188,7 @@ namespace EpinelPS.Models
Location = badge.Location;
Seq = badge.Seq;
BadgeContent = badge.BadgeContent;
BadgeGuId = new Guid([.. badge.BadgeGuid]).ToString();
BadgeGuid = new Guid([.. badge.BadgeGuid]).ToString();
}
public NetBadge ToNet()
@@ -196,7 +196,7 @@ namespace EpinelPS.Models
return new NetBadge()
{
BadgeContent = BadgeContent,
BadgeGuid = ByteString.CopyFrom(new Guid(BadgeGuId).ToByteArray()),
BadgeGuid = ByteString.CopyFrom(new Guid(BadgeGuid).ToByteArray()),
Location = Location,
Seq = Seq
};

View File

@@ -137,7 +137,7 @@ public class User
{
BadgeContent = type,
Location = location,
BadgeGuId = Guid.NewGuid().ToString(),
BadgeGuid = Guid.NewGuid().ToString(),
Seq = LastBadgeSeq++
};