Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop
commit
ba64ab34ff
|
@ -1004,7 +1004,7 @@
|
|||
[11003] = "援助次数(",
|
||||
[11004] = "免费援助",
|
||||
[11005] = "援 助",
|
||||
[11006] = "元宝或援助次数不足!",
|
||||
[11006] = "妖晶或援助次数不足!",
|
||||
[11007] = "您还未进行求援!",
|
||||
[11008] = "求助发送成功!",
|
||||
[11009] = "每日凌晨5点重置求援次数",
|
||||
|
|
|
@ -244,13 +244,9 @@ function this.AutoCompound(_position)
|
|||
end
|
||||
end
|
||||
end
|
||||
-- LogBlue("bagNums:"..LengthOfTable(bagNums))
|
||||
-- for k,v in pairs(bagNums) do
|
||||
-- LogBlue(k.." "..v)
|
||||
-- end
|
||||
|
||||
--一种装备一种装备的循环检测 金币能合成的数量 与 背包装备能合成的数量 取最小值 然后扣除临时消耗道具
|
||||
--最后所有装备存在curPosEquips 与 之前背包 bagPosEquips 作比较 看合成了什么装备 删除了什么装备 和计算消耗材料
|
||||
local isNoGold = false--是否缺金币
|
||||
for i = 1, #curPosEquips do
|
||||
local materialEndNum = -1
|
||||
--合成的1个 下一个装备的需要的消耗材料的数量
|
||||
|
@ -268,64 +264,52 @@ function this.AutoCompound(_position)
|
|||
end
|
||||
end
|
||||
end
|
||||
--LogBlue("materialEndNum "..materialEndNum)
|
||||
if i < #curPosEquips or i == 1 then
|
||||
--当前拥有的装备材料能合成的下一个装备的数量
|
||||
--LogBlue("equipStarsConfig[i].RankupCount:"..equipStarsConfig[i].RankupCount)
|
||||
local curQuEquipCompoundNum = math.floor(curPosEquips[i] / equipStarsConfig[i].RankupCount)
|
||||
local endCompoundNum = materialEndNum > curQuEquipCompoundNum and curQuEquipCompoundNum or materialEndNum
|
||||
--LogBlue("curQuEquipCompoundNum "..curQuEquipCompoundNum)
|
||||
--LogBlue("endCompoundNum "..endCompoundNum)
|
||||
|
||||
if not isNoGold and materialEndNum < 1 and curQuEquipCompoundNum > 0 then
|
||||
isNoGold = true
|
||||
end
|
||||
for itemId, num in pairs(materialNums) do
|
||||
bagNums[itemId] = bagNums[itemId] - endCompoundNum * num
|
||||
shengGoldNum = shengGoldNum + endCompoundNum * num
|
||||
end
|
||||
--LogBlue("curPosEquips[i] before:"..curPosEquips[i])
|
||||
--LogBlue("equipStarsConfig[i].RankupCount:"..equipStarsConfig[i].RankupCount)
|
||||
curPosEquips[i] = curPosEquips[i] - endCompoundNum * equipStarsConfig[i].RankupCount
|
||||
--LogBlue("curPosEquips[i] after:"..curPosEquips[i])
|
||||
if curPosEquips[i + 1] then
|
||||
--LogBlue("curPosEquips[i + 1] before:"..curPosEquips[i + 1])
|
||||
curPosEquips[i + 1] = curPosEquips[i + 1] + endCompoundNum
|
||||
--LogBlue("curPosEquips[i + 1] after:"..curPosEquips[i + 1])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local curRewards = {}
|
||||
for i = 1, #curPosEquips do
|
||||
--LogError("curPosEquips 剩余 "..i.." "..curPosEquips[i])
|
||||
local str = ""
|
||||
if curPosEquips[i] - bagPosEquips[i] > 0 then
|
||||
str = Language[10432]..i.." "..curPosEquips[i] - bagPosEquips[i]
|
||||
--LogBlue(str)
|
||||
local singleEquipData = {}
|
||||
singleEquipData.id = ConfigManager.GetConfigDataByDoubleKey(ConfigName.EquipConfig,"Position",curIndex,"Star",i).Id
|
||||
singleEquipData.num = curPosEquips[i] - bagPosEquips[i]
|
||||
--LogError("singleEquipData.id "..singleEquipData.id.." "..singleEquipData.num)
|
||||
table.insert(curRewards,{singleEquipData.id,singleEquipData.num})
|
||||
else
|
||||
str = str .. Language[10433]..bagPosEquips[i] - curPosEquips[i]
|
||||
--LogBlue(str)
|
||||
end
|
||||
--LogError(str)
|
||||
end
|
||||
--LogBlue(#curRewards)
|
||||
--LogError("shengGoldNum "..shengGoldNum)
|
||||
if isNoGold then
|
||||
PopupTipPanel.ShowTip(Language[10431])
|
||||
return
|
||||
end
|
||||
if shengGoldNum <= 0 then
|
||||
PopupTipPanel.ShowTip(Language[10434])
|
||||
return
|
||||
end
|
||||
--BagManager.GetItemCountById(14) -
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.EquipCompound,
|
||||
shengGoldNum,curRewards,function ()
|
||||
NetManager.ComplexEquipRequest(curIndex,0,0,function(msg)
|
||||
this.OnClickTabBtn(curIndex)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
end)
|
||||
end)
|
||||
shengGoldNum,curRewards,function ()
|
||||
NetManager.ComplexEquipRequest(curIndex,0,0,function(msg)
|
||||
this.OnClickTabBtn(curIndex)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
-- tab节点显示自定义
|
||||
|
|
|
@ -38,7 +38,10 @@ function this.On_Btn1_Click()
|
|||
PopupTipPanel.ShowTip(string.format(Language[10701], 1))
|
||||
return
|
||||
end
|
||||
|
||||
if DeathPosManager.battleTime<=0 then
|
||||
PopupTipPanel.ShowTip(Language[11048])
|
||||
return
|
||||
end
|
||||
NetManager.ChallengeDeathPathRequest(curIndex,function(msg)
|
||||
LogBlue(Language[10730]..msg.damage..Language[10731]..msg.historyMax)
|
||||
local fightData = BattleManager.GetBattleServerData(msg)
|
||||
|
|
|
@ -801,11 +801,21 @@ end
|
|||
--获取我的公会援助红点
|
||||
function MyGuildManager.GetMyGuildHelpRedPoint()
|
||||
if not PlayerManager.familyId or PlayerManager.familyId == 0 then return false end
|
||||
--是否还有援助次数
|
||||
local isShowRedPoint = false
|
||||
if this.MyFeteInfo.guildHelpInfo then
|
||||
return #this.MyFeteInfo.guildHelpInfo < ConfigManager.GetConfigData(ConfigName.GuildHelpConfig,1).RecourseTime[1]
|
||||
isShowRedPoint = #this.MyFeteInfo.guildHelpInfo < ConfigManager.GetConfigData(ConfigName.GuildHelpConfig,1).RecourseTime[1]
|
||||
else
|
||||
return true
|
||||
isShowRedPoint = true
|
||||
end
|
||||
if not isShowRedPoint then
|
||||
for i = 1, #this.MyFeteInfo.guildHelpInfo do
|
||||
if this.MyFeteInfo.guildHelpInfo[i].num > this.MyFeteInfo.guildHelpInfo[i].hadtakenum then
|
||||
isShowRedPoint = true
|
||||
end
|
||||
end
|
||||
end
|
||||
return isShowRedPoint
|
||||
end
|
||||
--获取公会军团援助红点
|
||||
function MyGuildManager.GetMyAidOtherGuildHelpRedPoint()
|
||||
|
|
|
@ -1003,7 +1003,7 @@
|
|||
11003,援助次数(
|
||||
11004,免费援助
|
||||
11005,援 助
|
||||
11006,元宝或援助次数不足!
|
||||
11006,妖晶或援助次数不足!
|
||||
11007,您还未进行求援!
|
||||
11008,求助发送成功!
|
||||
11009,每日凌晨5点重置求援次数
|
||||
|
|
|
Loading…
Reference in New Issue