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
|
canSweep = msg.canSweep--是否能扫荡,今天是否挑战过这个boss
|
||||||
buffCount = msg.buffCount
|
buffCount = msg.buffCount
|
||||||
buffTime = msg.buffTime
|
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.RefreshGuildTranscript)
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscriptBuff)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscriptBuff)
|
||||||
end)
|
end)
|
||||||
|
@ -44,14 +44,12 @@ function this.GuildChallengeRequest(attackType,callBack)
|
||||||
this.damage = msg.damage
|
this.damage = msg.damage
|
||||||
this.drop = msg.drop
|
this.drop = msg.drop
|
||||||
canSweep = 1
|
canSweep = 1
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM, 1)--更新特权
|
|
||||||
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.GuildTranscript, callBack)
|
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.GuildTranscript, callBack)
|
||||||
CheckRedPointStatus(RedPointType.Guild_Transcript)
|
CheckRedPointStatus(RedPointType.Guild_Transcript)
|
||||||
end)
|
end)
|
||||||
elseif attackType == 1 then--快速战斗 扫荡
|
elseif attackType == 1 then--快速战斗 扫荡
|
||||||
NetManager.GuildChallengeRequest(this.GetCurBoss(),attackType,function (msg)
|
NetManager.GuildChallengeRequest(this.GetCurBoss(),attackType,function (msg)
|
||||||
this.damage = msg.damage
|
this.damage = msg.damage
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM, 1)--更新特权
|
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop, 1,function()
|
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop, 1,function()
|
||||||
if callBack then
|
if callBack then
|
||||||
callBack()
|
callBack()
|
||||||
|
@ -64,7 +62,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--剩余血量万分比
|
||||||
-- canSweep = msg.canSweep--是否能扫荡,今天是否挑战过这个boss
|
-- canSweep = msg.canSweep--是否能扫荡,今天是否挑战过这个boss
|
||||||
|
@ -80,8 +78,11 @@ function this.RefreshGuildTranscriptInfo(msg)
|
||||||
if oldBossId ~= curBoss then--前后ID不等认为是击杀
|
if oldBossId ~= curBoss then--前后ID不等认为是击杀
|
||||||
canSweep = 0
|
canSweep = 0
|
||||||
isKill = 1
|
isKill = 1
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM, - PrivilegeManager.GetPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_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.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
|
end
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
|
||||||
end
|
end
|
||||||
|
@ -92,7 +93,7 @@ function this.IsKillShowTip()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function this.RefreshGuildTranscriptBuffInfo(msg)
|
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
|
buffCount = msg.buffCount
|
||||||
buffTime = msg.buffTime
|
buffTime = msg.buffTime
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscriptBuff)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscriptBuff)
|
||||||
|
|
|
@ -773,14 +773,14 @@ function this.GuildTranscriptIndication(buffer)
|
||||||
local data = buffer:DataByte()
|
local data = buffer:DataByte()
|
||||||
local msg = Family_pb.GuildChallengeIndication()
|
local msg = Family_pb.GuildChallengeIndication()
|
||||||
msg:ParseFromString(data)
|
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)
|
GuildTranscriptManager.RefreshGuildTranscriptInfo(msg)
|
||||||
end
|
end
|
||||||
function this.GuildChallengeBuyBuffIndication(buffer)
|
function this.GuildChallengeBuyBuffIndication(buffer)
|
||||||
local data = buffer:DataByte()
|
local data = buffer:DataByte()
|
||||||
local msg = Family_pb.GuildChallengeBuyBuffIndication()
|
local msg = Family_pb.GuildChallengeBuyBuffIndication()
|
||||||
msg:ParseFromString(data)
|
msg:ParseFromString(data)
|
||||||
LogGreen("%%%%%%%%%%%msg.buffCount: "..msg.buffCount.." msg.buffTime: "..msg.buffTime)
|
-- LogGreen("%%%%%%%%%%%msg.buffCount: "..msg.buffCount.." msg.buffTime: "..msg.buffTime)
|
||||||
GuildTranscriptManager.RefreshGuildTranscriptBuffInfo(msg)
|
GuildTranscriptManager.RefreshGuildTranscriptBuffInfo(msg)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -4441,6 +4441,9 @@ function this.GuildChallengeRequest(bossId,type,func)--0为挑战 1为扫荡
|
||||||
local data = buffer:DataByte()
|
local data = buffer:DataByte()
|
||||||
local msg = Family_pb.GuildChallengeResponse()
|
local msg = Family_pb.GuildChallengeResponse()
|
||||||
msg:ParseFromString(data)
|
msg:ParseFromString(data)
|
||||||
|
if not GuildTranscriptManager.GetCurBattleIsSkillBoss() then--因为此时的indcaton RESPONSE 回来的还早 所以加特殊判断操作
|
||||||
|
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM, 1)--更新特权
|
||||||
|
end
|
||||||
if func then
|
if func then
|
||||||
func(msg)
|
func(msg)
|
||||||
end
|
end
|
||||||
|
|
|
@ -155,6 +155,7 @@ function PrivilegeManager.GetPrivilegeUsedTimes(privilegeType)
|
||||||
local serData = this._PrivilegeInfoList[privilegeId]
|
local serData = this._PrivilegeInfoList[privilegeId]
|
||||||
if serData then
|
if serData then
|
||||||
usedTimes = usedTimes + serData.usedTimes
|
usedTimes = usedTimes + serData.usedTimes
|
||||||
|
-- LogBlue(string.format("privilegeId:%s, usedTimes:%s",tostring(privilegeId),tostring(serData.usedTimes)))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return usedTimes
|
return usedTimes
|
||||||
|
@ -164,7 +165,7 @@ end
|
||||||
function PrivilegeManager.GetPrivilegeRemainValue(privilegeType)
|
function PrivilegeManager.GetPrivilegeRemainValue(privilegeType)
|
||||||
local originalValue = this.GetPrivilegeNumber(privilegeType)
|
local originalValue = this.GetPrivilegeNumber(privilegeType)
|
||||||
local usedTimes = this.GetPrivilegeUsedTimes(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
|
local remainNum = originalValue - usedTimes
|
||||||
return remainNum
|
return remainNum
|
||||||
end
|
end
|
||||||
|
@ -190,7 +191,30 @@ function PrivilegeManager.RefreshPrivilegeUsedTimes(privilegeType, times)
|
||||||
end
|
end
|
||||||
end
|
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)
|
function PrivilegeManager.GetPrivilegeOpenStatus(privilegeType, value)
|
||||||
-- 判断条件是否符合
|
-- 判断条件是否符合
|
||||||
|
|
|
@ -83,7 +83,7 @@ function this:OnShow(_parent,...)
|
||||||
isEquipShowSure=true
|
isEquipShowSure=true
|
||||||
end
|
end
|
||||||
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:GetComponent("Text").text=Language[12274]
|
||||||
this.bodyText2.gameObject:SetActive(isEquipShowSure)
|
this.bodyText2.gameObject:SetActive(isEquipShowSure)
|
||||||
this.tipText.text = Language[12275]
|
this.tipText.text = Language[12275]
|
||||||
|
|
|
@ -159,16 +159,16 @@ function this.SwitchView(index)
|
||||||
end
|
end
|
||||||
--区分显示
|
--区分显示
|
||||||
if index==1 then
|
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])
|
this.title.sprite=Util.LoadSprite(titleImageName[1])
|
||||||
elseif index==2 then
|
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])
|
this.title.sprite=Util.LoadSprite(titleImageName[2])
|
||||||
elseif index==3 then
|
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])
|
this.title.sprite=Util.LoadSprite(titleImageName[3])
|
||||||
elseif index==4 then
|
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])
|
this.title.sprite=Util.LoadSprite(titleImageName[4])
|
||||||
end
|
end
|
||||||
this.title:SetNativeSize()
|
this.title:SetNativeSize()
|
||||||
|
|
Loading…
Reference in New Issue