From c525b06de1415116f7d95dadfbb4c26d71402d13 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 15 一月 2026 14:58:38 +0800
Subject: [PATCH] 0312 支持坊市跳转指定商品,前提是商品存在
---
Main/System/Store/StoreWin.cs | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Main/System/Store/StoreWin.cs b/Main/System/Store/StoreWin.cs
index 240d780..111d50e 100644
--- a/Main/System/Store/StoreWin.cs
+++ b/Main/System/Store/StoreWin.cs
@@ -85,6 +85,7 @@
}
scroller.Refresh();
+ int jumpIndex = -1;
var list = StoreModel.Instance.storeTypeDict[(int)StoreModel.Instance.selectStoreFuncType];
for (int i = 0; i < list.Count; i++)
{
@@ -92,9 +93,18 @@
{
scroller.AddCell(ScrollerDataType.Header, i);
}
+ if (jumpIndex == -1 && list[i].shopId == StoreModel.Instance.jumpShopID)
+ {
+ jumpIndex = i / 3;
+ }
}
scroller.Restart();
scroller.lockType = EnhanceLockType.KeepVertical;
+ if (StoreModel.Instance.jumpShopID != 0)
+ {
+ scroller.JumpIndex(jumpIndex);
+ StoreModel.Instance.jumpShopID = 0;
+ }
}
--
Gitblit v1.8.0