예제 #1
0
        public static void OnHealthChangedEvent(EBodyPart bodyPart, float diff, PlayerStatesInterface effect)
        {
            float partHealth  = EmuInstance.Player.HealthController.GetBodyPartHealth(bodyPart).Current;
            var   requestData = new { type = "HealthChanged", bodyPart, value = partHealth };

            SendRequest(requestData);
        }
예제 #2
0
        public static void OnEffectRemovedEvent(PlayerStatesInterface effect)
        {
            if (effect is null)
            {
                return;
            }

            OnHealthChangedEvent(effect.BodyPart, 0, effect);

            var requestData = new
            { type = "EffectRemoved", bodyPart = effect.BodyPart, effectType = effect.DisplayableVariations[0].Type };

            SendRequest(requestData);
        }