public static void GetUser(EChaterType type, ulong ulluid, uint logicworld_id, out string name, out string level, out string head_url, out COMDT_GAME_VIP_CLIENT stGameVip) { name = "error"; level = "-1"; head_url = string.Empty; stGameVip = null; if (type == EChaterType.Self) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo(); if (masterRoleInfo != null) { name = masterRoleInfo.Name; level = masterRoleInfo.PvpLevel.ToString(); stGameVip = masterRoleInfo.GetNobeInfo().stGameVipClient; head_url = masterRoleInfo.HeadUrl.Substring(0, masterRoleInfo.HeadUrl.LastIndexOf("/")); } } else if (type == EChaterType.Friend) { COMDT_FRIEND_INFO gameOrSnsFriend = Singleton <CFriendContoller> .GetInstance().model.GetGameOrSnsFriend(ulluid, logicworld_id); if (gameOrSnsFriend != null) { name = UT.Bytes2String(gameOrSnsFriend.szUserName); int dwPvpLvl = (int)gameOrSnsFriend.dwPvpLvl; level = dwPvpLvl.ToString(); head_url = UT.Bytes2String(gameOrSnsFriend.szHeadUrl); stGameVip = gameOrSnsFriend.stGameVip; } } else if (type == EChaterType.Strenger) { COMDT_CHAT_PLAYER_INFO cOMDT_CHAT_PLAYER_INFO = Singleton <CChatController> .GetInstance().model.Get_Palyer_Info(ulluid, logicworld_id); if (cOMDT_CHAT_PLAYER_INFO != null) { name = UT.Bytes2String(cOMDT_CHAT_PLAYER_INFO.szName); int dwLevel = (int)cOMDT_CHAT_PLAYER_INFO.dwLevel; level = dwLevel.ToString(); head_url = UT.Bytes2String(cOMDT_CHAT_PLAYER_INFO.szHeadUrl); stGameVip = cOMDT_CHAT_PLAYER_INFO.stVip; } } else if (type == EChaterType.Speaker || type == EChaterType.LoudSpeaker) { COMDT_CHAT_PLAYER_INFO cOMDT_CHAT_PLAYER_INFO2 = Singleton <CChatController> .GetInstance().model.Get_Palyer_Info(ulluid, logicworld_id); if (cOMDT_CHAT_PLAYER_INFO2 != null) { name = UT.Bytes2String(cOMDT_CHAT_PLAYER_INFO2.szName); int dwLevel2 = (int)cOMDT_CHAT_PLAYER_INFO2.dwLevel; level = dwLevel2.ToString(); head_url = UT.Bytes2String(cOMDT_CHAT_PLAYER_INFO2.szHeadUrl); stGameVip = cOMDT_CHAT_PLAYER_INFO2.stVip; } } }
public void Clear() { this.ullUid = 0L; this.iLogicWorldID = 0; this.name = this.head_url = this.level = this.text = string.Empty; this.TextObjList.Clear(); this.stGameVip = null; this.final_width = 0f; this.type = EChaterType.None; }
public void Clear() { this.ullUid = 0uL; this.iLogicWorldID = 0u; this.name = (this.head_url = (this.level = (this.text = string.Empty))); this.TextObjList.Clear(); this.stGameVip = null; this.final_width = 0f; this.type = EChaterType.None; this.bHasReaded = true; }
public int GetCount(EChaterType type) { int num = 0; for (int i = 0; i < this.list.Count; i++) { if (this.list[i].type == type) { num++; } } return(num); }