Esempio n. 1
0
        private static async Task <bool> Protect()
        {
            if (!SuritoSettingsModel.Instance.UseProtect)
            {
                return(false);
            }

            if (PartyManager.IsInParty)
            {
                if (CombatHelper.LastSpell == Spells.Protect || ActionManager.LastSpell == Spells.Protect ||
                    !SuritoSettingsModel.Instance.UseProtectInCombat && PartyMembers.Any(pm => pm.InCombat) ||
                    PartyMembers.Any(pm => pm.Icon == PlayerIcon.Viewing_Cutscene) ||
                    HealManager.All(hm => hm.HasAura(Auras.Protect)) ||
                    HealManager.Any(hm => hm.CurrentHealthPercent <= SuritoSettingsModel.Instance.PhysickHpPct || hm.IsDead))
                {
                    return(false);
                }
            }

            var target = HealManager.FirstOrDefault(hm => !hm.HasAura(Auras.Protect));

            if (target == null)
            {
                return(false);
            }

            return(await Spells.Protect.CastBuff(target, CombatHelper.LastSpell != Spells.Protect, Auras.Protect));
        }
Esempio n. 2
0
        public DataContext()
        {
            foreach (var item in Info.Instance().Chars)
            {
                if (item.Value == 0)
                {
                    continue;
                }
                Charactors.Add(new Charactor(0x72FDA + 86 * (uint)(item.Value - 1), item.Name));
            }

            for (uint i = 0; i < 0x1000; i++)
            {
                Items.Add(new Item(0xF21A + i * 97));
            }

            for (uint i = 0; i < 7; i++)
            {
                PartyMembers.Add(new Member(0x73234 + i * 4));
            }
            for (uint i = 0; i < 3; i++)
            {
                BattleMembers.Add(new Member(0x73250 + i * 4));
            }
        }
        public void SetAllyInCommand(AllyMember _setToCommand)
        {
            bool _validSet = _setToCommand != null &&
                             _setToCommand.GetComponent <AllyMember>() != null &&
                             PartyMembers.Contains(_setToCommand);

            if (_validSet)
            {
                gamemaster.CallOnAllySwitch(this, _setToCommand, AllyInCommand);
                if (AllyInCommand != null)
                {
                    AllyInCommand.allyEventHandler.CallEventSwitchingFromCom();
                }

                AllyInCommand = _setToCommand;
                AllyInCommand.allyEventHandler.CallEventSetAsCommander();
                //Set PartySwitching Event Afterwards for more accurate party data retreival
                foreach (var _ally in PartyMembers)
                {
                    if (_ally != null && _ally.IsAlive)
                    {
                        _ally.allyEventHandler.CallEventPartySwitching();
                    }
                }
            }
        }
 public void Update(DestinyProfileTransitoryComponent?other)
 {
     if (other is null)
     {
         return;
     }
     if (!PartyMembers.DeepEqualsList(other.PartyMembers))
     {
         PartyMembers = other.PartyMembers;
         OnPropertyChanged(nameof(PartyMembers));
     }
     if (!CurrentActivity.DeepEquals(other.CurrentActivity))
     {
         CurrentActivity.Update(other.CurrentActivity);
         OnPropertyChanged(nameof(CurrentActivity));
     }
     if (!Joinability.DeepEquals(other.Joinability))
     {
         Joinability.Update(other.Joinability);
         OnPropertyChanged(nameof(Joinability));
     }
     if (!Tracking.DeepEqualsList(other.Tracking))
     {
         Tracking = other.Tracking;
         OnPropertyChanged(nameof(Tracking));
     }
     if (LastOrbitedDestinationHash != other.LastOrbitedDestinationHash)
     {
         LastOrbitedDestinationHash = other.LastOrbitedDestinationHash;
         OnPropertyChanged(nameof(LastOrbitedDestinationHash));
     }
 }
        public bool Equals(DestinyProfileTransitoryComponent input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     PartyMembers == input.PartyMembers ||
                     (PartyMembers != null && PartyMembers.SequenceEqual(input.PartyMembers))
                     ) &&
                 (
                     CurrentActivity == input.CurrentActivity ||
                     (CurrentActivity != null && CurrentActivity.Equals(input.CurrentActivity))
                 ) &&
                 (
                     Joinability == input.Joinability ||
                     (Joinability != null && Joinability.Equals(input.Joinability))
                 ) &&
                 (
                     Tracking == input.Tracking ||
                     (Tracking != null && Tracking.SequenceEqual(input.Tracking))
                 ) &&
                 (
                     LastOrbitedDestinationHash == input.LastOrbitedDestinationHash ||
                     (LastOrbitedDestinationHash.Equals(input.LastOrbitedDestinationHash))
                 ));
        }
        public void SetAllyInCommand(AllyMember _setToCommand)
        {
            bool _validSet = _setToCommand != null &&
                             _setToCommand.GetComponent <AllyMember>() != null &&
                             PartyMembers.Contains(_setToCommand);

            if (_validSet)
            {
                gamemaster.CallOnAllySwitch(this, _setToCommand, AllyInCommand);
                if (AllyInCommand != null)
                {
                    AllyInCommand.GetComponent <AllyEventHandler>().CallEventSwitchingFromCom();
                }

                AllyInCommand = _setToCommand;
                AllyInCommand.GetComponent <AllyEventHandler>().CallEventSetAsCommander();
                //Set PartySwitching Event Afterwards for more accurate party data retreival
                foreach (var _ally in PartyMembers)
                {
                    //TODO: RTSPrototype Fix null exception from foreach loop, this should not happen
                    if (_ally != null)
                    {
                        _ally.allyEventHandler.CallEventPartySwitching();
                    }
                }
            }
        }
 public override void Display()
 {
     if (whosHurt == null)
     {
         PartyMembers crewShuffed = MainWindow.settings.userStats.crew;
         MyExtensions.Shuffle(crewShuffed.Party);
         bool healthNeedsReduced = true;
         if (healthNeedsReduced)
         {
             foreach (PartyMember member in crewShuffed.Party.FindAll(c => c.status == PlayerStatus.good))
             {
                 whosHurt           = member;
                 whosHurt.status    = PlayerStatus.poor;
                 healthNeedsReduced = false;
                 break;
             }
         }
         if (healthNeedsReduced)
         {
             foreach (PartyMember member in crewShuffed.Party.FindAll(c => c.status == PlayerStatus.fair))
             {
                 whosHurt           = member;
                 whosHurt.status    = PlayerStatus.veryPoor;
                 healthNeedsReduced = false;
                 break;
             }
         }
         if (healthNeedsReduced)
         {
             foreach (PartyMember member in crewShuffed.Party.FindAll(c => c.status == PlayerStatus.poor))
             {
                 whosHurt           = member;
                 whosHurt.status    = PlayerStatus.dead;
                 healthNeedsReduced = false;
                 break;
             }
         }
         if (healthNeedsReduced)
         {
             foreach (PartyMember member in crewShuffed.Party.FindAll(c => c.status == PlayerStatus.veryPoor))
             {
                 whosHurt           = member;
                 whosHurt.status    = PlayerStatus.dead;
                 healthNeedsReduced = false;
                 break;
             }
         }
     }
     MessageBox(whosHurt.name + " was exposed\nand is now " + (whosHurt.status == PlayerStatus.dead ? whosHurt.status : "is in " + whosHurt.status + " health") + ".");
     if (loopCount > 5)
     {
         Confirmation();
     }
     else
     {
         loopCount++;
     }
 }
Esempio n. 8
0
 public override bool Activate()
 {
     if (PartyMembers.Where(x => x != null && !x.IsDead).FirstOrDefault() != null)
     {
         return(PartyMembers.Where(x => x != null && !x.IsDead)
                .FirstOrDefault().DistanceToPlayer > 5f);
     }
     return(false);
 }
Esempio n. 9
0
        private async void GetPartyMembersFromAPI()
        {
            HttpClient client = new HttpClient();
            var        json   = await client.GetStringAsync(new Uri(String.Format("http://localhost:5000/api/Passenger/partymembers/{0}", LoginSingleton.passenger.PassengerId)));

            var lst = JsonConvert.DeserializeObject <ObservableCollection <PassengerDTO> >(json);

            lst.ToList().ForEach(i => PartyMembers.Add(new Passenger(i)));
        }
 public bool DeepEquals(DestinyProfileTransitoryComponent?other)
 {
     return(other is not null &&
            PartyMembers.DeepEqualsList(other.PartyMembers) &&
            (CurrentActivity is not null ? CurrentActivity.DeepEquals(other.CurrentActivity) : other.CurrentActivity is null) &&
            (Joinability is not null ? Joinability.DeepEquals(other.Joinability) : other.Joinability is null) &&
            Tracking.DeepEqualsList(other.Tracking) &&
            LastOrbitedDestinationHash == other.LastOrbitedDestinationHash);
 }
Esempio n. 11
0
 private void HandlePartyUpdateMessage(IAccount account, PartyUpdateMessage message)
 {
     if (PartyMembers.ContainsKey(message.MemberInformations.Id))
     {
         PartyMembers[message.MemberInformations.Id] = message.MemberInformations;
     }
     else
     {
         Logger.Default.Log($"Player <{message.MemberInformations.Name}> can't be updated. Could not find player in your party.", LogMessageType.Error);
     }
 }
Esempio n. 12
0
 protected void HandleLeftClickPartyMember(AllyMember ally)
 {
     if (!bIsCurrentPlayerCommander || bNoPartyCommandsAllowed)
     {
         return;
     }
     if (PartyMembers.Contains(ally) && ally != AllyInCommand)
     {
         SetAllyInCommand(ally);
     }
 }
Esempio n. 13
0
        public void Fight()
        {
            var unit = PartyMembers.Where(x => x != null && x.IsInCombat);

            if (unit != null)
            {
                CustomClasses.Current.Fight(unit);
            }
            else if (ObjectManager.Units.Count() > 0)
            {
                CustomClasses.Current.Fight(ObjectManager.Units.Where(x => x.IsInCombat || x.GotDebuff("Polymorph")));
            }
        }
Esempio n. 14
0
        private static async Task <bool> Refresh()
        {
            if (!BarretSettingsModel.Instance.UseRefresh || ActionManager.LastSpell == Spells.Tactician || CombatHelper.LastSpell == Spells.Tactician)
            {
                return(false);
            }

            if (PartyManager.IsInParty && PartyMembers.Count(pm => pm.IsHealer() && pm.IsAlive && pm.CurrentManaPercent <= BarretSettingsModel.Instance.RefreshMpPct) >= BarretSettingsModel.Instance.RefreshMemberCount)
            {
                return(await Spells.Refresh.Use(Me, Target.HealthCheck(false) && Target.TimeToDeathCheck()));
            }

            return(await Spells.Refresh.Use(Me, Target.HealthCheck(false) && Target.TimeToDeathCheck() && GameObjectManager.Attackers.Any(a => a.TargetCharacter == Me)));
        }
Esempio n. 15
0
        private static async Task <bool> Tactician()
        {
            if (!EdwardSettingsModel.Instance.UseTactician || !PartyManager.IsInParty || !Target.HealthCheck(false) || !Target.TimeToDeathCheck() || ActionManager.LastSpell == Spells.Refresh || CombatHelper.LastSpell == Spells.Refresh)
            {
                return(false);
            }

            if (PartyMembers.Count(pm => pm.IsAlive && pm.IsPhysical() && pm.CurrentTPPercent <= EdwardSettingsModel.Instance.TacticianTpPct) >= EdwardSettingsModel.Instance.TacticianMemberCount)
            {
                return(await Spells.Tactician.Use(Me, true));
            }

            return(await Spells.Tactician.Use(Me, true));
        }
Esempio n. 16
0
        private static async Task <bool> Verraise()
        {
            if (!ElayneSettingsModel.Instance.UseVerraise || Me.CurrentManaPercent < ElayneSettingsModel.Instance.VerraiseMinMpPct || !Me.HasAura(Auras.Dualcast) && !Me.HasAura(Auras.Swiftcast))
            {
                return(false);
            }

            var target = PartyMembers.FirstOrDefault(pm => pm.IsDead &&
                                                     pm.Type == GameObjectType.Pc &&
                                                     !pm.HasAura(Auras.Raise) &&
                                                     !pm.HasAura(Auras.Raise2));

            return(await Spells.Verraise.Use(target, true));
        }
Esempio n. 17
0
        private static async Task <bool> Refresh()
        {
            if (!EdwardSettingsModel.Instance.UseRefresh || !PartyManager.IsInParty || !Target.HealthCheck(false) || !Target.TimeToDeathCheck() || ActionManager.LastSpell == Spells.Tactician || CombatHelper.LastSpell == Spells.Tactician)
            {
                return(false);
            }

            if (PartyMembers.Count(pm => pm.IsCaster() && pm.IsAlive && pm.CurrentManaPercent <= EdwardSettingsModel.Instance.RefreshMpPct) >= EdwardSettingsModel.Instance.RefreshMemberCount)
            {
                return(await Spells.Refresh.Use(Me, true));
            }

            return(await Spells.Refresh.Use(Me, await KefkaEnmityManager.TargetingMeCount() > 0));
        }
Esempio n. 18
0
 public void PossessAllyAdd()
 {
     if (AllyInCommand && PartyMembers.Count > 0)
     {
         int allyCommandIndex = PartyMembers.IndexOf(AllyInCommand);
         if (allyCommandIndex + 1 > 0 && allyCommandIndex + 1 < PartyMembers.Count)
         {
             SetAllyInCommand(PartyMembers[allyCommandIndex + 1]);
         }
         else if (PartyMembers.Count > 0)
         {
             SetAllyInCommand(PartyMembers[0]);
         }
     }
 }
Esempio n. 19
0
        private static async Task <bool> Resurrection()
        {
            if (!EikoSettingsModel.Instance.UseResurrection || Me.CurrentManaPercent < EikoSettingsModel.Instance.ResurrectionMinMpPct && !Me.HasAura(Auras.Swiftcast))
            {
                return(false);
            }

            var target = PartyMembers.FirstOrDefault(pm => pm.IsDead &&
                                                     pm.Type == GameObjectType.Pc &&
                                                     pm.IsHealer() &&
                                                     !pm.HasAura(Auras.Raise) &&
                                                     !pm.HasAura(Auras.Raise2));

            return(await Spells.Resurrection.Use(target, true));
        }
Esempio n. 20
0
        public void PossessAllySubtract()
        {
            if (AllyInCommand && PartyMembers.Count > 0)
            {
                int allyCommandIndex = PartyMembers.IndexOf(AllyInCommand);
                int endIndex         = PartyMembers.Count - 1;

                if (allyCommandIndex - 1 > -1 && allyCommandIndex - 1 < PartyMembers.Count)
                {
                    SetAllyInCommand(PartyMembers[allyCommandIndex - 1]);
                }
                else if (endIndex > 0 && endIndex < PartyMembers.Count)
                {
                    SetAllyInCommand(PartyMembers[endIndex]);
                }
            }
        }
Esempio n. 21
0
 private void HandlePartyNewMemberMessage(IAccount account, PartyNewMemberMessage message)
 {
     if (message.MemberInformations.Id == account.Character.Id)
     {
         return;
     }
     if (PartyMembers.ContainsKey(message.MemberInformations.Id))
     {
         Logger.Default.Log($"Player <{message.MemberInformations.Name}> is already listed in your party.", LogMessageType.Error);
         PartyNewMemberEvent?.Invoke(account, false);
     }
     else
     {
         PartyMembers.Add(message.MemberInformations.Id, message.MemberInformations);
         Logger.Default.Log($"Player <{message.MemberInformations.Name}> is a new member of your party.", LogMessageType.Party);
         PartyNewMemberEvent?.Invoke(account, true);
     }
 }
Esempio n. 22
0
        void NewGame()
        {
            var assets = Resolve <IAssetManager>();

            PartyMembers.Clear();
            foreach (PartyCharacterId charId in Enum.GetValues(typeof(PartyCharacterId)))
            {
                PartyMembers.Add(charId, assets.LoadCharacter(AssetType.PartyMember, charId));
            }

            Npcs.Clear();
            foreach (NpcCharacterId charId in Enum.GetValues(typeof(NpcCharacterId)))
            {
                Npcs.Add(charId, assets.LoadCharacter(AssetType.Npc, charId));
            }

            Chests.Clear();
            foreach (ChestId id in Enum.GetValues(typeof(ChestId)))
            {
                Chests.Add(id, assets.LoadChest(id));
            }

            Merchants.Clear();
            foreach (MerchantId id in Enum.GetValues(typeof(MerchantId)))
            {
                Merchants.Add(id, assets.LoadMerchant(id));
            }

            _party.Clear();

            Raise(new AddPartyMemberEvent(PartyCharacterId.Tom));
            Raise(new AddPartyMemberEvent(PartyCharacterId.Rainer));
            Raise(new AddPartyMemberEvent(PartyCharacterId.Drirr));
            Raise(new AddPartyMemberEvent(PartyCharacterId.Sira));
            Raise(new AddPartyMemberEvent(PartyCharacterId.Mellthas));
            Raise(new AddPartyMemberEvent(PartyCharacterId.Khunag));

            SetupTestState();
            Raise(new ReloadAssetsEvent()); // No need to keep character info cached once we've loaded it. New game is also a good point to clear out state.
            Raise(new PartyChangedEvent());
            Raise(new LoadMapEvent(MapDataId.Toronto2DGesamtkarteSpielbeginn));
            Raise(new StartClockEvent());
            Loaded = true;
        }
Esempio n. 23
0
 private void HandlePartyJoinMessage(IAccount account, PartyJoinMessage message)
 {
     PartyId = message.PartyId;
     if (message.PartyLeaderId == account.Character.Id)
     {
         IsLeader = true;
     }
     else
     {
         IsLeader = false;
     }
     foreach (var member in message.Members)
     {
         if (!PartyMembers.ContainsKey(member.Id))
         {
             PartyMembers.Add(member.Id, member);
         }
     }
 }
Esempio n. 24
0
 public virtual void Rota() {
     WhatToTarget = FindLowestPartyMember(out this.Target);
     switch (WhatToTarget) {
         case (PartyMembers.Player):
             SendKey.Send(ConstController.WindowsVirtualKey.VK_F1);
             break;
         case (PartyMembers.PartyMember1):
             SendKey.Send(ConstController.WindowsVirtualKey.VK_F2);
             break;
         case (PartyMembers.PartyMember2):
             SendKey.Send(ConstController.WindowsVirtualKey.VK_F3);
             break;
         case (PartyMembers.PartyMember3):
             SendKey.Send(ConstController.WindowsVirtualKey.VK_F4);
             break;
         case (PartyMembers.PartyMember4):
             SendKey.Send(ConstController.WindowsVirtualKey.VK_F5);
             break;
     }
 }
Esempio n. 25
0
        void OnWoWChatMessage(object sender, WoWEventHandler.ChatMessageArgs args)
        {
            /**
             * "Flash Heal" mana : 380  893-1054 1.5s
             * "Great Heal" mana: 556 1977-2207 2.5s
             * "Heal" mana: 259 783-885 2.5s
             * "Renew" mana: 369 1160-1165 overs 15s
             * "Resurrection" mana 1077 10s
             * "Power Word: Fortitude" mana 1525
             * "Power Word: Shield" mana 450
             * "Divine Spirit" mana 873
             * "Inner Fire" mana 283
             */

            if (args.Message.Contains("HEAL"))
            {
                Common.Instance.DebugMessage("HEAL request for " + args.UnitName);
                if (ObjectManager.Instance.Player.Class == Enums.ClassId.Priest)
                {
                    var partyMember = PartyMembers.Where(x => x.Name == args.UnitName).FirstOrDefault();
                    if (partyMember != null)
                    {
                        ObjectManager.Instance.Player.SetTarget(partyMember.Guid);
                        if (partyMember.DistanceToPlayer > 29f)
                        {
                            Navigation.Instance.Traverse(partyMember.Position);
                        }
                        else
                        {
                            //if (Spell.Instance.IsKnown("Greater Heal") && partyMember.HealthPercent < 50)
                            //    Spell.Instance.Cast("Greater Heal");
                            //else if (Spell.Instance.IsKnown("Heal"))
                            //Spell.Instance.Cast("Heal");
                            //else
                            Spell.Instance.Cast("Heal");
                        }
                        ObjectManager.Instance.Player.SetTarget(null);
                    }
                }
            }
        }
Esempio n. 26
0
        public void AddPartyMember(AllyMember _ally)
        {
            bool _validAdd = _ally != null &&
                             AllyHasSameGeneral(_ally) &&
                             AllyIsAPartyMember(_ally) == false &&
                             _ally.IsAlive;

            if (_validAdd)
            {
                PartyMembers.Add(_ally);
                if (AllyInCommand == null)
                {
                    SetAllyInCommand(_ally);
                }
                //Only Call if PartyManager is the Current Player's General
                if (uiMaster && bIsCurrentPlayerCommander)
                {
                    uiMaster.CallRegisterAllyToCharacterStatMonitor(this, _ally);
                }
            }
        }
Esempio n. 27
0
 private void HandlePartyMemberRemoveMessage(IAccount account, PartyMemberRemoveMessage message)
 {
     if (PartyMembers.ContainsKey(message.LeavingPlayerId))
     {
         Logger.Default.Log($"Player <{PartyMembers[message.LeavingPlayerId].Name}> was removed from your party.", LogMessageType.Party);
         PartyMembers.Remove(message.LeavingPlayerId);
         if (PartyMembers.Count == 1)
         {
             Logger.Default.Log($"Your party has been disbanded.", LogMessageType.Party);
             PartyMembers.Clear();
         }
         else
         {
             Logger.Default.Log($"Your party has now {PartyMembers.Count} members", LogMessageType.Party);
         }
     }
     else
     {
         Logger.Default.Log($"Player <{message.LeavingPlayerId}> is not a member of your party. It can't be removed.", LogMessageType.Party);
     }
 }
Esempio n. 28
0
        public static string SafeName(this GameObject obj)
        {
            var useSafeNames = MainSettingsModel.Instance.UseSafeNames;

            if (obj.IsMe)
            {
                return("Me");
            }

            string name;
            var    character = obj as BattleCharacter;

            if (character != null)
            {
                name = !PartyMembers.Contains(character) ? "Enemy -> " : "Ally -> ";

                if (name.Contains("Ally"))
                {
                    if (!useSafeNames)
                    {
                        name += character.Name;
                    }
                    else
                    {
                        name += character.CurrentJob.ToString();
                    }
                    return(name);
                }

                if (obj.IsBoss())
                {
                    name += "Boss: ";
                }

                return(name += character.Name);
            }
            name = obj.Name;

            return(name);
        }
Esempio n. 29
0
        public AllyMember FindPartyMembers()
        {
            PartyMembers.Clear();
            AllyMember[] Allies = GameObject.FindObjectsOfType <AllyMember>();
            foreach (var ally in Allies)
            {
                if (ally.GeneralCommander == this.GeneralCommander)
                {
                    PartyMembers.Add(ally);
                }
            }

            if (PartyMembers.Count <= 0)
            {
                Debug.LogWarning("No partyMembers in Scene!");
                return(null);
            }
            else
            {
                AllyMember firstallyfound = PartyMembers[0];
                return(firstallyfound);
            }
        }
Esempio n. 30
0
        private static async Task <bool> DeploymentTactics()
        {
            if (!SuritoSettingsModel.Instance.UseDeploymentTactics)
            {
                return(false);
            }

            var target = PartyMembers.FirstOrDefault(hm => (hm.HasAura(Auras.Adloquium, true, SuritoSettingsModel.Instance.DeploymentTacticsMinBuffTime) || hm.HasAura(Auras.EyeforanEye, true, SuritoSettingsModel.Instance.DeploymentTacticsMinBuffTime)) &&
                                                     !hm.IsMe && hm.AlliesInRange(10) >= SuritoSettingsModel.Instance.DeploymentTacticsPlayerCount);

            if (SuritoSettingsModel.Instance.UseDelpoymentTacticsOnBothBuffsOnly)
            {
                target = PartyMembers.FirstOrDefault(hm => (hm.HasAura(Auras.Adloquium, true, SuritoSettingsModel.Instance.DeploymentTacticsMinBuffTime) && hm.HasAura(Auras.EyeforanEye, true, SuritoSettingsModel.Instance.DeploymentTacticsMinBuffTime)) &&
                                                     !hm.IsMe && hm.AlliesInRange(10) >= SuritoSettingsModel.Instance.DeploymentTacticsPlayerCount);
            }

            if (target == null)
            {
                return(false);
            }

            return(await Spells.DeploymentTactics.Use(target, true));
        }
Esempio n. 31
0
        public override void Execute()
        {
            Common.Instance.DebugMessage("HEAL");
            var partyMember = PartyMembers.Where(x => NotNullOrDead(x) && x.HealthPercent < 65).FirstOrDefault();

            if (partyMember != null)
            {
                ObjectManager.Instance.Player.SetTarget(partyMember.Guid);
                if (partyMember.DistanceToPlayer > 29f)
                {
                    Navigation.Instance.Traverse(partyMember.Position);
                }
                else
                {
                    //if (Spell.Instance.IsKnown("Greater Heal") && partyMember.HealthPercent < 50)
                    //    Spell.Instance.Cast("Greater Heal");
                    //else if (Spell.Instance.IsKnown("Heal"))
                    //Spell.Instance.Cast("Heal");
                    //else
                    Spell.Instance.Cast("Heal");
                }
                ObjectManager.Instance.Player.SetTarget(null);
            }
        }