Exemplo n.º 1
0
        //CLILOC TRIGGERS
        public static void ClilocTriggerAddListEntrySingle(uint serial, uint time)
        {
            //RETURN IF DISABLED
            if (!ProfileManager.CurrentProfile.UOClassicCombatLines)
            {
                return;
            }

            Mobile mobtoadd = World.Mobiles.Get(serial);

            if (mobtoadd != null)
            {
                UOClassicCombatLines UOClassicCombatLines = UIManager.GetGump <UOClassicCombatLines>();

                if (UOClassicCombatLines != null)
                {
                    if (UOClassicCombatLines.entryList.Exists(mob => mob.Serial == mobtoadd.Serial)) //NO DOUBLE ENTRYS, REFRESH TIME INSTEAD
                    {
                        UOClassicCombatLines.entryList.Find(mob => mob.Serial == mobtoadd.Serial).TimeAdded = time;
                        return;
                    }
                    else
                    {
                        UOClassicCombatLines.entryList.Add(new UCCLinesListEntry {
                            Name = mobtoadd.Name, Serial = serial, TimeAdded = time
                        });
                    }
                }
            }
        }
Exemplo n.º 2
0
        //MACRO TRIGGERS
        public static void ClilocTriggerAddListEntryAll()
        {
            //RETURN IF DISABLED
            if (!ProfileManager.CurrentProfile.UOClassicCombatLines)
            {
                return;
            }

            UOClassicCombatLines UOClassicCombatLines = UIManager.GetGump <UOClassicCombatLines>();

            if (UOClassicCombatLines != null)
            {
                foreach (Mobile mobile in World.Mobiles)
                {
                    if (mobile == World.Player)
                    {
                        continue;
                    }

                    if (UOClassicCombatLines.entryList.Exists(mob => mob.Serial == mobile.Serial)) //NO DOUBLE ENTRYS, REFRESH TIME INSTEAD
                    {
                        UOClassicCombatLines.entryList.Find(mob => mob.Serial == mobile.Serial).TimeAdded = Time.Ticks;
                        continue;
                    }
                    else
                    {
                        UOClassicCombatLines.entryList.Add(new UCCLinesListEntry {
                            Name = mobile.Name, Serial = mobile.Serial, TimeAdded = Time.Ticks
                        });
                    }
                }
            }
        }
Exemplo n.º 3
0
        public static void ClilocTriggerToggleHM()
        {
            ProfileManager.CurrentProfile.UOClassicCombatLines_ToggleHuntingMmode = !ProfileManager.CurrentProfile.UOClassicCombatLines_ToggleHuntingMmode;

            //RETURN IF DISABLED
            if (!ProfileManager.CurrentProfile.UOClassicCombatLines)
            {
                return;
            }

            UOClassicCombatLines UOClassicCombatLines = UIManager.GetGump <UOClassicCombatLines>();

            if (UOClassicCombatLines != null)
            {
                UOClassicCombatLines.UpdateVars();
            }
        }
Exemplo n.º 4
0
        public void Draw(UltimaBatcher2D batcher)
        {
            //RETURN IF DISABLED
            if (!ProfileManager.CurrentProfile.UOClassicCombatLines)
            {
                return;
            }

            //POST
            Point p = World.Player.RealScreenPosition;

            p.X += (int)World.Player.Offset.X + 22;
            p.Y += (int)(World.Player.Offset.Y - World.Player.Offset.Z) + 22;

            //GET LIST FROM UI
            UOClassicCombatLines UOClassicCombatLines = UIManager.GetGump <UOClassicCombatLines>();

            //GET LAST TARGET
            Entity _lasttarget = World.Get(TargetManager.LastTargetInfo.Serial);

            //SEARCH MOBS IN LIST
            foreach (Mobile mobile in World.Mobiles)
            {
                //VAR FOR MODES
                bool  _draw = false;
                Color color = Color.White;

                if (!mobile.IsHuman)
                {
                    continue;
                }

                if (mobile == World.Player)
                {
                    continue;
                }

                switch (mobile.NotorietyFlag)
                {
                case NotorietyFlag.Innocent:

                    if (ProfileManager.CurrentProfile.UOClassicCombatLines_ToggleHuntingMmode && ProfileManager.CurrentProfile.UOClassicCombatLines_ToggleHMBlue && !World.Party.Contains(mobile.Serial))
                    {
                        _draw = true;
                    }

                    color = Color.Blue;
                    break;

                case NotorietyFlag.Ally:

                    color = Color.Green;
                    break;

                case NotorietyFlag.Criminal:

                    if (ProfileManager.CurrentProfile.UOClassicCombatLines_ToggleHuntingMmode && ProfileManager.CurrentProfile.UOClassicCombatLines_ToggleHMCriminal && !World.Party.Contains(mobile.Serial))
                    {
                        _draw = true;
                    }

                    color = Color.Gray;
                    break;

                case NotorietyFlag.Gray:

                    color = Color.Gray;
                    break;

                case NotorietyFlag.Enemy:

                    if (ProfileManager.CurrentProfile.UOClassicCombatLines_ToggleHuntingMmode && ProfileManager.CurrentProfile.UOClassicCombatLines_ToggleHMOrange && !World.Party.Contains(mobile.Serial))
                    {
                        _draw = true;
                    }

                    color = Color.Orange;
                    break;

                case NotorietyFlag.Murderer:

                    if (ProfileManager.CurrentProfile.UOClassicCombatLines_ToggleHuntingMmode && ProfileManager.CurrentProfile.UOClassicCombatLines_ToggleHMRed && !World.Party.Contains(mobile.Serial))
                    {
                        _draw = true;
                    }

                    color = Color.Red;
                    break;

                case NotorietyFlag.Invulnerable:

                    color = Color.Yellow;
                    break;

                default:

                    color = Color.White;
                    break;
                }

                if (ProfileManager.CurrentProfile.UOClassicCombatLines_ToggleLastTarget && _lasttarget != null)
                {
                    if (mobile.Serial == _lasttarget.Serial)
                    {
                        _draw = true;
                        color = Color.White;
                    }
                }


                if (UOClassicCombatLines.entryList.Exists(mob => mob.Serial == mobile.Serial) || _draw)
                {
                    //CALC WHERE MOBILE IS
                    Point pm = mobile.RealScreenPosition;
                    pm.X += (int)mobile.Offset.X + 22;
                    pm.Y += (int)(mobile.Offset.Y - mobile.Offset.Z) + 22;

                    if (!mobile.IsDead)
                    {
                        //CALC MIDDLE
                        int ox = (pm.X + p.X) / 2;
                        int oy = (pm.Y + p.Y) / 2;
                        batcher.DrawLine(SolidColorTextureCache.GetTexture(color), pm.X, pm.Y, p.X, p.Y, ox, oy);
                    }
                }
            }
        }