Merge branch 'china/dev-c' of http://60.1.1.230/gaoxin/JL_Client into china/dev-c
commit
f38620058c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -2529,3 +2529,11 @@ FIGHTLEVEL_STAGETYPE={
|
|||
AssistantLevelReward=2,--奖励副关卡
|
||||
AssistantLevel=3,--战斗副关卡
|
||||
}
|
||||
CardPosImageName = {
|
||||
[1] = "bd_xinkapaifan1",
|
||||
[2] = "bd_xinkapaifan2",
|
||||
[3] = "bd_xinkapaifan3",
|
||||
[4] = "bd_xinkapaifan4",
|
||||
[5] = "bd_xinkapaifan5",
|
||||
[6] = "bd_xinkapaifan6",
|
||||
}
|
|
@ -133,6 +133,7 @@ RECHARGEINFOINDICATION_BUYCOUNT_FIELD = protobuf.FieldDescriptor();
|
|||
RECHARGEINFOINDICATION_LEFTTIME_FIELD = protobuf.FieldDescriptor();
|
||||
SWEEPDEMONREQUEST = protobuf.Descriptor();
|
||||
SWEEPDEMONREQUEST_ID_FIELD = protobuf.FieldDescriptor();
|
||||
SWEEPDEMONREQUEST_ONKEYSWEEP_FIELD = protobuf.FieldDescriptor();
|
||||
SWEEPDEMONRESPONSE = protobuf.Descriptor();
|
||||
SWEEPDEMONRESPONSE_DROP_FIELD = protobuf.FieldDescriptor();
|
||||
|
||||
|
@ -1349,11 +1350,21 @@ SWEEPDEMONREQUEST_ID_FIELD.default_value = 0
|
|||
SWEEPDEMONREQUEST_ID_FIELD.type = 5
|
||||
SWEEPDEMONREQUEST_ID_FIELD.cpp_type = 1
|
||||
|
||||
SWEEPDEMONREQUEST_ONKEYSWEEP_FIELD.name = "onkeySweep"
|
||||
SWEEPDEMONREQUEST_ONKEYSWEEP_FIELD.full_name = ".rpc.protocols.SweepDemonRequest.onkeySweep"
|
||||
SWEEPDEMONREQUEST_ONKEYSWEEP_FIELD.number = 2
|
||||
SWEEPDEMONREQUEST_ONKEYSWEEP_FIELD.index = 1
|
||||
SWEEPDEMONREQUEST_ONKEYSWEEP_FIELD.label = 1
|
||||
SWEEPDEMONREQUEST_ONKEYSWEEP_FIELD.has_default_value = false
|
||||
SWEEPDEMONREQUEST_ONKEYSWEEP_FIELD.default_value = false
|
||||
SWEEPDEMONREQUEST_ONKEYSWEEP_FIELD.type = 8
|
||||
SWEEPDEMONREQUEST_ONKEYSWEEP_FIELD.cpp_type = 7
|
||||
|
||||
SWEEPDEMONREQUEST.name = "SweepDemonRequest"
|
||||
SWEEPDEMONREQUEST.full_name = ".rpc.protocols.SweepDemonRequest"
|
||||
SWEEPDEMONREQUEST.nested_types = {}
|
||||
SWEEPDEMONREQUEST.enum_types = {}
|
||||
SWEEPDEMONREQUEST.fields = {SWEEPDEMONREQUEST_ID_FIELD}
|
||||
SWEEPDEMONREQUEST.fields = {SWEEPDEMONREQUEST_ID_FIELD, SWEEPDEMONREQUEST_ONKEYSWEEP_FIELD}
|
||||
SWEEPDEMONREQUEST.is_extendable = false
|
||||
SWEEPDEMONREQUEST.extensions = {}
|
||||
SWEEPDEMONRESPONSE_DROP_FIELD.name = "Drop"
|
||||
|
|
|
@ -14,7 +14,7 @@ local contentScripts = {
|
|||
--贪婪
|
||||
[5]= {view=require("Modules/Expedition/View/ExpeditionMonsterInfo_Greed"),panelName="ExpeditionMonsterInfo_Greed",type=EXPEDITON_POPUP_TYPE.Greed},
|
||||
-- 四灵试炼 boss
|
||||
[6]= {view=require("Modules/Expedition/View/MonsterFormationInfo"),panelName="MonsterFormationInfo",type = EXPEDITON_POPUP_TYPE.FourElementMonster},
|
||||
[6]= {view=require("Modules/Expedition/View/MonsterCampFormationInfo"),panelName="MonsterCampFormationInfo",type = EXPEDITON_POPUP_TYPE.FourElementMonster},
|
||||
}
|
||||
--子模块预设
|
||||
local contentPrefabs={}
|
||||
|
@ -82,7 +82,7 @@ function ExpeditionMonsterInfoPopup:OnOpen(popupType,...)
|
|||
contentPrefabs[i].gameObject:SetActive(false)
|
||||
end
|
||||
this.BGImage1:SetActive(index == 1 or index == 2)
|
||||
this.BGImage2:SetActive(index == 3 or index == 4 or index == 5)
|
||||
this.BGImage2:SetActive(index == 3 or index == 4 or index == 5 or index == 6)
|
||||
contentPrefabs[index].gameObject:SetActive(true)
|
||||
contentScripts[index].view:OnShow(this,...)--1、传入自己 2、传入不定参
|
||||
end
|
||||
|
|
|
@ -42,7 +42,7 @@ function this:InitComponent(gameObject)
|
|||
this.fightBtnNum=Util.GetGameObject(this.fightBtn,"IconNum"):GetComponent("Text")
|
||||
this.fightBtn.gameObject:SetActive(true)
|
||||
this.returnLook=Util.GetGameObject(gameObject,"returnLook")
|
||||
this.returnLook.gameObject:SetActive(true)
|
||||
this.returnLook.gameObject:SetActive(false)
|
||||
this.tip = Util.GetGameObject(gameObject,"tip"):GetComponent("Text")
|
||||
Util.GetGameObject(gameObject, "RoleGrid/FrontImage"):GetComponent("Image").sprite = Util.LoadSprite("bd_xinqianpai_zh")
|
||||
Util.GetGameObject(gameObject, "RoleGrid/BehindImage"):GetComponent("Image").sprite = Util.LoadSprite("bd_xinhoupai_zh")
|
||||
|
@ -54,30 +54,30 @@ function this:BindEvent()
|
|||
Util.AddClick(this.sureBtn, function()
|
||||
this:BtnClickEvent()
|
||||
end)
|
||||
Util.AddClick(this.returnLook, function()
|
||||
--faxieyi
|
||||
local tempData = {}
|
||||
NetManager.GetRePlayData(curType,waveId,function(msg)
|
||||
tempData = msg.userRank
|
||||
if not tempData or #tempData < 1 then
|
||||
PopupTipPanel.ShowTip("无通关记录!")
|
||||
else
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.FourElementReturnLook,waveId,curType,tempData)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
-- Util.AddClick(this.returnLook, function()
|
||||
-- --faxieyi
|
||||
-- local tempData = {}
|
||||
-- NetManager.GetRePlayData(curType,waveId,function(msg)
|
||||
-- tempData = msg.userRank
|
||||
-- if not tempData or #tempData < 1 then
|
||||
-- PopupTipPanel.ShowTip("无通关记录!")
|
||||
-- else
|
||||
-- UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.FourElementReturnLook,waveId,curType,tempData)
|
||||
-- end
|
||||
-- end)
|
||||
-- end)
|
||||
Util.AddClick(this.backBtn, function()
|
||||
parent:ClosePanel()
|
||||
end)
|
||||
end
|
||||
function this:BtnClickEvent()
|
||||
local x = function()
|
||||
MonsterCampManager.ExecuteFightBattle(waveId,1,function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(data.freeTimeId, 1)
|
||||
NetManager.SweepDemonRequest(waveId,false,function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BATTLENUM, 1)
|
||||
this:SetIcon()
|
||||
end,curType)
|
||||
end)
|
||||
end
|
||||
if waveId == data.monsterWave then
|
||||
if waveId == MonsterCampManager.monsterWave - 1 then
|
||||
LogGreen(freeTime..buyTime)
|
||||
if freeTime <=0 and buyTime <= 0 then
|
||||
PopupTipPanel.ShowTip("今日已无扫荡次数!")
|
||||
|
@ -90,20 +90,20 @@ function this:BtnClickEvent()
|
|||
end
|
||||
MsgPanel.ShowTwo(string.format("是否花费%s%s购买一次扫荡次数?",costNum,itemConfig[itemId].Name),function() end,function()
|
||||
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeDataId,1,function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(data.buyTimeId, 1)
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BUY_BATTLENUM, 1)
|
||||
x()
|
||||
end)
|
||||
end,"取消","确定")
|
||||
else
|
||||
x()
|
||||
end
|
||||
elseif (waveId == data.monsterWave + 1) then
|
||||
if data.canFightTime > 0 then
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.FOUR_ELEMENT, curType,waveId)
|
||||
elseif (waveId == MonsterCampManager.monsterWave) then
|
||||
-- if data.canFightTime > 0 then
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.MONSTER_CAMP)
|
||||
parent:ClosePanel()
|
||||
else
|
||||
PopupTipPanel.ShowTip("今日已无可挑战层数!")
|
||||
end
|
||||
-- else
|
||||
-- PopupTipPanel.ShowTip("今日已无可挑战层数!")
|
||||
-- end
|
||||
else
|
||||
parent:ClosePanel()
|
||||
end
|
||||
|
@ -117,13 +117,14 @@ function this:RemoveListener()
|
|||
end
|
||||
|
||||
function this:SetIcon()
|
||||
freeTime,buyTime = MonsterCampManager.GetTimeTip(curType)
|
||||
storeDataId,itemId,costNum = MonsterCampManager.GetCost(curType)
|
||||
freeTime = MonsterCampManager.GetCanBattleCount()
|
||||
buyTime = MonsterCampManager.GetCanBuyBattleCount()
|
||||
storeDataId,itemId,costNum = MonsterCampManager.MonsterCampGetCost()
|
||||
Util.SetGray(this.fightBtn,false)
|
||||
this.fightBtnIcon.gameObject:SetActive(false)
|
||||
this.fightBtnNum.gameObject:SetActive(false)
|
||||
this.sureBtn:GetComponent("Image").sprite = Util.LoadSprite("r_hero_button_002")
|
||||
if waveId == data.monsterWave then
|
||||
if waveId == MonsterCampManager.monsterWave - 1 then
|
||||
this.tip.text = "扫荡奖励"
|
||||
if freeTime > 0 then
|
||||
this.fightBtnText.text = string.format("<color=#%s>%s</color>","17232A","免费扫荡")
|
||||
|
@ -143,7 +144,7 @@ function this:SetIcon()
|
|||
Util.SetGray(this.fightBtn,true)
|
||||
end
|
||||
end
|
||||
elseif (waveId == data.monsterWave + 1) then
|
||||
elseif (waveId == MonsterCampManager.monsterWave) then
|
||||
this.tip.text = "战斗奖励"
|
||||
this.sureBtn:GetComponent("Image").sprite = Util.LoadSprite("r_hero_button_001")
|
||||
this.fightBtnText.text = string.format("<color=#%s>%s</color>","17232A","挑 战")
|
||||
|
@ -158,32 +159,17 @@ function this:OnShow(_parent,...)
|
|||
sortingOrder = _parent.sortingOrder
|
||||
--不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参
|
||||
local args = {...}
|
||||
curType = args[1]
|
||||
waveId = args[2]
|
||||
|
||||
configData = MonsterCampManager.GetFourElementMonsterInfoByWave(curType,waveId)
|
||||
data = MonsterCampManager.GetCurFourElementMonsterInfo(curType)
|
||||
waveId = args[1]
|
||||
configData = ConfigManager.GetConfigData(ConfigName.FloodConfig,waveId)
|
||||
this:SetIcon()
|
||||
local rewardIds = {}
|
||||
if waveId == data.monsterWave then
|
||||
--扫荡
|
||||
rewardIds = configData.commonReward
|
||||
else
|
||||
rewardIds = configData.firstReward
|
||||
end
|
||||
|
||||
if rewardIds and #rewardIds > 0 then
|
||||
for i, v in pairs(rewardIds) do
|
||||
table.insert(rewardData,{v.id,v.num})
|
||||
end
|
||||
end
|
||||
rewardData = configData.RewardShow
|
||||
this:FormationAdapter()
|
||||
end
|
||||
-- 编队数据匹配
|
||||
function this:FormationAdapter()
|
||||
this.titleText.text = string.format("%s层",configData.wave)
|
||||
this.power.text = configData.power
|
||||
local bossTeaminfo = configData.monster
|
||||
this.titleText.text = string.format("%s层",configData.Id)
|
||||
this.power.text = configData.Force
|
||||
local bossTeaminfo = ConfigManager.GetConfigData(ConfigName.MonsterGroup,configData.Monster).Contents[1]
|
||||
for i = 1, #heroListGo do
|
||||
if (bossTeaminfo[i]) and bossTeaminfo[i] > 0 then
|
||||
heroListGo[i].transform.parent:GetComponent("Image").sprite=Util.LoadSprite("t_chengyuankuang_kuang")
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7b9c7d5cf678256498a8f008243e458e
|
||||
guid: 2123b5c797b8e924dbb73d417ac70ea9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
|
@ -205,10 +205,33 @@ function this.MonsterCampGetCost()
|
|||
and PrivilegeManager.GetPrivilegeNumber(buyTimeId) or (PrivilegeManager.GetPrivilegeUsedTimes(buyTimeId) + 1)
|
||||
return storeData.Id, storeData.Cost[1][1],storeData.Cost[2][buyTimes]
|
||||
end
|
||||
--心魔试炼特权一键扫荡购买信息
|
||||
function this.MonsterCampGetYJGMCost()
|
||||
local buyTimeId = PRIVILEGE_TYPE.MONSTERCAMP_BUY_BATTLENUM
|
||||
local storeData = ConfigManager.GetConfigDataByDoubleKey(ConfigName.StoreConfig, "StoreId", 7, "Limit", buyTimeId)
|
||||
--商店表数据
|
||||
local allNum = PrivilegeManager.GetPrivilegeNumber(buyTimeId)
|
||||
local useNum = PrivilegeManager.GetPrivilegeUsedTimes(buyTimeId)
|
||||
local shengNum = allNum - useNum
|
||||
local maNum = 0
|
||||
for i = 1, shengNum do
|
||||
local buyTimes = (PrivilegeManager.GetPrivilegeUsedTimes(buyTimeId) + i) > PrivilegeManager.GetPrivilegeNumber(buyTimeId)
|
||||
and PrivilegeManager.GetPrivilegeNumber(buyTimeId) or (PrivilegeManager.GetPrivilegeUsedTimes(buyTimeId) + i)
|
||||
maNum = maNum + storeData.Cost[2][buyTimes]
|
||||
end
|
||||
return storeData.Id, storeData.Cost[1][1],maNum,shengNum
|
||||
end
|
||||
--获取心魔试炼表数据
|
||||
function this.GetMonstersInfo()
|
||||
local datas = {}
|
||||
local i = 10
|
||||
for _, configInfo in ConfigPairs(monsterCampConfig) do
|
||||
if i <= 0 then
|
||||
break
|
||||
end
|
||||
if configInfo.Id > this.monsterWave then
|
||||
i = i - 1
|
||||
end
|
||||
table.insert(datas,configInfo)
|
||||
end
|
||||
return datas
|
||||
|
|
|
@ -26,6 +26,7 @@ function MonsterCampNewPanel:InitComponent()
|
|||
|
||||
this.btnBack = Util.GetGameObject(self.gameObject, "InfoRoot/btnBack")
|
||||
this.helpBtn = Util.GetGameObject(self.gameObject, "InfoRoot/help")
|
||||
this.helpBtn:SetActive(false)
|
||||
this.helpPosition=this.helpBtn:GetComponent("RectTransform").localPosition
|
||||
this.pre = Util.GetGameObject(self.gameObject, "InfoRoot/pre")
|
||||
this.grid = Util.GetGameObject(self.gameObject, "InfoRoot/grid")
|
||||
|
@ -37,7 +38,8 @@ function MonsterCampNewPanel:InitComponent()
|
|||
this.scrollView.moveTween.Strength = 2
|
||||
|
||||
this.titleText = Util.GetGameObject(self.gameObject, "InfoRoot/tiitleRoot/title"):GetComponent("Text")
|
||||
this.canFightWaves = Util.GetGameObject(self.gameObject, "InfoRoot/bottomLayout/canFightWaves"):GetComponent("Text")
|
||||
this.moppingUpBtn = Util.GetGameObject(self.gameObject, "InfoRoot/bottomLayout/moppingUpBtn")
|
||||
Util.GetGameObject(self.gameObject, "InfoRoot/bottomLayout/moppingUpBtn/Text"):GetComponent("Text").text = "一键扫荡"
|
||||
this.freeMoppingTimes = Util.GetGameObject(self.gameObject, "InfoRoot/bottomLayout/freeMoppingTimes"):GetComponent("Text")
|
||||
this.buyMoppingTimes = Util.GetGameObject(self.gameObject, "InfoRoot/bottomLayout/buyMoppingTimes"):GetComponent("Text")
|
||||
this.addBtn = Util.GetGameObject(self.gameObject, "InfoRoot/bottomLayout/addBtn")
|
||||
|
@ -60,7 +62,7 @@ function MonsterCampNewPanel:BindEvent()
|
|||
PopupTipPanel.ShowTip("今日已无购买次数")
|
||||
else
|
||||
if BagManager.GetItemCountById(itemId) < costNum then
|
||||
PopupTipPanel.ShowTip(string.format(Language[10343], itemConfig[itemId].Name))
|
||||
PopupTipPanel.ShowTip(string.format(Language[10298], itemConfig[itemId].Name))
|
||||
return
|
||||
end
|
||||
MsgPanel.ShowTwo(string.format("是否花费%s%s购买一次扫荡次数?",costNum,itemConfig[itemId].Name),function() end,function()
|
||||
|
@ -89,13 +91,31 @@ function MonsterCampNewPanel:BindEvent()
|
|||
end)
|
||||
end,2)
|
||||
end)
|
||||
Util.AddClick(this.moppingUpBtn, function ()
|
||||
-- local _storeDataId,_itemId,_costNum,moppingUpNum = MonsterCampManager.MonsterCampGetYJGMCost()
|
||||
-- MsgPanel.ShowTwo(string.format("是否花费%s进行一键扫荡?",_costNum,itemConfig[itemId].Name),function() end,function()
|
||||
-- if BagManager.GetItemCountById(_itemId) < _costNum then
|
||||
-- PopupTipPanel.ShowTip(string.format(Language[10298], itemConfig[itemId].Name))
|
||||
-- else
|
||||
-- ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeDataId,moppingUpNum,function()
|
||||
-- PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BUY_BATTLENUM, moppingUpNum)
|
||||
-- NetManager.SweepDemonRequest(MonsterCampManager.monsterWave - 1,true,function(msg)
|
||||
-- UIManager.OpenPanel(UIName.RewardItemPopup,msg.Drop,1,function()
|
||||
-- PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BATTLENUM, MonsterCampManager.GetCanBattleCount() )
|
||||
-- this.UpdatePrivilage()
|
||||
-- end)
|
||||
-- end)
|
||||
-- end)
|
||||
-- end
|
||||
-- end,"取消","确定")
|
||||
end)
|
||||
BindRedPointObject(RedPointType.EpicExplore,Util.GetGameObject(this.btnHelpFight, "redPoint"))
|
||||
end
|
||||
|
||||
this.UpdatePrivilage = function()
|
||||
-- if this.singledataList[trailData.monsterWave] then
|
||||
-- this.singledataList[trailData.monsterWave]:UpdatePrivilage()
|
||||
-- end
|
||||
if this.singledataList[MonsterCampManager.monsterWave - 1] then
|
||||
this.singledataList[MonsterCampManager.monsterWave - 1]:UpdatePrivilage()
|
||||
end
|
||||
storeDataId,itemId,costNum = MonsterCampManager.MonsterCampGetCost()
|
||||
freeTimes = MonsterCampManager.GetCanBattleCount()
|
||||
buyTimes = MonsterCampManager.GetCanBuyBattleCount()
|
||||
|
@ -123,7 +143,6 @@ end
|
|||
function MonsterCampNewPanel:OnShow()
|
||||
storeDataId,itemId,costNum = MonsterCampManager.MonsterCampGetCost()
|
||||
this.titleText.text = Language[12099]
|
||||
this.canFightWaves.text = "可挑战层数:"..MonsterCampManager.monsterWave
|
||||
freeTimes = MonsterCampManager.GetCanBattleCount()
|
||||
buyTimes = MonsterCampManager.GetCanBuyBattleCount()
|
||||
this.freeMoppingTimes.text = "免费扫荡:" ..freeTimes
|
||||
|
|
|
@ -5141,9 +5141,10 @@ function NetManager.VipLevelStateRewardRequset(vipLevelId,func)
|
|||
end)
|
||||
end
|
||||
--心魔试炼扫荡
|
||||
function NetManager.SweepDemonRequest(id,func)
|
||||
function NetManager.SweepDemonRequest(id,onKeySweep,func)
|
||||
local data = FightInfoProto_pb.SweepDemonRequest()
|
||||
data.id = id
|
||||
data.onkeySweep = onKeySweep
|
||||
local msg = data:SerializeToString()
|
||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.SWEEP_DEMON_REQUEST, MessageTypeProto_pb.SWEEP_DEMON_RESPONSE, msg, function(buffer)
|
||||
local data = buffer:DataByte()
|
||||
|
|
|
@ -29,13 +29,12 @@ function MonsterCampSingleWave:InitComponent(go,_data)
|
|||
|
||||
self.reward = Util.GetGameObject(go,"bg/rewardRect")
|
||||
self.fight = Util.GetGameObject(go,"bg/fight")
|
||||
self.fightText = Util.GetGameObject(go,"bg/fight/Text"):GetComponent("Text")
|
||||
-- self.pass = Util.GetGameObject(go,"bg/pass"):GetComponent("Image")
|
||||
self.pass = Util.GetGameObject(go,"bg/pass"):GetComponent("Image")
|
||||
-- self.title = Util.GetGameObject(go,"bg/leftLayout/title"):GetComponent("Image")
|
||||
self.rewardText = Util.GetGameObject(self.reward,"Text"):GetComponent("Text")
|
||||
-- self.fightBtnIcon = Util.GetGameObject(self.fight,"layout/icon"):GetComponent("Image")
|
||||
-- self.fightBtnNum = Util.GetGameObject(self.fight,"layout/num"):GetComponent("Text")
|
||||
-- self.fightBtnText = Util.GetGameObject(self.fight,"layout/Text"):GetComponent("Text")
|
||||
self.fightBtnIcon = Util.GetGameObject(self.fight,"layout/icon"):GetComponent("Image")
|
||||
self.fightBtnNum = Util.GetGameObject(self.fight,"layout/num"):GetComponent("Text")
|
||||
self.fightBtnText = Util.GetGameObject(self.fight,"layout/Text"):GetComponent("Text")
|
||||
self.fightBtnMask = Util.GetGameObject(self.fight,"mask"):GetComponent("Image")
|
||||
self.bg = Util.GetGameObject(go,"bg"):GetComponent("Image")
|
||||
self.rewardGrid = Util.GetGameObject(self.reward,"grid")
|
||||
|
@ -52,8 +51,6 @@ end
|
|||
|
||||
function MonsterCampSingleWave:OnOpen()
|
||||
self:UpdatePrivilage()
|
||||
-- self.fightBtnIcon.gameObject:SetActive(false)
|
||||
-- self.fightBtnNum.gameObject:SetActive(false)
|
||||
self.Id.text = "第"..self.data.Id.."层"
|
||||
self.power.text = self.data.Force
|
||||
self.bg.sprite = self.spLoader:LoadSprite("s_silingshilian_renjieshiliandi")
|
||||
|
@ -61,19 +58,7 @@ function MonsterCampSingleWave:OnOpen()
|
|||
local monsterConfig = ConfigManager.GetConfigData(ConfigName.MonsterConfig,MonsterGroup.Contents[1][1])
|
||||
local herodata = ConfigManager.GetConfigData(ConfigName.HeroConfig,monsterConfig.MonsterId)
|
||||
self:SingleHeroDataShow(monsterConfig,herodata)
|
||||
self.rewardText.text = "奖励"
|
||||
self.fight.gameObject:SetActive(false)
|
||||
if self.data.Id < MonsterCampManager.monsterWave - 1 then
|
||||
|
||||
elseif self.data.Id == MonsterCampManager.monsterWave - 1 then--扫荡
|
||||
self.fight.gameObject:SetActive(true)
|
||||
self.fightText.text = Language[10997]
|
||||
elseif self.data.Id == MonsterCampManager.monsterWave then--挑战
|
||||
self.fight.gameObject:SetActive(true)
|
||||
self.fightText.text = Language[10559]
|
||||
elseif self.data.Id > MonsterCampManager.monsterWave then
|
||||
|
||||
end
|
||||
self:SetIcon()
|
||||
self.rewardData = self.data.RewardShow
|
||||
if self.rewardData and #self.rewardData then
|
||||
self:InitShowReward()
|
||||
|
@ -99,23 +84,22 @@ function MonsterCampSingleWave:OnOpen()
|
|||
-- end
|
||||
-- end
|
||||
-- Util.AddOnceClick(self.pass.gameObject, function()
|
||||
-- UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.trailData.fourElementType,self.data.Id)
|
||||
-- UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.data.Id)
|
||||
-- end)
|
||||
-- Util.AddOnceClick(self.hero, function()
|
||||
-- UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.trailData.fourElementType,self.data.Id)
|
||||
-- UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.data.Id)
|
||||
-- end)
|
||||
Util.AddOnceClick(self.btn, function()
|
||||
UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.trailData.fourElementType,self.data.Id)
|
||||
UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.data.Id)
|
||||
end)
|
||||
Util.AddOnceClick(self.fight, function()
|
||||
LogGreen(self.data.Id)
|
||||
local x = function()
|
||||
NetManager.SweepDemonRequest(self.data.Id,function(msg)
|
||||
NetManager.SweepDemonRequest(self.data.Id,false,function(msg)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.Drop,1,function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BATTLENUM, 1)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.MonsterCamp.UpdatePri)
|
||||
self:UpdatePrivilage()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.Drop,1,function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BATTLENUM, 1)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
@ -220,49 +204,42 @@ function MonsterCampSingleWave:UpdatePrivilage()
|
|||
-- self.freeTimes,self.buyTimes = MonsterCampManager.GetTimeTip(self.trailData.fourElementType)
|
||||
self.freeTimes = MonsterCampManager.GetCanBattleCount()
|
||||
self.buyTimes = MonsterCampManager.GetCanBuyBattleCount()
|
||||
-- self:SetIcon()
|
||||
self:SetIcon()
|
||||
end
|
||||
|
||||
-- function MonsterCampSingleWave:SetIcon()
|
||||
-- Util.SetGray(self.fight,false)
|
||||
-- if self.data.Id == MonsterCampManager.monsterWave then
|
||||
-- --设置扫荡按钮
|
||||
-- self.rewardText.text = "扫荡奖励"
|
||||
-- self.fightBtnMask.sprite = self.spLoader:LoadSprite("r_hero_button_002")
|
||||
-- if self.freeTimes > 0 then
|
||||
-- -- self.fightBtnIcon.gameObject:SetActive(false)
|
||||
-- -- self.fightBtnNum.gameObject:SetActive(false)
|
||||
-- self.fightBtnText.text = string.format("<color=#%s>%s</color>","17232A","免费扫荡")
|
||||
-- Util.SetGray(self.fight,false)
|
||||
-- else
|
||||
-- -- self.fightBtnIcon.gameObject:SetActive(true)
|
||||
-- -- self.fightBtnNum.gameObject:SetActive(true)
|
||||
-- -- self.fightBtnIcon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemConfig[self.itemId].ResourceID))
|
||||
-- local color = 0
|
||||
-- if BagManager.GetItemCountById(self.itemId) < self.costNum then
|
||||
-- color = "E71515"
|
||||
-- else
|
||||
-- color = "17232A"
|
||||
-- end
|
||||
-- self.fightBtnNum.text =string.format("<color=#%s>%s</color>",color,self.costNum)
|
||||
-- self.fightBtnText.text = string.format("<color=#%s>%s</color>",color,"扫荡")
|
||||
-- if self.buyTimes < 1 then
|
||||
-- Util.SetGray(self.fight,true)
|
||||
-- end
|
||||
-- end
|
||||
-- else
|
||||
-- if self.data.Id == self.trailData.monsterWave + 1 then
|
||||
-- --设置挑战fight
|
||||
-- -- self.fightBtnIcon.gameObject:SetActive(false)
|
||||
-- -- self.fightBtnNum.gameObject:SetActive(false)
|
||||
-- -- self.fightBtnMask:GetComponent("Image").sprite = self.spLoader:LoadSprite("r_hero_button_001")
|
||||
-- -- self.fightBtnText.text = string.format("<color=#%s>%s</color>","17232A","挑战")
|
||||
-- else
|
||||
-- self.fight.gameObject:SetActive(false)
|
||||
-- end
|
||||
-- Util.SetGray(self.fight,false)
|
||||
-- end
|
||||
-- end
|
||||
function MonsterCampSingleWave:SetIcon()
|
||||
Util.SetGray(self.fight,false)
|
||||
self.fight.gameObject:SetActive(false)
|
||||
self.fightBtnIcon.gameObject:SetActive(false)
|
||||
self.fightBtnNum.gameObject:SetActive(false)
|
||||
self.rewardText.text = "奖励"
|
||||
if self.data.Id < MonsterCampManager.monsterWave - 1 then
|
||||
elseif self.data.Id == MonsterCampManager.monsterWave - 1 then--扫荡
|
||||
self.rewardText.text = "扫荡奖励"
|
||||
self.fight.gameObject:SetActive(true)
|
||||
if self.freeTimes > 0 then
|
||||
self.fightBtnText.text = string.format("<color=#%s>%s</color>","17232A","免费扫荡")
|
||||
self.fightBtnMask.sprite = self.spLoader:LoadSprite("r_hero_button_002")
|
||||
else
|
||||
self.fightBtnIcon.gameObject:SetActive(true)
|
||||
self.fightBtnNum.gameObject:SetActive(true)
|
||||
local color = BagManager.GetItemCountById(self.itemId) < self.costNum and "E71515" or "17232A"
|
||||
self.fightBtnNum.text =string.format("<color=#%s>%s</color>",color,self.costNum)
|
||||
self.fightBtnText.text = string.format("<color=#%s>%s</color>",color,"扫荡")
|
||||
self.fightBtnIcon.sprite = Util.LoadSprite(GetResourcePath(itemConfig[self.itemId].ResourceID))
|
||||
if self.buyTimes < 1 then
|
||||
Util.SetGray(self.fight,true)
|
||||
end
|
||||
end
|
||||
elseif self.data.Id == MonsterCampManager.monsterWave then--挑战
|
||||
self.fight.gameObject:SetActive(true)
|
||||
self.fightBtnIcon.gameObject:SetActive(false)
|
||||
self.fightBtnNum.gameObject:SetActive(false)
|
||||
self.fightBtnMask:GetComponent("Image").sprite = self.spLoader:LoadSprite("r_hero_button_001")
|
||||
self.fightBtnText.text = string.format("<color=#%s>%s</color>","17232A","挑战")
|
||||
elseif self.data.Id > MonsterCampManager.monsterWave then
|
||||
end
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function MonsterCampSingleWave:OnDestroy()
|
||||
|
|
Loading…
Reference in New Issue