mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-12 15:04:36 +01:00
Basic Anomaly intercept implementation
This commit is contained in:
@@ -12,7 +12,7 @@ namespace EpinelPS.LobbyServer.Msgs.Gacha
|
||||
var response = new ResCheckDailyFreeGacha();
|
||||
|
||||
// TODO implement
|
||||
response.FreeCount = 0;
|
||||
response.FreeCount = 1;
|
||||
response.EventData = new NetEventData() { Id = 1 };
|
||||
|
||||
await WriteDataAsync(response);
|
||||
|
||||
@@ -19,16 +19,9 @@ namespace EpinelPS.LobbyServer.Msgs
|
||||
response.Gacha.Add(new NetUserGachaData() { GachaType = 3, PlayCount = 1 });
|
||||
}
|
||||
|
||||
// Now let's loop through gachaTypes and add those with "type" == "GachaPickup"
|
||||
foreach (var gacha in GameData.Instance.gachaTypes.Values) // We're looping through the dictionary's values
|
||||
{
|
||||
if (gacha.type == "GachaPickup")
|
||||
{
|
||||
// Add this GachaType ID to the response
|
||||
response.Gacha.Add(new NetUserGachaData() { GachaType = gacha.id, PlayCount = 1 });
|
||||
}
|
||||
}
|
||||
|
||||
response.Gacha.Add(new NetUserGachaData() { GachaType = 9, PlayCount = 0 }); //type 9 = pickup gacha
|
||||
response.GachaEventData.Add(new NetGachaEvent() {FreeCount = 1, GachaTypeId = 9 } );
|
||||
response.MultipleCustom.Add(new NetGachaCustomData() {Type = 9, Tid = 451101});
|
||||
// Write the response back
|
||||
await WriteDataAsync(response);
|
||||
}
|
||||
|
||||
21
EpinelPS/LobbyServer/Msgs/Intercept/AnomalousData.cs
Normal file
21
EpinelPS/LobbyServer/Msgs/Intercept/AnomalousData.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using EpinelPS.Utils;
|
||||
|
||||
namespace EpinelPS.LobbyServer.Msgs.Intercept
|
||||
{
|
||||
[PacketPath("/intercept/Anomalous/Data")]
|
||||
public class GetAnomalousData : LobbyMsgHandler
|
||||
{
|
||||
protected override async Task HandleAsync()
|
||||
{
|
||||
var req = await ReadData<ReqInterceptAnomalousData>();
|
||||
|
||||
var response = new ResInterceptAnomalousData
|
||||
{
|
||||
LastEnteredInterceptAnomalousId = 1,
|
||||
RemainingTickets = 5
|
||||
};
|
||||
response.ClearedInterceptAnomalousIds.Add(new[] { 1, 2, 3, 4, 5 });
|
||||
await WriteDataAsync(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
17
EpinelPS/LobbyServer/Msgs/Intercept/AnomalousEnter.cs
Normal file
17
EpinelPS/LobbyServer/Msgs/Intercept/AnomalousEnter.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using EpinelPS.Utils;
|
||||
|
||||
namespace EpinelPS.LobbyServer.Msgs.Intercept
|
||||
{
|
||||
[PacketPath("/intercept/Anomalous/Enter")]
|
||||
public class EnterAnomalousIntercept : LobbyMsgHandler
|
||||
{
|
||||
protected override async Task HandleAsync()
|
||||
{
|
||||
var req = await ReadData<ReqEnterInterceptAnomalous>();
|
||||
|
||||
var response = new ResEnterInterceptAnomalous();
|
||||
|
||||
await WriteDataAsync(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
17
EpinelPS/LobbyServer/Msgs/Intercept/AnomalousFastClear.cs
Normal file
17
EpinelPS/LobbyServer/Msgs/Intercept/AnomalousFastClear.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using EpinelPS.Utils;
|
||||
|
||||
namespace EpinelPS.LobbyServer.Msgs.Intercept
|
||||
{
|
||||
[PacketPath("/intercept/Anomalous/FastClear")]
|
||||
public class AnomalousFastClear : LobbyMsgHandler
|
||||
{
|
||||
protected override async Task HandleAsync()
|
||||
{
|
||||
var req = await ReadData<ReqFastClearInterceptAnomalous>();
|
||||
|
||||
var response = new ResFastClearInterceptAnomalous();
|
||||
|
||||
await WriteDataAsync(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
17
EpinelPS/LobbyServer/Msgs/Intercept/AnomalousFinish.cs
Normal file
17
EpinelPS/LobbyServer/Msgs/Intercept/AnomalousFinish.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using EpinelPS.Utils;
|
||||
|
||||
namespace EpinelPS.LobbyServer.Msgs.Intercept
|
||||
{
|
||||
[PacketPath("/intercept/Anomalous/Finish")]
|
||||
public class FinishAnomalousIntercept : LobbyMsgHandler
|
||||
{
|
||||
protected override async Task HandleAsync()
|
||||
{
|
||||
var req = await ReadData<ReqFinishInterceptAnomalous>();
|
||||
|
||||
var response = new ResFinishInterceptAnomalous();
|
||||
|
||||
await WriteDataAsync(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace EpinelPS.LobbyServer.Msgs.User
|
||||
|
||||
// this request returns a list of "special" stages that mark when something is unlocked, ex: the shop or interception
|
||||
|
||||
List<int> specialStages = [6003003, 6002008, 6002016, 6005003, 6003021, 6011018, 6007021, 6004018, 6005013, 6003009, 6003012, 6009017, 6016039, 6001004, 6000003, 6000001, 6002001, 6004023, 6005026, 6020050, 6006004, 6006023];
|
||||
List<int> specialStages = [6003003, 6002008, 6002016, 6005003, 6003021, 6011018, 6007021, 6004018, 6005013, 6003009, 6003012, 6009017, 6016039, 6001004, 6000003, 6000001, 6002001, 6004023, 6005026, 6020050, 6006004, 6006023,6022049];
|
||||
|
||||
var response = new ResGetContentsOpenData();
|
||||
foreach (var field in user.FieldInfoNew.Values)
|
||||
@@ -24,6 +24,7 @@ namespace EpinelPS.LobbyServer.Msgs.User
|
||||
}
|
||||
}
|
||||
response.MaxGachaCount = 10;
|
||||
response.MaxGachaPremiumCount = 10;
|
||||
// todo tutorial playcount of gacha
|
||||
response.TutorialGachaPlayCount = user.GachaTutorialPlayCount;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user