修复长沙麻将不能出牌以及结算报错
|
|
@ -322,11 +322,11 @@ function M:FillItemData(room, data, item, active_player)
|
|||
|
||||
-- local total_score = data["total_score"]
|
||||
if total >= 0 then
|
||||
item:GetChild("score2").text = "+"..total
|
||||
item:GetChild("score2").grayed = false
|
||||
item:GetChild("score2win").text = "+" .. total
|
||||
-- item:GetChild("score2win").grayed = false
|
||||
else
|
||||
item:GetChild("score2").text = total
|
||||
item:GetChild("score2").grayed = true
|
||||
item:GetChild("score2lose").text = total
|
||||
-- item:GetChild("score2win").grayed = true
|
||||
end
|
||||
|
||||
local hp_nonnegative = room:checkHpNonnegative()
|
||||
|
|
|
|||
|
|
@ -31,86 +31,86 @@ local function CardPos(obj, area, oder, loc, offset)
|
|||
return location
|
||||
end
|
||||
|
||||
function M:UpdateHandCard(getcard, mp, opcard)
|
||||
-- mp 是否明牌
|
||||
-- 如果不明牌,但是有 opcard 表示是起手胡
|
||||
getcard = getcard or false
|
||||
mp = mp or false
|
||||
local handcard_list = self._mask_data["handcard_list"]
|
||||
local oder = handcard_list["oder"]
|
||||
local _player = self._player
|
||||
local comp_back = handcard_list["comp_back"]
|
||||
local comp = handcard_list["comp"]
|
||||
local outcard_list = self._mask_data["outcard_list"]
|
||||
local card = outcard_list["card"]
|
||||
-- function M:UpdateHandCard(getcard, mp, opcard)
|
||||
-- -- mp 是否明牌
|
||||
-- -- 如果不明牌,但是有 opcard 表示是起手胡
|
||||
-- getcard = getcard or false
|
||||
-- mp = mp or false
|
||||
-- local handcard_list = self._mask_data["handcard_list"]
|
||||
-- local oder = handcard_list["oder"]
|
||||
-- local _player = self._player
|
||||
-- local comp_back = handcard_list["comp_back"]
|
||||
-- local comp = handcard_list["comp"]
|
||||
-- local outcard_list = self._mask_data["outcard_list"]
|
||||
-- local card = outcard_list["card"]
|
||||
|
||||
self._area_handcard_list:RemoveChildren(0, -1, true)
|
||||
local opnum = opcard and #opcard or -1
|
||||
if not mp and opnum > -1 then
|
||||
-- 起手胡板牌记录,手牌变化两次后,板牌收回
|
||||
self.__show_qs_hu_times = 1
|
||||
self.__qs_hu_cards = opcard
|
||||
elseif self.__qs_hu_cards and opnum == -1 and self.__show_qs_hu_times > 0 then
|
||||
self.__show_qs_hu_times = self.__show_qs_hu_times - 1
|
||||
opcard = self.__qs_hu_cards
|
||||
opnum = #opcard
|
||||
end
|
||||
local loc = 0
|
||||
if not mp then
|
||||
local comp_back = handcard_list["comp_back"]
|
||||
if self._current_card_type == 2 then
|
||||
comp_back = comp_back.."_3d"
|
||||
end
|
||||
for i = 0, _player.hand_left_count -1 do
|
||||
local obj
|
||||
local offset = getcard and (i == _player.hand_left_count - 1 and 15 or 0)
|
||||
if i < opnum then
|
||||
obj = UIPackage.CreateObject("Main_Majiang", comp)
|
||||
self:fillCard(obj, card, opcard[i + 1])
|
||||
else
|
||||
obj = UIPackage.CreateObject("Main_Majiang", comp_back)
|
||||
end
|
||||
if opnum ~= -1 then
|
||||
loc = CardPos(obj, self._area_handcard_list, oder, loc, offset)
|
||||
else
|
||||
ViewUtil.CardPos(obj, self._area_handcard_list, oder, i, offset)
|
||||
end
|
||||
--改变左右两边的手牌的x值
|
||||
if self._current_card_type == 2 and (oder == AreaOderType.down_up or oder == AreaOderType.up_down) then
|
||||
obj.x = i * -7.0
|
||||
end
|
||||
if (oder == AreaOderType.down_up) then
|
||||
self._area_handcard_list:AddChildAt(obj, 0)
|
||||
else
|
||||
self._area_handcard_list:AddChild(obj)
|
||||
end
|
||||
end
|
||||
else
|
||||
local outcard_list = self._mask_data["outcard_list"]
|
||||
local comp = handcard_list["comp"]
|
||||
local card = outcard_list["card"]
|
||||
--print("comp"..comp)
|
||||
-- print(vardump(_player.card_list))
|
||||
-- self._area_handcard_list:RemoveChildren(0, -1, true)
|
||||
-- local opnum = opcard and #opcard or -1
|
||||
-- if not mp and opnum > -1 then
|
||||
-- -- 起手胡板牌记录,手牌变化两次后,板牌收回
|
||||
-- self.__show_qs_hu_times = 1
|
||||
-- self.__qs_hu_cards = opcard
|
||||
-- elseif self.__qs_hu_cards and opnum == -1 and self.__show_qs_hu_times > 0 then
|
||||
-- self.__show_qs_hu_times = self.__show_qs_hu_times - 1
|
||||
-- opcard = self.__qs_hu_cards
|
||||
-- opnum = #opcard
|
||||
-- end
|
||||
-- local loc = 0
|
||||
-- if not mp then
|
||||
-- local comp_back = handcard_list["comp_back"]
|
||||
-- if self._current_card_type == 2 then
|
||||
-- comp_back = comp_back.."_3d"
|
||||
-- end
|
||||
-- for i = 0, _player.hand_left_count -1 do
|
||||
-- local obj
|
||||
-- local offset = (getcard and i == _player.hand_left_count - 1) and 15 or 0
|
||||
-- if i < opnum then
|
||||
-- obj = UIPackage.CreateObject("Main_Majiang", comp)
|
||||
-- self:fillCard(obj, card, opcard[i + 1])
|
||||
-- else
|
||||
-- obj = UIPackage.CreateObject("Main_Majiang", comp_back)
|
||||
-- end
|
||||
-- if opnum ~= -1 then
|
||||
-- loc = CardPos(obj, self._area_handcard_list, oder, loc, offset)
|
||||
-- else
|
||||
-- ViewUtil.CardPos(obj, self._area_handcard_list, oder, i, offset)
|
||||
-- end
|
||||
-- --改变左右两边的手牌的x值
|
||||
-- if self._current_card_type == 2 and (oder == AreaOderType.down_up or oder == AreaOderType.up_down) then
|
||||
-- obj.x = i * -7.0
|
||||
-- end
|
||||
-- if (oder == AreaOderType.down_up) then
|
||||
-- self._area_handcard_list:AddChildAt(obj, 0)
|
||||
-- else
|
||||
-- self._area_handcard_list:AddChild(obj)
|
||||
-- end
|
||||
-- end
|
||||
-- else
|
||||
-- local outcard_list = self._mask_data["outcard_list"]
|
||||
-- local comp = handcard_list["comp"]
|
||||
-- local card = outcard_list["card"]
|
||||
-- --print("comp"..comp)
|
||||
-- -- print(vardump(_player.card_list))
|
||||
|
||||
if self._current_card_type == 2 then
|
||||
comp = comp.."_3d"
|
||||
end
|
||||
for i = 0, #_player.card_list -1 do
|
||||
local obj = UIPackage.CreateObject("Main_Majiang", comp)
|
||||
self:fillCard(obj,card,_player.card_list[i+1])
|
||||
local offset = getcard and (i == _player.hand_left_count - 1 and 15 or 0)
|
||||
ViewUtil.CardPos(obj, self._area_handcard_list, oder, i, offset)
|
||||
--改变左右两边的手牌的x值
|
||||
if self._current_card_type == 2 and (oder == AreaOderType.down_up or oder == AreaOderType.up_down) then
|
||||
obj.x = i * -7
|
||||
end
|
||||
if (oder == AreaOderType.down_up) then
|
||||
self._area_handcard_list:AddChildAt(obj, 0)
|
||||
else
|
||||
self._area_handcard_list:AddChild(obj)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- if self._current_card_type == 2 then
|
||||
-- comp = comp.."_3d"
|
||||
-- end
|
||||
-- for i = 0, #_player.card_list -1 do
|
||||
-- local obj = UIPackage.CreateObject("Main_Majiang", comp)
|
||||
-- self:fillCard(obj,card,_player.card_list[i+1])
|
||||
-- local offset = getcard and (i == _player.hand_left_count - 1 and 15 or 0)
|
||||
-- ViewUtil.CardPos(obj, self._area_handcard_list, oder, i, offset)
|
||||
-- --改变左右两边的手牌的x值
|
||||
-- if self._current_card_type == 2 and (oder == AreaOderType.down_up or oder == AreaOderType.up_down) then
|
||||
-- obj.x = i * -7
|
||||
-- end
|
||||
-- if (oder == AreaOderType.down_up) then
|
||||
-- self._area_handcard_list:AddChildAt(obj, 0)
|
||||
-- else
|
||||
-- self._area_handcard_list:AddChild(obj)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
|
||||
return M
|
||||
|
|
@ -148,6 +148,12 @@
|
|||
"/buttons/",
|
||||
"27vd145b",
|
||||
"/conMui/",
|
||||
"egnzysm7",
|
||||
"/",
|
||||
"egnzysm7",
|
||||
"/component/",
|
||||
"egnzysm7",
|
||||
"/component/create_room/",
|
||||
"3n2top74",
|
||||
"/",
|
||||
"5cdldr01",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 774 KiB After Width: | Height: | Size: 783 KiB |
|
Before Width: | Height: | Size: 759 KiB After Width: | Height: | Size: 732 KiB |
|
Before Width: | Height: | Size: 790 KiB After Width: | Height: | Size: 771 KiB |
|
Before Width: | Height: | Size: 740 KiB After Width: | Height: | Size: 740 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 667 KiB After Width: | Height: | Size: 619 KiB |
|
Before Width: | Height: | Size: 742 KiB After Width: | Height: | Size: 778 KiB |
|
Before Width: | Height: | Size: 768 KiB After Width: | Height: | Size: 771 KiB |
|
Before Width: | Height: | Size: 549 KiB After Width: | Height: | Size: 557 KiB |
|
Before Width: | Height: | Size: 684 KiB After Width: | Height: | Size: 675 KiB |