mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-02 20:26:03 +08:00
feat: avatar global buff
This commit is contained in:
18
Common/Data/Excel/AvatarGlobalBuffConfigExcel.cs
Normal file
18
Common/Data/Excel/AvatarGlobalBuffConfigExcel.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace EggLink.DanhengServer.Data.Excel;
|
||||
|
||||
[ResourceEntity("AvatarGlobalBuffConfig.json")]
|
||||
public class AvatarGlobalBuffConfigExcel : ExcelResource
|
||||
{
|
||||
public int AvatarID { get; set; }
|
||||
public int MazeBuffID { get; set; }
|
||||
|
||||
public override int GetId()
|
||||
{
|
||||
return MazeBuffID;
|
||||
}
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.AvatarGlobalBuffConfigData.TryAdd(MazeBuffID, this);
|
||||
}
|
||||
}
|
||||
@@ -48,6 +48,7 @@ public static class GameData
|
||||
#region Avatar
|
||||
|
||||
public static Dictionary<int, AvatarConfigExcel> AvatarConfigData { get; private set; } = [];
|
||||
public static Dictionary<int, AvatarGlobalBuffConfigExcel> AvatarGlobalBuffConfigData { get; private set; } = [];
|
||||
|
||||
public static Dictionary<int, AdventureAbilityConfigListInfo> AdventureAbilityConfigListData { get; private set; } =
|
||||
[];
|
||||
|
||||
@@ -277,6 +277,19 @@ public class BattleInstance(PlayerInstance player, LineupInfo lineup, List<Stage
|
||||
proto.BattleTargetInfo.Add((uint)i, battleTargetEntry);
|
||||
}
|
||||
|
||||
// global buff
|
||||
foreach (var buff in GameData.AvatarGlobalBuffConfigData.Values)
|
||||
{
|
||||
if (Player.AvatarManager!.GetFormalAvatar(buff.AvatarID) != null)
|
||||
{
|
||||
// add buff
|
||||
Buffs.Add(new MazeBuff(buff.MazeBuffID, 1, -1)
|
||||
{
|
||||
WaveFlag = -1
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var buff in Buffs)
|
||||
{
|
||||
if (buff.WaveFlag != null) continue;
|
||||
|
||||
Reference in New Issue
Block a user