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; }
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(); }
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; }
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; }
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)); } } }
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); }
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(); }
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; }
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; }