Merge branch 'china/dev' into china/dev_res

dev_chengFeng
gaoxin 2021-11-24 14:30:07 +08:00
commit a97cc47cce
14 changed files with 157 additions and 63 deletions

View File

@ -1195,10 +1195,10 @@ RectTransform:
m_Father: {fileID: 391854018}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -1.3999023, y: 370}
m_SizeDelta: {x: -172.8, y: 181.9}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1.3999023, y: -624}
m_SizeDelta: {x: 907.2, y: 181.90002}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1220850633
MonoBehaviour:
@ -1601,10 +1601,10 @@ RectTransform:
m_Father: {fileID: 391854018}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -1.3999023, y: 985.7202}
m_SizeDelta: {x: -172.8, y: 1049.6}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1.3999023, y: -5.4000244}
m_SizeDelta: {x: 907.2, y: 1111.8999}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1831826791
CanvasRenderer:

View File

@ -448,7 +448,11 @@ function this.GetActivityTypeFromId(activityId)
end
function this.IsActivityTypeOpen(type)
local globalActConfigs = ConfigManager.GetAllConfigsDataByKey(ConfigName.GlobalActivity, "Type", type)
local globalActConfigs = ConfigManager.TryGetAllConfigsDataByKey(ConfigName.GlobalActivity, "Type", type)
if not globalActConfigs or #globalActConfigs <= 0 then
LogError("未找到活动相关配置,类型:"..tostring(type))
return
end
local activityId = nil
table.walk(globalActConfigs, function(actConfigInfo)
if this.mission and this.mission[actConfigInfo.Id] then

View File

@ -754,6 +754,7 @@ function this.GetFakeBattleData(fakeId)
battleData.enemyData[1].firstCamp = 1
battleData.playerData.firstCamp = 0
end
battleData.enemyId=fakeId
return battleData, fakeConfig.TimeSeed
end

View File

@ -27,9 +27,9 @@ local SKIP_STATE = {
}
local UpdateBtnGMFunc = {
[-1] = function()
if not BattleManager.IsUnlockBattlePass() then
return SKIP_STATE.LOCK, "25级或充值任意金额后解锁"
end
-- if not BattleManager.IsUnlockBattlePass() then
-- return SKIP_STATE.LOCK, "25级或充值任意金额后解锁"
-- end
return SKIP_STATE.UNLOCK
end,
[BATTLE_TYPE.BACK]= function()
@ -48,11 +48,26 @@ local UpdateBtnGMFunc = {
-- return SKIP_STATE.NOUSE, "日常副本战斗无法跳过!"
-- end,
[BATTLE_TYPE.STORY_FIGHT] = function()
if not BattleManager.IsUnlockBattlePass() then
return SKIP_STATE.LOCK, "25级或充值任意金额后解锁"
-- if not BattleManager.IsUnlockBattlePass() then
-- return SKIP_STATE.LOCK, "25级或充值任意金额后解锁"
-- end
-- if FightPointPassManager.GetCurOpenFightIdIsBoss() then
-- return SKIP_STATE.NOUSE, "首领关卡无法跳过!"
-- end
if this.curRound < 3 then
return SKIP_STATE.NOUSE, "跳过功能将在第三回合解锁"
end
if FightPointPassManager.GetCurOpenFightIdIsBoss() then
return SKIP_STATE.NOUSE, "首领关卡无法跳过!"
return SKIP_STATE.UNLOCK
end,
[BATTLE_TYPE.DAILY_CHALLENGE] = function()
-- if not BattleManager.IsUnlockBattlePass() then
-- return SKIP_STATE.LOCK, "25级或充值任意金额后解锁"
-- end
-- if FightPointPassManager.GetCurOpenFightIdIsBoss() then
-- return SKIP_STATE.NOUSE, "首领关卡无法跳过!"
-- end
if this.curRound < 3 then
return SKIP_STATE.NOUSE, "跳过功能将在第三回合解锁"
end
return SKIP_STATE.UNLOCK
end,
@ -363,16 +378,22 @@ function this:InitOption()
this.Option:SetActive(true)
Util.GetGameObject(this.BtnTimeScale, "lock"):SetActive(not BattleManager.IsUnlockBattleSpeed())
local state, tip = self:GetSkipState()
this.jumpLock:SetActive(state == SKIP_STATE.LOCK)
Util.SetColor(this.BtnJumpFight, state == SKIP_STATE.NOUSE and UIColor.DEEPGRAY or UIColor.WRITE)
-- 设置跳过按钮的状态
this.SetJumpBtnState()
-- 初始化战斗时间,刷新前端显示
BattleManager.InitTimeScale()
this.SwitchTimeScale()
end
-- 设置跳过按钮的状态
function this.SetJumpBtnState()
local state, tip = this:GetSkipState()
this.jumpLock:SetActive(state == SKIP_STATE.LOCK)
Util.SetColor(this.BtnJumpFight, state == SKIP_STATE.NOUSE and UIColor.DEEPGRAY or UIColor.WRITE)
end
function this.SwitchTimeScale()
local _scale = BattleManager.GetTimeScale()
local child = this.BtnTimeScale.transform.childCount - 3 -- 3倍速时-2
@ -717,6 +738,8 @@ function this.OnRoundChanged(round)
end
this.roundText.text = string.format(Language[10211], curRound, maxRound)
-- 设置跳过按钮的状态
this.SetJumpBtnState()
end
-- 角色轮转回调
function this.RoleTurnChange(role)

View File

@ -666,7 +666,7 @@ function this.OnAddRole(data)
if this.isBoss and data.position == 2 then
isBoss = true
end
tbRole[data] = EnemyView.New(go, data, data.position, this, isBoss)
tbRole[data] = EnemyView.New(go, data, data.position, this, isBoss, this.fightData and this.fightData.enemyId or nil)
end
go.transform.localScale = Vector3.one
go.transform.localPosition = Vector3.zero

View File

@ -6,11 +6,11 @@ function BattleUnit.New(go, role, position, root, isBoss)
return o
end
function BattleUnit:ctor(go, role, position, root, isBoss)
function BattleUnit:ctor(go, role, position, root, isBoss,enemyId)
self._DelayFuncList = {}
self._LoopFuncList = {}
if self.onCreate then
self:onCreate(go, role, position, root, isBoss)
self:onCreate(go, role, position, root, isBoss,enemyId)
end
end

View File

@ -8,23 +8,23 @@ local reliveEffect1 = "fx_chongsheng_lianhua"
local reliveEffect2 = "fx_chongsheng_lizhi"
EnemyView = BattleUnit.New()
function EnemyView.New(go, role, position, root, isBoss)
function EnemyView.New(go, role, position, root, isBoss,enemysId)
local o = BattleUnit.New(go, role, position, root)
setmetatable(o, EnemyView)
EnemyView.__index = EnemyView
o:ctor(go, role, position, root, isBoss)
o:ctor(go, role, position, root, isBoss,enemysId)
return o
end
function EnemyView:onCreate(go, role, position, root, isBoss)
function EnemyView:onCreate(go, role, position, root, isBoss,enemyId)
self.spLoader = SpriteLoader.New()
self.RootPanel = root
self.GameObject = go
self.role = role
self.camp = role.camp
self.isBoss = isBoss
self.enemysId=enemyId --剧情id用于处理剧情特殊显示
-- 创建技能播放器
self.castingEfectNode = self.RootPanel.enemySkillCast
self.castingNameNode = Util.GetGameObject(self.castingEfectNode, "TongYong_Casting_Shang/DongHua/MingZi")
@ -69,7 +69,10 @@ function EnemyView:onCreate(go, role, position, root, isBoss)
self.nameText.text = SubString2(self.readingName,9)
self.level.text = role:GetRoleData(RoleDataName.Level)
self.elementImg.sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(role.roleData.element))
if self.enemysId and self.enemysId==1017 then
Util.GetGameObject(go, "Name"):GetComponent("RectTransform").anchoredPosition=Vector3.New(20,-180,0)
Util.GetGameObject(go, "Pro"):GetComponent("RectTransform").anchoredPosition=Vector3.New(-77,-180,0)
end
--
self.RoleLiveGO = poolManager:LoadLive(self.livePath, go.transform.parent, Vector3.one, Vector3.zero)
self.RoleLiveGOGraphic = self.RoleLiveGO:GetComponent("SkeletonGraphic")

View File

@ -223,6 +223,12 @@ function this.RefreshMyInfo()
sortNumTabs[i] = Util.GetGameObject(this.myInfo, "sortNum/sortNum ("..i..")")
sortNumTabs[i]:SetActive(false)
end
if not itemList2 then
itemList2 = {}
end
for i = 1, #itemList2 do
itemList2[i].gameObject:SetActive(false)
end
if myrank and myrank > 0 then
if myrank < 4 then
sortNumTabs[myrank]:SetActive(true)
@ -231,13 +237,6 @@ function this.RefreshMyInfo()
Util.GetGameObject(sortNumTabs[4], "rankNumberText"):GetComponent("Text").text = myrank
end
if not itemList2 then
itemList2 = {}
end
for i = 1, #itemList2 do
itemList2[i].gameObject:SetActive(false)
end
--获取奖励
if curRankType == 3 then--竞技场
for k,value in ConfigPairs(ConfigList[curRankType]) do

View File

@ -246,6 +246,17 @@ function this.GetManyItems(text)
end)
return
end
if text == "一键法宝之灵" then
local config = (ConfigManager.TryGetAllConfigsDataByKey(ConfigName.ItemConfig,"ItemType",ItemType.talismanSoulChip))
local cor = coroutine.start(function()
for k,v in ipairs(config) do
local str = "1#" .. v.Id .."#" .. 500
NetManager.GMEvent(str)
coroutine.wait(0.1)
end
end)
return
end
if text and text ~= "" then
local list = string.split(text, "|")
local cor = coroutine.start(function()

View File

@ -27,6 +27,7 @@ function this:InitComponent(gameObject)
self.itemList = {}
self.maskList = {}
self.maskImageList = {}
self.heroNameList = {}--所有装备对应的英雄明list
end
function this:BindEvent()
@ -116,32 +117,43 @@ function this:ShowSingleData(item,sdata,index)
local equiped = Util.GetGameObject(item,"equiped")
maskImage:SetActive(false)
equiped:SetActive(sdata.Equiped)
if not self.itemList[index] then
self.itemList[index] = SubUIManager.Open(SubUIConfig.ItemView,itemtrans.transform)
self.itemList[index].gameObject:SetActive(false)
if not self.itemList[item] then
self.itemList[item] = SubUIManager.Open(SubUIConfig.ItemView,itemtrans.transform)
self.itemList[item].gameObject:SetActive(false)
end
self.itemList[item]:OnOpen(false, {sdata.Id,sdata.Num}, 1,true,false,false,sortingOrder)
self.itemList[item].gameObject:SetActive(true)
self.maskList[item] = itemmask
self.maskImageList[item] = maskImage
self.maskImageList[item]:SetActive(self.selectId == sdata.Id)
if not self.heroNameList[index] then
if sdata.Equiped then
local data = HeroManager.GetHeroIdListByEquipId(sdata.Id)
for i = 1, #data do
table.insert( self.heroNameList,data[i])
end
else
self.heroNameList[index] = nil
end
end
LogGreen("index:"..tostring(index))
self.itemList[index]:OnOpen(false, {sdata.Id,sdata.Num}, 1,true,false,false,sortingOrder)
self.itemList[index].gameObject:SetActive(true)
self.maskList[index] = itemmask
self.maskImageList[index] = maskImage
self.maskImageList[index]:SetActive(self.selectId == sdata.Id)
Util.AddOnceClick(self.maskList[index],function ()
Util.AddOnceClick(self.maskList[item],function ()
for i = 1, #self.maskImageList do
self.maskImageList[i]:SetActive(false)
end
if self.selectId == sdata.Id then
self.maskImageList[index]:SetActive(false)
self.maskImageList[item]:SetActive(false)
self.selectId = 0
else
self.maskImageList[index]:SetActive(true)
self.maskImageList[item]:SetActive(true)
self.selectId = sdata.Id
end
end)
Util.AddOnceClick(equiped,function ()
MsgPanel.ShowTwo(string.format("<size=45><color=#00FF66>%s</color>穿戴该装备,是否前往卸下?</size>",HeroManager.GetHeroIdListByEquipId(sdata.Id)[index]),function() end,function()
MsgPanel.ShowTwo(string.format("<size=45><color=#00FF66>%s</color>穿戴该装备,是否前往卸下?</size>",self.heroNameList[index]),function() end,function()
JumpManager.GoJump(22001)
end,"取消","确定")
end)
@ -152,6 +164,7 @@ function this:OnClose()
self.equipList={}
self.maskList = {}
self.maskImageList = {}
self.heroNameList = {}
end
function this:OnDestroy()

View File

@ -7,8 +7,6 @@ local IMAGE = {
[4] = "r_hero_jinengdian01",
}
local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
local maxLevel = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig,133).Value)
local statePower = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig,134).Value)
function Cultivation:InitComponent()
self.spLoader = SpriteLoader.New()
@ -19,6 +17,7 @@ function Cultivation:InitComponent()
self.textPre = Util.GetGameObject(self.grid,"TextPre")
self.textPre:SetActive(false)
self.Tips = Util.GetGameObject(self.gameObject,"Frame/Tips"):GetComponent("Text")
self.title = Util.GetGameObject(self.gameObject,"Frame/Bg/title/Text"):GetComponent("Text")
self.Slide = Util.GetGameObject(self.gameObject,"Frame/Slide")
self.level = Util.GetGameObject(self.Slide,"level"):GetComponent("Text")
@ -44,11 +43,11 @@ function Cultivation:BindEvent()
self:ClosePanel()
end)
Util.AddOnceClick(self.upGradeBtn, function()
if (self.curMaxPower-PracticeManager.CultivationLevel*statePower) < statePower then
if (self.curMaxPower-self.achivePower) < self.statePower then
PopupTipPanel.ShowTip("战力不足无法升级!")
return
end
if maxLevel <= PracticeManager.CultivationLevel then
if self.maxLevel <= PracticeManager.CultivationLevel then
PopupTipPanel.ShowTip("等级已达上限!")
return
end
@ -88,8 +87,11 @@ function Cultivation:OnShow()
--战力
self.curMaxPower = PlayerManager.maxForce
self.lastLevel = PracticeManager.CultivationLevel--上次的等级
self.maxLevel,self.statePower,self.achivePower = PracticeManager.getDataOfCur()
self.lastPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
self.Tips.text = ConfigManager.GetConfigData(ConfigName.QAConfig,112).content
self.title.text = string.format("最高战力每提升%s万可提升1级修为",self.statePower/10000)
--设置四个属性
for i = 1, #self.configData.ProRank do
local go = self.textPreList[i]
@ -104,12 +106,12 @@ function Cultivation:OnShow()
self.level.text = string.format("%s级",PracticeManager.CultivationLevel)
self.power.text = self.curMaxPower
--数字
if maxLevel > PracticeManager.CultivationLevel then
self.value.text = string.format("%s/%s",self.curMaxPower-statePower*PracticeManager.CultivationLevel,statePower)
if self.curMaxPower-statePower*PracticeManager.CultivationLevel > statePower then
if self.maxLevel > PracticeManager.CultivationLevel then
self.value.text = string.format("%s/%s",self.curMaxPower-self.achivePower,self.statePower)
if self.curMaxPower-self.achivePower > self.statePower then
self.fill:GetComponent("RectTransform").sizeDelta = Vector3.New(445,26,0)
else
local size = (self.curMaxPower%statePower)/statePower
local size = (self.curMaxPower-self.achivePower)/self.statePower
self.fill:GetComponent("RectTransform").sizeDelta = Vector3.New(445*size,26,0)
end
self.btnText.text = "升 级"

View File

@ -723,12 +723,43 @@ function this.SetCultivationLevel(_level,func)
end
end
function this.getDataOfCur()
local maxLevel = 0--最大等级
local statePower = 0--当前升一级需要的战力
local achivePower = 0--当前等级已达到的战力
local levelList = string.split(ConfigManager.GetConfigData(ConfigName.SpecialConfig,133).Value, "#")
local statePowerList = string.split(ConfigManager.GetConfigData(ConfigName.SpecialConfig,134).Value, "#")
local limitPowerList = string.split(ConfigManager.GetConfigData(ConfigName.SpecialConfig,139).Value, "#")
maxLevel = tonumber(levelList[#levelList])
for i = #levelList, 1,-1 do
if this.CultivationLevel <= tonumber(levelList[i]) then
statePower = tonumber(statePowerList[i])
end
end
for i = 1, #levelList do
if this.CultivationLevel <= tonumber(levelList[i]) then
if levelList[i-1] then
achivePower = achivePower + (this.CultivationLevel - tonumber(levelList[i-1]))*statePower
break
else
achivePower = this.CultivationLevel*statePower
break
end
else
achivePower = tonumber(limitPowerList[i])
end
end
-- LogGreen("修为等级:"..tostring(this.CultivationLevel).." maxLevel:"..tostring(maxLevel).." statePower:"..tostring(statePower).." achivePower:"..tostring(achivePower).." 最高战力:"..tostring(PlayerManager.maxForce))
return maxLevel,statePower,achivePower
end
function this.CheckPlayerCultivetionRed()
local maxLevel = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig,133).Value)
local statePower = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig,134).Value)
local maxLevel,statePower,achivePower = this.getDataOfCur()
if maxLevel > this.CultivationLevel then
FormationManager.UserPowerChanged()
if (PlayerManager.maxForce - statePower*this.CultivationLevel) > statePower then
if (PlayerManager.maxForce - achivePower) > statePower then
return true
end
end

View File

@ -58,9 +58,16 @@ function TailsManSouPanel:BindEvent()
local s = function(data)
local lis1 = {}
for k,v in pairs(data) do
table.insert(lis1,string.format("<color=#00FF00>%s+%s</color>",propertyConfig[k].Info,GetPropertyFormatStr(propertyConfig[k].Style,v)))
table.insert(lis1,{str = string.format("<color=#00FF00>%s+%s</color>",propertyConfig[k].Info,GetPropertyFormatStr(propertyConfig[k].Style,v)),sort = propertyConfig[k].SortId})
end
return lis1
table.sort(lis1,function(a,b)
return a.sort < b.sort
end)
local list2 = {}
for i = 1,#lis1 do
table.insert(list2,lis1[i].str)
end
return list2
end
local data = {}
local singData = {}

View File

@ -178,9 +178,9 @@ function TailsmanSoulMainPanel:GetProData()
end
local str = ""
for i = 1,#curData do
str = string.format("<color=#ecdfc8>%s%s</color>",propertyConfig[curData[i][1]].Info,GetEquipPropertyFormatStr(propertyConfig[curData[i][1]].Style,curData[i][2]) )
str = string.format("<color=#ecdfc8>%s%s</color>",propertyConfig[curData[i][1]].Info,GetPropertyFormatStr(propertyConfig[curData[i][1]].Style,curData[i][2]) )
if nextProData[curData[i][1]] then
str = str..string.format("<color=#00FF00>+%s</color>",GetEquipPropertyFormatStr(propertyConfig[curData[i][1]].Style,nextProData[curData[i][1]] - curData[i][2]))
str = str..string.format("<color=#00FF00>+%s</color>",GetPropertyFormatStr(propertyConfig[curData[i][1]].Style,nextProData[curData[i][1]] - curData[i][2]))
end
table.insert(proData,str)
end