挂机提交
parent
5b2ddbf8e6
commit
089f0ce436
|
@ -212,10 +212,10 @@ end
|
|||
|
||||
this.isCanUseIconList = 0
|
||||
function this.RequestIconList()
|
||||
LogGreen(" this.isCanUseIconList:".. tostring(this.isCanUseIconList))
|
||||
--LogGreen(" this.isCanUseIconList:".. tostring(this.isCanUseIconList))
|
||||
if this.isCanUseIconList == 0 then
|
||||
this.isCanUseIconList = 1
|
||||
LogGreen(" this.iconList:".. tostring(this.iconList))
|
||||
--LogGreen(" this.iconList:".. tostring(this.iconList))
|
||||
return this.iconList
|
||||
end
|
||||
return nil
|
||||
|
@ -226,7 +226,7 @@ function this.ReleaseIconList()
|
|||
end
|
||||
|
||||
function this.AsideTriggerJudge(data,isSelf,_userData)
|
||||
--LogGreen("data:"..tostring(data).." pos:"..tostring(Map_UV2Pos(data.u - 1, data.v)))
|
||||
LogGreen("data:"..tostring(data).." pos:"..tostring(Map_UV2Pos(data.u - 1, data.v).. " isSelf:"..tostring(isSelf).. " Self:"..tostring(_userData).. " Self:".." "..tostring(_userData.userId)))
|
||||
local isGetIconList = false
|
||||
local iconList = this.iconList
|
||||
if not this.threads then
|
||||
|
@ -242,7 +242,7 @@ function this.AsideTriggerJudge(data,isSelf,_userData)
|
|||
coroutine.stop(this.threads[_userData.userId])
|
||||
this.threads[_userData.userId] = nil
|
||||
this.ReleaseIconList()
|
||||
return
|
||||
coroutine.yield()
|
||||
end
|
||||
--LogGreen("没有得到访问权")
|
||||
iconList = this.RequestIconList()
|
||||
|
@ -255,9 +255,9 @@ function this.AsideTriggerJudge(data,isSelf,_userData)
|
|||
end
|
||||
--LogGreen("得到了访问权")
|
||||
|
||||
for k,v in pairs(iconList) do
|
||||
--LogGreen("iconList k:"..tostring(k))
|
||||
end
|
||||
-- for k,v in pairs(iconList) do
|
||||
-- --LogGreen("iconList k:"..tostring(k))
|
||||
-- end
|
||||
|
||||
local selfPos = Map_UV2Pos(data.u, data.v)
|
||||
--LogGreen("selfPos:"..tostring(selfPos))
|
||||
|
@ -271,27 +271,35 @@ function this.AsideTriggerJudge(data,isSelf,_userData)
|
|||
if iconList[pos] and this.HasSelectIconList(pos,_userData.userId) then
|
||||
this.RemoveSelectIconList(_userData.eventPointPos)
|
||||
this.AddSelectIconList(pos,_userData.userId)
|
||||
--LogGreen("发送了消息")
|
||||
LogGreen("发送了消息")
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.GuaJi.getEvent,{goData = _userData, event = iconList[pos], pos = pos})
|
||||
coroutine.stop(this.threads[_userData.userId])
|
||||
this.threads[_userData.userId] = nil
|
||||
this.ReleaseIconList()
|
||||
return
|
||||
coroutine.yield()
|
||||
elseif FightPointPassManager.talkingTime == 0 or (GetTimeStamp() - FightPointPassManager.talkingTime >= 60) then
|
||||
if isSelf and this.playerViews and LengthOfTable(this.playerViews) > 1 then
|
||||
for k,v in pairs(this.playerViews) do
|
||||
if not v.isSelf and Map_UV2Pos(v.roleCurPos.u, v.roleCurPos.v) == pos and v.state == 0 then
|
||||
FightPointPassManager.talkingTime = GetTimeStamp()
|
||||
LogGreen("发送了消息")
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.GuaJi.getEvent,{goData = _userData,event = v,pos = pos})
|
||||
coroutine.stop(this.threads[_userData.userId])
|
||||
this.threads[_userData.userId] = nil
|
||||
this.ReleaseIconList()
|
||||
return
|
||||
coroutine.yield()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
coroutine.stop(this.threads[_userData.userId])
|
||||
LogGreen("周围没有事件")
|
||||
if this.threads[_userData.userId] then
|
||||
coroutine.stop( this.threads[_userData.userId])
|
||||
this.threads[_userData.userId] = nil
|
||||
end
|
||||
this.ReleaseIconList()
|
||||
coroutine.yield()
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
@ -791,7 +791,7 @@ function this.GetPlayerViewDataByType(index,randomList,needNum,func)
|
|||
singleUserData.uid = 1000 + i
|
||||
singleUserData.userSkin = PlayerManager.GetPlayerSkin()
|
||||
singleUserData.userTitle = 0
|
||||
singleUserData.userMount = 0
|
||||
singleUserData.userMount = 80008
|
||||
table.insert(randomList,singleUserData)
|
||||
end
|
||||
--LogGreen("机器人 后 needNum:"..needNum.." randomList:"..LengthOfTable(randomList))
|
||||
|
|
|
@ -159,7 +159,7 @@ function SingleFightPlayerView:SetData(u,v,isSelf,data)
|
|||
else
|
||||
npc = data.sex == ROLE_SEX.BOY and npc1 or npc2
|
||||
scale = data.sex == ROLE_SEX.BOY and 1 or 0.5
|
||||
self.userId = data.uid
|
||||
self.userId = data.uid or data.roleUid or data.id
|
||||
self.playerLiveView = PlayerLiveView:New(self.roleRoot,2, {
|
||||
skin = data.userSkin,
|
||||
sex = data.sex,
|
||||
|
|
Loading…
Reference in New Issue