合并管理类脚本
parent
1053b84076
commit
0bf4e85daf
|
@ -5310,7 +5310,7 @@ MonoBehaviour:
|
|||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: be22547d075a3fa439f78ce38cdb4beb, type: 3}
|
||||
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
|
||||
m_FontSize: 20
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
|
@ -5723,7 +5723,7 @@ MonoBehaviour:
|
|||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: be22547d075a3fa439f78ce38cdb4beb, type: 3}
|
||||
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
|
||||
m_FontSize: 20
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
|
|
|
@ -604,7 +604,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 397, y: 569}
|
||||
m_AnchoredPosition: {x: 262, y: 569}
|
||||
m_SizeDelta: {x: 300, y: 76}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1586863083
|
||||
|
|
|
@ -35,6 +35,9 @@ function this.GetCollectLvAndNum()
|
|||
collect=collect+equipConfig[id].Gift
|
||||
end
|
||||
end
|
||||
if CheckFunctionOpen(FUNCTION_OPEN_TYPE.Train) then
|
||||
collect=collect+HeroManager.ReturnGiftCount()
|
||||
end
|
||||
for k, v in ConfigPairs(giftConfig) do
|
||||
if collect>=v.Gift then
|
||||
lv=v.Id
|
||||
|
@ -118,6 +121,12 @@ function this.GetHeroGiftAddPro(_id)
|
|||
end
|
||||
end
|
||||
end
|
||||
if CheckFunctionOpen(FUNCTION_OPEN_TYPE.Train) then
|
||||
local t=HeroManager.ReturnGiftAtt()
|
||||
for k, v in ipairs(data) do
|
||||
data[k]=data[k]*(1+t)
|
||||
end
|
||||
end
|
||||
--英雄礼物不会加成主角属性
|
||||
-- local pro2 = equipConfig[id].PlayerProperty
|
||||
-- if pro2 and #pro2>0 then
|
||||
|
|
|
@ -7645,6 +7645,7 @@ function NetManager.TrainingRequest(_id,_heroId,_type,_func)
|
|||
if msg.training then
|
||||
HeroManager.SetHeroTraining(_heroId,msg.training)
|
||||
HeroPropManager.SetDirtyByType(_heroId,Hero_Prop_Type.Training)
|
||||
HeroPropManager.RefreshHeroProp(_heroId)
|
||||
local oldWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
|
||||
--获取新战力
|
||||
NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)
|
||||
|
@ -7695,15 +7696,31 @@ function NetManager.TrainingUpLvRequest(_heroid,_func)
|
|||
end)
|
||||
end
|
||||
-- 英雄特训技能解锁请求
|
||||
function NetManager.TrainingUnlockSkillRequest(_heroid,_unlockId,pokemonIds,magicSoldierIds,TrainingUnlockSkillHeroItem,incarnationCards,playerGifts,_func)
|
||||
function NetManager.TrainingUnlockSkillRequest(_heroid,_unlockId,pockemensId,TrainingUnlockSkillHeroItem,item,_func)
|
||||
local data=HeroInfoProto_pb.TrainingUnlockSkillRequest()
|
||||
data.heroId= _heroid
|
||||
data.unlockId= _unlockId
|
||||
data.pokemonIds= pokemonIds
|
||||
data.magicSoldierIds= magicSoldierIds
|
||||
data.TrainingUnlockSkillHeroItem= TrainingUnlockSkillHeroItem
|
||||
data.incarnationCards= incarnationCards
|
||||
data.playerGifts= playerGifts
|
||||
-- data.pokemonIds= pokemonIds
|
||||
--data.magicSoldierIds= magicSoldierIds
|
||||
if TrainingUnlockSkillHeroItem then
|
||||
for i = 1, #TrainingUnlockSkillHeroItem do
|
||||
local info = data.consumeHeroIds:add()
|
||||
info.type = TrainingUnlockSkillHeroItem[i].type
|
||||
info.id =tostring( TrainingUnlockSkillHeroItem[i].id)
|
||||
info.num = TrainingUnlockSkillHeroItem[i].num
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--data.incarnationCards= incarnationCards
|
||||
if item.itemtype==56 then
|
||||
data.playerGifts.itemId = item.id
|
||||
data.playerGifts.itemNum = item.itemNum
|
||||
end
|
||||
if item.itemtype==29 then
|
||||
data.incarnationCards.itemId = item.id
|
||||
data.incarnationCards.itemNum = item.itemNum
|
||||
end
|
||||
local msg = data:SerializeToString()
|
||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.TrainingUnlockSkillRequest,MessageTypeProto_pb.TrainingUnlockSkillResponse,msg,function(buffer)
|
||||
local data = buffer:DataByte()
|
||||
|
@ -7714,6 +7731,9 @@ function NetManager.TrainingUnlockSkillRequest(_heroid,_unlockId,pokemonIds,magi
|
|||
if msg.training then
|
||||
HeroManager.SetHeroTraining(_heroid,msg.training)
|
||||
HeroPropManager.SetDirtyByType(_heroid,Hero_Prop_Type.Training)
|
||||
if HeroManager.IsHeroTrainingMax then
|
||||
HeroPropManager.SetDirtyByType(_heroid,Hero_Prop_Type.Gift)
|
||||
end
|
||||
local oldWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
|
||||
--获取新战力
|
||||
NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)
|
||||
|
@ -7725,7 +7745,7 @@ function NetManager.TrainingUnlockSkillRequest(_heroid,_unlockId,pokemonIds,magi
|
|||
end
|
||||
|
||||
if _func then
|
||||
_func()
|
||||
_func(msg)
|
||||
end
|
||||
|
||||
end)
|
||||
|
|
|
@ -447,6 +447,10 @@ function this.FormationAdapter(teamInfo)
|
|||
end
|
||||
heroData= GoodFriendManager.GetHeroDatas(msg.hero,msg.force,msg.SpecialEffects,msg.guildSkill)
|
||||
GoodFriendManager.InitEquipData(msg.equip,heroData)--HeroManager.GetSingleHeroData(heroData.dynamicId)
|
||||
LogError("msg.playerGiftLv==================="..msg.playerGiftLv)
|
||||
for k, v in pairs(heroData.potential) do
|
||||
v.giftLv= msg.playerGiftLv
|
||||
end
|
||||
UIManager.OpenPanel(UIName.RoleInfoPopup, heroData,true)
|
||||
end)
|
||||
end)
|
||||
|
|
|
@ -101,6 +101,8 @@ function RoleInfoPopup:InitComponent()
|
|||
this.potentyPre=Util.GetGameObject(this.potentyGrid,"giftPre")
|
||||
--技能
|
||||
this.skillInfo = Util.GetGameObject(self.transform, "Panel/Scroll View/Viewport/Content/skillInfo")
|
||||
this.trainlevel = Util.GetGameObject(this.skillInfo, "TitleBG/traininglv")
|
||||
this.trainBtn = Util.GetGameObject(this.skillInfo, "TitleBG/training")
|
||||
this.skillGrid = Util.GetGameObject(this.skillInfo, "Grid")
|
||||
this.skillPre=Util.GetGameObject(this.godPrintGrid,"S1")
|
||||
|
||||
|
@ -210,6 +212,9 @@ function RoleInfoPopup:BindEvent()
|
|||
end
|
||||
Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, triggerCallBack)
|
||||
end)
|
||||
Util.AddClick(this.trainBtn,function ()
|
||||
UIManager.OpenPanel(UIName.SpecailTrainingInfoPopup,curHeroData,2)
|
||||
end)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
|
@ -594,6 +599,7 @@ function this.SkillInfo()
|
|||
if curHeroData.heroConfig.MaxRank>9 then
|
||||
skillList2 = HeroManager.GetCurHeroSidAndCurStarAllSkillDatas2(curHeroData.heroConfig.Id,10,curHeroData.star)
|
||||
end
|
||||
this.trainlevel:GetComponent("Text").text=Language[12326]..NumToComplexFont[curHeroData.HeroTraining.trainingLv]..Language[10065]
|
||||
for i = 1, this.skillGrid.transform.childCount do
|
||||
this.skillGrid.transform:GetChild(i-1).gameObject:SetActive(false)
|
||||
end
|
||||
|
|
|
@ -143,6 +143,19 @@ function this.GetSinglePointAdd()
|
|||
end
|
||||
singlePointAddList[TotalPros[i][1]] = TotalPros[i][2]
|
||||
end
|
||||
|
||||
local player=XiuXianConfig[this.PracticeLevel].PlayerProperty
|
||||
if player and #player>0 and type(player[1][1])~="userdata" then
|
||||
for i=1,#player do
|
||||
if not singlePointAddList[player[i][1]] then
|
||||
singlePointAddList[player[i][1]] = 0
|
||||
end
|
||||
singlePointAddList[player[i][1]] = singlePointAddList[player[i][1]] + player[i][2]
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
--end
|
||||
return singlePointAddList
|
||||
end
|
||||
|
||||
|
@ -163,6 +176,12 @@ function this.GetCurAllGetAdd()
|
|||
end
|
||||
end
|
||||
end
|
||||
if XiuXianConfig[i].PlayerProperty and #XiuXianConfig[i].PlayerProperty>0 and type(XiuXianConfig[i].PlayerProperty[1][1])~="userdata" then
|
||||
local player=XiuXianConfig[i].PlayerProperty
|
||||
for i=1,#player do
|
||||
PropertyList[player[i][1]] = PropertyList[player[i][1]] + player[i][2]
|
||||
end
|
||||
end
|
||||
end
|
||||
return PropertyList
|
||||
end
|
||||
|
@ -184,22 +203,13 @@ function this.GetCurAllGetAddForShow()
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return PropertyList
|
||||
end
|
||||
|
||||
--获取各个大境界中所有小属性加成的总和 +模板的
|
||||
function this.GetAddsListWithTemplate()
|
||||
local PropertyList = this.BuildAddTemplate()
|
||||
local addsList = {}
|
||||
for i, v in ConfigPairs(XiuXianConfig) do
|
||||
if v.TotalPros then
|
||||
local Pros = v.TotalPros
|
||||
for i = 1, #Pros do
|
||||
if PropertyConfig[Pros[i][1]].Style == 1 then
|
||||
PropertyList[Pros[i][1]] = PropertyList[Pros[i][1]] + Pros[i][2]
|
||||
elseif PropertyConfig[Pros[i][1]].Style == 2 then
|
||||
PropertyList[Pros[i][1]] = PropertyList[Pros[i][1]] + Pros[i][2]
|
||||
if XiuXianConfig[i].PlayerProperty and #XiuXianConfig[i].PlayerProperty>0 and type(XiuXianConfig[i].PlayerProperty[1][1])~="userdata" then
|
||||
local player=XiuXianConfig[i].PlayerProperty
|
||||
for i=1,#player do
|
||||
if PropertyConfig[player[i][1]].Style == 1 then
|
||||
PropertyList[player[i][1]] = PropertyList[player[i][1]] + player[i][2]
|
||||
elseif PropertyConfig[player[i][1]].Style == 2 then
|
||||
PropertyList[player[i][1]] = PropertyList[player[i][1]] + player[i][2]/100
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -210,7 +220,7 @@ end
|
|||
--获取各个大境界中所有小属性加成的总和 不加模板的
|
||||
function this.GetAddsListWithOutTemplate()
|
||||
local addsList = {}
|
||||
for i, v in ConfigPairs(XiuXianConfig) do
|
||||
for key, v in ConfigPairs(XiuXianConfig) do
|
||||
if not addsList[v.RealmId] then
|
||||
addsList[v.RealmId] = {}
|
||||
end
|
||||
|
@ -227,6 +237,20 @@ function this.GetAddsListWithOutTemplate()
|
|||
end
|
||||
end
|
||||
end
|
||||
if v.PlayerProperty and #v.PlayerProperty>0 and type(v.PlayerProperty[1][1])~="userdata" then
|
||||
local player=v.PlayerProperty
|
||||
for i=1,#player do
|
||||
if not addsList[v.RealmId][player[i][1]] then
|
||||
addsList[v.RealmId][player[i][1]] = 0
|
||||
end
|
||||
if PropertyConfig[player[i][1]].Style == 1 then
|
||||
addsList[v.RealmId][player[i][1]] = addsList[v.RealmId][player[i][1]] + player[i][2]
|
||||
elseif PropertyConfig[player[i][1]].Style == 2 then
|
||||
addsList[v.RealmId][player[i][1]] = addsList[v.RealmId][player[i][1]] + player[i][2]/100
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
return addsList
|
||||
end
|
||||
|
@ -258,10 +282,18 @@ end
|
|||
|
||||
--返回预览界面文字
|
||||
function this.GetPreviewSingleText(id,value)
|
||||
if PropertyConfig[id].Style == 1 then
|
||||
return string.format("全体神将%s",PropertyConfig[id].Info),string.format("+%s",value)
|
||||
elseif PropertyConfig[id].Style == 2 then
|
||||
return string.format("全体神将%s",PropertyConfig[id].Info),string.format("+%s",value).."%"
|
||||
if id>112 then
|
||||
if PropertyConfig[id].Style == 1 then
|
||||
return string.format("%s",PropertyConfig[id].Info),string.format("+%s",value)
|
||||
elseif PropertyConfig[id].Style == 2 then
|
||||
return string.format("%s",PropertyConfig[id].Info),string.format("+%s",value).."%"
|
||||
end
|
||||
else
|
||||
if PropertyConfig[id].Style == 1 then
|
||||
return string.format("全体神将%s",PropertyConfig[id].Info),string.format("+%s",value)
|
||||
elseif PropertyConfig[id].Style == 2 then
|
||||
return string.format("全体神将%s",PropertyConfig[id].Info),string.format("+%s",value).."%"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue