// Token: 0x06000212 RID: 530 RVA: 0x0001CEE4 File Offset: 0x0001B0E4 public ushort GetEmptyID(BookMark.eBookType bookType = BookMark.eBookType.Role) { ushort num; BookMarkData[] array; if (bookType == BookMark.eBookType.Role) { num = DataManager.Instance.RoleAttr.BookmarkLimit; array = this.AllData; } else { num = 20; array = this.AllAllianceData; } byte b = 0; while ((ushort)b < num) { if (array.Length <= (int)b) { return(1); } if (array[(int)b].ID == 0) { return((ushort)(b + 1)); } b += 1; } return(1); }
// Token: 0x060001FE RID: 510 RVA: 0x0001B808 File Offset: 0x00019A08 private ushort GetBookMarkID(int MapID, ushort KingdomID, BookMark.eBookType bookType = BookMark.eBookType.Role) { ushort num; byte[] array; BookMarkData[] array2; if (bookType == BookMark.eBookType.Role) { num = DataManager.Instance.RoleAttr.BookmarkNum; array = this.KindDataIDIndex[3]; array2 = this.AllData; } else { num = (ushort)this.AllianceBookCount; array = this.AllianceIDIndex; array2 = this.AllAllianceData; } for (ushort num2 = 0; num2 < num; num2 += 1) { ushort id = array2[(int)array[(int)num2]].ID; if (array2[(int)array[(int)num2]].KingdomID == KingdomID && this.GetMapID(id, bookType) == MapID) { return(id); } } return(0); }
// Token: 0x060001FD RID: 509 RVA: 0x0001B7C8 File Offset: 0x000199C8 public ushort GetKingdomID(ushort ID, BookMark.eBookType bookType = BookMark.eBookType.Role) { if (ID == 0) { return(0); } if (bookType == BookMark.eBookType.Role) { return(this.AllData[(int)(ID -= 1)].KingdomID); } return(this.AllAllianceData[(int)(ID -= 1)].KingdomID); }
// Token: 0x06000205 RID: 517 RVA: 0x0001BB6C File Offset: 0x00019D6C private void RemoveDataIndex(ushort index, BookMark.eBookType bookType = BookMark.eBookType.Role) { byte b; byte[] array2; if (bookType == BookMark.eBookType.Role) { BookMarkData[] array = this.AllData; b = this.KindDataCount[(int)array[(int)index].Type]; array2 = this.KindDataIDIndex[(int)array[(int)index].Type]; } else { BookMarkData[] array = this.AllAllianceData; b = this.AllianceBookCount; array2 = this.AllianceIDIndex; } bool flag = false; for (int i = 0; i < (int)b; i++) { if ((ushort)array2[i] == index) { flag = true; int num = (int)b - (i + 1); if (num > 0) { Array.Copy(array2, i + 1, array2, i, num); } break; } } if (flag && b > 0) { if (bookType == BookMark.eBookType.Role) { byte[] kindDataCount = this.KindDataCount; byte type = this.AllData[(int)index].Type; kindDataCount[(int)type] = kindDataCount[(int)type] - 1; } else { this.AllianceBookCount -= 1; } } }
// Token: 0x060001FC RID: 508 RVA: 0x0001B740 File Offset: 0x00019940 public int GetMapID(ushort ID, BookMark.eBookType bookType = BookMark.eBookType.Role) { if (ID == 0) { return(0); } BookMarkData[] array; if (bookType == BookMark.eBookType.Role) { array = this.AllData; } else { array = this.AllAllianceData; } if (array[(int)(ID -= 1)].MapID == 0) { array[(int)ID].MapID = GameConstants.PointCodeToMapID(array[(int)ID].KingdomPoint.zoneID, array[(int)ID].KingdomPoint.pointID); } return(array[(int)ID].MapID); }
// Token: 0x06002C22 RID: 11298 RVA: 0x00487200 File Offset: 0x00485400 public void OnButtonClick(UIButton sender) { Door door = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door; switch (sender.m_BtnID1) { case 0: case 1: case 2: case 3: this.ChangeTag((UIBookMark.ClickType)sender.m_BtnID1, false, true); break; case 4: if (this.CurrentAllianceTag == UIBookMark.ClickType.RoleTag) { door.m_GroundInfo.ModifyBookmarksPanel((ushort)sender.m_BtnID2, UIGroundInfo._BookmarkSwitch.eType.ModifyBookmark); } else { door.m_GroundInfo.ModifyBookmarksPanel((ushort)sender.m_BtnID2, UIGroundInfo._BookmarkSwitch.eType.ModifyAlliancemark); } door.CloseMenu(false); break; case 5: if (this.CurrentAllianceTag == UIBookMark.ClickType.RoleTag) { DataManager.Instance.RoleBookMark.sendDelBookMark((ushort)sender.m_BtnID2); } else { DataManager.Instance.RoleBookMark.sendDelBookMark_Alliance((byte)sender.m_BtnID2); } break; case 6: { BookMark.eBookType bookType = (BookMark.eBookType)(this.CurrentAllianceTag - 9); door.GoToMapID(DataManager.Instance.RoleBookMark.GetKingdomID((ushort)sender.m_BtnID2, bookType), DataManager.Instance.RoleBookMark.GetMapID((ushort)sender.m_BtnID2, bookType), 0, 1, true); break; } case 7: door.CloseMenu(false); break; case 8: if (this.Type == UIBookMark.BookMarkType.Type2) { BookMark roleBookMark = DataManager.Instance.RoleBookMark; Array.Clear(roleBookMark.SelectBookMarkIndex, 0, roleBookMark.SelectBookMarkIndex.Length); roleBookMark.SelectCount = this.SelectCount; int num = 0; for (int i = 0; i < this.BookMarkSel.Length; i++) { if (this.SelectCount == 0) { break; } if (this.BookMarkSel[i] > 0) { roleBookMark.SelectBookMarkIndex[num++] = this.BookMarkSel[i]; this.SelectCount -= 1; } } door.CloseMenu(false); } break; case 9: this.ChangeAllianceTag(UIBookMark.ClickType.RoleTag, this.CurrentTag, false, true); break; case 10: this.ChangeAllianceTag(UIBookMark.ClickType.AllianceTag, this.CurrentTag, false, true); break; } }