mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-02 20:26:03 +08:00
fix some bug
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using EggLink.DanhengServer.Util;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using EggLink.DanhengServer.Database.Mission;
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using static System.Formats.Asn1.AsnWriter;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using EggLink.DanhengServer.Data.Excel;
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using EggLink.DanhengServer.Util;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using EggLink.DanhengServer.Util;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Avatar;
|
||||
using EggLink.DanhengServer.Util;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using EggLink.DanhengServer.Data.Config;
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Avatar;
|
||||
using EggLink.DanhengServer.Enums.Item;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Item;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Item;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Avatar;
|
||||
|
||||
namespace EggLink.DanhengServer.Data.Excel
|
||||
{
|
||||
|
||||
25
Common/Data/Excel/RogueBonusExcel.cs
Normal file
25
Common/Data/Excel/RogueBonusExcel.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Data.Excel
|
||||
{
|
||||
[ResourceEntity("RogueBonus.json")]
|
||||
public class RogueBonusExcel : ExcelResource
|
||||
{
|
||||
public int BonusID { get; set; }
|
||||
public int BonusEvent { get; set; }
|
||||
|
||||
public override int GetId()
|
||||
{
|
||||
return BonusID;
|
||||
}
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.RogueBonusData.Add(GetId(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
28
Common/Data/Excel/RogueBuffExcel.cs
Normal file
28
Common/Data/Excel/RogueBuffExcel.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Data.Excel
|
||||
{
|
||||
[ResourceEntity("RogueBuff.json")]
|
||||
public class RogueBuffExcel : ExcelResource
|
||||
{
|
||||
public int MazeBuffID { get; set; }
|
||||
public int MazeBuffLevel { get; set; }
|
||||
public int RogueBuffType { get; set; }
|
||||
public int RogueBuffRarity { get; set; }
|
||||
public int RogueBuffTag { get; set; }
|
||||
|
||||
public override int GetId()
|
||||
{
|
||||
return MazeBuffID * 100 + MazeBuffLevel;
|
||||
}
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.RogueBuffData.Add(GetId(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
73
Common/Data/Excel/RogueBuffGroupExcel.cs
Normal file
73
Common/Data/Excel/RogueBuffGroupExcel.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
using EggLink.DanhengServer.Util;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Data.Excel
|
||||
{
|
||||
[ResourceEntity("RogueBuffGroup.json")]
|
||||
public class RogueBuffGroupExcel : ExcelResource
|
||||
{
|
||||
[JsonProperty("EGDAIIJDDPA")]
|
||||
public int GroupID { get; set; }
|
||||
|
||||
[JsonProperty("AMGHNOBDGLM")]
|
||||
public List<int> BuffTagList { get; set; } = [];
|
||||
|
||||
[JsonIgnore]
|
||||
public List<RogueBuffExcel> BuffList { get; set; } = [];
|
||||
|
||||
[JsonIgnore]
|
||||
public bool IsLoaded { get; set; }
|
||||
|
||||
public override int GetId()
|
||||
{
|
||||
return GroupID;
|
||||
}
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.RogueBuffGroupData.Add(GetId(), this);
|
||||
LoadBuff();
|
||||
}
|
||||
|
||||
public override void AfterAllDone()
|
||||
{
|
||||
LoadBuff();
|
||||
}
|
||||
|
||||
public void LoadBuff()
|
||||
{
|
||||
if (IsLoaded)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var count = 0;
|
||||
foreach (var buffID in BuffTagList)
|
||||
{
|
||||
if (GameData.RogueBuffData.FirstOrDefault(x => x.Value.RogueBuffTag == buffID).Value is RogueBuffExcel buff)
|
||||
{
|
||||
BuffList.SafeAdd(buff);
|
||||
count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// might is group id
|
||||
if (GameData.RogueBuffGroupData.TryGetValue(buffID, out var group))
|
||||
{
|
||||
group.LoadBuff();
|
||||
BuffList.SafeAddRange(group.BuffList);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (count == BuffTagList.Count)
|
||||
{
|
||||
IsLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
28
Common/Data/Excel/RogueHandBookEventExcel.cs
Normal file
28
Common/Data/Excel/RogueHandBookEventExcel.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Data.Excel
|
||||
{
|
||||
[ResourceEntity("RogueHandBookEvent.json")]
|
||||
public class RogueHandBookEventExcel : ExcelResource
|
||||
{
|
||||
public int EventID { get; set; }
|
||||
public HashName EventTitle { get; set; } = new();
|
||||
|
||||
public int EventReward { get; set; }
|
||||
public List<int> EventTypeList { get; set; } = [];
|
||||
|
||||
public override int GetId()
|
||||
{
|
||||
return EventID;
|
||||
}
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.RogueHandBookEventData.Add(GetId(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
27
Common/Data/Excel/RogueHandbookMiracleExcel.cs
Normal file
27
Common/Data/Excel/RogueHandbookMiracleExcel.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Data.Excel
|
||||
{
|
||||
[ResourceEntity("RogueHandbookMiracle.json")]
|
||||
public class RogueHandbookMiracleExcel : ExcelResource
|
||||
{
|
||||
public int MiracleHandbookID { get; set; }
|
||||
public int MiracleReward { get; set; }
|
||||
|
||||
public List<int> MiracleTypeList { get; set; } = [];
|
||||
|
||||
public override int GetId()
|
||||
{
|
||||
return MiracleHandbookID;
|
||||
}
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.RogueHandbookMiracleData.Add(GetId(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
27
Common/Data/Excel/RogueMazeBuffExcel.cs
Normal file
27
Common/Data/Excel/RogueMazeBuffExcel.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Data.Excel
|
||||
{
|
||||
[ResourceEntity("RogueMazeBuff.json")]
|
||||
public class RogueMazeBuffExcel : ExcelResource
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public int Lv { get; set; }
|
||||
public int LvMax { get; set; }
|
||||
public HashName BuffName { get; set; } = new();
|
||||
|
||||
public override int GetId()
|
||||
{
|
||||
return ID * 100 + Lv;
|
||||
}
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.RogueMazeBuffData.Add(GetId(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
25
Common/Data/Excel/RogueMiracleDisplayExcel.cs
Normal file
25
Common/Data/Excel/RogueMiracleDisplayExcel.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Data.Excel
|
||||
{
|
||||
[ResourceEntity("RogueMiracleDisplay.json")]
|
||||
public class RogueMiracleDisplayExcel : ExcelResource
|
||||
{
|
||||
public int MiracleDisplayID { get; set; }
|
||||
public HashName MiracleName { get; set; } = new();
|
||||
|
||||
public override int GetId()
|
||||
{
|
||||
return MiracleDisplayID;
|
||||
}
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.RogueMiracleDisplayData.Add(GetId(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
32
Common/Data/Excel/RogueMiracleEffectExcel.cs
Normal file
32
Common/Data/Excel/RogueMiracleEffectExcel.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using EggLink.DanhengServer.Enums.Rogue;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Data.Excel
|
||||
{
|
||||
[ResourceEntity("RogueMiracleEffect.json")]
|
||||
public class RogueMiracleEffectExcel : ExcelResource
|
||||
{
|
||||
public int MiracleEffectID { get; set; }
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public RogueMiracleEffectTypeEnum MiracleEffectType { get; set; }
|
||||
|
||||
public List<int> ParamList { get; set; } = [];
|
||||
|
||||
public override int GetId()
|
||||
{
|
||||
return MiracleEffectID;
|
||||
}
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.RogueMiracleEffectData.Add(GetId(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using EggLink.DanhengServer.Database;
|
||||
using EggLink.DanhengServer.Database.Avatar;
|
||||
using EggLink.DanhengServer.Database.Player;
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Avatar;
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
@@ -7,12 +7,18 @@ namespace EggLink.DanhengServer.Data
|
||||
{
|
||||
public static class GameData
|
||||
{
|
||||
#region Avatar
|
||||
|
||||
public static Dictionary<int, AvatarConfigExcel> AvatarConfigData { get; private set; } = [];
|
||||
public static Dictionary<int, AvatarPromotionConfigExcel> AvatarPromotionConfigData { get; private set; } = [];
|
||||
public static Dictionary<int, AvatarExpItemConfigExcel> AvatarExpItemConfigData { get; private set; } = [];
|
||||
public static Dictionary<int, AvatarSkillTreeConfigExcel> AvatarSkillTreeConfigData { get; private set; } = [];
|
||||
public static Dictionary<int, ExpTypeExcel> ExpTypeData { get; private set; } = [];
|
||||
|
||||
#endregion
|
||||
|
||||
#region Battle
|
||||
|
||||
public static Dictionary<int, CocoonConfigExcel> CocoonConfigData { get; private set; } = [];
|
||||
public static Dictionary<int, StageConfigExcel> StageConfigData { get; private set; } = [];
|
||||
public static Dictionary<int, RaidConfigExcel> RaidConfigData { get; private set; } = [];
|
||||
@@ -21,16 +27,29 @@ namespace EggLink.DanhengServer.Data
|
||||
public static Dictionary<int, NPCMonsterDataExcel> NpcMonsterDataData { get; private set; } = [];
|
||||
public static Dictionary<int, MonsterConfigExcel> MonsterConfigData { get; private set; } = [];
|
||||
public static Dictionary<int, MonsterDropExcel> MonsterDropData { get; private set; } = [];
|
||||
public static Dictionary<int, NPCDataExcel> NpcDataData { get; private set; } = [];
|
||||
|
||||
#endregion
|
||||
|
||||
#region Player
|
||||
|
||||
public static Dictionary<int, QuestDataExcel> QuestDataData { get; private set; } = [];
|
||||
public static Dictionary<int, PlayerLevelConfigExcel> PlayerLevelConfigData { get; private set; } = [];
|
||||
|
||||
#endregion
|
||||
|
||||
#region Maze
|
||||
|
||||
public static Dictionary<int, NPCDataExcel> NpcDataData { get; private set; } = [];
|
||||
public static Dictionary<string, FloorInfo> FloorInfoData { get; private set; } = [];
|
||||
public static Dictionary<int, MapEntranceExcel> MapEntranceData { get; private set; } = [];
|
||||
public static Dictionary<int, MazePlaneExcel> MazePlaneData { get; private set; } = [];
|
||||
public static Dictionary<int, MazePropExcel> MazePropData { get; private set; } = [];
|
||||
public static Dictionary<int, PlaneEventExcel> PlaneEventData { get; private set; } = [];
|
||||
|
||||
#endregion
|
||||
|
||||
#region Items
|
||||
|
||||
public static Dictionary<int, ItemConfigExcel> ItemConfigData { get; private set; } = [];
|
||||
public static Dictionary<int, EquipmentConfigExcel> EquipmentConfigData { get; private set; } = [];
|
||||
public static Dictionary<int, EquipmentExpTypeExcel> EquipmentExpTypeData { get; private set; } = [];
|
||||
@@ -40,9 +59,17 @@ namespace EggLink.DanhengServer.Data
|
||||
public static Dictionary<int, Dictionary<int, RelicSubAffixConfigExcel>> RelicSubAffixData { get; private set; } = []; // groupId, affixId
|
||||
public static Dictionary<int, RelicConfigExcel> RelicConfigData { get; private set; } = [];
|
||||
|
||||
#endregion
|
||||
|
||||
#region Special Avatar
|
||||
|
||||
public static Dictionary<int, SpecialAvatarExcel> SpecialAvatarData { get; private set; } = [];
|
||||
public static Dictionary<int, SpecialAvatarRelicExcel> SpecialAvatarRelicData { get; private set; } = [];
|
||||
|
||||
#endregion
|
||||
|
||||
#region Mission
|
||||
|
||||
public static Dictionary<int, MainMissionExcel> MainMissionData { get; private set; } = [];
|
||||
public static Dictionary<int, SubMissionExcel> SubMissionData { get; private set; } = [];
|
||||
public static Dictionary<int, RewardDataExcel> RewardDataData { get; private set; } = [];
|
||||
@@ -51,14 +78,38 @@ namespace EggLink.DanhengServer.Data
|
||||
public static Dictionary<int, MessageContactsConfigExcel> MessageContactsConfigData { get; private set; } = [];
|
||||
public static Dictionary<int, MessageItemConfigExcel> MessageItemConfigData { get; private set; } = [];
|
||||
|
||||
#endregion
|
||||
|
||||
#region Item Exchange
|
||||
|
||||
public static Dictionary<int, ShopConfigExcel> ShopConfigData { get; private set; } = [];
|
||||
public static Dictionary<int, ItemComposeConfigExcel> ItemComposeConfigData { get; private set; } = [];
|
||||
|
||||
#endregion
|
||||
|
||||
#region Rogue
|
||||
|
||||
public static Dictionary<int, RogueAeonExcel> RogueAeonData { get; private set; } = [];
|
||||
public static Dictionary<int, RogueBonusExcel> RogueBonusData { get; private set; } = [];
|
||||
public static Dictionary<int, RogueBuffExcel> RogueBuffData { get; private set; } = [];
|
||||
public static Dictionary<int, RogueBuffGroupExcel> RogueBuffGroupData { get; private set; } = [];
|
||||
public static Dictionary<int, RogueHandBookEventExcel> RogueHandBookEventData { get; private set; } = [];
|
||||
public static Dictionary<int, RogueHandbookMiracleExcel> RogueHandbookMiracleData { get; private set; } = [];
|
||||
public static Dictionary<int, RogueManagerExcel> RogueManagerData { get; private set; } = [];
|
||||
public static Dictionary<int, RogueMazeBuffExcel> RogueMazeBuffData { get; private set; } = [];
|
||||
public static Dictionary<int, RogueMiracleDisplayExcel> RogueMiracleDisplayData { get; private set; } = [];
|
||||
public static Dictionary<int, RogueMiracleEffectExcel> RogueMiracleEffectData { get; private set; } = [];
|
||||
|
||||
#endregion
|
||||
|
||||
#region Banners
|
||||
|
||||
public static BannersConfig BannersConfig { get; set; } = new();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Actions
|
||||
|
||||
public static void GetFloorInfo(int planeId, int floorId, out FloorInfo outer)
|
||||
{
|
||||
FloorInfoData.TryGetValue("P" + planeId + "_F" + floorId, out outer!);
|
||||
@@ -121,5 +172,7 @@ namespace EggLink.DanhengServer.Data
|
||||
{
|
||||
return Math.Max(Math.Min((int)((level - 11) / 10D), 6), 0);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using SqlSugar;
|
||||
|
||||
namespace EggLink.DanhengServer.Database.Scene
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Enums
|
||||
namespace EggLink.DanhengServer.Enums.Avatar
|
||||
{
|
||||
public enum DamageTypeEnum
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EggLink.DanhengServer.Enums
|
||||
namespace EggLink.DanhengServer.Enums.Avatar
|
||||
{
|
||||
public enum RelicTypeEnum
|
||||
{
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Enums
|
||||
namespace EggLink.DanhengServer.Enums.Avatar
|
||||
{
|
||||
public enum SpecialAvatarTypeEnum
|
||||
{
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Enums
|
||||
namespace EggLink.DanhengServer.Enums.Avatar
|
||||
{
|
||||
public enum TaskTypeEnum
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EggLink.DanhengServer.Enums
|
||||
namespace EggLink.DanhengServer.Enums.Item
|
||||
{
|
||||
public enum ItemMainTypeEnum
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EggLink.DanhengServer.Enums
|
||||
namespace EggLink.DanhengServer.Enums.Item
|
||||
{
|
||||
public enum ItemRarityEnum
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EggLink.DanhengServer.Enums
|
||||
namespace EggLink.DanhengServer.Enums.Item
|
||||
{
|
||||
public enum ItemSubTypeEnum
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EggLink.DanhengServer.Enums
|
||||
namespace EggLink.DanhengServer.Enums.Item
|
||||
{
|
||||
public enum ItemUseMethodEnum
|
||||
{
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Enums
|
||||
namespace EggLink.DanhengServer.Enums.Item
|
||||
{
|
||||
public enum RarityEnum
|
||||
{
|
||||
64
Common/Enums/Rogue/RogueMiracleEffectTypeEnum.cs
Normal file
64
Common/Enums/Rogue/RogueMiracleEffectTypeEnum.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Enums.Rogue
|
||||
{
|
||||
public enum RogueMiracleEffectTypeEnum
|
||||
{
|
||||
None = 0,
|
||||
ExtraBuffSelectReduceNumber = 1,
|
||||
ExtraFreeBuffRoll = 2,
|
||||
SetSelectBuffLevel = 3,
|
||||
ReviveLineupAvatar = 4,
|
||||
ExtraBuffRandomCount = 5,
|
||||
AddMazeBuffAfterMonsterKill = 6,
|
||||
SetSelectBuffGroupCount = 7,
|
||||
AddMazeBuff = 8,
|
||||
ChangeItemRatio = 9,
|
||||
ChangeCostRatio = 10,
|
||||
ChangeItemRatioOnNextRoom = 11,
|
||||
AddRogueBuffGroupNumber = 12,
|
||||
RepairRandomMiracle = 13,
|
||||
UpgradeRandomBuff = 14,
|
||||
ReplaceAllMiracles = 15,
|
||||
SetBattleWinOnBattleFail = 16,
|
||||
StartDestructPropExtraMiracle = 17,
|
||||
ChangePropDestructNumber = 18,
|
||||
StartDestructPropRecord = 19,
|
||||
ChangeCurrentItemImmediately = 20,
|
||||
ChangeAllRogueAvatarLineupDataByCurrent = 21,
|
||||
ChangePropHitResultRatio = 22,
|
||||
GetItemWithFullHpCountAfterMonsterKill = 23,
|
||||
StartDestructPropExtraBuff = 24,
|
||||
AddMiracleFromListOnBattleWin = 25,
|
||||
SetIsBattleTriggerNoBuffSelect = 26,
|
||||
MultipleItemRatio = 27,
|
||||
GetOrRemoveItemOnEnterRoom = 28,
|
||||
SetCountByConsumeItem = 29,
|
||||
ReplaceAllBuffs = 30,
|
||||
AddCurAeonBuffWithRandomCnt = 31, // minCount, maxCount, aeonId, buffGroup, aeonId, buffGroup, ...
|
||||
SetSelectBuffRandomEnhance = 32,
|
||||
SelectMazeBuffOnSelectAeon = 33,
|
||||
GetItem = 34,
|
||||
TurnBlockTypeToTarget = 35,
|
||||
AddMazeBuffOnEnterCellWithBlockType = 36,
|
||||
SetCountByEnterCellType = 37,
|
||||
ChangeRogueShopDiscountRatio = 38,
|
||||
GetDiceRollNum = 39,
|
||||
ModifyBuffTypeCount = 40,
|
||||
ModifyAdventureRoomTime = 41,
|
||||
GetRogueCoinWithNotify = 42,
|
||||
AccumulateCoinRecord = 43,
|
||||
AdventureRoomExtraGroup = 44,
|
||||
GetCoinByBlockType = 45,
|
||||
SetDiceReRollNum = 46,
|
||||
SetDiceReRollFree = 47,
|
||||
RoomRepeatedSurfaceUseMiracle = 48,
|
||||
RefreshBuffSelectGuaranteedAeonBuff = 49,
|
||||
UseMiracleByEnterCellType = 50,
|
||||
ModifyDiceSurfaceWeightByRarity = 51,
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Enums
|
||||
namespace EggLink.DanhengServer.Enums.Scene
|
||||
{
|
||||
public enum GroupLoadSideEnum
|
||||
{
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Enums
|
||||
namespace EggLink.DanhengServer.Enums.Scene
|
||||
{
|
||||
public enum PlaneTypeEnum
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EggLink.DanhengServer.Enums
|
||||
namespace EggLink.DanhengServer.Enums.Scene
|
||||
{
|
||||
public enum PropStateEnum
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EggLink.DanhengServer.Enums
|
||||
namespace EggLink.DanhengServer.Enums.Scene
|
||||
{
|
||||
public enum PropTypeEnum
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EggLink.DanhengServer.Enums
|
||||
namespace EggLink.DanhengServer.Enums.Scene
|
||||
{
|
||||
public enum SaveTypeEnum
|
||||
{
|
||||
@@ -6,6 +6,8 @@ namespace EggLink.DanhengServer.Util;
|
||||
|
||||
public static class Extensions
|
||||
{
|
||||
#region Kcp Utils
|
||||
|
||||
public static string JoinFormat<T>(this IEnumerable<T> list, string separator,
|
||||
string formatString)
|
||||
{
|
||||
@@ -70,6 +72,8 @@ public static class Extensions
|
||||
bw.Write(data);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static Position ToPosition(this Vector vector)
|
||||
{
|
||||
return new Position
|
||||
@@ -91,6 +95,22 @@ public static class Extensions
|
||||
return new Random().Next(from, to);
|
||||
}
|
||||
|
||||
public static void SafeAdd<T>(this List<T> list, T item)
|
||||
{
|
||||
if (!list.Contains(item))
|
||||
{
|
||||
list.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
public static void SafeAddRange<T>(this List<T> list, List<T> item)
|
||||
{
|
||||
foreach (var i in item)
|
||||
{
|
||||
list.SafeAdd(i);
|
||||
}
|
||||
}
|
||||
|
||||
public static long GetUnixSec()
|
||||
{
|
||||
return DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using EggLink.DanhengServer.Game.Scene.Entity;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using EggLink.DanhengServer.Game.Scene.Entity;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -53,8 +54,8 @@ namespace EggLink.DanhengServer.Command.Cmd
|
||||
arg.SendMsg("Prop not found");
|
||||
return;
|
||||
}
|
||||
prop.SetState((Enums.PropStateEnum)arg.GetInt(2));
|
||||
arg.SendMsg($"Prop: {prop.EntityID} has been set to {(Enums.PropStateEnum)arg.GetInt(2)}");
|
||||
prop.SetState((PropStateEnum)arg.GetInt(2));
|
||||
arg.SendMsg($"Prop: {prop.EntityID} has been set to {(PropStateEnum)arg.GetInt(2)}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using EggLink.DanhengServer.Data.Config;
|
||||
using EggLink.DanhengServer.Data.Excel;
|
||||
using EggLink.DanhengServer.Enums.Avatar;
|
||||
using EggLink.DanhengServer.Game.Battle.Skill.Action;
|
||||
using EggLink.DanhengServer.Game.Scene;
|
||||
using EggLink.DanhengServer.Game.Scene.Entity;
|
||||
@@ -33,30 +34,30 @@ namespace EggLink.DanhengServer.Game.Battle.Skill
|
||||
{
|
||||
switch (task.TaskType)
|
||||
{
|
||||
case Enums.TaskTypeEnum.None:
|
||||
case TaskTypeEnum.None:
|
||||
break;
|
||||
case Enums.TaskTypeEnum.AddMazeBuff:
|
||||
case TaskTypeEnum.AddMazeBuff:
|
||||
Actions.Add(new MazeAddMazeBuff(task.ID, task.LifeTime.GetLifeTime()));
|
||||
break;
|
||||
case Enums.TaskTypeEnum.RemoveMazeBuff:
|
||||
case TaskTypeEnum.RemoveMazeBuff:
|
||||
Actions.RemoveAll(a => a is MazeAddMazeBuff buff && buff.BuffId == task.ID);
|
||||
break;
|
||||
case Enums.TaskTypeEnum.AdventureModifyTeamPlayerHP:
|
||||
case TaskTypeEnum.AdventureModifyTeamPlayerHP:
|
||||
break;
|
||||
case Enums.TaskTypeEnum.AdventureModifyTeamPlayerSP:
|
||||
case TaskTypeEnum.AdventureModifyTeamPlayerSP:
|
||||
break;
|
||||
case Enums.TaskTypeEnum.CreateSummonUnit:
|
||||
case TaskTypeEnum.CreateSummonUnit:
|
||||
break;
|
||||
case Enums.TaskTypeEnum.AdventureSetAttackTargetMonsterDie:
|
||||
case TaskTypeEnum.AdventureSetAttackTargetMonsterDie:
|
||||
Actions.Add(new MazeSetTargetMonsterDie());
|
||||
break;
|
||||
case Enums.TaskTypeEnum.SuccessTaskList:
|
||||
case TaskTypeEnum.SuccessTaskList:
|
||||
foreach (var t in task.SuccessTaskList)
|
||||
{
|
||||
AddAction(t);
|
||||
}
|
||||
break;
|
||||
case Enums.TaskTypeEnum.AdventureTriggerAttack:
|
||||
case TaskTypeEnum.AdventureTriggerAttack:
|
||||
if (IsMazeSkill)
|
||||
{
|
||||
TriggerBattle = task.TriggerBattle;
|
||||
@@ -67,7 +68,7 @@ namespace EggLink.DanhengServer.Game.Battle.Skill
|
||||
AddAction(t);
|
||||
}
|
||||
break;
|
||||
case Enums.TaskTypeEnum.AdventureFireProjectile:
|
||||
case TaskTypeEnum.AdventureFireProjectile:
|
||||
foreach (var t in task.OnProjectileHit)
|
||||
{
|
||||
AddAction(t);
|
||||
|
||||
@@ -4,6 +4,7 @@ using EggLink.DanhengServer.Database.Gacha;
|
||||
using EggLink.DanhengServer.Database.Inventory;
|
||||
using EggLink.DanhengServer.Database.Message;
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Item;
|
||||
using EggLink.DanhengServer.Game.Player;
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using System.Numerics;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using EggLink.DanhengServer.Data;
|
||||
using EggLink.DanhengServer.Database;
|
||||
using EggLink.DanhengServer.Database.Inventory;
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Item;
|
||||
using EggLink.DanhengServer.Game.Player;
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using EggLink.DanhengServer.Server.Packet.Send.Avatar;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using EggLink.DanhengServer.Data.Config;
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using EggLink.DanhengServer.Game.Player;
|
||||
using EggLink.DanhengServer.Game.Scene.Entity;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using EggLink.DanhengServer.Database.Player;
|
||||
using EggLink.DanhengServer.Database.Scene;
|
||||
using EggLink.DanhengServer.Database.Tutorial;
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using EggLink.DanhengServer.Game.Avatar;
|
||||
using EggLink.DanhengServer.Game.Battle;
|
||||
using EggLink.DanhengServer.Game.Gacha;
|
||||
|
||||
21
GameServer/Game/Rogue/Buff/RogueBuffInstance.cs
Normal file
21
GameServer/Game/Rogue/Buff/RogueBuffInstance.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Game.Rogue.Buff
|
||||
{
|
||||
public class RogueBuffInstance(int buffId, int buffLevel)
|
||||
{
|
||||
public int BuffId { get; set; } = buffId;
|
||||
public int BuffLevel { get; set; } = buffLevel;
|
||||
|
||||
public RogueBuff ToProto() => new()
|
||||
{
|
||||
BuffId = (uint)BuffId,
|
||||
Level = (uint)BuffLevel
|
||||
};
|
||||
}
|
||||
}
|
||||
21
GameServer/Game/Rogue/Miracle/RogueMiracleInstance.cs
Normal file
21
GameServer/Game/Rogue/Miracle/RogueMiracleInstance.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Game.Rogue.Miracle
|
||||
{
|
||||
public class RogueMiracleInstance
|
||||
{
|
||||
|
||||
public RogueMiracle ToProto() // TODO: Implement
|
||||
{
|
||||
return new()
|
||||
{
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
43
GameServer/Game/Rogue/RogueActionInstance.cs
Normal file
43
GameServer/Game/Rogue/RogueActionInstance.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Game.Rogue
|
||||
{
|
||||
public class RogueActionInstance
|
||||
{
|
||||
public int QueuePosition { get; set; } = 0;
|
||||
public RogueCommonBuffSelectInfo? RogueCommonBuffSelectInfo { get; set; }
|
||||
public RogueMiracleSelectInfo? RogueMiracleSelectInfo { get; set; }
|
||||
public RogueBonusSelectInfo? RogueBonusSelectInfo { get; set; }
|
||||
|
||||
public RogueCommonPendingAction ToProto()
|
||||
{
|
||||
var action = new RogueAction();
|
||||
|
||||
if (RogueCommonBuffSelectInfo != null)
|
||||
{
|
||||
action.BuffSelectInfo = RogueCommonBuffSelectInfo;
|
||||
}
|
||||
|
||||
if (RogueMiracleSelectInfo != null)
|
||||
{
|
||||
action.MiracleSelectInfo = RogueMiracleSelectInfo;
|
||||
}
|
||||
|
||||
if (RogueBonusSelectInfo != null)
|
||||
{
|
||||
action.BonusSelectInfo = RogueBonusSelectInfo;
|
||||
}
|
||||
|
||||
return new()
|
||||
{
|
||||
QueuePosition = (uint)QueuePosition,
|
||||
RogueAction = action
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
123
GameServer/Game/Rogue/RogueInstance.cs
Normal file
123
GameServer/Game/Rogue/RogueInstance.cs
Normal file
@@ -0,0 +1,123 @@
|
||||
using EggLink.DanhengServer.Data.Excel;
|
||||
using EggLink.DanhengServer.Game.Rogue.Buff;
|
||||
using EggLink.DanhengServer.Game.Rogue.Miracle;
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using EggLink.DanhengServer.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Game.Rogue
|
||||
{
|
||||
public class RogueInstance
|
||||
{
|
||||
#region Properties
|
||||
|
||||
public int RogueVersionId { get; set; } = 101;
|
||||
public RogueStatus Status { get; set; } = RogueStatus.Doing;
|
||||
public Dictionary<int, RogueMiracleInstance> RogueMiracles { get; set; } = [];
|
||||
public int AeonId { get; set; } = 0;
|
||||
public Database.Lineup.LineupInfo CurLineup { get; set; } = new();
|
||||
public int CurReviveCost { get; set; } = 80;
|
||||
public List<RogueBuffInstance> RogueBuffs { get; set; } = [];
|
||||
|
||||
public SortedDictionary<int, RogueActionInstance> RogueActions { get; set; } = []; // queue_position -> action
|
||||
|
||||
#endregion
|
||||
|
||||
#region Serialization
|
||||
|
||||
public RogueCurrentInfo ToProto()
|
||||
{
|
||||
var proto = new RogueCurrentInfo()
|
||||
{
|
||||
Status = Status,
|
||||
GameMiracleInfo = ToMiracleInfo(),
|
||||
RogueAeonInfo = ToAeonInfo(),
|
||||
RogueLineupInfo = ToLineupInfo(),
|
||||
RogueBuffInfo = ToBuffInfo(),
|
||||
RogueVirtualItem = ToVirtualItemInfo(),
|
||||
MapInfo = ToMapInfo()
|
||||
};
|
||||
|
||||
if (RogueActions.Count > 0)
|
||||
{
|
||||
proto.PendingAction = RogueActions.First().Value.ToProto();
|
||||
}
|
||||
|
||||
return proto;
|
||||
}
|
||||
|
||||
public GameMiracleInfo ToMiracleInfo()
|
||||
{
|
||||
var proto = new GameMiracleInfo()
|
||||
{
|
||||
GameMiracleInfo_ = new()
|
||||
};
|
||||
foreach (var miracle in RogueMiracles.Values)
|
||||
{
|
||||
proto.GameMiracleInfo_.MiracleList.Add(miracle.ToProto());
|
||||
}
|
||||
return proto;
|
||||
}
|
||||
|
||||
public GameAeonInfo ToAeonInfo()
|
||||
{
|
||||
return new()
|
||||
{
|
||||
AeonId = (uint)AeonId,
|
||||
IsUnlocked = AeonId != 0,
|
||||
UnlockedAeonEnhanceNum = (uint)(AeonId != 0 ? 3 : 0)
|
||||
};
|
||||
}
|
||||
|
||||
public RogueLineupInfo ToLineupInfo()
|
||||
{
|
||||
var proto = new RogueLineupInfo();
|
||||
|
||||
foreach (var avatar in CurLineup.BaseAvatars!)
|
||||
{
|
||||
proto.BaseAvatarIdList.Add((uint)avatar.BaseAvatarId);
|
||||
}
|
||||
|
||||
proto.ReviveInfo = new()
|
||||
{
|
||||
// need to implement
|
||||
};
|
||||
|
||||
return proto;
|
||||
}
|
||||
|
||||
public RogueBuffInfo ToBuffInfo()
|
||||
{
|
||||
var proto = new RogueBuffInfo();
|
||||
|
||||
foreach (var buff in RogueBuffs)
|
||||
{
|
||||
proto.MazeBuffList.Add(buff.ToProto());
|
||||
}
|
||||
|
||||
return proto;
|
||||
}
|
||||
|
||||
public RogueVirtualItem ToVirtualItemInfo()
|
||||
{
|
||||
return new()
|
||||
{
|
||||
// need to implement
|
||||
};
|
||||
}
|
||||
|
||||
public RogueMapInfo ToMapInfo()
|
||||
{
|
||||
return new()
|
||||
{
|
||||
// need to implement
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -13,12 +13,19 @@ namespace EggLink.DanhengServer.Game.Rogue
|
||||
{
|
||||
public class RogueManager(PlayerInstance player) : BasePlayerManager(player)
|
||||
{
|
||||
#region Properties
|
||||
|
||||
public RogueInstance? RogueInstances { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Information
|
||||
|
||||
/// <summary>
|
||||
/// Get the begin time and end time
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public (long, long) GetCurrentRogueTime()
|
||||
public static (long, long) GetCurrentRogueTime()
|
||||
{
|
||||
// get the first day of the week
|
||||
var beginTime = DateTime.Now.AddDays(-(int)DateTime.Now.DayOfWeek).AddHours(4);
|
||||
@@ -28,7 +35,7 @@ namespace EggLink.DanhengServer.Game.Rogue
|
||||
|
||||
public int GetRogueScore() => 0; // TODO: Implement
|
||||
|
||||
public RogueManagerExcel? GetCurrentManager()
|
||||
public static RogueManagerExcel? GetCurrentManager()
|
||||
{
|
||||
foreach (var manager in GameData.RogueManagerData.Values)
|
||||
{
|
||||
@@ -40,17 +47,35 @@ namespace EggLink.DanhengServer.Game.Rogue
|
||||
return null;
|
||||
}
|
||||
|
||||
public RogueGetInfo ToProto()
|
||||
#endregion
|
||||
|
||||
#region Serialization
|
||||
|
||||
public RogueInfo ToProto()
|
||||
{
|
||||
var proto = new RogueGetInfo()
|
||||
var proto = new RogueInfo()
|
||||
{
|
||||
RogueGetInfo = ToGetProto()
|
||||
};
|
||||
|
||||
if (RogueInstances != null)
|
||||
{
|
||||
proto.RogueCurrentInfo = RogueInstances.ToProto();
|
||||
}
|
||||
|
||||
return proto;
|
||||
}
|
||||
|
||||
public RogueGetInfo ToGetProto()
|
||||
{
|
||||
return new()
|
||||
{
|
||||
RogueScoreRewardInfo = ToRewardProto(),
|
||||
RogueAeonInfo = ToAeonInfo(),
|
||||
RogueSeasonInfo = ToSeasonProto(),
|
||||
RogueAreaInfo = ToAreaProto(),
|
||||
RogueVirtualItemInfo = ToVirtualItemProto()
|
||||
};
|
||||
|
||||
return proto;
|
||||
}
|
||||
|
||||
public RogueScoreRewardInfo ToRewardProto()
|
||||
@@ -68,7 +93,7 @@ namespace EggLink.DanhengServer.Game.Rogue
|
||||
};
|
||||
}
|
||||
|
||||
public RogueAeonInfo ToAeonInfo()
|
||||
public static RogueAeonInfo ToAeonInfo()
|
||||
{
|
||||
var proto = new RogueAeonInfo()
|
||||
{
|
||||
@@ -82,7 +107,7 @@ namespace EggLink.DanhengServer.Game.Rogue
|
||||
return proto;
|
||||
}
|
||||
|
||||
public RogueSeasonInfo ToSeasonProto()
|
||||
public static RogueSeasonInfo ToSeasonProto()
|
||||
{
|
||||
var manager = GetCurrentManager();
|
||||
if (manager == null)
|
||||
@@ -98,7 +123,7 @@ namespace EggLink.DanhengServer.Game.Rogue
|
||||
};
|
||||
}
|
||||
|
||||
public RogueAreaInfo ToAreaProto()
|
||||
public static RogueAreaInfo ToAreaProto()
|
||||
{
|
||||
var manager = GetCurrentManager();
|
||||
if (manager == null)
|
||||
@@ -111,8 +136,19 @@ namespace EggLink.DanhengServer.Game.Rogue
|
||||
{
|
||||
AreaId = (uint)x,
|
||||
AreaStatus = RogueAreaStatus.FirstPass,
|
||||
HasTakenReward = true
|
||||
})}
|
||||
};
|
||||
}
|
||||
|
||||
public RogueVirtualItemInfo ToVirtualItemProto()
|
||||
{
|
||||
return new()
|
||||
{
|
||||
// TODO: Implement
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using EggLink.DanhengServer.Data.Config;
|
||||
using EggLink.DanhengServer.Data.Excel;
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using EggLink.DanhengServer.Game.Battle;
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using EggLink.DanhengServer.Server.Packet.Send.Scene;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using EggLink.DanhengServer.Data;
|
||||
using EggLink.DanhengServer.Data.Config;
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using EggLink.DanhengServer.Game.Scene.Entity;
|
||||
using EggLink.DanhengServer.Server.Packet.Send.Scene;
|
||||
using EggLink.DanhengServer.Util;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using EggLink.DanhengServer.Data;
|
||||
using EggLink.DanhengServer.Database;
|
||||
using EggLink.DanhengServer.Database.Inventory;
|
||||
using EggLink.DanhengServer.Enums.Item;
|
||||
using EggLink.DanhengServer.Game.Player;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -26,7 +27,7 @@ namespace EggLink.DanhengServer.Game.Shop
|
||||
Player.InventoryManager!.RemoveItem(cost.Key, cost.Value * count);
|
||||
}
|
||||
var items = new List<ItemData>();
|
||||
if (itemConfig.ItemMainType == Enums.ItemMainTypeEnum.Equipment || itemConfig.ItemMainType == Enums.ItemMainTypeEnum.Relic)
|
||||
if (itemConfig.ItemMainType == ItemMainTypeEnum.Equipment || itemConfig.ItemMainType == ItemMainTypeEnum.Relic)
|
||||
{
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
|
||||
@@ -55,6 +55,16 @@ namespace EggLink.DanhengServer.Handbook
|
||||
builder.AppendLine();
|
||||
GenerateSubMissionId(builder, textMap);
|
||||
|
||||
builder.AppendLine();
|
||||
builder.AppendLine("#RogueBuff");
|
||||
builder.AppendLine();
|
||||
GenerateRogueBuff(builder, textMap);
|
||||
|
||||
builder.AppendLine();
|
||||
builder.AppendLine("#RogueMiracle");
|
||||
builder.AppendLine();
|
||||
GenerateRogueMiracleDisplay(builder, textMap);
|
||||
|
||||
builder.AppendLine();
|
||||
WriteToFile(builder.ToString());
|
||||
|
||||
@@ -108,6 +118,24 @@ namespace EggLink.DanhengServer.Handbook
|
||||
}
|
||||
}
|
||||
|
||||
public static void GenerateRogueBuff(StringBuilder builder, Dictionary<long, string> map)
|
||||
{
|
||||
foreach (var buff in GameData.RogueMazeBuffData)
|
||||
{
|
||||
var name = map.TryGetValue(buff.Value.BuffName.Hash, out var value) ? value : $"[{buff.Value.BuffName.Hash}]";
|
||||
builder.AppendLine(buff.Key + ": " + name + " --- Level:" + buff.Value.Lv);
|
||||
}
|
||||
}
|
||||
|
||||
public static void GenerateRogueMiracleDisplay(StringBuilder builder, Dictionary<long, string> map)
|
||||
{
|
||||
foreach (var display in GameData.RogueMiracleDisplayData.Values)
|
||||
{
|
||||
var name = map.TryGetValue(display.MiracleName.Hash, out var value) ? value : $"[{display.MiracleName.Hash}]";
|
||||
builder.AppendLine(display.MiracleDisplayID + ": " + name);
|
||||
}
|
||||
}
|
||||
|
||||
public static void WriteToFile(string content)
|
||||
{
|
||||
File.WriteAllText(HandbookPath, content);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using EggLink.DanhengServer.Server.Packet.Send.Rogue;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -11,7 +12,7 @@ namespace EggLink.DanhengServer.Server.Packet.Recv.Rogue
|
||||
{
|
||||
public override void OnHandle(Connection connection, byte[] header, byte[] data)
|
||||
{
|
||||
connection.SendPacket(CmdIds.GetRogueHandbookDataScRsp);
|
||||
connection.SendPacket(new PacketGetRogueHandbookDataScRsp());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using EggLink.DanhengServer.Server.Packet.Send.Rogue;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -11,7 +12,7 @@ namespace EggLink.DanhengServer.Server.Packet.Recv.Rogue
|
||||
{
|
||||
public override void OnHandle(Connection connection, byte[] header, byte[] data)
|
||||
{
|
||||
connection.SendPacket(CmdIds.GetRogueInfoScRsp);
|
||||
connection.SendPacket(new PacketGetRogueInfoScRsp(connection.Player!));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using EggLink.DanhengServer.Database.Avatar;
|
||||
using EggLink.DanhengServer.Database.Inventory;
|
||||
using EggLink.DanhengServer.Database.Message;
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Item;
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
using EggLink.DanhengServer.Data;
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Rogue
|
||||
{
|
||||
public class PacketGetRogueHandbookDataScRsp : BasePacket
|
||||
{
|
||||
public PacketGetRogueHandbookDataScRsp() : base(CmdIds.GetRogueHandbookDataScRsp)
|
||||
{
|
||||
var proto = new GetRogueHandbookDataScRsp
|
||||
{
|
||||
HandbookInfo = new()
|
||||
};
|
||||
|
||||
foreach (var item in GameData.RogueHandbookMiracleData)
|
||||
{
|
||||
proto.HandbookInfo.MiracleList.Add(new EHJPAIBFIPK()
|
||||
{
|
||||
HAGLJCEAMEK = (uint)item.Value.MiracleHandbookID,
|
||||
HasTakenReward = true,
|
||||
});
|
||||
}
|
||||
|
||||
foreach (var item in GameData.RogueMazeBuffData)
|
||||
{
|
||||
if (item.Value.Lv != 1)
|
||||
continue;
|
||||
proto.HandbookInfo.BuffList.Add(new NIDCBKKJJMH()
|
||||
{
|
||||
MazeBuffId = (uint)item.Value.ID,
|
||||
});
|
||||
}
|
||||
|
||||
foreach (var item in GameData.RogueAeonData)
|
||||
{
|
||||
proto.HandbookInfo.RogueAeonList.Add(new DKNNNMJKPNO()
|
||||
{
|
||||
AeonId = (uint)item.Value.AeonID,
|
||||
});
|
||||
}
|
||||
|
||||
foreach (var item in GameData.RogueHandBookEventData)
|
||||
{
|
||||
proto.HandbookInfo.EventList.Add(new MMEGPGAAPDG()
|
||||
{
|
||||
BFHDEKMCJJA = (uint)item.Value.EventID,
|
||||
HasTakenReward = true,
|
||||
});
|
||||
}
|
||||
|
||||
SetData(proto);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using EggLink.DanhengServer.Game.Player;
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Rogue
|
||||
{
|
||||
public class PacketGetRogueInfoScRsp : BasePacket
|
||||
{
|
||||
public PacketGetRogueInfoScRsp(PlayerInstance player) : base(CmdIds.GetRogueInfoScRsp)
|
||||
{
|
||||
var proto = new GetRogueInfoScRsp()
|
||||
{
|
||||
RogueInfo = player.RogueManager!.ToProto(),
|
||||
};
|
||||
|
||||
SetData(proto);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using EggLink.DanhengServer.Data;
|
||||
using EggLink.DanhengServer.Data.Config;
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using EggLink.DanhengServer.Game.Player;
|
||||
using EggLink.DanhengServer.Proto;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using EggLink.DanhengServer.Enums;
|
||||
using EggLink.DanhengServer.Enums.Scene;
|
||||
using EggLink.DanhengServer.Proto;
|
||||
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Scene
|
||||
|
||||
Reference in New Issue
Block a user