mirror of
https://github.com/rafi1212122/PemukulPaku
synced 2025-12-12 21:04:43 +01:00
dummy gacha & memorial arena
This commit is contained in:
30
GameServer/Handlers/GachaReqHandler.cs
Normal file
30
GameServer/Handlers/GachaReqHandler.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
[PacketCmdId(CmdId.GachaReq)]
|
||||
internal class GachaReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
GachaReq Data = packet.GetDecodedBody<GachaReq>();
|
||||
GachaRsp Rsp = new()
|
||||
{
|
||||
retcode = GachaRsp.Retcode.Succ,
|
||||
GachaRandom = Data.GachaRandom,
|
||||
IsUseFreeGacha = Data.IsUseFreeGacha
|
||||
};
|
||||
Rsp.ItemLists.Add(new()
|
||||
{
|
||||
ItemId = 10106,
|
||||
Level = 0,
|
||||
Num = 5,
|
||||
GiftItemId = 80026,
|
||||
GiftLevel = 0,
|
||||
GiftNum = 50
|
||||
});
|
||||
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.GachaRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
13
GameServer/Handlers/GetChapterActivityDataReqHandler.cs
Normal file
13
GameServer/Handlers/GetChapterActivityDataReqHandler.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
[PacketCmdId(CmdId.GetChapterActivityDataReq)]
|
||||
internal class GetChapterActivityDataReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
session.Send(Packet.FromProto(new GetChapterActivityDataRsp() { retcode = GetChapterActivityDataRsp.Retcode.Succ }, CmdId.GetChapterActivityDataRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
57
GameServer/Handlers/GetGachaDisplayReqHandler.cs
Normal file
57
GameServer/Handlers/GetGachaDisplayReqHandler.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using Common;
|
||||
using Common.Resources.Proto;
|
||||
using Common.Utils.ExcelReader;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
[PacketCmdId(CmdId.GetGachaDisplayReq)]
|
||||
internal class GetGachaDisplayReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
GetGachaDisplayRsp Rsp = new()
|
||||
{
|
||||
retcode = GetGachaDisplayRsp.Retcode.Succ,
|
||||
IsAll = true,
|
||||
Type = GachaType.GachaTypeError,
|
||||
GachaRandom = (uint)Global.GetUnixInSeconds()
|
||||
};
|
||||
Rsp.GachaDisplayInfoLists.Add(new()
|
||||
{
|
||||
GachaType = GachaType.GachaCustomAvatar,
|
||||
CommonData = new()
|
||||
{
|
||||
TitleImage = "SpriteOutput/Gacha/TitleKakin3",
|
||||
Title = "5.18~6.16",
|
||||
Content = "To feed ur gacha addiction",
|
||||
IsEnablePrompt = true,
|
||||
GachaId = 30115600,
|
||||
DataBeginTime = 1684353600,
|
||||
DataEndTime = 2684353600,
|
||||
UpAvatarLists = AvatarData.GetInstance().All.Where(avatar => avatar.AvatarId < 9000).Select(avatar => (uint)avatar.AvatarId).ToArray()
|
||||
},
|
||||
CustomGachaData = new()
|
||||
{
|
||||
TicketHcoinCost = 280,
|
||||
TicketMaterialId = 1103,
|
||||
IsEnableBaodi = true,
|
||||
GachaType = GachaType.GachaCustomAvatar,
|
||||
GachaTimes = 0,
|
||||
DisplayMaxTimes = 100,
|
||||
NoProtectGachaTimes = 0,
|
||||
DisplayVideoAvatar = 0,
|
||||
ShiningType = 1,
|
||||
ExId = 1,
|
||||
ProtectDisplayInfo = new()
|
||||
{
|
||||
NoProtectGachaTimes = 0,
|
||||
DisplayKeyAvatar = 0,
|
||||
protect_display_type = GachaProtectDisplayInfo.ProtectDisplayType.NoDisplay
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.GetGachaDisplayRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
39
GameServer/Handlers/GetThemeWantedReqHandler.cs
Normal file
39
GameServer/Handlers/GetThemeWantedReqHandler.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using Common;
|
||||
using Common.Resources.Proto;
|
||||
using Common.Utils.ExcelReader;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
[PacketCmdId(CmdId.GetThemeWantedReq)]
|
||||
internal class GetThemeWantedReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
GetThemeWantedRsp Rsp = new()
|
||||
{
|
||||
retcode = GetThemeWantedRsp.Retcode.Succ,
|
||||
ThemeWantedActivity = new()
|
||||
{
|
||||
ScheduleId = 1,
|
||||
ActivityId = 11104,
|
||||
OpenStageGroupIdLists = new uint[] { 13, 14, 15, 16 }
|
||||
}
|
||||
};
|
||||
foreach (uint groupId in Rsp.ThemeWantedActivity.OpenStageGroupIdLists)
|
||||
{
|
||||
SingleWantedStageGroupExcel? groupData = SingleWantedStageGroup.GetInstance().FromGroupId((int)groupId);
|
||||
if(groupData is not null)
|
||||
{
|
||||
Rsp.ThemeWantedActivity.StageGroupInfoLists.Add(new()
|
||||
{
|
||||
StageGroupId = groupId,
|
||||
Progress = (uint)groupData.StageIdList.Length,
|
||||
UnlockMpProgressLists = groupData.MpStageIdList.Select((mpStage, index) => (uint)index + 1).ToArray()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.GetThemeWantedRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,12 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
Equipment.AddMaterial((int)DropItem.ItemId, (int)DropItem.Num);
|
||||
}
|
||||
|
||||
session.Player.User.Hcoin += DecodedBody.ChallengeIndexLists.Length * 5;
|
||||
if(DecodedBody.ChallengeIndexLists is not null)
|
||||
{
|
||||
session.Player.User.Hcoin += DecodedBody.ChallengeIndexLists.Length * 5;
|
||||
Rsp.ChallengeLists.AddRange(DecodedBody.ChallengeIndexLists.Select(challengeIndex => new StageChallengeData() { ChallengeIndex = challengeIndex, Reward = new() { Hcoin = 5 } }));
|
||||
}
|
||||
|
||||
session.Player.User.Exp += 100;
|
||||
|
||||
session.ProcessPacket(Packet.FromProto(new GetMainDataReq() { }, CmdId.GetMainDataReq));
|
||||
@@ -52,7 +57,6 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
Rsp.PlayerExpReward = 100;
|
||||
Rsp.AvatarExpReward = DecodedBody.AvatarExpReward;
|
||||
Rsp.ScoinReward = DecodedBody.ScoinReward;
|
||||
Rsp.ChallengeLists.AddRange(DecodedBody.ChallengeIndexLists.Select(challengeIndex => new StageChallengeData() { ChallengeIndex = challengeIndex, Reward = new() { Hcoin = 5 } }));
|
||||
}
|
||||
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.StageEndRsp));
|
||||
|
||||
Reference in New Issue
Block a user