master
罗家炜 2025-09-19 18:50:28 +08:00
parent 4d9d22b368
commit e552d08fcb
27 changed files with 122 additions and 56 deletions

View File

@ -380,6 +380,7 @@ function M:FG_SetShowStartRoom(groupId, isOpen, callback)
local _data = {} local _data = {}
_data.groupId = groupId _data.groupId = groupId
_data.isOpen = isOpen _data.isOpen = isOpen
_data.uid = DataManager.SelfUser.account_id
self._mgr_client:send(Protocol.FGMGR_SET_SHOWSTART, _data, function(res) self._mgr_client:send(Protocol.FGMGR_SET_SHOWSTART, _data, function(res)
callback(res) callback(res)
end) end)
@ -667,9 +668,9 @@ function M:OnRefNumberBan(evt_data)
end end
function M:OnRefShowStartRoom(evt_data) function M:OnRefShowStartRoom(evt_data)
local group = DataManager.groups:get(self.groupId) local group = DataManager.groups:get(evt_data.groupId)
group.isOpenStartRoom = evt_data.isOpen group.isOpenStartRoom = evt_data.isOpen
DispatchEvent(self._dispatcher, GroupMgrEvent.OnRefNumberBan, evt_data) DispatchEvent(self._dispatcher, GroupMgrEvent.OnRefShowStartRoom, evt_data)
end end
function M:PopEvent() function M:PopEvent()

View File

@ -396,16 +396,16 @@ end
function M:_evtOnRefShowStartRoom(...) function M:_evtOnRefShowStartRoom(...)
local arg = { ... } local arg = { ... }
-- local groupId = arg[1] local evt_data = arg[1]
-- local view = ViewManager.GetCurrenView() -- local view = ViewManager.GetCurrenView()
-- if view.class ~= "FamilyMainView" then -- if view.class ~= "FamilyMainView" then
-- return -- return
-- end -- end
printlog("lingmeng _evtOnRefShowStartRoom", self._group.id, evt_data.groupId)
-- if view._group == nil or groupId ~= view._group.id then if self._group.id == nil or evt_data.groupId ~= self._group.id then
-- return return
-- end end
self:UpdateFamilyRoom(nil, self._group.id) self:UpdateFamilyRoom(nil, self._group.id)
end end

View File

@ -67,7 +67,7 @@ function FamilyRoomCard.New()
obj:GetController("cColor").selectedIndex = data[_idx].colorIndex obj:GetController("cColor").selectedIndex = data[_idx].colorIndex
obj.onClick:Set(function() obj.onClick:Set(function()
if Instance.group and Instance.group ~= 1 then if Instance.group and Instance.group.lev ~= 1 then
local _curren_msg = local _curren_msg =
MsgWindow.new( MsgWindow.new(
Instance._root_view, Instance._root_view,

View File

@ -243,7 +243,6 @@ function M:init(url)
self._view:GetChild('btn_showALlStartRoom').onClick:Set(function() self._view:GetChild('btn_showALlStartRoom').onClick:Set(function()
local mgr_ctr = ControllerManager.GetController(GroupMgrController) local mgr_ctr = ControllerManager.GetController(GroupMgrController)
self:UpdateFamilyRoom(nil, self._group.id)
mgr_ctr:FG_SetShowStartRoom(self._group.id, 1 - self._group.isOpenStartRoom, function(res) mgr_ctr:FG_SetShowStartRoom(self._group.id, 1 - self._group.isOpenStartRoom, function(res)
--因为没有回调,这边先把值设置好 --因为没有回调,这边先把值设置好
if res.ReturnCode ~= 0 then if res.ReturnCode ~= 0 then
@ -568,10 +567,8 @@ function M:OnEnterGroupCallBack()
FamilyOnline(self._group.id, self) FamilyOnline(self._group.id, self)
ViewUtil.ShowModalWait(self._root_view, "正在加载成员列表中......")
self:ChangeNumber(fgCtr, self._group.id, 0, self._group.total_member_num, false, 1) self:ChangeNumber(fgCtr, self._group.id, 0, self._group.total_member_num, false, 1)
ViewUtil.ShowModalWait(self._root_view, "正在加载房间列表中......")
self:UpdateFamilyRoom(fgCtr, self._group.id) self:UpdateFamilyRoom(fgCtr, self._group.id)
--ViewUtil.ShowModalWait(self._root_view, "正在加载亲友圈权限中......") --ViewUtil.ShowModalWait(self._root_view, "正在加载亲友圈权限中......")
@ -600,6 +597,8 @@ function M:OnEnterGroupCallBack()
end end
function M:UpdateFamilyRoom(fgCtr, id) function M:UpdateFamilyRoom(fgCtr, id)
ViewUtil.ShowModalWait(self._root_view, "正在加载房间列表中......")
local list_room = self._view:GetChild('list_room') local list_room = self._view:GetChild('list_room')
list_room:SetVirtual() list_room:SetVirtual()
local playList = self._group.playList local playList = self._group.playList
@ -614,10 +613,10 @@ function M:UpdateFamilyRoom(fgCtr, id)
end end
local all_num = #playList + #roomList local all_num = #playList + #roomList
local show_num = all_num local show_num = all_num
if self._group.isOpenStartRoom == 1 then if self._group.lev == 3 and self._group.isOpenStartRoom == 1 then
self._view:GetChild('btn_showALlStartRoom'):GetController('isOpen').selectedIndex = self._group.isOpenStartRoom
show_num = #playList + #readyRoom show_num = #playList + #readyRoom
end end
self._view:GetChild('btn_showALlStartRoom'):GetController('isOpen').selectedIndex = self._group.isOpenStartRoom
list_room.itemRenderer = function(index, obj) list_room.itemRenderer = function(index, obj)
if index < #readyRoom then if index < #readyRoom then
local newIndex = index + 1 local newIndex = index + 1
@ -748,6 +747,7 @@ function M:UpdateFamilyRoom(fgCtr, id)
if self._view_PlayEditView then if self._view_PlayEditView then
self._view_PlayEditView:Refalsh(self._group.id) self._view_PlayEditView:Refalsh(self._group.id)
end end
ViewUtil.CloseModalWait()
end end
--房间渲染 --房间渲染
@ -836,6 +836,8 @@ function M:ReflashFamilyList()
end end
function M:ConnetFamily(index, groups) function M:ConnetFamily(index, groups)
ViewUtil.ShowModalWait(self._root_view, "正在加载成员列表中......")
if self._group then if self._group then
FamilyOffline(self._group.id, self) FamilyOffline(self._group.id, self)
end end

View File

@ -41,7 +41,7 @@ function M:init(url)
self.Lable_name = view:GetChild('Lable_name'):GetChild('text') self.Lable_name = view:GetChild('Lable_name'):GetChild('text')
self.Lable_name.text = user.nick_name self.Lable_name.text = user.nick_name
self.group_sex = view:GetController('group_sex') self.group_sex = view:GetController('group_sex')
self.group_sex.selectedIndex = user.sex self.group_sex.selectedIndex = user.sex - 1
self.Lable_phone = view:GetChild('Lable_phone'):GetChild('text') self.Lable_phone = view:GetChild('Lable_phone'):GetChild('text')
local bind = view:GetController('bind') local bind = view:GetController('bind')
if user.phone then if user.phone then

View File

@ -71,9 +71,9 @@ function M:FillRoomData(s2croom)
local _config = _tableInfo["config"] local _config = _tableInfo["config"]
pt(_config) pt(_config)
room.room_config = EXRoomConfig.new(_config) room.room_config = EXRoomConfig.new(_config)
local playerList = _tableInfo["playerData"] local playerList = _tableInfo["playerData"]
room.curren_round = _tableInfo["round"] room.curren_round = _tableInfo["round"]
room.witness_player_list = _tableInfo["playerSpectatorData"] room.witness_player_list = _tableInfo["playerSpectatorData"]
room._flag_updateWitness = true room._flag_updateWitness = true
self:FillPlayerData(playerList) self:FillPlayerData(playerList)
@ -98,10 +98,10 @@ function M:FillRoomData(s2croom)
if room.self_player.seat == room.curren_outcard_seat then if room.self_player.seat == room.curren_outcard_seat then
local getCard = _hand_card[#_hand_card] local getCard = _hand_card[#_hand_card]
table.remove(_hand_card, #_hand_card) table.remove(_hand_card, #_hand_card)
table.sort(_hand_card, ViewUtil.HandCardSort) table.sort(_hand_card, self.HandCardSortAndJing)
table.insert(_hand_card, getCard) table.insert(_hand_card, getCard)
else else
table.sort(_hand_card, ViewUtil.HandCardSort) table.sort(_hand_card, self.HandCardSortAndJing)
end end
for i = 1, #_info_list do for i = 1, #_info_list do
local tem = _info_list[i] local tem = _info_list[i]
@ -169,7 +169,7 @@ function M:FillPlayBackData(pd_data)
local _hand_card = _jp["hand_card"] local _hand_card = _jp["hand_card"]
p.card_list = _hand_card p.card_list = _hand_card
--room.self_player.card_list = _hand_card --room.self_player.card_list = _hand_card
table.sort(_hand_card, ViewUtil.HandCardSort) table.sort(_hand_card, self.HandCardSortAndJing)
p.total_score = _jp["score"] p.total_score = _jp["score"]
p.hand_left_count = #_hand_card p.hand_left_count = #_hand_card
if _jp.hp_info then if _jp.hp_info then
@ -249,4 +249,34 @@ function M:FillWitnessData(pd_data)
end end
end end
function M.HandCardSortAndJing(a, b)
local jing = DataManager.CurrenRoom.jing
if a == jing or b == jing then
if a == b then
return a < b
end
return a == jing
else
if a < 200 then
a = a + 1000
elseif a < 300 then
a = a + 3000
elseif a < 400 then
a = a + 2000
else
a = a + 4000
end
if b < 200 then
b = b + 1000
elseif b < 300 then
b = b + 3000
elseif b < 400 then
b = b + 2000
else
b = b + 4000
end
return a < b
end
end
return M return M

View File

@ -99,10 +99,10 @@ function M:FillRoomData(s2croom)
if room.self_player.seat == room.curren_outcard_seat then if room.self_player.seat == room.curren_outcard_seat then
local getCard = _hand_card[#_hand_card] local getCard = _hand_card[#_hand_card]
table.remove(_hand_card, #_hand_card) table.remove(_hand_card, #_hand_card)
table.sort(_hand_card, ViewUtil.HandCardSort) table.sort(_hand_card, self.HandCardSortAndJing)
table.insert(_hand_card, getCard) table.insert(_hand_card, getCard)
else else
table.sort(_hand_card, ViewUtil.HandCardSort) table.sort(_hand_card, self.HandCardSortAndJing)
end end
for i = 1, #_info_list do for i = 1, #_info_list do
local tem = _info_list[i] local tem = _info_list[i]
@ -170,7 +170,7 @@ function M:FillPlayBackData(pd_data)
local _hand_card = _jp["hand_card"] local _hand_card = _jp["hand_card"]
p.card_list = _hand_card p.card_list = _hand_card
--room.self_player.card_list = _hand_card --room.self_player.card_list = _hand_card
table.sort(_hand_card, ViewUtil.HandCardSort) table.sort(_hand_card, self.HandCardSortAndJing)
p.total_score = _jp["score"] p.total_score = _jp["score"]
p.hand_left_count = #_hand_card p.hand_left_count = #_hand_card
if _jp.hp_info then if _jp.hp_info then
@ -249,4 +249,35 @@ function M:FillWitnessData(pd_data)
room:AddPlayer(p) room:AddPlayer(p)
end end
end end
function M.HandCardSortAndJing(a, b)
local jing = DataManager.CurrenRoom.jing
if a == jing or b == jing then
if a == b then
return a < b
end
return a == jing
else
if a < 200 then
a = a + 1000
elseif a < 300 then
a = a + 3000
elseif a < 400 then
a = a + 2000
else
a = a + 4000
end
if b < 200 then
b = b + 1000
elseif b < 300 then
b = b + 3000
elseif b < 400 then
b = b + 2000
else
b = b + 4000
end
return a < b
end
end
return M return M

View File

@ -331,6 +331,9 @@ function M:ClearChoose()
if self._click_index and self._click_index ~= -1 then if self._click_index and self._click_index ~= -1 then
self:ChangeMarkOutCards("") self:ChangeMarkOutCards("")
end end
if self._flag_seletedGet and self._flag_seletedGet ~= -1 then
self:ChangeMarkOutCards("")
end
self._click_index = -1 self._click_index = -1
self._view_handCardList.selectedIndex = -1 self._view_handCardList.selectedIndex = -1
self._ctr_seletedGet.selectedIndex = 1 self._ctr_seletedGet.selectedIndex = 1

View File

@ -18,5 +18,5 @@ AudioImporter:
ambisonic: 0 ambisonic: 0
3D: 1 3D: 1
userData: userData:
assetBundleName: assetBundleName: base/common/843a324d4f0104d51b55c771ef546b04
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/lobby/4a425335ab0e1c246f741e6da62b244f
assetBundleVariant: assetBundleVariant:

View File

@ -1,109 +1,109 @@
[ [
{ {
"lua_path": "/tolua_project,/base_project,/main_project", "lua_path": "/tolua_project,/base_project,/main_project",
"ver": "1.0.7", "ver": "1.0.8",
"name": "base_script", "name": "base_script",
"check": true, "check": true,
"bundle": "base/base_script", "bundle": "base/base_script",
"version": "1.0.7" "version": "1.0.8"
}, },
{ {
"ver": "1.0.7", "ver": "1.0.8",
"name": "common", "name": "common",
"check": true, "check": true,
"bundle": "base/common", "bundle": "base/common",
"version": "1.0.7" "version": "1.0.8"
}, },
{ {
"ver": "1.0.7", "ver": "1.0.8",
"name": "login", "name": "login",
"check": true, "check": true,
"bundle": "base/login", "bundle": "base/login",
"version": "1.0.7" "version": "1.0.8"
}, },
{ {
"ver": "1.0.7", "ver": "1.0.8",
"name": "lobby", "name": "lobby",
"check": true, "check": true,
"bundle": "base/lobby", "bundle": "base/lobby",
"version": "1.0.7" "version": "1.0.8"
}, },
{ {
"ver": "1.0.7", "ver": "1.0.8",
"name": "Family", "name": "Family",
"check": true, "check": true,
"bundle": "base/Family", "bundle": "base/Family",
"version": "1.0.7" "version": "1.0.8"
}, },
{ {
"ver": "1.0.7", "ver": "1.0.8",
"name": "chat", "name": "chat",
"check": true, "check": true,
"bundle": "base/chat", "bundle": "base/chat",
"version": "1.0.7" "version": "1.0.8"
}, },
{ {
"ver": "1.0.7", "ver": "1.0.8",
"name": "newgroup", "name": "newgroup",
"check": true, "check": true,
"bundle": "base/newgroup", "bundle": "base/newgroup",
"version": "1.0.7" "version": "1.0.8"
}, },
{ {
"ver": "1.0.7", "ver": "1.0.8",
"name": "rank", "name": "rank",
"check": true, "check": true,
"version": "1.0.7", "version": "1.0.8",
"bundle": "base/rank" "bundle": "base/rank"
}, },
{ {
"ver": "1.0.7", "ver": "1.0.8",
"name": "main_majiang", "name": "main_majiang",
"check": true, "check": true,
"version": "1.0.7", "version": "1.0.8",
"bundle": "base/main_majiang" "bundle": "base/main_majiang"
}, },
{ {
"ver": "1.0.7", "ver": "1.0.8",
"name": "main_poker", "name": "main_poker",
"check": true, "check": true,
"version": "1.0.7", "version": "1.0.8",
"bundle": "base/main_poker" "bundle": "base/main_poker"
}, },
{ {
"ver": "1.0.7", "ver": "1.0.8",
"name": "main_zipai", "name": "main_zipai",
"check": true, "check": true,
"version": "1.0.7", "version": "1.0.8",
"bundle": "base/main_zipai" "bundle": "base/main_zipai"
}, },
{ {
"ver": "1.0.7", "ver": "1.0.8",
"name": "static", "name": "static",
"check": true, "check": true,
"bundle": "base/static", "bundle": "base/static",
"version": "1.0.7" "version": "1.0.8"
}, },
{ {
"ver": "1.0.7", "ver": "1.0.8",
"is_res": true, "is_res": true,
"name": "embed", "name": "embed",
"check": true, "check": true,
"bundle": "base/embed", "bundle": "base/embed",
"version": "1.0.7" "version": "1.0.8"
}, },
{ {
"ver": "1.0.7", "ver": "1.0.8",
"name": "main_pokemajiang", "name": "main_pokemajiang",
"check": true, "check": true,
"version": "1.0.7", "version": "1.0.8",
"bundle": "base/main_pokemajiang" "bundle": "base/main_pokemajiang"
}, },
{ {
"ver": "1.0.7", "ver": "1.0.8",
"name": "main_zipaimajiang", "name": "main_zipaimajiang",
"check": true, "check": true,
"version": "1.0.7", "version": "1.0.8",
"bundle": "base/main_zipaimajiang" "bundle": "base/main_zipaimajiang"
} }
] ]

View File

@ -39,7 +39,6 @@ GraphicsSettings:
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: [] m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0} type: 0}