Ejemplo n.º 1
0
        public ClientOnlineEntry(string name, string title, string guild, int clss, PaperdollIconType icon)
            : base(name, title, guild, clss, icon)
        {
            ClassRecord record = (ClassRecord)World.Instance.ECF.Data.Find(rec => ((ClassRecord)rec).ID == clss);

            ClassString = record.ID == 0 ? "-" : record.Name;
        }
Ejemplo n.º 2
0
        internal PaperdollDisplayData(Packet pkt)
        {
            //need to be applied to the character that is passed to the dialog
            name    = pkt.GetBreakString();
            home    = pkt.GetBreakString();
            partner = pkt.GetBreakString();
            title   = pkt.GetBreakString();
            guild   = pkt.GetBreakString();
            rank    = pkt.GetBreakString();

            playerID = pkt.GetShort();
            clas     = pkt.GetChar();
            gender   = pkt.GetChar();

            if (pkt.GetChar() != 0)
            {
                throw new ArgumentException("Invalid/malformed packet", "pkt");
            }

            paperdoll = new short[(int)EquipLocation.PAPERDOLL_MAX];
            for (int i = 0; i < (int)EquipLocation.PAPERDOLL_MAX; ++i)
            {
                paperdoll[i] = pkt.GetShort();
            }

            iconType = (PaperdollIconType)pkt.GetChar();
        }
Ejemplo n.º 3
0
 public OnlineEntry(string name, string title, string guild, int clss, PaperdollIconType icon)
 {
     m_name     = name;
     m_title    = title;
     m_guild    = guild;
     m_class    = clss;
     m_iconType = icon;
 }
Ejemplo n.º 4
0
 public OnlineEntry(string name, string title, string guild, int clss, PaperdollIconType icon)
 {
     m_name = name;
     m_title = title;
     m_guild = guild;
     m_class = clss;
     m_iconType = icon;
 }
Ejemplo n.º 5
0
        private void _handlePlayerList(Packet pkt, bool isFriendList)
        {
            short numTotal = pkt.GetShort();

            if (pkt.GetByte() != 255)
            {
                return;
            }

            m_init_onlinePlayerList = new List <OnlineEntry>();
            for (int i = 0; i < numTotal; ++i)
            {
                string name = pkt.GetBreakString();

                if (!isFriendList)
                {
                    string title = pkt.GetBreakString();
                    if (string.IsNullOrWhiteSpace(title))
                    {
                        title = "-";
                    }
                    if (pkt.GetChar() != 0)
                    {
                        return;
                    }

                    PaperdollIconType iconType = (PaperdollIconType)pkt.GetChar();

                    int clsId = pkt.GetChar();

                    string guild = pkt.GetBreakString();
                    if (string.IsNullOrWhiteSpace(guild))
                    {
                        guild = "-";
                    }

                    name  = char.ToUpper(name[0]) + name.Substring(1);
                    title = char.ToUpper(title[0]) + title.Substring(1);

                    m_init_onlinePlayerList.Add(new OnlineEntry(name, title, guild, clsId, iconType));
                }
                else
                {
                    m_init_onlinePlayerList.Add(new OnlineEntry(name, "", "", 0, PaperdollIconType.Normal));
                }
            }
        }
Ejemplo n.º 6
0
        public static ChatType GetChatTypeFromPaperdollIcon(PaperdollIconType whichIcon)
        {
            ChatType iconType;

            switch (whichIcon)
            {
            case PaperdollIconType.Normal:
                iconType = ChatType.Player;
                break;

            case PaperdollIconType.GM:
                iconType = ChatType.GM;
                break;

            case PaperdollIconType.HGM:
                iconType = ChatType.HGM;
                break;

            case PaperdollIconType.Party:
                iconType = ChatType.PlayerParty;
                break;

            case PaperdollIconType.GMParty:
                iconType = ChatType.GMParty;
                break;

            case PaperdollIconType.HGMParty:
                iconType = ChatType.HGMParty;
                break;

            case PaperdollIconType.SLNBot:
                iconType = ChatType.PlayerPartyDark;
                break;

            default:
                throw new ArgumentOutOfRangeException("whichIcon", "Invalid Icon type specified.");
            }
            return(iconType);
        }
Ejemplo n.º 7
0
        internal PaperdollDisplayData(Packet pkt)
        {
            //need to be applied to the character that is passed to the dialog
            name = pkt.GetBreakString();
            home = pkt.GetBreakString();
            partner = pkt.GetBreakString();
            title = pkt.GetBreakString();
            guild = pkt.GetBreakString();
            rank = pkt.GetBreakString();

            playerID = pkt.GetShort();
            clas = pkt.GetChar();
            gender = pkt.GetChar();

            if (pkt.GetChar() != 0)
                throw new ArgumentException("Invalid/malformed packet", "pkt");

            paperdoll = new short[(int)EquipLocation.PAPERDOLL_MAX];
            for (int i = 0; i < (int)EquipLocation.PAPERDOLL_MAX; ++i)
                paperdoll[i] = pkt.GetShort();

            iconType = (PaperdollIconType)pkt.GetChar();
        }
Ejemplo n.º 8
0
		public ClientOnlineEntry(string name, string title, string guild, int clss, PaperdollIconType icon)
			: base(name, title, guild, clss, icon)
		{
			ClassRecord record = (ClassRecord) World.Instance.ECF.Data.Find(rec => ((ClassRecord) rec).ID == clss);
			ClassString = record.ID == 0 ? "-" : record.Name;
		}
Ejemplo n.º 9
0
		public static ChatType GetChatTypeFromPaperdollIcon(PaperdollIconType whichIcon)
		{
			ChatType iconType;
			switch (whichIcon)
			{
				case PaperdollIconType.Normal:
					iconType = ChatType.Player;
					break;
				case PaperdollIconType.GM:
					iconType = ChatType.GM;
					break;
				case PaperdollIconType.HGM:
					iconType = ChatType.HGM;
					break;
				case PaperdollIconType.Party:
					iconType = ChatType.PlayerParty;
					break;
				case PaperdollIconType.GMParty:
					iconType = ChatType.GMParty;
					break;
				case PaperdollIconType.HGMParty:
					iconType = ChatType.HGMParty;
					break;
				case PaperdollIconType.SLNBot:
					iconType = ChatType.PlayerPartyDark;
					break;
				default:
					throw new ArgumentOutOfRangeException("whichIcon", "Invalid Icon type specified.");
			}
			return iconType;
		}