示例#1
0
        private string Color(ChatInfo info)
        {
            if (info.Mobile.NetState == null ||
                info.PublicDisabled ||
                (info.Hidden && info.Mobile.AccessLevel > Owner.AccessLevel))
            {
                return(HTML.Gray);
            }
            if (info.Banned)
            {
                return(HTML.Red);
            }
            if (c_Info.Ignoring(info.Mobile))
            {
                return(HTML.AshRed);
            }
            if (c_Info.GlobalIgnoring(info.Mobile))
            {
                return(HTML.DarkGray);
            }
            if (info.Mobile.AccessLevel != AccessLevel.Player)
            {
                return(HTML.Blue);
            }
            if (Owner.Guild != null && Owner.Guild == info.Mobile.Guild)
            {
                return(HTML.Green);
            }
            if (FactionChat.SameFaction(Owner, info.Mobile))
            {
                return(HTML.Purple);
            }

            return(HTML.White);
        }