svn逻辑tongbu

dev_chengFeng
JieLing 2020-07-01 18:14:03 +08:00
parent 956dcfbcd2
commit b3c70f66e4
21 changed files with 652 additions and 513 deletions

View File

@ -808,7 +808,7 @@ JumpType = {
DailyCarbon_Hero=69, --每日角色碎片副本
DailyCarbon_Transure=70, --每日法宝副本
DailyCarbon_SoulPrint=71, --每日魂印副本
DeathPos=71, --十绝阵
DeathPos=72, --十绝阵
GuildCarDelay=73 , --车迟斗法
BuyVigor = 10000, --体力购买
BuyGold = 10001, --金币购买

View File

@ -17,6 +17,7 @@ function CardRendererManager.Initialize()
this.indexFlag = 0
this.liveList = {}
this.usingList = {}
end
@ -52,7 +53,7 @@ function CardRendererManager.GetSpineTexture(liveName, scaleV3, posV3, isReuse,
node = liveNode
}
--
return this.textureList[this.indexFlag], this.liveList[this.indexFlag].node
return this.textureList[this.indexFlag], this.liveList[this.indexFlag].node, this.indexFlag
end
-- 判断是否存在
@ -65,6 +66,19 @@ function this.CheckIsExist(liveName)
end
-- 检测是否正在使用
function this.CheckIsUsing(index)
return this.usingList[index]
end
-- 设置是否正在使用
function this.SetUsing(index, isUsing)
this.usingList[index] = isUsing
end
-- 清除使用列表
function this.ClearUsing()
this.usingList = {}
end
function CardRendererManager.Dispose()
GameObject.DestroyImmediate(this.root)

View File

@ -31,6 +31,7 @@ function BattleBestPopup:BindEvent()
end
function this:OnOpen(heroTId, damageValue, allDamage, func,_func2)
func2 = _func2
-- 创建立绘
local heroTData = ConfigManager.GetConfigData(ConfigName.HeroConfig, heroTId)
this.liveName = GetResourcePath(heroTData.Live)
@ -58,7 +59,6 @@ function this:OnOpen(heroTId, damageValue, allDamage, func,_func2)
-- 结束回调
this._OverFunc = func
func2 = _func2
-- 开始播放动画
Timer.New(function()
if this._OverFunc then

View File

@ -521,23 +521,38 @@ function this.InitQuickFightData(monsterGroupId, eventId, msg)
battledHp = this.GetMapTotalBlood()
-- if this.difficulty == 1 or this.difficulty == 3 or this.difficulty == 4 then
-- PopupText(strShow, 0.5, 2)
-- elseif this.difficulty == 2 then
-- -- UIManager.OpenPanel(UIName.BattleEndPanel, nil, data.hpList, data.drop, func)
-- UIManager.OpenPanel(UIName.RewardItemPopup,data.drop,1,
-- -- Game.GlobalEvent:DispatchEvent(GameEvent.Event.PointTriggerEnd)
-- func
-- )
-- end
-- func = nil
-- LogPink(" MapManager.curTriggerPos ".. MapManager.curTriggerPos)
-- Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove, MapManager.curTriggerPos)
-- -- 试炼副本不能直接结束事件点
-- if this.difficulty ~= 2 then
-- Game.GlobalEvent:DispatchEvent(GameEvent.Event.PointTriggerEnd)
-- end
if this.difficulty == 1 or this.difficulty == 3 or this.difficulty == 4 then
PopupText(strShow, 0.5, 2)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove, MapManager.curTriggerPos)
elseif this.difficulty == 2 then
-- UIManager.OpenPanel(UIName.BattleEndPanel, nil, data.hpList, data.drop, func)
UIManager.OpenPanel(UIName.RewardItemPopup,data.drop,1,
-- Game.GlobalEvent:DispatchEvent(GameEvent.Event.PointTriggerEnd)
func
)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove, MapManager.curTriggerPos)
UIManager.OpenPanel(UIName.RewardItemPopup,data.drop,1,func)
end
func = nil
LogPink(" MapManager.curTriggerPos ".. MapManager.curTriggerPos)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove, MapManager.curTriggerPos)
-- 试炼副本不能直接结束事件点
if this.difficulty ~= 2 then
Game.GlobalEvent:DispatchEvent(GameEvent.Event.PointTriggerEnd)
end
end
Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnMapTeamHpReduce, oldHp - battledHp)

View File

@ -171,20 +171,34 @@ function this.SetData(root, data, ldata)
ResetItemView(root,reward.transform,itemList,3,0.9,orginLayer,false,data.RewardView)
--解锁状态
-- local _lv=0 --等级
-- local _point=0 --关卡
local _power = data.ForceShow--表战力
-- if data.OpenRules[2] ~= nil and data.OpenRules[1][1] == 1 then
-- _lv = data.OpenRules[1][2]
-- end
-- if data.OpenRules[1] ~= nil and data.OpenRules[1][1] == 2 then
-- _point= data.OpenRules[1][2]
-- end
-- if data.OpenRules[2][1]==3 then
-- _power= data.OpenRules[2][2]
-- end
local _lv=0 --等级
local _point=0 --关卡
local _power = 0 --data.ForceShow--表战力
local isOpen = not ldata or CarbonManager.IsDailyCarbonPass(ldata.Id)
for i = 1, #data.OpenRules do
if data.OpenRules[i][1] == 1 then
_lv = data.OpenRules[i][2]
elseif data.OpenRules[i][1] == 2 then
_point = data.OpenRules[i][2]
elseif data.OpenRules[i][1] == 3 then
_power = data.OpenRules[i][2]
end
end
if data.OpenRules[2] ~= nil and data.OpenRules[1][1] == 1 then
_lv = data.OpenRules[1][2]
end
if data.OpenRules[1] ~= nil and data.OpenRules[1][1] == 2 then
_point= data.OpenRules[1][2]
end
if data.OpenRules[2][1]==3 then
_power= data.OpenRules[2][2]
end
-- 判断每日副本是否解锁
local isOpen = (not ldata or CarbonManager.IsDailyCarbonPass(ldata.Id)) -- 上一个副本解锁
and PlayerManager.level >= _lv -- 等级
and (_point == 0 or FightPointPassManager.IsFightPointPass(_point))
and PlayerManager.maxForce >= _power -- 战斗力
--显示挑战或扫荡道具消耗
goIcon:SetActive(isOpen and freeTime<=0)
goIconNum:SetActive( isOpen and freeTime<=0)
@ -213,19 +227,26 @@ function this.SetData(root, data, ldata)
--点击事件
Util.AddOnceClick(goBtn,function()
if PlayerManager.level<_lv then
PopupTipPanel.ShowTip(string.format(Language[10340],_lv))
return
elseif PlayerManager.maxForce < _power then
PopupTipPanel.ShowTip(string.format("战斗力到达%s解锁", _power))
return
elseif _point ~= 0 and not FightPointPassManager.IsFightPointPass(_point) then
PopupTipPanel.ShowTip(string.format("通关%s解锁", mainLevelConfig[_point].Name))
return
elseif PlayerManager.curMapId ~= 0 and FightPointPassManager.IsFightPointPass(PlayerManager.curMapId)==false then
PopupTipPanel.ShowTip(string.format(Language[10341],mainLevelConfig[_point].Name))
return
end
if not isOpen then
PopupTipPanel.ShowTip(Language[12191])
return
end
-- if PlayerManager.level<_lv then
-- PopupTipPanel.ShowTip(string.format(Language[10340],_lv))
-- return
-- elseif PlayerManager.curMapId ~= 0 and FightPointPassManager.IsFightPointPass(PlayerManager.curMapId)==false then
-- PopupTipPanel.ShowTip(string.format(Language[10341],mainLevelConfig[_point].Name))
-- return
-- end
--检测剩余次数
if buyTime<=0 and freeTime<=0 then
PopupTipPanel.ShowTip(Language[10342])

View File

@ -280,6 +280,7 @@ function this.FormationAdapter(teamInfo)
local demonId = teamInfo.team[i].heroTid
local starGrid=Util.GetGameObject(demon, "starGrid")
local proImage=Util.GetGameObject(demon, "heroShow/proIcon"):GetComponent("Image")
Util.GetGameObject(demon, "heroShow/posIcon"):SetActive(false)
-- local posImage=Util.GetGameObject(demon, "heroShow/posIcon"):GetComponent("Image")
-- local heroStage = Util.GetGameObject(demon, "heroShow/heroStage"):GetComponent("Image")
local UI_Effect_Kuang_JinSe=Util.GetGameObject(demon, "effects/UI_Effect_Kuang_JinSe")

View File

@ -157,15 +157,12 @@ function LuckyTurnTablePanel:RemoveListener()
end
---界面打开时调用(用于子类重写)
function LuckyTurnTablePanel:OnOpen(...)
function LuckyTurnTablePanel:OnOpen(_TreasureType)
LuckyTurnTableManager.curTreasureType =_TreasureType and _TreasureType or TreasureType.Lucky
end
---界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function LuckyTurnTablePanel:OnShow(_TreasureType)--_upView,expertPanel,
--this.upView = _upView
LuckyTurnTableManager.curTreasureType =_TreasureType and _TreasureType or TreasureType.Lucky
function LuckyTurnTablePanel:OnShow()
if LuckyTurnTableManager.curTreasureType==TreasureType.Lucky then--防止当前为高级探宝时 按下探宝后跳转到幸运探宝
this.LuckyTurnOnShow(TreasureType.Lucky)
elseif LuckyTurnTableManager.curTreasureType==TreasureType.Advanced then

View File

@ -330,14 +330,14 @@ function this.OnSortingOrderChange()
orginLayer = MapPanel.sortingOrder
end
function this.InitBossInfo()
if powerValue ==-1 then
UIManager.OpenPanel(UIName.TrialOpPanel, 1)
-- 停止自动寻路
-- ctrlView.OnRoleDead()
-- function this.InitBossInfo()
-- if powerValue ==-1 then
-- UIManager.OpenPanel(UIName.TrialOpPanel, 1)
-- -- 停止自动寻路
-- -- ctrlView.OnRoleDead()
end
end
-- end
-- end
-- 初始化部buff显示

View File

@ -394,7 +394,7 @@ function this.CheckFieldOfView(u, v)
end
function this.OnAddPoint(pos, pointId)
LogPink("pointId "..pointId)
-- LogPink("pointId "..pointId)
if pos and not this.EventPoint[pos] then
local u, v = Map_Pos2UV(pos)
LogPink(u.." "..v)

View File

@ -283,16 +283,9 @@ local mapDialoguePanel = function(showType, eventId, showValues, options)
-- UIManager.OpenPanel(UIName.MapOptionPanel, showType, eventId, showValues, options)
-- LogPink("MissionManager showType"..showType.." eventId"..eventId)
-- end
if eventId == 2000001 or eventId == 2000002 then
-- 打开general界面
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.TrialToNextFloor,eventId)
elseif eventId == 2000005 then
-- 直接加buff走人
NetManager.EventUpdateRequest(2000005, 2000011, function ()
Game.GlobalEvent:DispatchEvent(GameEvent.Event.PointTriggerEnd)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.ProgressChange, 1, 2000011)
end)
if not UIManager.IsOpen(UIName.GeneralPopup) then
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.TrialToNextFloor, showType, eventId, showValues, options)
end
end
@ -403,9 +396,13 @@ end
-- 试炼Buff界面
local trailBuffPanel = function(showType, eventId, showValues, options)
if not UIManager.IsOpen(UIName.BuffOptionPanel) then
UIManager.OpenPanel(UIName.BuffOptionPanel, eventId)
end
NetManager.EventUpdateRequest(eventId, options[1], function ()
Game.GlobalEvent:DispatchEvent(GameEvent.Event.PointTriggerEnd)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.ProgressChange, 1, options[1])
end)
-- if not UIManager.IsOpen(UIName.BuffOptionPanel) then
-- UIManager.OpenPanel(UIName.BuffOptionPanel, eventId)
-- end
end
-- 无尽商店
@ -529,10 +526,13 @@ function this.GetAllRewardTrigger()
-- end)
Timer.New(function ()
for key, value in pairs(MapManager.mapPointList) do
-- LogPink("["..key.."] "..value)
LogPink("["..key.."] "..value)
if value==2000000 then
Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove,key)--删除全部宝箱点
end
-- if EventPointConfig[value].ShowType == 17 then
-- Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove,key)--删除所有的buff点
-- end
end
UIManager.OpenPanel(UIName.RewardItemPopup,msg.boxDrop,1,function()
Game.GlobalEvent:DispatchEvent(GameEvent.Event.PointTriggerEnd)

View File

@ -538,7 +538,7 @@ function this.GoJump(_jumpId)
if jumpSData then
if jumpSData.Type < 10000 then
local serData = ActTimeCtrlManager.GetSerDataByTypeId(jumpSData.Type)
if serData then
if serData then
if ActTimeCtrlManager.SingleFuncState(jumpSData.Type) then
jumpDic[jumpSData.Type](jumpSData.Skipfactor)
else

View File

@ -104,23 +104,7 @@ function BattleWinPopup:NextStep()
end
end
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup)
local keys = GameDataBase.SheetBase.GetKeys(ConfigManager.GetConfig(ConfigName.ExpeditionFloorConfig))
--Log("GetCurNodeInfo.lay == #keys "..GetCurNodeInfo.lay .." ".. #keys.." "..GetCurNodeInfo.state)
if GetCurNodeInfo.lay == #keys and GetCurNodeInfo.state == ExpeditionNodeState.Finish then--打完最后一层
UIManager.OpenPanel(UIName.RewardItemPopup,m_battleResult.drop, 1,function()
if m_battlePanel then
m_battlePanel:ClosePanel()
end
if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
end
if UIManager.GetOpenPanel(UIName.ExpeditionMainPanel) then
UIManager.OpenPanel(UIName.ExpeditionMainPanel)
end
end, 0,true,true)
else
--贪婪节点不弹领取圣物
--LogError("GetCurNodeInfo.type "..GetCurNodeInfo.type)
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点
if m_battleResult.drop.itemlist and #m_battleResult.drop.itemlist > 0 then
LogGreen("m_battleResult.drop.itemlist "..#m_battleResult.drop.itemlist)
@ -146,10 +130,6 @@ function BattleWinPopup:NextStep()
m_battlePanel:ClosePanel()
end
PopupTipPanel.ShowTip(Language[12192])
--if _BattleBestPopup then
-- _BattleBestPopup:ClosePanel()
--end
--Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
else
UIManager.OpenPanel(UIName.RewardItemPopup,m_battleResult.drop, 1,function()
if m_battlePanel then
@ -161,10 +141,12 @@ function BattleWinPopup:NextStep()
if GetCurNodeInfo.holyEquipID and #GetCurNodeInfo.holyEquipID > 0 then
UIManager.OpenPanel(UIName.ExpeditionSelectHalidomPanel,true,function ()
end)
else
--此时战斗了但没有圣物 所有直接刷新界面动画 后并刷新界面
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
end
end, 0,true,true)
end
end
end,func2)
end
elseif m_fightType==9 then

View File

@ -85,7 +85,7 @@ function RewardItemSingleShowPopup:BindEvent()
end)
Util.AddClick(this.btnJump, function()
if itemConfigData then
JumpManager.GoJump(itemConfigData.UseJump)
JumpManager.GoJump(itemConfigData.Jump)
end
end)
end

View File

@ -124,6 +124,7 @@ function RewardTalismanSingleShowPopup:OnShowPanelData()
else
self.powerNum1.text=EquipTreasureManager.CalculateWarForceBySid(sId,lv,refineLv)
itemConfig = ConfigManager.GetConfigData(ConfigName.ItemConfig,sId)
LogBlue("sId:"..sId)
curEquipTreasureFigData = ConfigManager.GetConfigData(ConfigName.JewelConfig, sId)
curEquipTreasureStrongFigData,curEquipTreasureSefineFigData = self:GetStrongAndRefineConFig(curEquipTreasureFigData,lv,refineLv)
end
@ -178,7 +179,11 @@ function RewardTalismanSingleShowPopup:OnShowPanelData()
local proConFig = ConfigManager.GetConfigData(ConfigName.PropertyConfig,curEquipTreasureSefineFigData.Property[i][1])
if proConFig then
Util.GetGameObject(go.transform, "proName"):GetComponent("Text").text =proConFig.Info
Util.GetGameObject(go.transform, "proVale"):GetComponent("Text").text = "+"..GetEquipPropertyFormatStr(proConFig.Style,curEquipTreasureSefineFigData.Property[i][2])
if curEquipTreasureSefineFigData.Property[i][2]==0 and proConFig.Style~=1 then
Util.GetGameObject(go.transform, "proVale"):GetComponent("Text").text = "+0%"
else
Util.GetGameObject(go.transform, "proVale"):GetComponent("Text").text = "+"..GetEquipPropertyFormatStr(proConFig.Style,curEquipTreasureSefineFigData.Property[i][2])
end
end
end
else

View File

@ -1,6 +1,10 @@
----- 试炼进入下一层 -----
local this = {}
local showType
local eventId
local showValues
local options
local eventConfig = ConfigManager.GetConfig(ConfigName.EventPointConfig)
function this:InitComponent(gameObject)
this.bodyText = Util.GetGameObject(gameObject,"BodyText"):GetComponent("Text")
@ -15,11 +19,8 @@ function this:BindEvent()
end)
Util.AddClick(this.btnSure,function()
if eventId==2000001 then
OptionBehaviourManager.JumpEventPoint(2000001, 2000001,UIManager.GetOpenPanel(UIName.GeneralPopup))
elseif eventId==2000002 then
OptionBehaviourManager.JumpEventPoint(2000002, 2000003,UIManager.GetOpenPanel(UIName.GeneralPopup))
end
local optionId = eventConfig[eventId].Option[1]
OptionBehaviourManager.JumpEventPoint(eventId, optionId,UIManager.GetOpenPanel(UIName.GeneralPopup))
end)
end
@ -29,8 +30,11 @@ end
function this:RemoveListener()
end
function this:OnShow(this,...)
eventId = ...
function this:OnShow(this,_showType, _eventId, _showValues, _options)
showType = _showType
eventId = _eventId
showValues = _showValues
options = _options
end
function this:OnClose()

View File

@ -800,9 +800,9 @@ function this.QuickSelectListData()
end)
elseif tabType == 3 then
selectEquipTreasureData={}
for k, v in pairs(equipTreasureData) do
for k,v in pairs(equipTreasureData) do
if LengthOfTable(selectEquipTreasureData)<30 then
selectEquipTreasureData[v.did]=v
selectEquipTreasureData[v.idDyn]=v
else
break
end
@ -1042,7 +1042,6 @@ function this.ResolveBtnClickEvent()
if #itemMaxList>0 then--是否分解物品有超过物品上限的
this.GetItemIsBeyondMaxNum(type,curResolveAllItemList)
else
LogError("type "..type.." "..LengthOfTable(curResolveAllItemList))
NetManager.UseAndPriceItemRequest(type,curResolveAllItemList,function (drop)
this.SendBackResolveReCallBack(drop)
end)

View File

@ -156,27 +156,16 @@ function EquipTreasureStrongPopup:BindEvent()
end)
end
--添加事件监听(用于子类重写)
function EquipTreasureStrongPopup:AddListener()
end
--移除事件监听(用于子类重写)
function EquipTreasureStrongPopup:RemoveListener()
end
--界面打开时调用(用于子类重写)
function EquipTreasureStrongPopup:OnOpen(...)
local datas={...}
curEquipData=datas[1]
type=datas[2]
this.SetWindShow(type)
end
function EquipTreasureStrongPopup:OnShow()
this.SetWindShow(type)
end
--设置界面显示 1.强化 2.精炼

View File

@ -356,7 +356,7 @@ function this.SetPropertyShow(_infos,_preList,_grid)
if proper.Style==1 then
obj.transform:GetComponent("Text").text=" +".. value.currValue
else
obj.transform:GetComponent("Text").text=" +".. value.currValue/1000 .."%"
obj.transform:GetComponent("Text").text=" +".. value.currValue/100 .."%"
end
obj.gameObject:SetActive(true)
index=index+1

View File

@ -625,13 +625,13 @@ function this.IsAutoRecoverCount(shopType)
local curTimeStamp = GetTimeStamp()
local shopData = this.GetShopDataByType(shopType)
local lastRefreshTime = math.floor(shopData.lastRefreshTime / 1000)
local leftCount = math.min(maxTime, math.floor((curTimeStamp - lastRefreshTime)/refreshTime))
local leftCount = math.min(maxTime, math.floor(math.ceil(curTimeStamp - lastRefreshTime)/refreshTime))
-- 如果没有免费次数了,但是有特权刷新次数
if leftCount <= 0 and shopInfo.RefreshPrivilege ~= 0 then
return false
end
--
return true, leftCount
end

View File

@ -338,6 +338,7 @@ function this:RefreshBase()
self.costIcon:SetActive(false)
self.costLab:SetActive(false)
self.countLabTip:GetComponent("Text").text = Language[12092]
self.isMaxTime = false
else
self.costIcon:SetActive(true)
self.costLab:SetActive(true)