Ejemplo n.º 1
0
        private async Task <bool> UseFullCircle(AppViewModel app)
        {
            if (!app.Options.Config.EnableFullCircle)
            {
                return(false);
            }
            if (app.Healer.Player.Pet.HealthPercent < 1)
            {
                return(false);
            }
            var petEntity       = app.Healer.Entity.GetEntity((int)app.Healer.Player.Pet.TargetID);
            var geoTargetPlayer = app.ActivePlayers.FirstOrDefault(p => p.IsGeoTarget);
            var geoEntity       = geoTargetPlayer == null
                                ? app.Healer.Entity.GetEntity((int)app.Healer.Player.TargetID)
                                : app.Healer.Entity.GetEntity((int)geoTargetPlayer.Member.TargetIndex);

            var distance = PlayerUtilities.GetDistance(petEntity, geoEntity);

            if (distance > 12 && await app.Actions.UseAbility("Full Circle"))
            {
                return(true);
            }

            return(false);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Update player vitals
        /// </summary>
        private void UpdatePlayerInfo(AppViewModel app, EliteAPI.PartyMember member)
        {
            var healer       = app.Healer.Entity.GetLocalPlayer();
            var player       = app.Players.ElementAt(member.MemberNumber);
            var playerEntity = app.Healer.Entity.GetEntity((int)member.TargetIndex);

            if (member.Active > 0)
            {
                player.Name               = member.Name;
                player.CurrentHp          = member.CurrentHP;
                player.CurrentHpp         = member.CurrentHPP;
                player.DistanceFromHealer = PlayerUtilities.GetDistance(healer, playerEntity);
                player.Member             = member;
            }
            else
            {
                player.Name               = "";
                player.CurrentHp          = 0;
                player.CurrentHpp         = 0;
                player.DistanceFromHealer = double.MaxValue;
                player.Member             = null;
            }
        }