public PlayerStatesInterface[] GetAllEffects(EBodyPart bodyPart) { return(new PlayerStatesInterface[] { }); }
public bool IsBodyPartDestroyed(EBodyPart bodyPart) { return(false); }
public TEffect FindActiveEffect <TEffect>(EBodyPart bodyPart = EBodyPart.Common) where TEffect : PlayerStatesInterface { return((TEffect)(object)null); }
public static void SetPlayerDamageInfoS(PlayerEntity source, PlayerEntity target, float damage, EBodyPart part) { if (!source.hasPosition) { Logger.Error("damage source player has no position"); return; } if (!source.hasEntityKey) { Logger.Error("damage source has no entity key"); return; } if (!target.hasNetwork) { Logger.Error("damage target has no network component"); return; } var pos = source.position.Value; var msg = PlayerDamageInfoMessage.Allocate(); msg.EntityId = source.entityKey.Value.EntityId; msg.Damage = damage; msg.PosX = pos.x; msg.PosZ = pos.z; SendMessage(msg, target); }
public static void OnBodyPartDestroyedEvent(EBodyPart bodyPart, EDamageType damageType) { var requestData = new { type = "BodyPartDestroyed", bodyPart, damageType }; SendRequest(requestData); }
public bool IsBodyPartBroken(EBodyPart bodyPart) { return(false); }
public static void SetPlayerDamageInfoC(PlayerEntity source, PlayerEntity target, float damage, EBodyPart part) { if (Logger.IsDebugEnabled) { Logger.DebugFormat("SetPlayerDamageInfo {0} in {1}", damage, part); } if (!source.isFlagSelf) { return; } if (!source.hasAttackDamage) { source.AddAttackDamage(part, damage); } else { source.attackDamage.HitPart = part; source.attackDamage.Damage = damage; } }
public void ApplyItem(Item item, EBodyPart bodyPart, float?amount = null) { }
public BodyPartStruct GetBodyPartHealth(EBodyPart bodyPart, bool rounded = false) { return(new BodyPartStruct { Current = float.MaxValue, Maximum = float.MaxValue }); }
public IEnumerable <TEffect> FindActiveEffects <TEffect>(EBodyPart bodyPart = EBodyPart.Common) where TEffect : PlayerStatesInterface { return(new List <TEffect>()); }
public EBodyPart?CanApplyItem(Item item, EBodyPart bodyPart) { return(null); }
public static void DoPlayerDamage(Contexts contexts, PlayerEntity sourcePlayer, PlayerEntity targetPlayer, float damage, EUIDeadType hitType = EUIDeadType.VehicleHit, EBodyPart hitPart = EBodyPart.Chest, int weaponId = 0) { BulletPlayerUtility.ProcessPlayerHealthDamage(contexts, _damager, sourcePlayer, targetPlayer, new PlayerDamageInfo(damage, (int)hitType, (int)hitPart, weaponId)); }
public static float GetPlayerFactor(RaycastHit hit, MeleeFireLogicConfig config, EBodyPart part) { var factor = 1f; for (int i = 0; i < config.DamageFactor.Length; i++) { if (config.DamageFactor[i].BodyPart == part) { factor = config.DamageFactor[i].Factor; break; } } return(factor); }
public void OnHealthChangedEvent(EBodyPart bodyPart, float diff, StDamage effect) { CurrentHealth.Health[bodyPart].ChangeHealth(diff); _simpleTimer.isHealthSynchronized = false; }
private void SetCurrentHealth(IHealthController healthController, IReadOnlyDictionary <EBodyPart, BodyPartHealth> dictionary, EBodyPart bodyPart) { var bodyPartHealth = healthController.GetBodyPartHealth(bodyPart); dictionary[bodyPart].Initialize(bodyPartHealth.Current, bodyPartHealth.Maximum); // set effects if (healthController.IsBodyPartBroken(bodyPart)) { dictionary[bodyPart].AddEffect(BodyPartEffect.BreakPart); } else { dictionary[bodyPart].RemoveEffect(BodyPartEffect.BreakPart); } }
public Equipable(EItemID id, string name, List <IItemEffect> onUseEffects, EBodyPart bodyPart) : base(id, name, onUseEffects) { BodyPart = bodyPart; }