public static void ShowItemDialogByPosType(EPosType posType, int pos) { Dictionary <int, XItem> dict = GTDataManager.Instance.GetItemDataByPosType(posType); if (!dict.ContainsKey(pos)) { return; } switch (posType) { case EPosType.RoleEquip: GTWindowManager.Instance.OpenWindow(EWindowID.UIEquipInfo); UIEquipInfo window1 = (UIEquipInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIEquipInfo); window1.ShowInfoByPos(EPosType.RoleEquip, pos); break; case EPosType.RoleGem: GTWindowManager.Instance.OpenWindow(EWindowID.UIGemInfo); UIGemInfo window2 = (UIGemInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIGemInfo); window2.ShowInfoByPos(EPosType.RoleGem, pos); break; case EPosType.RoleFashion: break; case EPosType.RoleRune: break; case EPosType.BagItem: ShowItemDialogByBagType(EBagType.ITEM, pos); break; case EPosType.BagGem: GTWindowManager.Instance.OpenWindow(EWindowID.UIGemInfo); UIGemInfo window6 = (UIGemInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIGemInfo); window6.ShowInfoByPos(EPosType.BagGem, pos); break; case EPosType.BagChip: GTWindowManager.Instance.OpenWindow(EWindowID.UIChipInfo); UIChipInfo window7 = (UIChipInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIChipInfo); window7.ShowInfoByPos(pos); break; case EPosType.BagFashion: break; case EPosType.BagRune: break; default: break; } }
public static void ShowItemDialogByBagType(EBagType bagType, int pos) { Dictionary <int, XItem> dict = GTDataManager.Instance.GetBagDataByBagType(bagType); if (!dict.ContainsKey(pos)) { return; } XItem item = dict[pos]; DItem db = ReadCfgItem.GetDataById(item.Id); switch (db.ItemType) { case EItemType.EQUIP: GTWindowManager.Instance.OpenWindow(EWindowID.UIEquipInfo); UIEquipInfo w1 = (UIEquipInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIEquipInfo); w1.ShowInfoByPos(EPosType.BagItem, pos); break; case EItemType.MAT: GTWindowManager.Instance.OpenWindow(EWindowID.UIItemInfo); UIItemInfo w2 = (UIItemInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIItemInfo); w2.ShowInfoByPos(pos, false); break; case EItemType.DRUG: case EItemType.BOX: case EItemType.KEY: GTWindowManager.Instance.OpenWindow(EWindowID.UIItemInfo); UIItemInfo w3 = (UIItemInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIItemInfo); w3.ShowInfoByPos(pos, true); break; case EItemType.EXP: break; case EItemType.CHIP: GTWindowManager.Instance.OpenWindow(EWindowID.UIChipInfo); UIChipInfo w4 = (UIChipInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIChipInfo); w4.ShowInfoByPos(pos); break; case EItemType.GEM: GTWindowManager.Instance.OpenWindow(EWindowID.UIGemInfo); UIGemInfo w5 = (UIGemInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIGemInfo); w5.ShowInfoByPos(EPosType.BagGem, pos); break; } }