mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-02 20:26:03 +08:00
Code Format
This commit is contained in:
@@ -8,15 +8,13 @@ public class RogueNPCConfigInfo
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public RogueDialogueTypeEnum DialogueType { get; set; }
|
||||
|
||||
public List<RogueNPCDialogueConfigInfo> DialogueList { get; set; } = [];
|
||||
|
||||
public void Loaded()
|
||||
{
|
||||
if (DialogueList.Count == 0) return;
|
||||
|
||||
foreach (var info in DialogueList)
|
||||
{
|
||||
info.Loaded();
|
||||
}
|
||||
foreach (var info in DialogueList) info.Loaded();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,36 +42,36 @@ public class FloorInfo
|
||||
|
||||
// Cache anchors
|
||||
foreach (var group in Groups.Values)
|
||||
foreach (var prop in group.PropList)
|
||||
// Check if prop can be teleported to
|
||||
if (prop.AnchorID > 0)
|
||||
foreach (var prop in group.PropList)
|
||||
// Check if prop can be teleported to
|
||||
if (prop.AnchorID > 0)
|
||||
{
|
||||
// Put inside cached teleport list to send to client when they request map info
|
||||
CachedTeleports.TryAdd(prop.MappingInfoID, prop);
|
||||
UnlockedCheckpoints.Add(prop);
|
||||
|
||||
// Force prop to be in the unlocked state
|
||||
prop.State = PropStateEnum.CheckPointEnable;
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(prop.InitLevelGraph))
|
||||
{
|
||||
var json = prop.InitLevelGraph;
|
||||
|
||||
// Hacky way to setup prop triggers
|
||||
if (json.Contains("Maze_GroupProp_OpenTreasure_WhenMonsterDie"))
|
||||
{
|
||||
// Put inside cached teleport list to send to client when they request map info
|
||||
CachedTeleports.TryAdd(prop.MappingInfoID, prop);
|
||||
UnlockedCheckpoints.Add(prop);
|
||||
|
||||
// Force prop to be in the unlocked state
|
||||
prop.State = PropStateEnum.CheckPointEnable;
|
||||
//prop.Trigger = new TriggerOpenTreasureWhenMonsterDie(group.Id);
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(prop.InitLevelGraph))
|
||||
else if (json.Contains("Common_Console"))
|
||||
{
|
||||
var json = prop.InitLevelGraph;
|
||||
|
||||
// Hacky way to setup prop triggers
|
||||
if (json.Contains("Maze_GroupProp_OpenTreasure_WhenMonsterDie"))
|
||||
{
|
||||
//prop.Trigger = new TriggerOpenTreasureWhenMonsterDie(group.Id);
|
||||
}
|
||||
else if (json.Contains("Common_Console"))
|
||||
{
|
||||
prop.CommonConsole = true;
|
||||
}
|
||||
|
||||
// Clear for garbage collection
|
||||
prop.ValueSource = null;
|
||||
prop.InitLevelGraph = null;
|
||||
prop.CommonConsole = true;
|
||||
}
|
||||
|
||||
// Clear for garbage collection
|
||||
prop.ValueSource = null;
|
||||
prop.InitLevelGraph = null;
|
||||
}
|
||||
|
||||
Loaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using EggLink.DanhengServer.Data.Config;
|
||||
using EggLink.DanhengServer.Data.Config.Rogue;
|
||||
using EggLink.DanhengServer.Data.Config.Rogue;
|
||||
|
||||
namespace EggLink.DanhengServer.Data.Excel;
|
||||
|
||||
|
||||
@@ -49,9 +49,10 @@ public class LineupInfo
|
||||
if (avatarInfo != null)
|
||||
{
|
||||
if (avatarInfo.GetCurHp(IsExtraLineup()) <= 0 && !allowRevive) continue;
|
||||
if (avatarInfo.GetCurHp(IsExtraLineup()) >= 10000 && count > 0) continue; // full hp
|
||||
if (avatarInfo.GetCurHp(IsExtraLineup()) <= 0 && count < 0) continue; // dead
|
||||
avatarInfo.SetCurHp(Math.Max(Math.Min(avatarInfo.GetCurHp(IsExtraLineup()) + count, 10000), 0), IsExtraLineup());
|
||||
if (avatarInfo.GetCurHp(IsExtraLineup()) >= 10000 && count > 0) continue; // full hp
|
||||
if (avatarInfo.GetCurHp(IsExtraLineup()) <= 0 && count < 0) continue; // dead
|
||||
avatarInfo.SetCurHp(Math.Max(Math.Min(avatarInfo.GetCurHp(IsExtraLineup()) + count, 10000), 0),
|
||||
IsExtraLineup());
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
@@ -96,7 +97,7 @@ public class LineupInfo
|
||||
if (avatarInfo != null)
|
||||
{
|
||||
if (avatarInfo.CurrentHp <= 0) continue;
|
||||
avatarInfo.SetCurSp((int)Math.Min(avatarInfo.GetCurSp(IsExtraLineup()) + count, 10000), IsExtraLineup());
|
||||
avatarInfo.SetCurSp(Math.Min(avatarInfo.GetCurSp(IsExtraLineup()) + count, 10000), IsExtraLineup());
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,14 +7,13 @@ namespace EggLink.DanhengServer.Database.Player;
|
||||
[SugarTable("server_prefs_data")]
|
||||
public class ServerPrefsData : BaseDatabaseDataHelper
|
||||
{
|
||||
[SugarColumn(IsJson = true)]
|
||||
public Dictionary<int, ServerPrefsInfo> ServerPrefsDict { get; set; } = [];
|
||||
[SugarColumn(IsJson = true)] public Dictionary<int, ServerPrefsInfo> ServerPrefsDict { get; set; } = [];
|
||||
|
||||
public double Version { get; set; } = 2.4;
|
||||
|
||||
public void SetData(int prefsId, string b64Data)
|
||||
{
|
||||
ServerPrefsDict[prefsId] = new ServerPrefsInfo()
|
||||
ServerPrefsDict[prefsId] = new ServerPrefsInfo
|
||||
{
|
||||
ServerPrefsId = prefsId,
|
||||
Data = b64Data
|
||||
@@ -27,9 +26,12 @@ public class ServerPrefsInfo
|
||||
public int ServerPrefsId { get; set; }
|
||||
public string Data { get; set; } = "";
|
||||
|
||||
public ServerPrefs ToProto() => new()
|
||||
public ServerPrefs ToProto()
|
||||
{
|
||||
Data = ByteString.FromBase64(Data),
|
||||
ServerPrefsId = (uint)ServerPrefsId
|
||||
};
|
||||
return new ServerPrefs
|
||||
{
|
||||
Data = ByteString.FromBase64(Data),
|
||||
ServerPrefsId = (uint)ServerPrefsId
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -6,4 +6,4 @@ public enum RogueDialogueTypeEnum
|
||||
Story = 1,
|
||||
Event = 2,
|
||||
Store = 3
|
||||
}
|
||||
}
|
||||
@@ -7,5 +7,5 @@ public enum RogueSubModeEnum
|
||||
CosmosRogueEndless = 102,
|
||||
ChessRogue = 201,
|
||||
ChessRogueNous = 202,
|
||||
TournRogue = 301,
|
||||
}
|
||||
TournRogue = 301
|
||||
}
|
||||
@@ -288,7 +288,9 @@ public class ChessRogueInstance : BaseRogueInstance
|
||||
|
||||
LayerMap = GameConstants.AllowedChessRogueEntranceId.RandomElement();
|
||||
|
||||
CurBoardExcel = RogueSubMode == RogueSubModeEnum.ChessRogue ? GameData.RogueSwarmChessBoardData[level].RandomElement() : GameData.RogueNousChessBoardData[level].RandomElement();
|
||||
CurBoardExcel = RogueSubMode == RogueSubModeEnum.ChessRogue
|
||||
? GameData.RogueSwarmChessBoardData[level].RandomElement()
|
||||
: GameData.RogueNousChessBoardData[level].RandomElement();
|
||||
|
||||
RogueCells.Clear();
|
||||
CurCell = null;
|
||||
@@ -455,7 +457,9 @@ public class ChessRogueInstance : BaseRogueInstance
|
||||
RogueDifficultyInfo = ToDifficultyInfo(),
|
||||
VirtualItemInfo = ToVirtualItemInfo(),
|
||||
LevelInfo = ToLevelInfo(),
|
||||
PendingAction = RogueActions.Count > 0 ? RogueActions.First().Value.ToProto() : new RogueCommonPendingAction()
|
||||
PendingAction = RogueActions.Count > 0
|
||||
? RogueActions.First().Value.ToProto()
|
||||
: new RogueCommonPendingAction()
|
||||
};
|
||||
|
||||
proto.RogueCurrentGameInfo.AddRange(ToGameInfo());
|
||||
|
||||
@@ -553,7 +553,8 @@ public class InventoryManager(PlayerInstance player) : BasePlayerManager(player)
|
||||
return items;
|
||||
}
|
||||
|
||||
public async ValueTask<(Retcode, List<ItemData>? returnItems)> UseItem(int itemId, int count = 1, int baseAvatarId = 0)
|
||||
public async ValueTask<(Retcode, List<ItemData>? returnItems)> UseItem(int itemId, int count = 1,
|
||||
int baseAvatarId = 0)
|
||||
{
|
||||
GameData.ItemConfigData.TryGetValue(itemId, out var itemConfig);
|
||||
if (itemConfig == null) return (Retcode.RetItemNotExist, null);
|
||||
@@ -561,12 +562,9 @@ public class InventoryManager(PlayerInstance player) : BasePlayerManager(player)
|
||||
GameData.ItemUseBuffDataData.TryGetValue(dataId, out var useConfig);
|
||||
if (useConfig == null) return (Retcode.RetItemUseConfigNotExist, null);
|
||||
|
||||
for (int i = 0; i < count; i++) // do count times
|
||||
for (var i = 0; i < count; i++) // do count times
|
||||
{
|
||||
if (useConfig.PreviewSkillPoint != 0)
|
||||
{
|
||||
await Player.LineupManager!.GainMp((int)useConfig.PreviewSkillPoint);
|
||||
}
|
||||
if (useConfig.PreviewSkillPoint != 0) await Player.LineupManager!.GainMp((int)useConfig.PreviewSkillPoint);
|
||||
|
||||
if (baseAvatarId > 0)
|
||||
{
|
||||
@@ -578,25 +576,30 @@ public class InventoryManager(PlayerInstance player) : BasePlayerManager(player)
|
||||
|
||||
if (useConfig.PreviewHPRecoveryPercent != 0)
|
||||
{
|
||||
avatar.SetCurHp(Math.Min(Math.Max(avatar.CurrentHp + (int)(useConfig.PreviewHPRecoveryPercent * 10000), 0), 10000), extraLineup);
|
||||
avatar.SetCurHp(
|
||||
Math.Min(Math.Max(avatar.CurrentHp + (int)(useConfig.PreviewHPRecoveryPercent * 10000), 0),
|
||||
10000), extraLineup);
|
||||
|
||||
await Player.SendPacket(new PacketSyncLineupNotify(Player.LineupManager.GetCurLineup()!));
|
||||
}
|
||||
|
||||
if (useConfig.PreviewHPRecoveryValue != 0)
|
||||
{
|
||||
avatar.SetCurHp(Math.Min(Math.Max(avatar.CurrentHp + (int)useConfig.PreviewHPRecoveryValue, 0), 10000), extraLineup);
|
||||
avatar.SetCurHp(
|
||||
Math.Min(Math.Max(avatar.CurrentHp + (int)useConfig.PreviewHPRecoveryValue, 0), 10000),
|
||||
extraLineup);
|
||||
|
||||
await Player.SendPacket(new PacketSyncLineupNotify(Player.LineupManager.GetCurLineup()!));
|
||||
}
|
||||
|
||||
if (useConfig.PreviewPowerPercent != 0)
|
||||
{
|
||||
avatar.SetCurSp(Math.Min(Math.Max(avatar.CurrentHp + (int)(useConfig.PreviewPowerPercent * 10000), 0), 10000), extraLineup);
|
||||
avatar.SetCurSp(
|
||||
Math.Min(Math.Max(avatar.CurrentHp + (int)(useConfig.PreviewPowerPercent * 10000), 0), 10000),
|
||||
extraLineup);
|
||||
|
||||
await Player.SendPacket(new PacketSyncLineupNotify(Player.LineupManager.GetCurLineup()!));
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -626,22 +629,14 @@ public class InventoryManager(PlayerInstance player) : BasePlayerManager(player)
|
||||
|
||||
//maze buff
|
||||
if (useConfig.MazeBuffID > 0)
|
||||
{
|
||||
foreach (var info in Player.SceneInstance?.AvatarInfo.Values.ToList() ?? [])
|
||||
{
|
||||
if (baseAvatarId == 0 || info.AvatarInfo.GetBaseAvatarId() == baseAvatarId)
|
||||
await info.AddBuff(new SceneBuff(useConfig.MazeBuffID, 1, info.AvatarInfo.AvatarId));
|
||||
}
|
||||
}
|
||||
|
||||
if (useConfig.MazeBuffID2 > 0)
|
||||
{
|
||||
foreach (var info in Player.SceneInstance?.AvatarInfo.Values.ToList() ?? [])
|
||||
{
|
||||
if (baseAvatarId == 0 || info.AvatarInfo.GetBaseAvatarId() == baseAvatarId)
|
||||
await info.AddBuff(new SceneBuff(useConfig.MazeBuffID2, 1, info.AvatarInfo.AvatarId));
|
||||
}
|
||||
}
|
||||
|
||||
// remove item
|
||||
await RemoveItem(itemId, count);
|
||||
|
||||
@@ -359,7 +359,8 @@ public class LineupManager : BasePlayerManager
|
||||
await Player.SendPacket(new PacketSceneCastSkillMpUpdateScNotify(castEntityId, curLineup.Mp));
|
||||
}
|
||||
|
||||
public async ValueTask GainMp(int count, bool sendPacket = true, SyncLineupReason reason = SyncLineupReason.SyncReasonNone)
|
||||
public async ValueTask GainMp(int count, bool sendPacket = true,
|
||||
SyncLineupReason reason = SyncLineupReason.SyncReasonNone)
|
||||
{
|
||||
var curLineup = GetCurLineup()!;
|
||||
curLineup.Mp += count;
|
||||
|
||||
@@ -504,7 +504,6 @@ public class PlayerInstance(PlayerData data)
|
||||
if (prop.PropInfo.IsLevelBtn) await prop.SetState(PropStateEnum.Closed);
|
||||
|
||||
return prop;
|
||||
|
||||
}
|
||||
|
||||
public async ValueTask<bool> EnterScene(int entryId, int teleportId, bool sendPacket, int storyLineId = 0,
|
||||
|
||||
@@ -9,7 +9,7 @@ public class RogueBuffSelectMenu(BaseRogueInstance rogue)
|
||||
public int HintId { get; set; } = 1;
|
||||
public List<RogueBuffExcel> Buffs { get; set; } = [];
|
||||
public int RollMaxCount { get; set; } = rogue.BaseRerollCount;
|
||||
public int RollCount { get; set; } = 0;
|
||||
public int RollCount { get; set; }
|
||||
public int RollFreeCount { get; set; } = rogue.BaseRerollFreeCount;
|
||||
public int RollCost { get; set; } = rogue.CurRerollCost;
|
||||
public int QueueAppend { get; set; } = 3;
|
||||
|
||||
@@ -8,6 +8,6 @@ public class EventHandlerCostItemPercent : RogueEventCostHandler
|
||||
public override async ValueTask Handle(BaseRogueInstance rogue, RogueEventInstance? eventInstance,
|
||||
List<int> paramList)
|
||||
{
|
||||
await rogue.CostMoney((int)(rogue.CurMoney * (paramList[1] / 100f)), 0);
|
||||
await rogue.CostMoney((int)(rogue.CurMoney * (paramList[1] / 100f)));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using EggLink.DanhengServer.Enums.Rogue;
|
||||
using EggLink.DanhengServer.Proto;
|
||||
|
||||
namespace EggLink.DanhengServer.GameServer.Game.Rogue.Event.CostHandler;
|
||||
|
||||
@@ -10,6 +9,6 @@ public class EventHandlerCostItemValue : RogueEventCostHandler
|
||||
List<int> paramList)
|
||||
{
|
||||
var decreaseMoney = paramList[1];
|
||||
await rogue.CostMoney(decreaseMoney, 0);
|
||||
await rogue.CostMoney(decreaseMoney);
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,8 @@ public class EventHandlerRepeatableGamble : RogueEventEffectHandler
|
||||
option.Ratio = paramList[1] / 100f;
|
||||
}
|
||||
|
||||
public override async ValueTask Handle(BaseRogueInstance rogue, RogueEventInstance? eventInstance, List<int> paramList, RogueEventParam? option)
|
||||
public override async ValueTask Handle(BaseRogueInstance rogue, RogueEventInstance? eventInstance,
|
||||
List<int> paramList, RogueEventParam? option)
|
||||
{
|
||||
if (option == null) return;
|
||||
if (eventInstance == null) return;
|
||||
@@ -35,4 +36,4 @@ public class EventHandlerRepeatableGamble : RogueEventEffectHandler
|
||||
await rogue.TriggerEvent(eventInstance, paramList[3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace EggLink.DanhengServer.GameServer.Game.Rogue.Event.EffectHandler;
|
||||
using EggLink.DanhengServer.Enums.Rogue;
|
||||
|
||||
using EggLink.DanhengServer.Enums.Rogue;
|
||||
namespace EggLink.DanhengServer.GameServer.Game.Rogue.Event.EffectHandler;
|
||||
|
||||
[RogueEvent(DialogueEventTypeEnum.TriggerBattle)]
|
||||
public class EventHandlerTriggerBattle : RogueEventEffectHandler
|
||||
@@ -21,4 +21,4 @@ public class EventHandlerTriggerBattle : RogueEventEffectHandler
|
||||
});
|
||||
await ValueTask.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,7 +90,7 @@ public class RogueEventParam
|
||||
OptionId = (uint)OptionId,
|
||||
DisplayValue = new RogueCommonDialogueOptionDisplayInfo
|
||||
{
|
||||
DisplayFloatValue = Ratio,
|
||||
DisplayFloatValue = Ratio
|
||||
},
|
||||
OptionResultInfo = { Results.Select(x => x.ToProto()) },
|
||||
Confirm = OverrideSelected ?? IsSelected
|
||||
@@ -110,11 +110,12 @@ public class RogueEventParam
|
||||
public class RogueEventResultInfo
|
||||
{
|
||||
public int BattleEventId { get; set; }
|
||||
|
||||
public RogueCommonDialogueOptionResultInfo ToProto()
|
||||
{
|
||||
return new RogueCommonDialogueOptionResultInfo()
|
||||
return new RogueCommonDialogueOptionResultInfo
|
||||
{
|
||||
BattleResultInfo = new RogueCommonDialogueOptionBattleResultInfo()
|
||||
BattleResultInfo = new RogueCommonDialogueOptionBattleResultInfo
|
||||
{
|
||||
BattleEventId = (uint)BattleEventId
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ public class RogueEventManager
|
||||
if (EffectHandler.TryGetValue(dialogueEvent.RogueEffectType, out var effectHandler))
|
||||
effectHandler.Init(Rogue, eventInstance, param, option);
|
||||
}
|
||||
|
||||
await Player.SendPacket(new PacketSyncRogueCommonDialogueDataScNotify(eventInstance));
|
||||
}
|
||||
|
||||
@@ -114,6 +115,7 @@ public class RogueEventManager
|
||||
await Player.SendPacket(new PacketSelectRogueCommonDialogueOptionScRsp());
|
||||
return;
|
||||
}
|
||||
|
||||
await Player.SendPacket(new PacketSyncRogueCommonDialogueDataScNotify(eventInstance));
|
||||
|
||||
var param = dialogueEvent.RogueEffectParamList;
|
||||
|
||||
@@ -10,8 +10,11 @@ public class HandlerUseItemCsReq : Handler
|
||||
public override async Task OnHandle(Connection connection, byte[] header, byte[] data)
|
||||
{
|
||||
var req = UseItemCsReq.Parser.ParseFrom(data);
|
||||
var result = await connection.Player!.InventoryManager!.UseItem((int)req.UseItemId, (int)req.UseItemCount, (int)req.BaseAvatarId);
|
||||
var result =
|
||||
await connection.Player!.InventoryManager!.UseItem((int)req.UseItemId, (int)req.UseItemCount,
|
||||
(int)req.BaseAvatarId);
|
||||
|
||||
await connection.SendPacket(new PacketUseItemScRsp(result.Item1, req.UseItemId, req.UseItemCount, result.returnItems));
|
||||
await connection.SendPacket(new PacketUseItemScRsp(result.Item1, req.UseItemId, req.UseItemCount,
|
||||
result.returnItems));
|
||||
}
|
||||
}
|
||||
@@ -11,4 +11,4 @@ public class HandlerGetAllServerPrefsDataCsReq : Handler
|
||||
var infos = connection.Player?.ServerPrefsData?.ServerPrefsDict.Values.ToList() ?? [];
|
||||
await connection.SendPacket(new PacketGetAllServerPrefsDataScRsp(infos));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,4 +15,4 @@ public class HandlerGetServerPrefsDataCsReq : Handler
|
||||
|
||||
await connection.SendPacket(new PacketGetServerPrefsDataScRsp(info, req.ServerPrefsId));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,9 @@ public class HandlerUpdateServerPrefsDataCsReq : Handler
|
||||
public override async Task OnHandle(Connection connection, byte[] header, byte[] data)
|
||||
{
|
||||
var req = UpdateServerPrefsDataCsReq.Parser.ParseFrom(data);
|
||||
|
||||
connection.Player?.ServerPrefsData?.SetData((int)req.ServerPrefs.ServerPrefsId, req.ServerPrefs.Data.ToBase64());
|
||||
|
||||
connection.Player?.ServerPrefsData?.SetData((int)req.ServerPrefs.ServerPrefsId,
|
||||
req.ServerPrefs.Data.ToBase64());
|
||||
await connection.SendPacket(new PacketUpdateServerPrefsDataScRsp(req.ServerPrefs.ServerPrefsId));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,8 @@ namespace EggLink.DanhengServer.GameServer.Server.Packet.Send.Item;
|
||||
|
||||
public class PacketUseItemScRsp : BasePacket
|
||||
{
|
||||
public PacketUseItemScRsp(Retcode retCode, uint itemId, uint count, List<ItemData>? returnItems) : base(CmdIds.UseItemScRsp)
|
||||
public PacketUseItemScRsp(Retcode retCode, uint itemId, uint count, List<ItemData>? returnItems) : base(
|
||||
CmdIds.UseItemScRsp)
|
||||
{
|
||||
var proto = new UseItemScRsp
|
||||
{
|
||||
@@ -18,10 +19,7 @@ public class PacketUseItemScRsp : BasePacket
|
||||
if (returnItems != null)
|
||||
{
|
||||
proto.ReturnData = new ItemList();
|
||||
foreach (var item in returnItems)
|
||||
{
|
||||
proto.ReturnData.ItemList_.Add(item.ToProto());
|
||||
}
|
||||
foreach (var item in returnItems) proto.ReturnData.ItemList_.Add(item.ToProto());
|
||||
}
|
||||
|
||||
SetData(proto);
|
||||
|
||||
@@ -11,13 +11,10 @@ public class PacketSyncLineupNotify : BasePacket
|
||||
{
|
||||
var proto = new SyncLineupNotify
|
||||
{
|
||||
Lineup = info.ToProto(),
|
||||
Lineup = info.ToProto()
|
||||
};
|
||||
|
||||
if (reason != SyncLineupReason.SyncReasonNone)
|
||||
{
|
||||
proto.ReasonList.Add(reason);
|
||||
}
|
||||
if (reason != SyncLineupReason.SyncReasonNone) proto.ReasonList.Add(reason);
|
||||
|
||||
SetData(proto);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ public class PacketMonthCardRewardNotify : BasePacket
|
||||
Reward = new ItemList
|
||||
{
|
||||
ItemList_ = { items.Select(x => x.ToProto()) }
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -23,13 +23,11 @@ public class PacketSelectRogueCommonDialogueOptionScRsp : BasePacket
|
||||
}
|
||||
|
||||
foreach (var option in rogueEvent.Options)
|
||||
{
|
||||
if (option.OverrideSelected ?? option.IsSelected)
|
||||
{
|
||||
proto.EventHasEffect = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SetData(proto);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,8 @@ public class PacketSyncRogueCommonActionResultScNotify : BasePacket
|
||||
SetData(proto);
|
||||
}
|
||||
|
||||
public PacketSyncRogueCommonActionResultScNotify(RogueSubModeEnum rogueSubmode, List<RogueCommonActionResult> results,
|
||||
public PacketSyncRogueCommonActionResultScNotify(RogueSubModeEnum rogueSubmode,
|
||||
List<RogueCommonActionResult> results,
|
||||
RogueCommonActionResultDisplayType displayType = RogueCommonActionResultDisplayType.None) : base(
|
||||
CmdIds.SyncRogueCommonActionResultScNotify)
|
||||
{
|
||||
|
||||
@@ -7,8 +7,9 @@ namespace EggLink.DanhengServer.GameServer.Server.Packet.Send.RogueCommon;
|
||||
|
||||
public class PacketSyncRogueCommonPendingActionScNotify : BasePacket
|
||||
{
|
||||
public PacketSyncRogueCommonPendingActionScNotify(RogueActionInstance actionInstance, RogueSubModeEnum rogueSubmode) : base(
|
||||
CmdIds.SyncRogueCommonPendingActionScNotify)
|
||||
public PacketSyncRogueCommonPendingActionScNotify(RogueActionInstance actionInstance, RogueSubModeEnum rogueSubmode)
|
||||
: base(
|
||||
CmdIds.SyncRogueCommonPendingActionScNotify)
|
||||
{
|
||||
var proto = new SyncRogueCommonPendingActionScNotify
|
||||
{
|
||||
|
||||
@@ -10,10 +10,7 @@ public class PacketGetAllServerPrefsDataScRsp : BasePacket
|
||||
{
|
||||
var proto = new GetAllServerPrefsDataScRsp();
|
||||
|
||||
foreach (var info in infos)
|
||||
{
|
||||
proto.CFHMFEBMJIK.Add(info.ToProto());
|
||||
}
|
||||
foreach (var info in infos) proto.CFHMFEBMJIK.Add(info.ToProto());
|
||||
|
||||
SetData(proto);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ public class PacketGetServerPrefsDataScRsp : BasePacket
|
||||
{
|
||||
var proto = new GetServerPrefsDataScRsp
|
||||
{
|
||||
ServerPrefs = info?.ToProto() ?? new Proto.ServerPrefs()
|
||||
ServerPrefs = info?.ToProto() ?? new Proto.ServerPrefs
|
||||
{
|
||||
Data = ByteString.Empty,
|
||||
ServerPrefsId = id
|
||||
|
||||
Reference in New Issue
Block a user