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