出牌速度修改,战况显示个人战绩

master
罗家炜 2025-07-06 05:15:49 +08:00
parent 6e3cfa0297
commit 3e97cddb8a
9 changed files with 120 additions and 114 deletions

View File

@ -405,20 +405,22 @@ function M:OnEventInteraction(evt_data)
end
-- GPS更新事件
-- function M:OnEventUpdateGPS(evt_data)
-- self._cacheEvent:Enqueue(
-- function()
-- local seat = evt_data['seat']
-- local pos = evt_data['pos']
-- if seat == 0 or seat == 'skip' then
-- return
-- end
-- local p = self._room:GetPlayerBySeat(seat)
-- p.self_user.location = Location.new(pos)
-- end
-- )
-- end
function M:OnEventUpdateGPS(evt_data)
self._cacheEvent:Enqueue(
function()
if self._callback_popEvent then
self._callback_popEvent(true)
end
local seat = evt_data['seat']
local pos = evt_data['pos']
if seat == 0 or seat == 'skip' then
return
end
local p = self._room:GetPlayerBySeat(seat)
p.self_user.location = Location.new(pos)
end
)
end
-- 被踢出房间事件
function M:OnEventKicked()

View File

@ -131,8 +131,10 @@ function M:RecursionGetNumber1(index, id, tempTable)
ViewUtil.CloseModalWait()
else
for i = 1, #numbers do
if numbers[i].partnerLev ~= 0 then
table.insert(tempTable, numbers[i])
end
end
self:RecursionGetNumber1(index + 1, id, tempTable)
end
end

View File

@ -39,7 +39,12 @@ end
function M:init(btn_type)
local url
if btn_type == 2 then
local group = DataManager.groups:get(self.group_id)
local lev = group.lev
if lev == 3 and group.partnerLev == 0 then
lev = 4
end
if btn_type == 2 and lev ~= 4 then
url = "ui://NewGroup/Win_ManagerView"
else
url = "ui://NewGroup/Win_ManagerView_old"
@ -55,19 +60,15 @@ function M:init(btn_type)
-- end
local lst_index = self._view:GetChild("lst_index")
lst_index:RemoveChildrenToPool()
local group = DataManager.groups:get(self.group_id)
--根据玩家权限,加载不同的界面配置
local lev = group.lev
if lev == 3 and group.partnerLev == 0 then
lev = 4
end
self.ctr_index = self._view:GetController("index")
self._ctr_tongji = self._view:GetController('tongji')
self.page_config = MngPageConfig.Config[btn_type][lev]
local gmsv
if btn_type == 2 then
if btn_type == 2 and lev ~= 4 then
--绑定统计代码
self._child_statView = GroupManagerStagView.new(self)
-- 初始界面 --战况是用新界面
@ -241,7 +242,13 @@ end
-- quick_access_id 是快速访问标志打开对应id的页面
function M:Show(quick_access_id)
local index = self.ctr_index.selectedIndex
if self._data_btn_type == 2 then
local group = DataManager.groups:get(self.group_id)
local lev = group.lev
if lev == 3 and group.partnerLev == 0 then
lev = 4
end
if self._data_btn_type == 2 and lev ~= 4 then
self._child_statView:InitInfo()
end

View File

@ -61,9 +61,18 @@ function M:InitView()
self.lst_record.itemRenderer = function(index, obj)
self:OnRenderRecordItem(index, obj)
end
self.lst_record.scrollPane.onPullUpRelease:Set(function()
self:GetRecordData(self.lst_record.numItems)
end)
-- self.lst_record.scrollPane.onPullUpRelease:Set(function()
-- self:GetRecordData(self.lst_record.numItems)
-- end)
self.lst_record_find = self._view:GetChild("lst_member_find")
self.lst_record_find:SetVirtual()
self.lst_record_find.itemRenderer = function(index, obj)
self:OnRenderRecordItem(index, obj)
end
-- self.lst_record.scrollPane.onPullUpRelease:Set(function()
-- self:GetRecordData(self.lst_record.numItems)
-- end)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"),
-308, 0, function()
@ -112,46 +121,40 @@ function M:InitView()
ViewUtil.ErrorTip(nil, '输入不能为空')
return
end
self._view:GetChild('tex_id').text = ""
qid = tonumber(text) or 0
qnick = text
local time_type = self._view:GetController("type").selectedIndex
if self.begin_time ~= nil and self.end_time ~= nil then
time_type = 0
end
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_FindPartnerStat(
self.group_id,
qid, 0, 6, time_type, self.begin_time, self.end_time,
fgCtr:FG_GetMemberStat(self.group_id, qid, DataManager.SelfUser.account_id,
0, 6, 3, self.begin_time, self.end_time,
function(res)
-- printlog("aaaaaaaaaaaaaaaa22222222222222222222222222222")
-- pt(res)
if res.ReturnCode == 0 then
local members = res.Data.members
self.record_data_find = {}
for i = 1, #members do
if members[i].round > 0 then
members[i].pump = 0 - members[i].pump
self.record_data_find[#self.record_data_find + 1] = members[i]
end
end
ctr_search.selectedIndex = 1
ViewUtil.CloseModalWait()
if self._is_destroy then
print("lingmeng record_data_find", #self.record_data_find)
self.lst_record_find.numItems = #self.record_data_find
else
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(res.ReturnCode)
return
end
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, '找不到成员')
else
self._view:GetChild('tex_id').text = ''
ctr_search.selectedIndex = 1
local item_result = self._view:GetChild('lst_member_find')
item_result:RemoveChildrenToPool()
for j = 1, #res.Data.members do
local tem = item_result:AddItemFromPool()
self:FillRecordItem(res.Data.members[j], tem)
end
end
end
)
end)
end
)
local btn_back = self._view:GetChild('btn_back')
btn_back.onClick:Set(
function()
ctr_search.selectedIndex = 0
table.sort(self.record_data, function(a, b)
return a.total_round > b.total_round
return a.round > b.round
end)
self.lst_record.numItems = #self.record_data
end
@ -168,11 +171,11 @@ function M:InitView()
if type.selectedIndex == 1 then
table.sort(self.record_data, function(a, b)
return a.total_win > b.total_win
return a.score > b.score
end)
elseif type.selectedIndex == 2 then
table.sort(self.record_data, function(a, b)
return a.total_win < b.total_win
return a.score < b.score
end)
end
self.lst_record:RefreshVirtualList()
@ -189,11 +192,11 @@ function M:InitView()
type.selectedIndex = type.selectedIndex == 0 and 1 or 3 - type.selectedIndex
if type.selectedIndex == 1 then
table.sort(self.record_data, function(a, b)
return a.total_round > b.total_round
return a.round > b.round
end)
elseif type.selectedIndex == 2 then
table.sort(self.record_data, function(a, b)
return a.total_round < b.total_round
return a.round < b.round
end)
end
self.lst_record:RefreshVirtualList()
@ -211,11 +214,11 @@ function M:InitView()
if type.selectedIndex == 1 then
table.sort(self.record_data, function(a, b)
return a.win_round > b.win_round
return a.win > b.win
end)
elseif type.selectedIndex == 2 then
table.sort(self.record_data, function(a, b)
return a.win_round < b.win_round
return a.win < b.win
end)
end
self.lst_record:RefreshVirtualList()
@ -233,11 +236,11 @@ function M:InitView()
if type.selectedIndex == 1 then
table.sort(self.record_data, function(a, b)
return a.reward_hp > b.reward_hp
return a.pump > b.pump
end)
elseif type.selectedIndex == 2 then
table.sort(self.record_data, function(a, b)
return a.reward_hp < b.reward_hp
return a.pump < b.pump
end)
end
self.lst_record:RefreshVirtualList()
@ -269,21 +272,18 @@ end
function M:RecursionGetRecoedData(index)
ViewUtil.ShowModalWait("正在获取数据中")
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetMemberStat(self.group_id, 0,
self._data_choosePlayyer.parentId or self._data_choosePlayyer.uid,
index * 67, 67, 0, self.begin_time, self.end_time,
fgCtr:FG_GetMemberStat(self.group_id, 0, self._data_choosePlayyer.uid,
index * 67, 67, 3, self.begin_time, self.end_time,
function(res)
end)
fgCtr:FG_GetPartnerStatMember(self.group_id, self._data_choosePlayyer.uid,
self._data_choosePlayyer.parentId or self._data_choosePlayyer.uid,
index * 67, 67, 0, self.begin_time, self.end_time, function(res)
if res.ReturnCode == 0 then
local members = res.Data.members
if members and #members > 0 then
for i = 1, #members do
if members[i].round > 0 then
members[i].pump = 0 - members[i].pump
self.record_data[#self.record_data + 1] = members[i]
end
end
self:RecursionGetRecoedData(index + 1)
else
ViewUtil.CloseModalWait()
@ -292,7 +292,7 @@ function M:RecursionGetRecoedData(index)
self.btn_total:GetController("type").selectedIndex = 0
self.btn_reward:GetController("type").selectedIndex = 0
table.sort(self.record_data, function(a, b)
return a.total_round > b.total_round
return a.round > b.round
end)
self.lst_record.numItems = #self.record_data
end
@ -312,13 +312,14 @@ function M:RecursionGetRankData(index)
local ranks = res.Data.ranks
if ranks and #ranks > 0 then
for i = 1, #ranks do
-- ranks[i].pump = 0 - ranks[i].pump
self.record_data[#self.record_data + 1] = ranks[i]
end
self:RecursionGetRankData(index + 1)
else
ViewUtil.CloseModalWait()
table.sort(self.record_data, function(a, b)
return a.total_round > b.total_round
return a.round > b.round
end)
self.lst_record.numItems = #self.record_data
end
@ -356,9 +357,9 @@ function M:FillRecordItem(data, obj)
ctr_show_total.selectedIndex = 0
end
obj:GetChild("tex_round_valid").text = d2ad(data.reward_hp + data.total_win) --d2ad(data.reward_hp) --data.valid_round / 100
obj:GetChild("tex_round_total").text = data.total_round
obj:GetChild("tex_total").text = d2ad(data.total_win)
obj:GetChild("tex_round_valid").text = d2ad(data.pump + data.score) --d2ad(data.pump) --data.valid_round / 100
obj:GetChild("tex_round_total").text = data.round
obj:GetChild("tex_total").text = d2ad(data.score)
obj:GetChild("tex_round_youxiao").text = data.valid_round / 100
@ -381,7 +382,7 @@ function M:FillRecordItem(data, obj)
local btn_award = obj:GetChild("btn_award")
btn_award.text = d2ad(data.reward_hp) --d2ad(data.reward_hp+data.total_win)
btn_award.text = d2ad(data.pump) --d2ad(data.pump+data.score)
btn_award.onClick:Set(function()
local time_type = self._view:GetController("type").selectedIndex
local gniv = GroupPartnerStatPlay.new(self.group_id, data.uid, data.partnerLev, DataManager.SelfUser.account_id,
@ -436,14 +437,19 @@ end
function M:FillRecordItem2(data, obj)
obj:GetChild('tex_name').text = data.nick
obj:GetChild('tex_id').text = data.uid
obj:GetChild('tex_total').text = d2ad(data.total_win)
obj:GetChild('tex_round_total').text = data.total_round
obj:GetChild('tex_win').text = data.win_round or 0
obj:GetChild('tex_reward').text = d2ad(data.reward_hp)
obj:GetChild('tex_total').text = d2ad(data.score)
obj:GetChild('tex_round_total').text = data.round
obj:GetChild('tex_win').text = data.win or 0
obj:GetChild('tex_reward').text = d2ad(data.pump)
end
function M:OnRenderRecordItem(index, obj)
local data = self.record_data[index + 1]
local dataList = self.record_data
if self._view:GetController('search').selectedIndex == 1 then
dataList = self.record_data_find
end
print("lingmeng dataList", #dataList)
local data = dataList[index + 1]
self:FillRecordItem2(data, obj)
end

View File

@ -440,11 +440,12 @@ function M:OnRenderRecordItemNew(obj, mainRecord, root_id)
else
ctr_show_total.selectedIndex = 0
end
obj:GetChild("tex_round_valid").text = d2ad(mainRecord.reward_hp + mainRecord.total_win) --d2ad(data.reward_hp) --data.valid_round / 100
obj:GetChild("tex_round_valid").text = d2ad((mainRecord.reward_tongji or mainRecord.reward_hp) + mainRecord
.total_win) --d2ad(data.reward_hp) --data.valid_round / 100
obj:GetChild("tex_round_total").text = mainRecord.total_round
obj:GetChild("tex_total").text = d2ad(mainRecord.total_win)
obj:GetChild("tex_round_youxiao").text = mainRecord.valid_round / 100
obj:GetChild('tex_reward').text = d2ad(mainRecord.reward_hp)
obj:GetChild('tex_reward').text = d2ad(mainRecord.reward_tongji or mainRecord.reward_hp)
obj:GetChild("btn_more").visible = not mainRecord.partnerLev or mainRecord.partnerLev > 0
obj:GetController("more").onChanged:Set(function() end)
obj:GetController("more").selectedIndex = 0
@ -651,7 +652,7 @@ function M:RecursionGetPropLog(members, index)
local info = res.Data
self.groupumberTemp.total_round = info.count
self.groupumberTemp.valid_round = info.valid_count * 100
self.groupumberTemp.reward_hp = 0
self.groupumberTemp.reward_hp = info.pump
self.groupumberTemp.total_win = 0
ViewUtil.CloseModalWait()
fgCtr:FG_GetMembersCount(self.group_id, function(res)

View File

@ -247,9 +247,6 @@ function M:OnEventOutCard(evt_data)
local p = self._room:GetPlayerBySeat(seat)
self._cacheEvent:Enqueue(function()
if self._callback_popEvent then
self._callback_popEvent(true)
end
local _room = self._room
if (seat == _room.self_player.seat) then
list_remove(_room.self_player.handcard_list, card)
@ -299,6 +296,9 @@ function M:OnAddCard(evt_data)
local p = _room:GetPlayerBySeat(seat)
self._cacheEvent:Enqueue(function()
if self._callback_popEvent then
self._callback_popEvent(true)
end
p.DiceCard = card
p.hand_left_count = p.hand_left_count + 1
if (seat == _room.self_player.seat) then

View File

@ -483,6 +483,12 @@ function M:EventInit()
card_info:UpdateFzList(p.fz_list, false, p.seat)
end
end
coroutine.start(
function()
coroutine.wait(0.23)
self._popEvent = true
end
)
end
)
@ -1184,7 +1190,7 @@ function M:OnFangziAction(...)
pNode:AddChild(effect)
coroutine.start(
function()
coroutine.wait(0.5)
coroutine.wait(0.66)
effect:Dispose()
end
)
@ -1203,7 +1209,7 @@ function M:OnFangziAction(...)
if fz.type ~= RB_FZType.Kan then
local time = 0.01
if fz.type == RB_FZType.Pao or fz.type == RB_FZType.Ti or fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then
time = 0.5
time = 0.66
end
local removeOutcard = _player_card_info[self:GetPos(fz.from_seat)]
coroutine.start(
@ -1259,7 +1265,7 @@ function M:OnFangziAction(...)
local time = 0.01
if fz.type ~= RB_FZType.Kan then
if fz.type == RB_FZType.Pao or fz.type == RB_FZType.Ti or fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then
time = time + 0.5
time = time + 0.66
end
end

View File

@ -3,16 +3,9 @@
"n213_yvb2": {
"hidden": true
},
"n189_dji9": {
"hidden": true,
"collapsed": true
},
"n212_yvb2": {
"n181_b8zx": {
"hidden": true
},
"n83_kwi0": {
"collapsed": true
},
"n184_b5ny": {
"hidden": true
},
@ -22,7 +15,7 @@
"n214_yvb2": {
"hidden": true
},
"n181_b8zx": {
"n212_yvb2": {
"hidden": true
}
},

View File

@ -2,7 +2,7 @@
<component size="1135,559">
<controller name="type" pages="0,,1,,2," selected="0"/>
<controller name="mng" pages="0,,1," selected="0"/>
<controller name="search" pages="0,,1," selected="0"/>
<controller name="search" pages="0,,1," selected="1"/>
<displayList>
<image id="n229_yvb2" name="n229" src="imp57iho" fileName="images/Rectangle 343.png" xy="0,0" size="1135,559"/>
<list id="n184_b5ny" name="lst_mgr_index" xy="77,-177" size="612,53" group="n83_kwi0" visible="false" layout="row" overflow="hidden" colGap="1" defaultItem="ui://27vd145beeqmch0" selectionController="type">
@ -25,7 +25,7 @@
<item/>
<item/>
</list>
<list id="n190_dji9" name="lst_member_find" xy="0,65" size="1133,465" overflow="scroll" lineGap="5" defaultItem="ui://m7iejg46f6brhww" autoClearItems="true">
<list id="n190_dji9" name="lst_member_find" xy="0,65" size="1133,465" overflow="scroll" lineGap="5" defaultItem="ui://m7iejg46yvb27ijw" autoClearItems="true">
<gearDisplay controller="search" pages="1"/>
<relation target="" sidePair="width-width"/>
<item/>
@ -35,17 +35,6 @@
<item/>
</list>
<image id="n181_b8zx" name="n181" pkg="m7iejg46" src="b8zx7i4g" fileName="合伙人统计.png" xy="-250,-145" visible="false" alpha="0.5"/>
<image id="n185_dji9" name="n185" src="dfkc7i4w" fileName="images/kuang2.png" xy="761,-86" size="290,58" group="n187_dji9" scale="0.8,1"/>
<text id="n186_dji9" name="tex_id" xy="782,-86" size="203,59" group="n187_dji9" font="Microsoft YaHei" fontSize="24" color="#367256" vAlign="middle" autoSize="shrink" text="" input="true" prompt="输入玩家ID或昵称" maxLength="8"/>
<group id="n187_dji9" name="n187" xy="761,-86" size="290,59" group="n189_dji9" advanced="true"/>
<component id="n188_dji9" name="btn_search" src="dzx8hbb" fileName="component/Btn/btn_req.xml" xy="992,-88" size="134,58" group="n189_dji9" scale="0.8,1"/>
<group id="n189_dji9" name="n189" xy="761,-88" size="365,61" visible="false" advanced="true">
<relation target="" sidePair="center-center%"/>
</group>
<component id="n191_dji9" name="btn_back" src="efnuhdk" fileName="component/Btn/Btn_back1.xml" xy="449,542" size="71,54">
<gearDisplay controller="search" pages="1"/>
<Button controller="search" page="0"/>
</component>
<image id="n210_yvb2" name="n210" src="csp47i44" fileName="component/nav/sd.png" xy="1,0" size="1122,60" group="n216_yvb2">
<relation target="" sidePair="width-width"/>
</image>