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(); } } }
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(); } }
private static void RemoveTextFlags(UOEntity m) { if (m != null) { bool oplchanged = false; if (oplchanged) { m.OPLChanged(); } } }
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(); } } }