public void BtClickJoinRoom(IUIObject obj) { IUIListObject selectItem = this.m_lbOpenRoomList.GetSelectItem(); if (selectItem == null) { return; } BABELTOWER_OPENROOMLIST bABELTOWER_OPENROOMLIST = selectItem.Data as BABELTOWER_OPENROOMLIST; if (bABELTOWER_OPENROOMLIST != null) { GS_BABELTOWER_GOLOBBY_REQ gS_BABELTOWER_GOLOBBY_REQ = new GS_BABELTOWER_GOLOBBY_REQ(); gS_BABELTOWER_GOLOBBY_REQ.mode = 2; gS_BABELTOWER_GOLOBBY_REQ.babel_floor = bABELTOWER_OPENROOMLIST.i16Floor; gS_BABELTOWER_GOLOBBY_REQ.babel_subfloor = bABELTOWER_OPENROOMLIST.i16SubFloor; gS_BABELTOWER_GOLOBBY_REQ.Babel_FloorType = this.m_nFloorType; gS_BABELTOWER_GOLOBBY_REQ.nPersonID = bABELTOWER_OPENROOMLIST.i64LeaderPersonID; gS_BABELTOWER_GOLOBBY_REQ.Babel_FloorType = bABELTOWER_OPENROOMLIST.i16FloorType; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BABELTOWER_GOLOBBY_REQ, gS_BABELTOWER_GOLOBBY_REQ); } this.Close(); }
public void ShowList() { string text = string.Empty; string empty = string.Empty; this.m_lbOpenRoomList.Clear(); for (int i = this.m_nPage * 5; i < this.m_nPage * 5 + 5; i++) { if (this.m_listBabelOpenRoomList.Count <= i) { break; } BABELTOWER_OPENROOMLIST bABELTOWER_OPENROOMLIST = this.m_listBabelOpenRoomList[i]; if (bABELTOWER_OPENROOMLIST != null) { NewListItem newListItem = new NewListItem(this.m_lbOpenRoomList.ColumnNum, true, string.Empty); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1639"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { text, "count", bABELTOWER_OPENROOMLIST.i16LeaderLevel, "targetname", TKString.NEWString(bABELTOWER_OPENROOMLIST.szLeaderName) }); newListItem.SetListItemData(0, empty, null, null, null); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1600"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { text, "usernum", bABELTOWER_OPENROOMLIST.byCurUserNum, "maxuser", bABELTOWER_OPENROOMLIST.byMaxUserNum }); newListItem.SetListItemData(1, empty, null, null, null); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("833"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { text, "floor", bABELTOWER_OPENROOMLIST.i16Floor, "subfloor", (int)(bABELTOWER_OPENROOMLIST.i16SubFloor + 1) }); newListItem.SetListItemData(2, empty, null, null, null); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1285"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { text, "min", bABELTOWER_OPENROOMLIST.MinLevel, "max", bABELTOWER_OPENROOMLIST.MaxLevel }); newListItem.SetListItemData(3, empty, null, null, null); newListItem.Data = bABELTOWER_OPENROOMLIST; this.m_lbOpenRoomList.Add(newListItem); } } this.m_lbOpenRoomList.RepositionItems(); this.m_laPage.SetText(string.Format("{0} / {1}", this.m_nPage + 1, this.m_nMaxPage + 1)); base.Show(); }
public void AddOpenRoominfo(BABELTOWER_OPENROOMLIST info) { this.m_listBabelOpenRoomList.Add(info); }