公会副本添加边界判断

dev_chengFeng
zhangqiang 2020-08-31 17:02:58 +08:00
parent ed758d3a37
commit bac91deb69
1 changed files with 13 additions and 6 deletions

View File

@ -14,9 +14,14 @@ this.damage = 0
this.drop = nil--当场战斗掉落
this.shopGoodId = 10031--公会副本挑战价格
local refreshedBoss = {}
local endBossId = 0
function this.Initialize()
for _, configInfo in ConfigPairs(guildCheckpointConfig) do
table.insert(allChapterConfigData,configInfo)
if configInfo.Id > endBossId then
endBossId = configInfo.Id
end
end
end
function this.GetAllConFigData()
@ -40,7 +45,7 @@ function this.GetGuildChallengeInfoRequest(fun)
PrivilegeManager.RefreshStarPrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM)
PrivilegeManager.RefreshStarPrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM)
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.RefreshGuildTranscriptBuff)
end)
@ -73,7 +78,7 @@ end
local oldBossId = 0
function this.RefreshGuildTranscriptInfo(msg)
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
blood = msg.blood--剩余血量万分比
isKill = msg.isKill--是否击杀
@ -90,12 +95,14 @@ function this.RefreshGuildTranscriptInfo(msg)
isKill = 1
if not refreshedBoss[oldBossId] then
refreshedBoss[oldBossId] = oldBossId
LogPink("msg.refreshedBoss "..oldBossId)
-- LogPink("msg.refreshedBoss "..oldBossId)
if endBossId ~= oldBossId then
PrivilegeManager.RemovePrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM,3013)
PrivilegeManager.RefreshStarPrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM)
PrivilegeManager.RefreshStarPrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM)
end
end
end
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
end
function this.IsKillShowTip()