Glider and wall run

This commit is contained in:
xeon 2024-02-22 01:51:39 +03:00
parent a46dc434d8
commit ec7db3384d
3 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,20 @@
using Protocol;
namespace GameServer.Systems.Entity.Component;
internal class EntityFightBuffComponent : EntityComponentBase
{
public List<FightBuffInformation> BuffInfoList { get; } = [];
public override EntityComponentType Type => EntityComponentType.FightBuff;
public override EntityComponentPb Pb => new()
{
FightBuffComponent = new()
{
FightBuffInfos =
{
BuffInfoList
}
}
};
}

View file

@ -30,6 +30,7 @@ internal abstract class EntityBase
State = EntityState.Born; State = EntityState.Born;
_ = ComponentSystem.Create<EntityLogicStateComponent>(); _ = ComponentSystem.Create<EntityLogicStateComponent>();
_ = ComponentSystem.Create<EntityFightBuffComponent>();
} }
public virtual void Activate() public virtual void Activate()

View file

@ -46,6 +46,32 @@ internal class PlayerEntity : EntityBase
_ = ComponentSystem.Create<EntityEquipComponent>(); _ = ComponentSystem.Create<EntityEquipComponent>();
_ = ComponentSystem.Create<EntityAttributeComponent>(); _ = ComponentSystem.Create<EntityAttributeComponent>();
// TODO: temporary solution to enable glider and wall run, should implement proper buff management.
EntityFightBuffComponent fightBuffComponent = ComponentSystem.Get<EntityFightBuffComponent>();
fightBuffComponent.BuffInfoList.Add(new FightBuffInformation
{
BuffId = 3004,
EntityId = Id,
InstigatorId = Id,
IsActive = true,
Duration = -1,
LeftDuration = -1,
Level = 1,
StackCount = 1
});
fightBuffComponent.BuffInfoList.Add(new FightBuffInformation
{
BuffId = 3003,
EntityId = Id,
InstigatorId = Id,
IsActive = true,
Duration = -1,
LeftDuration = -1,
Level = 1,
StackCount = 1
});
} }
public override void Activate() public override void Activate()