@@ -2657,6 +2657,7 @@ OpenGUI = {
2657
2657
return
2658
2658
end
2659
2659
Land .RelationShip .Owner .set (landId ,targetXuid )
2660
+ MEM [pl .xuid ].BackToId = nil
2660
2661
pl :sendModalForm (
2661
2662
_Tr (' gui.general.complete' ),
2662
2663
_Tr (' title.landtransfer.complete' ,' <a>' ,Land .Options .Nickname .get (landId ,3 ),' <b>' ,selected [1 ]),
@@ -2734,23 +2735,27 @@ ItemSelector = {
2734
2735
]]
2735
2736
2736
2737
local function toPages ()
2737
- local rtn = {}
2738
+ local pages = {}
2739
+ local allpair = {}
2738
2740
for n ,item in pairs (payload .list ) do
2739
- local num = math.ceil (n / ItemSelector ._perpage )
2740
- rtn [num ] = rtn [num ] or {}
2741
- rtn [num ][# rtn [num ]+ 1 ] = {n ,item }
2741
+ allpair [# allpair + 1 ] = {n ,item }
2742
2742
end
2743
- return rtn
2743
+ for n ,pair in pairs (allpair ) do
2744
+ local pn = math.ceil (n / ItemSelector ._perpage )
2745
+ pages [pn ] = pages [pn ] or {}
2746
+ pages [pn ][# pages [pn ]+ 1 ] = pair
2747
+ end
2748
+ return pages ,allpair
2744
2749
end
2745
2750
2751
+ local pages ,allpair = toPages ()
2746
2752
local xuid = player .xuid
2747
- local pages = toPages ()
2748
2753
MEM [xuid ].isr = {
2749
2754
payload = payload ,
2750
2755
runtime = {
2751
- origin = pages ,
2756
+ origin = allpair ,
2752
2757
display = pages ,
2753
- page = 1 ,
2758
+ page_num = 1 ,
2754
2759
filter = ' '
2755
2760
}
2756
2761
}
@@ -2775,7 +2780,7 @@ ItemSelector = {
2775
2780
-- Init.
2776
2781
local runtime = MEM [xuid ].isr .runtime
2777
2782
local payload = MEM [xuid ].isr .payload
2778
- local displayList = runtime .display [runtime .page ]
2783
+ local displayList = runtime .display [runtime .page_num ]
2779
2784
local pageCount = # runtime .display
2780
2785
2781
2786
local function buildPageTurner (pages )
@@ -2786,7 +2791,7 @@ ItemSelector = {
2786
2791
return rtn
2787
2792
end
2788
2793
local function setDisplayPage (pageNum )
2789
- runtime .page = pageNum
2794
+ runtime .page_num = pageNum
2790
2795
displayList = runtime .display [pageNum ]
2791
2796
end
2792
2797
local function getItemCount ()
@@ -2804,7 +2809,7 @@ ItemSelector = {
2804
2809
2805
2810
-- Update page if changed.
2806
2811
local nowPage = res [# res ] + 1
2807
- if nowPage ~= runtime .page and nowPage <= pageCount then
2812
+ if nowPage ~= runtime .page_num and nowPage <= pageCount then
2808
2813
setDisplayPage (nowPage )
2809
2814
goto JUMPOUT_ISR_PARSE
2810
2815
end
@@ -2814,15 +2819,15 @@ ItemSelector = {
2814
2819
runtime .display = {}
2815
2820
local findTarget = string.lower (res [1 ])
2816
2821
local count = 0
2817
- for n ,str in pairs (payload . list ) do
2818
- if string.find (string.lower (str ),findTarget ) then
2822
+ for n ,pair in pairs (runtime . origin ) do
2823
+ if string.find (string.lower (pair [ 2 ] ),findTarget ) then
2819
2824
count = count + 1
2820
2825
local num = math.ceil (count / ItemSelector ._perpage )
2821
2826
runtime .display [num ] = runtime .display [num ] or {}
2822
- runtime .display [num ][# runtime .display [num ]+ 1 ] = { n , str }
2827
+ runtime .display [num ][# runtime .display [num ]+ 1 ] = pair
2823
2828
end
2824
2829
end
2825
- runtime .page = 1
2830
+ runtime .page_num = 1
2826
2831
displayList = runtime .display [1 ]
2827
2832
pageCount = # runtime .display
2828
2833
runtime .filter = res [1 ]
@@ -2855,7 +2860,7 @@ ItemSelector = {
2855
2860
Form :addInput (_Tr (' gui.itemselector.search.type' ),_Tr (' gui.itemselector.search.ph' ),runtime .filter )
2856
2861
Form :addLabel (
2857
2862
_Tr (' gui.itemselector.pages' ,
2858
- ' <a>' ,runtime .page ,
2863
+ ' <a>' ,runtime .page_num ,
2859
2864
' <b>' ,pageCount ,
2860
2865
' <c>' ,getItemCount ()
2861
2866
)
@@ -2866,7 +2871,7 @@ ItemSelector = {
2866
2871
Form :addSwitch (pair [2 ],false )
2867
2872
end
2868
2873
end
2869
- Form :addStepSlider (_Tr (' gui.itemselector.jumpto' ),buildPageTurner (pageCount ),runtime .page - 1 )
2874
+ Form :addStepSlider (_Tr (' gui.itemselector.jumpto' ),buildPageTurner (pageCount ),runtime .page_num - 1 )
2870
2875
player :sendForm (Form ,ItemSelector .Callback )
2871
2876
end
2872
2877
}
@@ -4029,7 +4034,10 @@ function GetPlayerList(mode,IncAll)
4029
4034
end
4030
4035
if mode == 0 then
4031
4036
for xuid ,ex in pairs (base ) do
4032
- rtn [# rtn + 1 ] = xuid
4037
+ local t = data .xuid2name (xuid )
4038
+ if t and t ~= ' ' then
4039
+ rtn [# rtn + 1 ] = xuid
4040
+ end
4033
4041
end
4034
4042
elseif mode == 1 then
4035
4043
for xuid ,ex in pairs (base ) do
0 commit comments