/// <summary> /// Heals the player by specified amount /// </summary> /// <param name="session"></param> /// <param name="amount"></param> public void Heal(PlayerSession session, float amount) { EntityEffectFluid effect = new EntityEffectFluid(EntityFluidEffectKeyDatabase.Instance.Health, EEntityEffectFluidModifierType.AddValuePure, amount); EntityStats stats = session.WorldPlayerEntity.GetComponent <EntityStats>(); effect.Apply(stats); }
/// <summary> /// Damages the player by specified amount /// </summary> /// <param name="session"></param> /// <param name="amount"></param> public void Hurt(PlayerSession session, float amount) { var effect = new EntityEffectFluid(EEntityFluidEffectType.Damage, EEntityEffectFluidModifierType.AddValuePure, -amount); var stats = session.WorldPlayerEntity.GetComponent <EntityStats>(); effect.Apply(stats); }
/// <summary> /// Heals the user's character by specified amount /// </summary> /// <param name="amount"></param> public void Heal(float amount) { var effect = new EntityEffectFluid(EEntityFluidEffectType.Health, EEntityEffectFluidModifierType.AddValuePure, amount); var stats = session.WorldPlayerEntity.GetComponent <EntityStats>(); effect.Apply(stats); }
/// <summary> /// Damages the player by specified amount /// </summary> /// <param name="session"></param> /// <param name="amount"></param> public void Hurt(PlayerSession session, float amount) { #if ITEMV2 var effect = new EntityEffectFluid(EntityFluidEffectKeyDatabase.Instance.Damage, EEntityEffectFluidModifierType.AddValuePure, -amount); #else var effect = new EntityEffectFluid(EEntityFluidEffectType.Damage, EEntityEffectFluidModifierType.AddValuePure, -amount); #endif var stats = session.WorldPlayerEntity.GetComponent <EntityStats>(); effect.Apply(stats); }