[神兵]==================修改提交

dev_chengFeng
wangzhenxing 2023-04-11 14:41:36 +08:00
parent c294eb3406
commit 3f8a00cb14
15 changed files with 75 additions and 37 deletions

View File

@ -2002,6 +2002,7 @@ HELP_TYPE = {
PowerRice = 127,--战力冲刺
GodPrint=129,--神印
GodWeapon=139,--神兵玩法
GodsWayTreasure=140, --多队塔秘宝
}
NumToComplexFont = {

View File

@ -1136,7 +1136,7 @@ function this.GetItemListFromTempBag(drop, isSave)
itemdata.frame = GetHeroQuantityImageByquality(itemConfig.Quantity)
itemdata.icon = GetResourcePath(itemConfig.ResourceID)
itemdata.num = 1
GodWeaponManager.AddHandBook(itemdata.sId)
--GodWeaponManager.AddHandBook(itemdata.sId)
table.insert(itemDataList, itemdata)
end
end

View File

@ -188,7 +188,7 @@ function BattleLogic.InitOrder()
local enemyWeaponList = fightData.enemyData[1].weaponList
if enemyWeaponList then
for i=1, #enemyWeaponList do
LogError("创建一个神兵")
--LogError("创建一个神兵")
FightWeaponManager.AddWeapon(enemyWeaponList[i])
end
end

View File

@ -117,16 +117,16 @@ function this.GetShowPanelData()
end)
end
function this.NoGetShowPanelData()
local pokemonSData=ConfigManager.GetConfigData(ConfigName.SpiritAnimal, pokemonSid)
local pokemonSData=ConfigManager.GetConfigData(ConfigName.ShenBing, pokemonSid)
this.heroName.text = GetStringByEquipQua(pokemonSData.Quality, GetLanguageStrById(pokemonSData.Name))
SetTextVerTial(this.heroName,Vector3.New(96.87,0,0))
--this.ShowPokemonLive(pokemonSData)
--星级
PokemonManager.SetHeroStars(this.spLoader, this.starGrid, 0,2,Vector2.New(60,60))
PokemonManager.SetHeroStars(this.spLoader, this.starGrid, pokemonSData.MaxStar,2,Vector2.New(60,60))
--属性
local allAddProVal = PokemonManager.GetSinglePokemonAddProDataBySid(pokemonSid) --this.CalculateHeroAllProValList(heroSData,heroStar,heroStar ~= heroSData.Star)
local allAddProVal = GodWeaponManager.GetSinglePokemonAddProData2(pokemonSid,pokemonSData.MaxStar,pokemonSData.MaxLevel) --this.CalculateHeroAllProValList(heroSData,heroStar,heroStar ~= heroSData.Star)
Util.GetGameObject(proList[0].transform,"proName"):GetComponent("Text").text =Language[10453]
Util.GetGameObject(proList[0].transform,"proValue"):GetComponent("Text").text = "1/"..pokemonSData.MaxLevel
Util.GetGameObject(proList[0].transform,"proValue"):GetComponent("Text").text = pokemonSData.MaxLevel.."/"..pokemonSData.MaxLevel
Util.GetGameObject(proList[0].transform,"Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite("r_hero_jinengdian05")
local index = 0
for key, value in pairs(allAddProVal) do
@ -137,21 +137,21 @@ function this.NoGetShowPanelData()
Util.GetGameObject(proList[index].transform,"Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(ConfigManager.GetConfigData(ConfigName.PropertyConfig,key).PropertyIcon))
end
end
local curSkillId = 0
local skillArray = ConfigManager.GetConfigData(ConfigName.SpiritAnimal,pokemonSid).SkillArray
for i = 1, #skillArray do
if skillArray[i][1] == 0 then
curSkillId = skillArray[i][2]
end
local skills=ConfigManager.GetAllConfigsDataByDoubleKey(ConfigName.ShenBingSkill,"SpiritAnimalMatch",pokemonSid ,"StarMatch",pokemonSData.MaxStar)
for i = 1, #skillList do
skillList[i]:SetActive(false)
end
local curSkillConFig = ConfigManager.GetConfigData(ConfigName.SpiritAnimalSkill,curSkillId)
this.skillName.text = GetLanguageStrById(curSkillConFig.Name)
this.skillLvGo:SetActive(false)
-- this.skillLv.text = curSkillConFig.Level
this.skillIcon.sprite = this.spLoader:LoadSprite(GetResourcePath(curSkillConFig.Icon))
for i = 1, #skills do
skillList[i]:SetActive(true)
local skillName=Util.GetGameObject(skillList[i].transform,"nameText"):GetComponent("Text")
local skillIcon=Util.GetGameObject(skillList[i].transform,"icon"):GetComponent("Image")
local skillBtn=Util.GetGameObject(skillList[i].transform,"bg/PokemonInfo/skill/icon")
skillName.text=skills[i].Name
skillIcon.sprite= this.spLoader:LoadSprite(GetResourcePath(skills[i].Icon))
end
Util.AddOnceClick(this.skillBtn, function()
-- UIManager.OpenPanel(UIName.PokemonSkillInfoPopup,pokemonSid,1,0)
UIManager.OpenPanel(UIName.PokemonAllSkillInfoPopup,pokemonSid,1,0)
UIManager.OpenPanel(UIName.PokemonSkillInfoPopup,pokemonSid,pokemonSData.MaxLevel,pokemonSData.MaxStar)
end)
end

View File

@ -97,7 +97,7 @@ function this.OnClickTabBtn(_curIndex)
this.SingPokemonDataShow(go, pokemonList[index])
end)
this.NoneImage:SetActive(#pokemonList <= 0)
this.NoneImageText.text = Language[11448]
this.NoneImageText.text = "未获得神兵"
elseif curIndex == 1 then
this.ScrollParentView1:SetActive(false)
this.ScrollParentView2:SetActive(true)
@ -113,7 +113,7 @@ function this.OnClickTabBtn(_curIndex)
this.SingPokemonChipDataShow(go, pokemonChipList[index])
end)
this.NoneImage:SetActive(#pokemonChipList <= 0)
this.NoneImageText.text = Language[11449]
this.NoneImageText.text = "未获得神兵碎片"
end
-- this.ScrollView:ForeachItemGO(function(index, go)
-- Timer.New(function()

View File

@ -31,9 +31,9 @@ function GodWeaponMainPanel:InitComponent()
this.btnFenRed = Util.GetGameObject(this.btnFen, "redPoint")
this.btnFenRed:SetActive(false)
this.btnHand = Util.GetGameObject(self.transform, "btnEndRoot/btnHand")
Util.GetGameObject(this.btnHand, "redPoint"):SetActive(false)
this.btn_hand_red=Util.GetGameObject(this.btnHand, "redPoint")
this.btn_he = Util.GetGameObject(self.transform, "btnEndRoot/btnHe")
Util.GetGameObject(this.btn_he, "redPoint"):SetActive(false)
this.btn_he_red=Util.GetGameObject(this.btn_he, "redPoint")
this.line = Util.GetGameObject(self.transform,"lineParent/line")
this.line:SetActive(false)
this.roleGrid=Util.GetGameObject(this.gameObject,"lineParent")
@ -109,7 +109,7 @@ end
--界面打开时调用(用于子类重写)
function GodWeaponMainPanel:OnOpen(...)
-- 设置
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.LingShouUpLv })
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.GodWeapon })
end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
@ -126,7 +126,7 @@ function GodWeaponMainPanel:OnShow()
-- end
-- end
this.ShowPokemonList()
PokemonManager.CheckRedPointStatusPokemonMainCityRed()
--PokemonManager.CheckRedPointStatusPokemonMainCityRed()
end
@ -165,12 +165,15 @@ end
local orginLayer = 0
function this:OnSortingOrderChange()
for _, go in pairs(PokemonEffectList) do
Util.AddParticleSortLayer(go, this.sortingOrder - orginLayer)
end
for _, cvs in pairs(PokemonList) do
cvs:GetComponent("Canvas").sortingOrder = this.sortingOrder + 2
end
this.btn_he_red:SetActive(GodWeaponManager.WeaponChipCompoundRedPoint())
this.btn_hand_red:SetActive(TianShuMiJuanManger.CheckRedPoint(5))
orginLayer = self.sortingOrder
end
function this.ShowSinglePokemonList(go,singleData,liveIndex)
@ -236,6 +239,9 @@ function this.ShowSinglePokemonList(go,singleData,liveIndex)
upZhenInfo:SetActive(true)
local spiritAnimalConfig = ConfigManager.GetConfigData(ConfigName.ShenBing,curData.id)
local parent = Util.GetGameObject(go, "upZhenInfo/titleImage")
local starGrid=Util.GetGameObject(go, "upZhenInfo/starGrid")
--local starSize = Vector2.New(65,65)
--SetHeroStars(this.spLoader,starGrid,curData.star,1,starSize)
local nameText = Util.GetGameObject(parent, "nameText"):GetComponent("Text")
nameText.text = GetStringByEquipQua(spiritAnimalConfig.Quality, GetLanguageStrById(spiritAnimalConfig.Name))
local liveImg=Util.GetGameObject(go, "upZhenInfo/pokemonLive"):GetComponent("Image")
@ -389,14 +395,15 @@ end
--界面关闭时调用(用于子类重写)
function GodWeaponMainPanel:OnClose()
CheckRedPointStatus(RedPointType.GodWeapon)
end
--界面销毁时调用(用于子类重写)
function GodWeaponMainPanel:OnDestroy()
this.spLoader:Destroy()
ClearRedPointObject(RedPointType.Pokemon_Recruit, this.btnInfoRed)
ClearRedPointObject(RedPointType.Pokemon_Fetter, this.btnFetterRed)
ClearRedPointObject(RedPointType.Pokemon_ChipCompound, this.btnPokemonListRed)
--ClearRedPointObject(RedPointType.Pokemon_Recruit, this.btnInfoRed)
ClearRedPointObject(RedPointType.Weapon_Fetter, this.btnFetterRed)
--ClearRedPointObject(RedPointType.Pokemon_ChipCompound, this.btnPokemonListRed)
SubUIManager.Close(this.UpView)
dragViewListGo={}
for key, value in pairs(live2dList) do

View File

@ -36,7 +36,7 @@ function this.InitAllGodWeaponData(msg)
--LogError("static=="..staticId)
end
for i = 1, #msg.book do
--LogError("msg.book[i]====="..msg.book[i])
LogError("msg.book[i]====="..msg.book[i])
handBook[msg.book[i]]=msg.book[i]
end
HeroPropManager.SetFuncPropDirty(Func_Prop_Type.Weapon)
@ -83,6 +83,8 @@ function this.RemoveSingleWeaponData(_did)
end
end
function this.GetAllTeamWeaponId()
local list={}
for key, value in pairs(godWeaponTeamInfo) do
@ -117,7 +119,13 @@ function this.InitSingleGodWeaponData(data)
GodWeapon.position=shenBingConfig[staticId].Position
GodWeapon.config=shenBingConfig[staticId]
allGodWeapons[GodWeapon.Did]=GodWeapon
handBook[staticId]=staticId
if handBook[staticId]==nil then
handBook[staticId]=staticId
LogError("神兵字典加入新神兵========"..staticId)
TianShuMiJuanManger.CheckFetterStatus(5)
end
--Game.GlobalEvent:DispatchEvent(GameEvent.Pokemon.PokemonUpZhenRefresh)
--LogError("single static=="..staticId)
end
@ -387,6 +395,10 @@ function this.CheckUpStarRedPoint(_curData)
end
--检测主城神兵红点
function this.CheckGodWeaponRedPoint()
local list=GodWeaponManager.GetCanUpZhenWeapons()
if #list>0 then
return true
end
for key, value in pairs(godWeaponTeamInfo) do
if value then
if this.CheckUpLvRedPoint(value) or this.CheckUpStarRedPoint(value) then
@ -394,6 +406,10 @@ function this.CheckGodWeaponRedPoint()
end
end
end
local isCanHe=this.WeaponChipCompoundRedPoint()
if isCanHe then
return true
end
return false
end
return this

View File

@ -7126,6 +7126,7 @@ function NetManager.RequestMagicSoldierInfo(func)
LogError("收到服务器返回神兵信息")
msg:ParseFromString(data)
GodWeaponManager.InitAllGodWeaponData(msg)
TianShuMiJuanManger.OnLevelChange()
if func then
func()
end

View File

@ -358,7 +358,7 @@ function this.InitRedPointAllRelate()
RPData:SetParent(RedPointType.eastSeaFindGod2,RedPointType.eastSeaFindGod)
RPData:SetParent(RedPointType.eastSeaFindGod3,RedPointType.eastSeaFindGod)
RPData:SetParent(RedPointType.eastSeaFindGod4,RedPointType.eastSeaFindGod)
RPData:SetParent(RedPointType.Weapon_Fetter,RedPointType.GodWeapon)
for k,v in ConfigPairs(ConfigManager.GetConfig(ConfigName.ActivityGroups)) do
if v.RpType > 0 and v.RpTypeParent > 0 then
RPData:SetParent(v.RpType,v.RpTypeParent)
@ -580,7 +580,7 @@ function this.RegisterRedCheckFunc()
RPData:AddCheckFunc(RedPointType.SoulPrint_Fetter,TianShuMiJuanManger.CheckRedPointType)
RPData:AddCheckFunc(RedPointType.TianShuPokemon_Fetter,TianShuMiJuanManger.CheckRedPointType)
RPData:AddCheckFunc(RedPointType.Equip_Fetter,TianShuMiJuanManger.CheckRedPointType)
RPData:AddCheckFunc(RedPointType.Weapon_Fetter,TianShuMiJuanManger.CheckRedPointType)
--跨服天梯
RPData:AddCheckFunc(RedPointType.JumpServer_HightLadder_HaveMianFeiPanel,JumpServerManager.JumpServerHightLadderMianFeiNumRedPoint)
RPData:AddCheckFunc(RedPointType.JumpServer_HightLadder_Worship,JumpServerManager.JumpServerHightLadderWorshipRedPoint)

View File

@ -76,7 +76,7 @@ function RewardItemSingleShowPopup:BindEvent()
self:ClosePanel()
end)
Util.AddClick(this.checkHero, function()
if itemConfigData.ItemType == ItemType.HeroDebris or itemConfigData.ItemType == ItemType.LingShouChip then
if itemConfigData.ItemType == ItemType.HeroDebris or itemConfigData.ItemType == ItemType.LingShouChip or itemConfigData.ItemType == ItemType.GodWeaponChip then
if itemConfigData.RewardGroup then
local rg = ConfigManager.GetConfigData(ConfigName.RewardGroup, itemConfigData.RewardGroup[1])
if rg.ShowItem then
@ -87,6 +87,8 @@ function RewardItemSingleShowPopup:BindEvent()
UIManager.OpenPanel(UIName.RoleGetInfoPopup, false, id, star)
elseif itemConfigData.ItemType == ItemType.LingShouChip then
UIManager.OpenPanel(UIName.PokemonGetInfoPopup, false,id)
elseif itemConfigData.ItemType == ItemType.GodWeaponChip then
UIManager.OpenPanel(UIName.GodWeaponGetInfoPopup, false,id)
end
end
end
@ -573,6 +575,9 @@ function RewardItemSingleShowPopup:OnShow()
elseif rg and rg.ShowItem and itemConfigData.ItemType == ItemType.LingShouChip then
this.checkHero:SetActive(true)
this.checkHeroText.text = "查看灵兽"
elseif rg and rg.ShowItem and itemConfigData.ItemType == ItemType.GodWeaponChip then
this.checkHero:SetActive(true)
this.checkHeroText.text = "查看神兵"
else
this.checkHero:SetActive(false)
end

View File

@ -169,11 +169,12 @@ function this.GetRankInfo(rankType,rankIndex)
RankingManager.CurPage=0
this.istop=true
local curActivity = 0
if sData.rankType == RANK_TYPE.PERSON_CHALLENGE then
if sData.rankType == RANK_TYPE.PERSON_CHALLENGE or sData.rankType == RANK_TYPE.GodsWayTower then
curActivity = sData.activiteId
else
curActivity = sData.activiteId > 0 and ActivityGiftManager.GetActivityIdByType(sData.activiteId) or nil
end
RankingManager.InitData(rankType,function()
this.SetRankingInfo(true, true)
end,curActivity,rankIndex)

View File

@ -31,7 +31,7 @@ function this:InitComponent(gameObject)
this.scrollbar = Util.GetGameObject(gameObject,"Content/Resolve_GodWeapon/Scrollbar"):GetComponent("Scrollbar")
this.Empty = Util.GetGameObject(gameObject,"Content/Resolve_GodWeapon/Empty")
local v21 = Util.GetGameObject(gameObject, "Content/Resolve_GodWeapon/ItemListRoot"):GetComponent("RectTransform").rect
Util.GetGameObject(gameObject, "Content/Resolve_GodWeapon/Empty/Bg/Text"):GetComponent("Text").text=Language[11745]
Util.GetGameObject(gameObject, "Content/Resolve_GodWeapon/Empty/Bg/Text"):GetComponent("Text").text="无可分解神兵"
this.chipObj=Util.GetGameObject(gameObject, "Content/Resolve_GodWeapon/chipObj")
this.btn_remove=Util.GetGameObject(gameObject, "Content/Resolve_GodWeapon/chipObj/btn_remove")
this.btn_add=Util.GetGameObject(gameObject, "Content/Resolve_GodWeapon/chipObj/btn_add")

View File

@ -11,9 +11,13 @@ function this.Initialize()
end
this.fetterData[v.Id] = configData
end
Game.GlobalEvent:AddEvent(GameEvent.Player.OnLevelChange, this.OnLevelChange)
end
function this.OnLevelChange()
for k,v in pairs(this.fetterData) do
if v.enabled == -2 then
@ -105,6 +109,7 @@ function this.CheckFetterStatus(fetterType)
end
end
--刷新羁绊状态
function this.GetAllPokemonFetterDatas(fetterType,curPokemonSidList)
local SpiritAnimalBookList = {}

View File

@ -47,7 +47,7 @@ function GodsWayTreasurePanel:BindEvent()
end)
Util.AddClick(this.quesBtn,function()
--LogGreen(this.helpPosition.x.."+"..this.helpPosition.y)
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.TreasureOfHeaven,this.helpPosition.x,this.helpPosition.y)
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.GodsWayTreasure,this.helpPosition.x,this.helpPosition.y)
end)
Util.AddClick(this.btn_qmfl,function()
--LogGreen(this.helpPosition.x.."+"..this.helpPosition.y)

View File

@ -179,6 +179,7 @@ function ItemView:GetRewardShow(_itemData, effectLayer)
if _itemData.configData.ItemType == ItemType.HeroDebris
or _itemData.configData.ItemType ==ItemType.LingShouChip
or _itemData.configData.ItemType == ItemType.EquipChip
or _itemData.configData.ItemType == ItemType.GodWeaponChip
or _itemData.configData.ItemType == ItemType.CommonChip then
--角色碎片
self.frameMask:SetActive(true)
@ -599,7 +600,8 @@ function ItemView:NoGetRewardShow(_reward, effectLayer, isShowAddImage)
self.UI_effect_WuCai_Kuang:SetActive(heroConfigData.Quantity == 7)
end
elseif itemDataConFig.ItemType == ItemType.HeroDebris
or itemDataConFig.ItemType==ItemType.LingShouChip
or itemDataConFig.ItemType==ItemType.LingShouChip
or itemDataConFig.ItemType==ItemType.GodWeaponChip
or itemDataConFig.ItemType == ItemType.CommonChip then
--2角色碎片
self.frameMask:SetActive(true)