コード例 #1
0
        private static void AddTextFlags(UOEntity m)
        {
            if (m != null)
            {
                bool oplchanged = false;

                if (Config.GetBool("SmartLastTarget"))
                {
                    if (m_LastHarmTarg != null && m_LastHarmTarg.Serial == m.Serial)
                    {
                        oplchanged = true;
                        m.ObjPropList.Add(Language.GetString(LocString.HarmfulTarget));
                    }

                    if (m_LastBeneTarg != null && m_LastBeneTarg.Serial == m.Serial)
                    {
                        oplchanged = true;
                        m.ObjPropList.Add(Language.GetString(LocString.BeneficialTarget));
                    }
                }

                if (!oplchanged && m_LastTarget != null && m_LastTarget.Serial == m.Serial)
                {
                    oplchanged = true;
                    m.ObjPropList.Add(Language.GetString(LocString.LastTarget));
                }

                if (oplchanged)
                {
                    m.OPLChanged();
                }
            }
        }
コード例 #2
0
ファイル: Targeting.cs プロジェクト: mozkandemir/RE
        private static void AddTextFlags(UOEntity m)
        {
            if (m == null)
            {
                return;
            }

            bool oplchanged = false;

            if (RazorEnhanced.Settings.General.ReadBool("SmartLastTarget"))
            {
                if (m_LastHarmTarg != null && m_LastHarmTarg.Serial == m.Serial)
                {
                    oplchanged = true;
                    m.ObjPropList.Add(Language.GetString(LocString.HarmfulTarget));
                }

                if (m_LastBeneTarg != null && m_LastBeneTarg.Serial == m.Serial)
                {
                    oplchanged = true;
                    m.ObjPropList.Add(Language.GetString(LocString.BeneficialTarget));
                }
            }

            if (!oplchanged && m_LastTarget != null && m_LastTarget.Serial == m.Serial)
            {
                oplchanged = true;
                m.ObjPropList.Add(Language.GetString(LocString.LastTarget));
            }

            if (oplchanged)
            {
                m.OPLChanged();
            }
        }
コード例 #3
0
ファイル: Targeting.cs プロジェクト: zerodowned/CEasyUO
        private static void RemoveTextFlags(UOEntity m)
        {
            if (m != null)
            {
                bool oplchanged = false;

                if (oplchanged)
                {
                    m.OPLChanged();
                }
            }
        }
コード例 #4
0
        private static void RemoveTextFlags(UOEntity m)
        {
            if (m != null)
            {
                bool oplchanged = false;

                oplchanged |= m.ObjPropList.Remove(Language.GetString(LocString.LastTarget));
                oplchanged |= m.ObjPropList.Remove(Language.GetString(LocString.HarmfulTarget));
                oplchanged |= m.ObjPropList.Remove(Language.GetString(LocString.BeneficialTarget));

                if (oplchanged)
                {
                    m.OPLChanged();
                }
            }
        }