private Brush GetColor(Combatant c, bool IsSelf)
 {
     if (c.Type == ObjectType.PC)
     {
         return(new SolidColorBrush(IsSelf ? Colors.LightGreen : Colors.LightBlue));
     }
     if (c.Type == ObjectType.Monster)
     {
         if (Hunt.TryGetHuntRank(c.BNpcNameID, out HuntRank hr))
         {
             return(new SolidColorBrush(hr == HuntRank.B ? Color.FromArgb(255, 0, 0, 0xE7) : Colors.Red));
         }
         return(new SolidColorBrush(Colors.White));
     }
     if (string.IsNullOrWhiteSpace(c.Name))
     {
         return(new SolidColorBrush(Colors.MediumPurple));
     }
     return(new SolidColorBrush(Colors.LightGray));
 }
示例#2
0
 private Brush GetColor(Entity c, bool IsSelf)
 {
     if (c is PC)
     {
         return(new SolidColorBrush(IsSelf ? Colors.LightGreen : Colors.LightBlue));
     }
     if (c is Monster)
     {
         HuntRank hr;
         if (Hunt.TryGetHuntRank(((Monster)c).BNpcNameID, out hr))
         {
             return(new SolidColorBrush((hr == HuntRank.B) ? Color.FromArgb(byte.MaxValue, 0, 0, 231) : Colors.Red));
         }
         return(new SolidColorBrush(Colors.White));
     }
     else
     {
         if (string.IsNullOrWhiteSpace(c.Name))
         {
             return(new SolidColorBrush(Colors.MediumPurple));
         }
         return(new SolidColorBrush(Colors.LightGray));
     }
 }