Exemple #1
0
        public static void ShowAttackOverhead(Serial serial)
        {
            if (!Config.GetBool("ShowAttackTargetOverhead"))
            {
                return;
            }

            Mobile m = World.FindMobile(serial);

            if (m == null)
            {
                return;
            }

            World.Player.OverheadMessage(FriendsManager.IsFriend(m.Serial) ? 63 : m.GetNotorietyColorInt(),
                                         $"Attack: {m.Name}");
        }
Exemple #2
0
        public static void OverheadTargetMessage(TargetInfo info)
        {
            if (info == null)
            {
                return;
            }

            if (Config.GetBool("ShowAttackTargetNewOnly") && info.Serial == _lastOverheadMessageTarget.Serial)
            {
                return;
            }

            Mobile m = null;

            if (Config.GetBool("ShowAttackTargetOverhead") && info.Serial != 0 && info.Serial.IsMobile)
            {
                m = World.FindMobile(info.Serial);

                if (m == null)
                {
                    return;
                }

                World.Player.OverheadMessage(FriendsManager.IsFriend(m.Serial) ? 63 : m.GetNotorietyColorInt(),
                                             $"Target: {m.Name}");
            }

            if (Config.GetBool("ShowTextTargetIndicator") && info.Serial != 0 && info.Serial.IsMobile)
            {
                // lets not look it up again they had the previous feature enabled
                if (m == null)
                {
                    m = World.FindMobile(info.Serial);
                }

                if (m == null)
                {
                    return;
                }

                m.OverheadMessage(Config.GetInt("TargetIndicatorHue"), Config.GetString("TargetIndicatorFormat"));
            }

            _lastOverheadMessageTarget = info;
        }