公会副本添加边界判断
parent
ed758d3a37
commit
bac91deb69
|
@ -14,9 +14,14 @@ this.damage = 0
|
||||||
this.drop = nil--当场战斗掉落
|
this.drop = nil--当场战斗掉落
|
||||||
this.shopGoodId = 10031--公会副本挑战价格
|
this.shopGoodId = 10031--公会副本挑战价格
|
||||||
local refreshedBoss = {}
|
local refreshedBoss = {}
|
||||||
|
|
||||||
|
local endBossId = 0
|
||||||
function this.Initialize()
|
function this.Initialize()
|
||||||
for _, configInfo in ConfigPairs(guildCheckpointConfig) do
|
for _, configInfo in ConfigPairs(guildCheckpointConfig) do
|
||||||
table.insert(allChapterConfigData,configInfo)
|
table.insert(allChapterConfigData,configInfo)
|
||||||
|
if configInfo.Id > endBossId then
|
||||||
|
endBossId = configInfo.Id
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function this.GetAllConFigData()
|
function this.GetAllConFigData()
|
||||||
|
@ -40,7 +45,7 @@ function this.GetGuildChallengeInfoRequest(fun)
|
||||||
PrivilegeManager.RefreshStarPrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM)
|
PrivilegeManager.RefreshStarPrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM)
|
||||||
PrivilegeManager.RefreshStarPrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM)
|
PrivilegeManager.RefreshStarPrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM)
|
||||||
end
|
end
|
||||||
-- LogPink("curBoss "..curBoss.." blood "..blood.." canSweep "..canSweep.." buffCount "..buffCount.." buffTime "..buffTime.." sweepDamage "..sweepDamage)
|
-- LogPink("curBoss "..curBoss.." blood "..blood.." canSweep "..canSweep.." buffCount "..buffCount.." buffTime "..buffTime.." sweepDamage "..msg.sweepDamage)
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscriptBuff)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscriptBuff)
|
||||||
end)
|
end)
|
||||||
|
@ -73,7 +78,7 @@ end
|
||||||
local oldBossId = 0
|
local oldBossId = 0
|
||||||
function this.RefreshGuildTranscriptInfo(msg)
|
function this.RefreshGuildTranscriptInfo(msg)
|
||||||
oldBossId = curBoss
|
oldBossId = curBoss
|
||||||
LogGreen("msg.curBoss "..msg.curBoss.." msg.blood "..msg.blood.." msg.isKill "..msg.isKill)
|
-- LogGreen("msg.curBoss "..msg.curBoss.." msg.blood "..msg.blood.." msg.isKill "..msg.isKill)
|
||||||
curBoss = msg.curBoss--当前bossId
|
curBoss = msg.curBoss--当前bossId
|
||||||
blood = msg.blood--剩余血量万分比
|
blood = msg.blood--剩余血量万分比
|
||||||
isKill = msg.isKill--是否击杀
|
isKill = msg.isKill--是否击杀
|
||||||
|
@ -90,10 +95,12 @@ function this.RefreshGuildTranscriptInfo(msg)
|
||||||
isKill = 1
|
isKill = 1
|
||||||
if not refreshedBoss[oldBossId] then
|
if not refreshedBoss[oldBossId] then
|
||||||
refreshedBoss[oldBossId] = oldBossId
|
refreshedBoss[oldBossId] = oldBossId
|
||||||
LogPink("msg.refreshedBoss "..oldBossId)
|
-- LogPink("msg.refreshedBoss "..oldBossId)
|
||||||
PrivilegeManager.RemovePrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM,3013)
|
if endBossId ~= oldBossId then
|
||||||
PrivilegeManager.RefreshStarPrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM)
|
PrivilegeManager.RemovePrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM,3013)
|
||||||
PrivilegeManager.RefreshStarPrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM)
|
PrivilegeManager.RefreshStarPrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM)
|
||||||
|
PrivilegeManager.RefreshStarPrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
|
||||||
|
|
Loading…
Reference in New Issue