Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop
commit
be6e2ba6f4
Binary file not shown.
|
After Width: | Height: | Size: 405 KiB |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -315,10 +315,8 @@ end
|
|||
--通过物品类型获得物品list
|
||||
function this.GetDataByItemType(_itemType)
|
||||
local items = {}
|
||||
LogPink("通过物品类型获得物品list".._itemType)
|
||||
for i, v in pairs(this.bagDatas) do
|
||||
if v.itemConfig.ItemType == _itemType and v.num > 0 then
|
||||
LogPink("通过物品类型获得物品list "..v.id.." "..v.num)
|
||||
table.insert(items,v)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ Monster = {}
|
|||
function Monster:New()
|
||||
local o = {
|
||||
data=RoleData.New(),
|
||||
buffFilter=BattleList.New(),
|
||||
Event = BattleEvent:New()
|
||||
}
|
||||
setmetatable(o, self)
|
||||
|
|
@ -20,11 +21,41 @@ function Monster:Init(data)
|
|||
self.uid= data.id
|
||||
self.roleData = data
|
||||
self.data:Init(self, data.property)
|
||||
self.buffFilter:Clear() --buff屏蔽列表
|
||||
self.Event:ClearEvent()
|
||||
|
||||
self.skillGroup = MSkillManager.CreateMSkillGroup(self, data.skill)
|
||||
end
|
||||
|
||||
|
||||
|
||||
function Monster:AddBuff(buff)
|
||||
|
||||
-- buff的miss率
|
||||
local missF = 0
|
||||
-- 检测被动对miss概率的影响
|
||||
local cl = {}
|
||||
local function _CallBack(v, ct)
|
||||
if v then
|
||||
table.insert(cl, {v, ct})
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.RoleAddBuffMiss, _CallBack, self, buff)
|
||||
missF = BattleUtil.CountChangeList(missF, cl)
|
||||
|
||||
-- 如果概率为0 或者没有miss
|
||||
if missF == 0 or not BattleUtil.RandomAction(missF, function() BattleLogic.BuffMgr:PutBuff(buff) end) then
|
||||
for i=1, self.buffFilter.size do
|
||||
if self.buffFilter.buffer[i](buff) then
|
||||
BattleLogic.BuffMgr:PutBuff(buff)
|
||||
return
|
||||
end
|
||||
end
|
||||
BattleLogic.BuffMgr:AddBuff(self, buff)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function Monster:GetRoleData(property)
|
||||
local tarPro = self.data:GetData(property)
|
||||
return tarPro
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ function this.InitRedPointAllRelate()
|
|||
-- 成就
|
||||
RPData:SetParent(RedPointType.Achievement_Main, RedPointType.DailyTaskMain)
|
||||
--灵兽
|
||||
RPData:SetParent(RedPointType.Pokemon_UpLv, RedPointType.PokemonMainCity)
|
||||
-- RPData:SetParent(RedPointType.Pokemon_UpLv, RedPointType.PokemonMainCity)--嫌烦去掉
|
||||
RPData:SetParent(RedPointType.Pokemon_UpStar, RedPointType.PokemonMainCity)
|
||||
RPData:SetParent(RedPointType.Pokemon_CanUpZhen, RedPointType.PokemonMainCity)
|
||||
RPData:SetParent(RedPointType.Pokemon_Fetter, RedPointType.PokemonMainCity)
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ function this.ShowPokemonList()
|
|||
pokemonSkillDataList = {}
|
||||
for i = 1, #allSkillIds do
|
||||
table.insert(pokemonSkillDataList,{star = allSkillIds[i][1],conFig = ConfigManager.GetConfigData(ConfigName.SpiritAnimalSkill,allSkillIds[i][2])})
|
||||
LogPink("allSkillIds[i][1] == pokemonStar "..allSkillIds[i][1] .." ".. pokemonStar)
|
||||
-- LogPink("allSkillIds[i][1] == pokemonStar "..allSkillIds[i][1] .." ".. pokemonStar)
|
||||
if allSkillIds[i][1] == pokemonStar then
|
||||
curStarIndex = allSkillIds[i][1]
|
||||
end
|
||||
|
|
@ -59,8 +59,8 @@ function this.ShowPokemonList()
|
|||
this.ScrollView:SetData(pokemonSkillDataList, function(index, go)
|
||||
this.SingPokemonDataShow(go, pokemonSkillDataList[index])
|
||||
end)
|
||||
LogPink("curStarIndex "..curStarIndex)
|
||||
-- this.ScrollView:SetIndex(curStarIndex)
|
||||
-- LogPink("curStarIndex "..curStarIndex)
|
||||
this.ScrollView:SetIndex((curStarIndex + 1))
|
||||
end
|
||||
--478A5F B9AC97 string.format("<color=#FF0000FF>%s/%s</color>",PrintWanNum2(curMaterialBagNum),PrintWanNum2(upStarMaterialsData[i][2]))
|
||||
function this.SingPokemonDataShow(go,data)
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ function this.GetShowPanelData()
|
|||
end
|
||||
function this.NoGetShowPanelData()
|
||||
local pokemonSData=ConfigManager.GetConfigData(ConfigName.SpiritAnimal, pokemonSid)
|
||||
this.heroName.text = pokemonSData.Name
|
||||
this.ShowPokemonLive(pokemonSData)
|
||||
--星级
|
||||
PokemonManager.SetHeroStars(this.starGrid, 0,2,Vector2.New(60,60))
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ this.contents = {
|
|||
[1] = {view = require("Modules/Pokemon/view/PokemonInfoPanel_UpLv"), panelName = "PokemonInfoPanel_UpLv"},
|
||||
[2] = {view = require("Modules/Pokemon/view/PokemonInfoPanel_UpStar"), panelName = "PokemonInfoPanel_UpStar"},
|
||||
}
|
||||
local isHideLeftRihtBtn = false
|
||||
local redPointList = {}
|
||||
--初始化组件(用于子类重写)
|
||||
function PokemonInfoPanel:InitComponent()
|
||||
|
|
@ -87,7 +88,7 @@ function PokemonInfoPanel:BindEvent()
|
|||
end)
|
||||
Util.AddClick(this.dragView.gameObject, function()
|
||||
local SkeletonGraphic = this.curLiveObj:GetComponent("SkeletonGraphic")
|
||||
-- SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
|
||||
SkeletonGraphic.AnimationState:SetAnimation(0, "attack", false)
|
||||
end)
|
||||
--涅槃
|
||||
Util.AddClick(this.nirvanaBtn, function()
|
||||
|
|
@ -192,9 +193,17 @@ function PokemonInfoPanel:RemoveListener()
|
|||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function PokemonInfoPanel:OnOpen(_curPokemonData, _pokemonDatas)
|
||||
function PokemonInfoPanel:OnOpen(_curPokemonData, _pokemonDatas,_isHideLeftRihtBtn)
|
||||
curPokemonData, pokemonDatas = _curPokemonData, _pokemonDatas
|
||||
isHideLeftRihtBtn = _isHideLeftRihtBtn or false
|
||||
curIndex = 1
|
||||
if isHideLeftRihtBtn then
|
||||
this.leftBtn.transform.parent.gameObject:SetActive(false)
|
||||
this.rightBtn.transform.parent.gameObject:SetActive(false)
|
||||
else
|
||||
this.leftBtn.transform.parent.gameObject:SetActive(true)
|
||||
this.rightBtn.transform.parent.gameObject:SetActive(true)
|
||||
end
|
||||
end
|
||||
function this.RefreshShow(_curPokemonData, _pokemonDatas)
|
||||
if this.leftLiveObj and leftPokemonData then
|
||||
|
|
@ -329,7 +338,7 @@ function this.LoadHerolive(_heroData, _objPoint)
|
|||
local testLive = poolManager:LoadLive(GetResourcePath(spiritAnimal[_heroData.id].Live), _objPoint.transform,
|
||||
Vector3.one * spiritAnimal[_heroData.id].Scale, Vector3.New(spiritAnimal[_heroData.id].Position[1], spiritAnimal[_heroData.id].Position[2], 0))
|
||||
local SkeletonGraphic = testLive:GetComponent("SkeletonGraphic")
|
||||
-- local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end
|
||||
local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end
|
||||
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete + idle
|
||||
poolManager:SetLiveClearCall(GetResourcePath(spiritAnimal[_heroData.id].Live), testLive, function ()
|
||||
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete - idle
|
||||
|
|
@ -382,7 +391,7 @@ function this.RightBtnOnClick()
|
|||
this.OnShowData()
|
||||
this.contents[curIndex].view:OnShow(this,curPokemonData)
|
||||
local SkeletonGraphic = this.curLiveObj:GetComponent("SkeletonGraphic")
|
||||
-- SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
|
||||
SkeletonGraphic.AnimationState:SetAnimation(0, "attack", false)
|
||||
this.rightBtn:GetComponent("Button").enabled = true
|
||||
isClickLeftOrRightBtn = true
|
||||
end):SetEase(Ease.Linear)
|
||||
|
|
@ -412,7 +421,7 @@ function this.LeftBtnOnClick()
|
|||
this.OnShowData()
|
||||
this.contents[curIndex].view:OnShow(this,curPokemonData)
|
||||
local SkeletonGraphic = this.curLiveObj:GetComponent("SkeletonGraphic")
|
||||
-- SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
|
||||
SkeletonGraphic.AnimationState:SetAnimation(0, "attack", false)
|
||||
this.leftBtn:GetComponent("Button").enabled = true
|
||||
isClickLeftOrRightBtn = true
|
||||
end):SetEase(Ease.Linear)
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ end
|
|||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function PokemonMainPanel:OnShow()
|
||||
this.ShowPokemonList()
|
||||
PokemonManager.CheckRedPointStatusPokemonMainCityRed()
|
||||
end
|
||||
|
||||
local nextOpenLockIndex = 0
|
||||
|
|
@ -197,6 +198,9 @@ function this.ShowSinglePokemonList(go,singleData,liveIndex)
|
|||
local LiveName = curData.live
|
||||
local live2d = poolManager:LoadLive(LiveName, curPokemonLive.transform,Vector3.one *curData.scale * 0.4, Vector3.New(spiritAnimal[curData.id].littleScalePosition[1],spiritAnimal[curData.id].littleScalePosition[2],0))--curData.scale
|
||||
live2dList[liveIndex] = {name=curData.live, go=live2d}
|
||||
local SkeletonGraphic = live2d:GetComponent("SkeletonGraphic")
|
||||
local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end
|
||||
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete + idle
|
||||
local starSize = Vector2.New(65,65)
|
||||
PokemonManager.SetHeroStars(Util.GetGameObject(go, "upZhenInfo/starGrid/starGrid(Clone)"), curData.star,1,starSize)
|
||||
-- Util.AddOnceClick( Util.GetGameObject(go, "upZhenInfo/upZhenClick"), function()
|
||||
|
|
|
|||
|
|
@ -448,10 +448,14 @@ end
|
|||
---------------------------------------------
|
||||
--灵兽红点检测方法
|
||||
function this.CheckRedPointStatusPokemonMainCityRed()
|
||||
-- LogPink("···········刷新灵兽红点···········")
|
||||
CheckRedPointStatus(RedPointType.Pokemon_UpLv)
|
||||
CheckRedPointStatus(RedPointType.Pokemon_UpStar)
|
||||
CheckRedPointStatus(RedPointType.Pokemon_CanUpZhen)
|
||||
end
|
||||
CheckRedPointStatus(RedPointType.Pokemon_ChipCompound)
|
||||
CheckRedPointStatus(RedPointType.Pokemon_Fetter)
|
||||
CheckRedPointStatus(RedPointType.Pokemon_Recruit)
|
||||
end
|
||||
--上阵灵兽升级红点
|
||||
function this.RefreshPokemonUpLvRedPoint()
|
||||
local isOpen = ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.POKEMON)
|
||||
|
|
@ -464,11 +468,13 @@ function this.RefreshPokemonUpLvRedPoint()
|
|||
if curPokemonData then
|
||||
local singlePokemonPoint = this.GetSinglePokemonUpLvRedPoint(curPokemonData)
|
||||
if singlePokemonPoint then
|
||||
-- LogPink("上阵灵兽升级红点true")
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- LogPink("上阵灵兽升级红点false")
|
||||
return false
|
||||
end
|
||||
--上阵灵兽升级红点2
|
||||
|
|
@ -500,10 +506,12 @@ function this.RefreshPokemonUpStarRedPoint()
|
|||
local curPokemonData = pokemons[pokemonFormation[i].pokemonId]
|
||||
local singlePokemonPoint = this.GetSinglePokemonUpStarRedPoint(curPokemonData)
|
||||
if singlePokemonPoint then
|
||||
-- LogPink("上阵灵兽升星红点true")
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
-- LogPink("上阵灵兽升星红点false")
|
||||
return false
|
||||
end
|
||||
--上阵灵兽升星红点2
|
||||
|
|
@ -547,6 +555,7 @@ function this.RefreshPokemonCanUpZhenRedPoint()
|
|||
end
|
||||
local canPokemonList = this.GetCanUpZhenPokemonDatas()
|
||||
if #canPokemonList <= 0 then
|
||||
-- LogPink("可以上阵灵兽红点false")
|
||||
return false
|
||||
end
|
||||
local pokemonPosLocks = ConfigManager.GetConfigData(ConfigName.SpiritAnimalSetting,1).BlockUnlockLevel
|
||||
|
|
@ -561,9 +570,11 @@ function this.RefreshPokemonCanUpZhenRedPoint()
|
|||
state = 2
|
||||
end
|
||||
if state == 3 and #canPokemonList > 0 then
|
||||
-- LogPink("可以上阵灵兽红点true")
|
||||
return true
|
||||
end
|
||||
end
|
||||
-- LogPink("可以上阵灵兽红点false")
|
||||
return false
|
||||
end
|
||||
|
||||
|
|
@ -576,9 +587,11 @@ function this.RefreshPokemonFetterRedPoint()
|
|||
local curGetAllPokemonFetter = this.GetAllPokemonFetterDatas()
|
||||
for k,v in ipairs(curGetAllPokemonFetter) do
|
||||
if v.enabled == 0 then
|
||||
-- LogPink("可激活的羁绊true")
|
||||
return true
|
||||
end
|
||||
end
|
||||
-- LogPink("可激活的羁绊false")
|
||||
return false
|
||||
end
|
||||
function this.IsCompound(Teamers,curPokemonSidList)
|
||||
|
|
@ -608,8 +621,10 @@ function this.RefreshPokemonRecruitRedPoint()
|
|||
end
|
||||
local isFree = freeTime and freeTime >= 1
|
||||
if isFree then
|
||||
-- LogPink("免费抽卡次数true")
|
||||
return true
|
||||
else
|
||||
-- LogPink("免费抽卡次数false")
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
|
@ -625,12 +640,13 @@ function this.PokemonChipCompoundRedPoint()
|
|||
local pokemonChipList = BagManager.GetDataByItemType(ItemType.LingShouChip)
|
||||
if #pokemonChipList > 0 then
|
||||
for i = 1, #pokemonChipList do
|
||||
-- LogPink("pokemonChipList[i].id "..pokemonChipList[i].id.." "..BagManager.GetItemCountById(pokemonChipList[i].id).." "..itemConfig[pokemonChipList[i].id].UsePerCount)
|
||||
if BagManager.GetItemCountById(pokemonChipList[i].id) >= itemConfig[pokemonChipList[i].id].UsePerCount then
|
||||
-- LogPink("碎片可以合成红点true")
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
-- LogPink("碎片可以合成红点false")
|
||||
return false
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ function this.SingPokemonDataShow(_go,_itemData)
|
|||
local starSize = Vector2.New(50,50)
|
||||
SetHeroStars(Util.GetGameObject(_go.transform, "star/starGrid"), _itemData.star,1,starSize, -5,Vector2.New(0.5,0.5))
|
||||
Util.AddOnceClick(Util.GetGameObject(_go.transform,"click"), function()
|
||||
UIManager.OpenPanel(UIName.PokemonInfoPanel,_itemData,PokemonManager.GetPokemonDatas())
|
||||
UIManager.OpenPanel(UIName.PokemonInfoPanel,_itemData,{_itemData},true)
|
||||
end)
|
||||
end
|
||||
function this.SingPokemonChipDataShow(_go,_itemData)
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ function this.SingleItemDataShow(_go,_itemData)
|
|||
end
|
||||
end)
|
||||
Util.AddOnceClick(Util.GetGameObject(_go.transform,"click"), function()
|
||||
UIManager.OpenPanel(UIName.PokemonInfoPanel,_itemData,PokemonManager.GetPokemonDatas())
|
||||
UIManager.OpenPanel(UIName.PokemonInfoPanel,_itemData,{_itemData},true)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -265,8 +265,12 @@ function this.SingleHeroDataShow(go,_heroData,isGray)
|
|||
local _go = go
|
||||
Util.GetGameObject(_go.transform, "frame"):GetComponent("Image").sprite = Util.LoadSprite(heroData.frame)
|
||||
if heroData.ischip==1 then
|
||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = heroData.num
|
||||
Util.GetGameObject(_go.transform, "lv"):SetActive(false)
|
||||
Util.GetGameObject(_go.transform, "num"):SetActive(true)
|
||||
Util.GetGameObject(_go.transform, "num"):GetComponent("Text").text = heroData.num
|
||||
else
|
||||
Util.GetGameObject(_go.transform, "lv"):SetActive(true)
|
||||
Util.GetGameObject(_go.transform, "num"):SetActive(false)
|
||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = heroData.lv
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue