Files
DanhengServer-OpenSource/GameServer/Game/Rogue/RogueActionInstance.cs
2024-10-04 12:18:36 +08:00

46 lines
1.6 KiB
C#

using EggLink.DanhengServer.GameServer.Game.Rogue.Buff;
using EggLink.DanhengServer.GameServer.Game.Rogue.Miracle;
using EggLink.DanhengServer.GameServer.Game.RogueTourn.Formula;
using EggLink.DanhengServer.Proto;
namespace EggLink.DanhengServer.GameServer.Game.Rogue;
public class RogueActionInstance
{
public int QueuePosition { get; set; } = 0;
public RogueBuffSelectMenu? RogueBuffSelectMenu { get; set; }
public RogueMiracleSelectMenu? RogueMiracleSelectMenu { get; set; }
public RogueBonusSelectInfo? RogueBonusSelectInfo { get; set; }
public RogueFormulaSelectMenu? RogueFormulaSelectMenu { get; set; }
public bool IsReforge { get; set; }
public void SetBonus()
{
RogueBonusSelectInfo = new RogueBonusSelectInfo
{
BonusIdList = { 4, 5, 6 }
};
}
public RogueCommonPendingAction ToProto()
{
var action = new RogueAction();
if (RogueBuffSelectMenu != null && !IsReforge) action.BuffSelectInfo = RogueBuffSelectMenu.ToProto();
if (RogueBuffSelectMenu != null && IsReforge) action.BuffReforgeSelectInfo = RogueBuffSelectMenu.ToReforgeProto();
if (RogueMiracleSelectMenu != null) action.MiracleSelectInfo = RogueMiracleSelectMenu.ToProto();
if (RogueBonusSelectInfo != null) action.BonusSelectInfo = RogueBonusSelectInfo;
if (RogueFormulaSelectMenu != null) action.RogueFormulaSelectInfo = RogueFormulaSelectMenu.ToProto();
return new RogueCommonPendingAction
{
QueuePosition = (uint)QueuePosition,
RogueAction = action
};
}
}