예제 #1
0
파일: Abilities.cs 프로젝트: Bia10/clrn
        public static void Moving(Memory.Memory wow, int Target, int BestAbilityIndex)
        {
            if (Target > 0)
            {
                if (WowControl.ClassType == 1)
                {
                    if (Abilities.AbilityStatus != "Casting")
                    {
                        Button(BindingsList[BestAbilityIndex].AbilityName);
                        wow.GoTo(0, 0, 0, wow.Objects[Abilities.Target].GUID, 11);
                    }

                } else
                {
                    double Range = WowControl.CheckPoint(wow.Objects[0].X, wow.Objects[0].Y, wow.Objects[0].Z, wow.Objects[Abilities.Target].X, wow.Objects[Abilities.Target].Y, wow.Objects[Abilities.Target].Z);
                    if (Range > 25)
                    {
                        if (Abilities.AbilityStatus != "Casting")
                            wow.GoTo(wow.Objects[Abilities.Target].X, wow.Objects[Abilities.Target].Y, wow.Objects[Abilities.Target].Z, wow.Objects[Abilities.Target].GUID, 4);
                    } else
                    {
                        Button(BindingsList[BestAbilityIndex].AbilityName);
                        wow.GoTo(0, 0, 0, 0, 3);
                        WowControl.Sleep(100);
                        wow.GoTo(0, 0, 0, wow.Objects[Abilities.Target].GUID, 1);
                    }
                }
                if (WowControl.ErrorState == "Bad target")
                {
                    //WowControl.BadObjects.Add(wow.Objects[Abilities.Target].GUID);
                    WowControl.UpdateCombatLog("Bad target " + wow.Objects[Abilities.Target].Name + ".");
                }
            }
        }