dev_chengFeng
parent
44a2538eb3
commit
ead1ba8fd9
|
@ -446,6 +446,7 @@ function this.ShowBattleResult(result, msg)
|
||||||
end
|
end
|
||||||
this:ClosePanel()
|
this:ClosePanel()
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscripQuickBtn)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscripQuickBtn)
|
||||||
|
GuildTranscriptManager.IsKillShowTip()
|
||||||
end, 6,true,true)
|
end, 6,true,true)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
|
@ -416,8 +416,8 @@ function this.GetMonsterConfigDataById(MonsterId)
|
||||||
return monsterData
|
return monsterData
|
||||||
end
|
end
|
||||||
function this.ShowEndNumInfo()
|
function this.ShowEndNumInfo()
|
||||||
this.endNumText.text = "剩余购买次数:" .. GuildTranscriptManager.GetCanBattleCount()
|
this.endNumText.text = "剩余次数:" .. GuildTranscriptManager.GetCanBattleCount()
|
||||||
this.endNumBuyText.text = "剩余次数:" .. GuildTranscriptManager.GetCanBuyBattleCount()
|
this.endNumBuyText.text = "剩余购买次数:" .. GuildTranscriptManager.GetCanBuyBattleCount()
|
||||||
end
|
end
|
||||||
function this.QuickWar()
|
function this.QuickWar()
|
||||||
GuildTranscriptManager.GuildChallengeRequest(1,function()
|
GuildTranscriptManager.GuildChallengeRequest(1,function()
|
||||||
|
@ -490,6 +490,7 @@ function this.TimeStampToDateString(second)
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.SetSelectImagePos(parent)
|
function this.SetSelectImagePos(parent)
|
||||||
|
Util.SetGray(this.SelectImage,false)
|
||||||
this.SelectImage.transform:SetParent(Util.GetGameObject(parent, "GameObject").transform)
|
this.SelectImage.transform:SetParent(Util.GetGameObject(parent, "GameObject").transform)
|
||||||
this.SelectImage:GetComponent("RectTransform").localPosition = Vector3.zero
|
this.SelectImage:GetComponent("RectTransform").localPosition = Vector3.zero
|
||||||
this.SelectImage:GetComponent("RectTransform").localScale = Vector3.New(1,1,1)
|
this.SelectImage:GetComponent("RectTransform").localScale = Vector3.New(1,1,1)
|
||||||
|
|
|
@ -6,6 +6,7 @@ local curBoss = 1--当前bossId
|
||||||
local blood = 0--剩余血量万分比
|
local blood = 0--剩余血量万分比
|
||||||
local canSweep = 0--是否能扫荡,今天是否挑战过这个boss
|
local canSweep = 0--是否能扫荡,今天是否挑战过这个boss
|
||||||
local isKill = 0 --当场战斗boss 是否击杀
|
local isKill = 0 --当场战斗boss 是否击杀
|
||||||
|
local isKillShowTip = false --当场战斗boss 是否击杀
|
||||||
local buffCount = 0--当前buff到多少索引
|
local buffCount = 0--当前buff到多少索引
|
||||||
local buffTime = 0--buff结束时间
|
local buffTime = 0--buff结束时间
|
||||||
|
|
||||||
|
@ -34,7 +35,9 @@ function this.GetGuildChallengeInfoRequest(fun)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
--请求战斗
|
--请求战斗
|
||||||
|
local attackTypeShotTime
|
||||||
function this.GuildChallengeRequest(attackType,callBack)
|
function this.GuildChallengeRequest(attackType,callBack)
|
||||||
|
attackTypeShotTime = attackType
|
||||||
if attackType == 0 then
|
if attackType == 0 then
|
||||||
NetManager.GuildChallengeRequest(this.GetCurBoss(),attackType,function (msg)
|
NetManager.GuildChallengeRequest(this.GetCurBoss(),attackType,function (msg)
|
||||||
local fightData = BattleManager.GetBattleServerData(msg)
|
local fightData = BattleManager.GetBattleServerData(msg)
|
||||||
|
@ -58,15 +61,21 @@ function this.GuildChallengeRequest(attackType,callBack)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local oldBossId = 0
|
||||||
function this.RefreshGuildTranscriptInfo(msg)
|
function this.RefreshGuildTranscriptInfo(msg)
|
||||||
local oldBossId = curBoss
|
oldBossId = curBoss
|
||||||
|
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--剩余血量万分比
|
||||||
-- canSweep = msg.canSweep--是否能扫荡,今天是否挑战过这个boss
|
-- canSweep = msg.canSweep--是否能扫荡,今天是否挑战过这个boss
|
||||||
isKill = msg.isKill--是否击杀
|
isKill = msg.isKill--是否击杀
|
||||||
|
isKillShowTip = false
|
||||||
if msg.isKill == 1 then
|
if msg.isKill == 1 then
|
||||||
PopupTipPanel.ShowTip("已击败【首领名称】!")
|
isKillShowTip = true
|
||||||
-- canSweep = 0
|
if attackTypeShotTime == 1 then
|
||||||
|
local monsterData = this.GetMonsterConfigDataById(oldBossId)
|
||||||
|
PopupTipPanel.ShowTip( string.format("已击败【%s】!",monsterData.ReadingName) )
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if oldBossId ~= curBoss then--前后ID不等认为是击杀
|
if oldBossId ~= curBoss then--前后ID不等认为是击杀
|
||||||
canSweep = 0
|
canSweep = 0
|
||||||
|
@ -76,11 +85,39 @@ function this.RefreshGuildTranscriptInfo(msg)
|
||||||
end
|
end
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
|
||||||
end
|
end
|
||||||
|
function this.IsKillShowTip()
|
||||||
|
if isKillShowTip and attackTypeShotTime == 0 then
|
||||||
|
local monsterData = this.GetMonsterConfigDataById(oldBossId)
|
||||||
|
PopupTipPanel.ShowTip( string.format("已击败【%s】!",monsterData.ReadingName) )
|
||||||
|
end
|
||||||
|
end
|
||||||
function this.RefreshGuildTranscriptBuffInfo(msg)
|
function this.RefreshGuildTranscriptBuffInfo(msg)
|
||||||
|
LogGreen("msg.buffCount "..msg.buffCount.." msg.buffTime "..msg.buffTime)
|
||||||
buffCount = msg.buffCount
|
buffCount = msg.buffCount
|
||||||
buffTime = msg.buffTime
|
buffTime = msg.buffTime
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscriptBuff)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscriptBuff)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function this.GetMonsterConfigDataById(chapterId)
|
||||||
|
local MonsterId = ConfigManager.GetConfigData(ConfigName.GuildCheckpointConfig,chapterId).MonsterId
|
||||||
|
local monsterConFig = nil
|
||||||
|
local monsterGrip = ConfigManager.GetConfigData(ConfigName.MonsterGroup,MonsterId)
|
||||||
|
if not monsterGrip then return nil end
|
||||||
|
local monsterId = 0
|
||||||
|
for i = 1, #monsterGrip.Contents do
|
||||||
|
if monsterId <= 0 then
|
||||||
|
for j = 1, #monsterGrip.Contents[i] do
|
||||||
|
if monsterGrip.Contents[i][j] > 0 then
|
||||||
|
monsterId = monsterGrip.Contents[i][j]
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if monsterId <= 0 then return nil end
|
||||||
|
local monsterData = ConfigManager.GetConfigData(ConfigName.MonsterConfig,monsterId)
|
||||||
|
return monsterData
|
||||||
|
end
|
||||||
-- 获取剩余挑战次数 特权
|
-- 获取剩余挑战次数 特权
|
||||||
function this.GetCanBattleCount()
|
function this.GetCanBattleCount()
|
||||||
return PrivilegeManager.GetPrivilegeRemainValue(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM)
|
return PrivilegeManager.GetPrivilegeRemainValue(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM)
|
||||||
|
|
Loading…
Reference in New Issue