Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop
commit
264bf8d4f0
|
@ -29,7 +29,7 @@ function this.GetGuildChallengeInfoRequest(fun)
|
|||
canSweep = msg.canSweep--是否能扫荡,今天是否挑战过这个boss
|
||||
buffCount = msg.buffCount
|
||||
buffTime = msg.buffTime
|
||||
LogPink("curBoss "..curBoss.." blood "..blood.." canSweep "..canSweep.." buffCount "..buffCount.." buffTime "..buffTime)
|
||||
-- LogPink("curBoss "..curBoss.." blood "..blood.." canSweep "..canSweep.." buffCount "..buffCount.." buffTime "..buffTime)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscriptBuff)
|
||||
end)
|
||||
|
@ -44,14 +44,12 @@ function this.GuildChallengeRequest(attackType,callBack)
|
|||
this.damage = msg.damage
|
||||
this.drop = msg.drop
|
||||
canSweep = 1
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM, 1)--更新特权
|
||||
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.GuildTranscript, callBack)
|
||||
CheckRedPointStatus(RedPointType.Guild_Transcript)
|
||||
end)
|
||||
elseif attackType == 1 then--快速战斗 扫荡
|
||||
NetManager.GuildChallengeRequest(this.GetCurBoss(),attackType,function (msg)
|
||||
this.damage = msg.damage
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM, 1)--更新特权
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop, 1,function()
|
||||
if callBack then
|
||||
callBack()
|
||||
|
@ -64,7 +62,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--剩余血量万分比
|
||||
-- canSweep = msg.canSweep--是否能扫荡,今天是否挑战过这个boss
|
||||
|
@ -80,8 +78,11 @@ function this.RefreshGuildTranscriptInfo(msg)
|
|||
if oldBossId ~= curBoss then--前后ID不等认为是击杀
|
||||
canSweep = 0
|
||||
isKill = 1
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM, - PrivilegeManager.GetPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM))
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM, - PrivilegeManager.GetPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM))
|
||||
-- PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM, - PrivilegeManager.GetPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM))
|
||||
-- PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM, - PrivilegeManager.GetPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM))
|
||||
PrivilegeManager.RemovePrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM,3013)
|
||||
PrivilegeManager.RefreshStarPrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM)
|
||||
PrivilegeManager.RefreshStarPrivilege(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM)
|
||||
end
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
|
||||
end
|
||||
|
@ -92,7 +93,7 @@ function this.IsKillShowTip()
|
|||
end
|
||||
end
|
||||
function this.RefreshGuildTranscriptBuffInfo(msg)
|
||||
LogGreen("msg.buffCount "..msg.buffCount.." msg.buffTime "..msg.buffTime)
|
||||
-- LogGreen("msg.buffCount "..msg.buffCount.." msg.buffTime "..msg.buffTime)
|
||||
buffCount = msg.buffCount
|
||||
buffTime = msg.buffTime
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscriptBuff)
|
||||
|
|
|
@ -773,14 +773,14 @@ function this.GuildTranscriptIndication(buffer)
|
|||
local data = buffer:DataByte()
|
||||
local msg = Family_pb.GuildChallengeIndication()
|
||||
msg:ParseFromString(data)
|
||||
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)
|
||||
GuildTranscriptManager.RefreshGuildTranscriptInfo(msg)
|
||||
end
|
||||
function this.GuildChallengeBuyBuffIndication(buffer)
|
||||
local data = buffer:DataByte()
|
||||
local msg = Family_pb.GuildChallengeBuyBuffIndication()
|
||||
msg:ParseFromString(data)
|
||||
LogGreen("%%%%%%%%%%%msg.buffCount: "..msg.buffCount.." msg.buffTime: "..msg.buffTime)
|
||||
-- LogGreen("%%%%%%%%%%%msg.buffCount: "..msg.buffCount.." msg.buffTime: "..msg.buffTime)
|
||||
GuildTranscriptManager.RefreshGuildTranscriptBuffInfo(msg)
|
||||
end
|
||||
|
||||
|
|
|
@ -4441,6 +4441,9 @@ function this.GuildChallengeRequest(bossId,type,func)--0为挑战 1为扫荡
|
|||
local data = buffer:DataByte()
|
||||
local msg = Family_pb.GuildChallengeResponse()
|
||||
msg:ParseFromString(data)
|
||||
if not GuildTranscriptManager.GetCurBattleIsSkillBoss() then--因为此时的indcaton RESPONSE 回来的还早 所以加特殊判断操作
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM, 1)--更新特权
|
||||
end
|
||||
if func then
|
||||
func(msg)
|
||||
end
|
||||
|
|
|
@ -155,7 +155,8 @@ function PrivilegeManager.GetPrivilegeUsedTimes(privilegeType)
|
|||
local serData = this._PrivilegeInfoList[privilegeId]
|
||||
if serData then
|
||||
usedTimes = usedTimes + serData.usedTimes
|
||||
end
|
||||
-- LogBlue(string.format("privilegeId:%s, usedTimes:%s",tostring(privilegeId),tostring(serData.usedTimes)))
|
||||
end
|
||||
end
|
||||
return usedTimes
|
||||
end
|
||||
|
@ -164,7 +165,7 @@ end
|
|||
function PrivilegeManager.GetPrivilegeRemainValue(privilegeType)
|
||||
local originalValue = this.GetPrivilegeNumber(privilegeType)
|
||||
local usedTimes = this.GetPrivilegeUsedTimes(privilegeType)
|
||||
--LogBlue(string.format("originalValue:%s, usedTimes:%s",tostring(originalValue),tostring(usedTimes)))
|
||||
-- LogBlue(string.format("originalValue:%s, usedTimes:%s",tostring(originalValue),tostring(usedTimes)))
|
||||
local remainNum = originalValue - usedTimes
|
||||
return remainNum
|
||||
end
|
||||
|
@ -190,7 +191,30 @@ function PrivilegeManager.RefreshPrivilegeUsedTimes(privilegeType, times)
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
--前端重置特权次数
|
||||
function PrivilegeManager.RefreshStarPrivilege(privilegeType)
|
||||
local privilegeList = this._PrivilegeTypeList[privilegeType]
|
||||
if not privilegeList then return end
|
||||
for _, config in ipairs(privilegeList) do
|
||||
local privilegeId = config.Id
|
||||
local serData = this._PrivilegeInfoList[privilegeId]
|
||||
if serData then
|
||||
this._PrivilegeInfoList[privilegeId].usedTimes = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
--前端移除某特权
|
||||
function PrivilegeManager.RemovePrivilege(privilegeType,_privilegeId)
|
||||
local privilegeList = this._PrivilegeTypeList[privilegeType]
|
||||
if not privilegeList then return end
|
||||
for _, config in ipairs(privilegeList) do
|
||||
local privilegeId = config.Id
|
||||
local serData = this._PrivilegeInfoList[privilegeId]
|
||||
if serData and privilegeId == _privilegeId then
|
||||
this._PrivilegeInfoList[privilegeId] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
--获取某权益是否解锁的状态
|
||||
function PrivilegeManager.GetPrivilegeOpenStatus(privilegeType, value)
|
||||
-- 判断条件是否符合
|
||||
|
|
|
@ -83,7 +83,7 @@ function this:OnShow(_parent,...)
|
|||
isEquipShowSure=true
|
||||
end
|
||||
end
|
||||
this.bodyText.text=Language[12273]
|
||||
this.bodyText.text= string.format( Language[12273],ConfigManager.GetConfigData(ConfigName.ItemConfig,29))
|
||||
this.bodyText2:GetComponent("Text").text=Language[12274]
|
||||
this.bodyText2.gameObject:SetActive(isEquipShowSure)
|
||||
this.tipText.text = Language[12275]
|
||||
|
|
|
@ -159,16 +159,16 @@ function this.SwitchView(index)
|
|||
end
|
||||
--区分显示
|
||||
if index==1 then
|
||||
this.upView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.HeroReturn})
|
||||
this.upView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.HeartFireStone})
|
||||
this.title.sprite=Util.LoadSprite(titleImageName[1])
|
||||
elseif index==2 then
|
||||
this.upView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.HeartFireStone})
|
||||
this.upView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.HeroReturn})
|
||||
this.title.sprite=Util.LoadSprite(titleImageName[2])
|
||||
elseif index==3 then
|
||||
this.upView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.HeartFireStone})
|
||||
this.upView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.HeroReturn})
|
||||
this.title.sprite=Util.LoadSprite(titleImageName[3])
|
||||
elseif index==4 then
|
||||
this.upView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.HeartFireStone})
|
||||
this.upView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.HeroReturn})
|
||||
this.title.sprite=Util.LoadSprite(titleImageName[4])
|
||||
end
|
||||
this.title:SetNativeSize()
|
||||
|
|
Loading…
Reference in New Issue