Glider and wall run
This commit is contained in:
parent
a46dc434d8
commit
ec7db3384d
3 changed files with 47 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
|
@ -30,6 +30,7 @@ internal abstract class EntityBase
|
|||
State = EntityState.Born;
|
||||
|
||||
_ = ComponentSystem.Create<EntityLogicStateComponent>();
|
||||
_ = ComponentSystem.Create<EntityFightBuffComponent>();
|
||||
}
|
||||
|
||||
public virtual void Activate()
|
||||
|
|
|
@ -46,6 +46,32 @@ internal class PlayerEntity : EntityBase
|
|||
|
||||
_ = ComponentSystem.Create<EntityEquipComponent>();
|
||||
_ = 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()
|
||||
|
|
Loading…
Reference in a new issue