From 32b7c987bf2e43bae863f0c74765e21c3f0a9744 Mon Sep 17 00:00:00 2001 From: xeon Date: Fri, 23 Feb 2024 16:00:08 +0300 Subject: [PATCH] Set EnergyMax to 0 when UnlimitedEnergy enabled, more fields in Concomitants --- GameServer/Controllers/CreatureController.cs | 1 + .../Systems/Entity/Component/EntityConcomitantsComponent.cs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/GameServer/Controllers/CreatureController.cs b/GameServer/Controllers/CreatureController.cs index 560e8fb..221c416 100644 --- a/GameServer/Controllers/CreatureController.cs +++ b/GameServer/Controllers/CreatureController.cs @@ -266,6 +266,7 @@ internal class CreatureController : Controller if (_gameplayFeatures.UnlimitedEnergy) { EntityAttributeComponent attr = entity.ComponentSystem.Get(); + attr.SetAttribute(EAttributeType.EnergyMax, 0); attr.SetAttribute(EAttributeType.SpecialEnergy1Max, 0); attr.SetAttribute(EAttributeType.SpecialEnergy2Max, 0); attr.SetAttribute(EAttributeType.SpecialEnergy3Max, 0); diff --git a/GameServer/Systems/Entity/Component/EntityConcomitantsComponent.cs b/GameServer/Systems/Entity/Component/EntityConcomitantsComponent.cs index 2e966fe..5223e8f 100644 --- a/GameServer/Systems/Entity/Component/EntityConcomitantsComponent.cs +++ b/GameServer/Systems/Entity/Component/EntityConcomitantsComponent.cs @@ -4,6 +4,8 @@ namespace GameServer.Systems.Entity.Component; internal class EntityConcomitantsComponent : EntityComponentBase { public List CustomEntityIds { get; } + public long PhantomRoleEntityId { get; set; } + public long VisionEntityId { get; set; } public EntityConcomitantsComponent() { @@ -19,6 +21,10 @@ internal class EntityConcomitantsComponent : EntityComponentBase EntityComponentPb pb = new() { ConcomitantsComponentPb = new() + { + PhantomRoleEid = PhantomRoleEntityId, + VisionEntityId = VisionEntityId + } }; pb.ConcomitantsComponentPb.CustomEntityIds.AddRange(CustomEntityIds);