同步梭哈协议修改
parent
98a12bdbbc
commit
cf897e81f4
|
|
@ -33,7 +33,6 @@ end
|
||||||
-- 事件注册
|
-- 事件注册
|
||||||
function M:RegisterEvt()
|
function M:RegisterEvt()
|
||||||
self._eventmap[EXProtocol.GAME_EVT_PLAYER_DEAL] = self.OnSendCard
|
self._eventmap[EXProtocol.GAME_EVT_PLAYER_DEAL] = self.OnSendCard
|
||||||
self._eventmap[EXProtocol.GAME_EVT_ACTION] = self.OnTipAction
|
|
||||||
self._eventmap[EXProtocol.GAME_EVT_RESULT1] = self.OnResult1
|
self._eventmap[EXProtocol.GAME_EVT_RESULT1] = self.OnResult1
|
||||||
self._eventmap[EXProtocol.GAME_EVT_RESULT2] = self.OnResult2
|
self._eventmap[EXProtocol.GAME_EVT_RESULT2] = self.OnResult2
|
||||||
self._eventmap[EXProtocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnTurnAction
|
self._eventmap[EXProtocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnTurnAction
|
||||||
|
|
@ -79,17 +78,9 @@ end
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
--我发出的协议
|
--我发出的协议
|
||||||
function M:SendTipQi()
|
function M:SendTip(_data)
|
||||||
local _data = {}
|
|
||||||
local _client = ControllerManager.GameNetClinet
|
local _client = ControllerManager.GameNetClinet
|
||||||
_client:send(EXProtocol.GAME_EVT_FOLD, _data)
|
_client:send(EXProtocol.GAME_ACTION, _data)
|
||||||
end
|
|
||||||
|
|
||||||
function M:SendTipXia(score)
|
|
||||||
local _data = {}
|
|
||||||
_data["betScore"] = score
|
|
||||||
local _client = ControllerManager.GameNetClinet
|
|
||||||
_client:send(EXProtocol.GAME_EVT_BET, _data)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--绑定协议为事件
|
--绑定协议为事件
|
||||||
|
|
|
||||||
|
|
@ -64,21 +64,21 @@ end
|
||||||
function M:OnClickTips(context)
|
function M:OnClickTips(context)
|
||||||
local button = context.data.data
|
local button = context.data.data
|
||||||
local type = button.type
|
local type = button.type
|
||||||
|
local _data = {}
|
||||||
if type == TipType.guo then
|
if type == TipType.guo then
|
||||||
elseif type == TipType.qi then
|
elseif type == TipType.qi then
|
||||||
self:ClickTipQi()
|
_data["id"] = 1016
|
||||||
|
self:ClickTip(_data)
|
||||||
elseif type == TipType.xia then
|
elseif type == TipType.xia then
|
||||||
local score = button.data
|
local score = button.data
|
||||||
self:ClickTipXia(score)
|
_data["id"] = 1012
|
||||||
|
_data["betScore"] = tonumber(score)
|
||||||
|
self:ClickTip(_data)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:ClickTipQi()
|
function M:ClickTip(_data)
|
||||||
self._gameCtr:SendTipQi()
|
self._gameCtr:SendTip(_data)
|
||||||
end
|
|
||||||
|
|
||||||
function M:ClickTipXia(score)
|
|
||||||
self._gameCtr:SendTipXia(score)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.SetTipData(obj, type, ...)
|
function M.SetTipData(obj, type, ...)
|
||||||
|
|
|
||||||
|
|
@ -10,36 +10,12 @@ local EXProtocol = {
|
||||||
-- 发牌协议
|
-- 发牌协议
|
||||||
GAME_EVT_PLAYER_DEAL = "2010",
|
GAME_EVT_PLAYER_DEAL = "2010",
|
||||||
|
|
||||||
-- 下注提示协议
|
|
||||||
GAME_EVT_ACTION = "2011",
|
|
||||||
|
|
||||||
-- 下注事件
|
|
||||||
GAME_EVT_BET = "2012",
|
|
||||||
|
|
||||||
-- 跟注事件
|
|
||||||
GAME_EVT_CALL = "2013",
|
|
||||||
|
|
||||||
-- 加注事件
|
|
||||||
GAME_EVT_RAISE = "2014",
|
|
||||||
|
|
||||||
-- 梭哈事件
|
|
||||||
GAME_EVT_ALL_IN = "2015",
|
|
||||||
|
|
||||||
-- 弃牌事件
|
|
||||||
GAME_EVT_FOLD = "2016",
|
|
||||||
|
|
||||||
-- 过牌事件
|
|
||||||
GAME_EVT_CHECK = "2017",
|
|
||||||
|
|
||||||
|
|
||||||
-- 小结算
|
-- 小结算
|
||||||
GAME_EVT_RESULT1 = "2007",
|
GAME_EVT_RESULT1 = "2007",
|
||||||
|
|
||||||
-- 大结算
|
-- 大结算
|
||||||
GAME_EVT_RESULT2 = "2008",
|
GAME_EVT_RESULT2 = "2008",
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- 转盘指向事件
|
-- 转盘指向事件
|
||||||
GAME_EVT_CHANGE_ACTIVE_PLAYER = "2099",
|
GAME_EVT_CHANGE_ACTIVE_PLAYER = "2099",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in New Issue