Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
jiaoyangna 2021-12-03 18:03:53 +08:00
commit b19801639d
25 changed files with 200 additions and 4918 deletions

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 45d51fb03fdc4e0409257d84adf4a63c
timeCreated: 1555742523
licenseType: Pro
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: ad5f5bfa24e584f408fa380b7864e70a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -995,7 +995,6 @@ MonoBehaviour:
- Assets/ManagedResources/~Lua/misc
- Assets/ManagedResources/~Lua/Modules/Achievement
- Assets/ManagedResources/~Lua/Modules/ActivityGift
- Assets/ManagedResources/~Lua/Modules/ActivityGift/View
- Assets/ManagedResources/~Lua/Modules/Adventure
- Assets/ManagedResources/~Lua/Modules/Adventure/View
- Assets/ManagedResources/~Lua/Modules/Alien
@ -57571,10 +57570,6 @@ MonoBehaviour:
extension: .prefab
resPathIndex: 654
resAbNameIndex: 3121
- resName: SevenDayGiftPanel
extension: .prefab
resPathIndex: 654
resAbNameIndex: 3121
- resName: AdventureAlianInvasionPanel
extension: .prefab
resPathIndex: 655
@ -76410,8 +76405,6 @@ MonoBehaviour:
- lz4/dynamicatlas/commonatlas/s_slbz_1anniuhuise.unity3d
- lz4/dynamicatlas/commonatlas/s_slbz_1anniuongse.unity3d
- lz4/dynamicatlas/l_libao_kuang.unity3d
- lz4/dynamicatlas/r_huodong_qiri_banner.unity3d
- lz4/dynamicatlas/r_huodong_qiri_biaoti_zh.unity3d
- lz4/dynamicatlas/r_huodong_zaixain_banner.unity3d
- lz4/dynamicatlas/r_huodong_zaixian_biaoti_zh.unity3d
- lz4/dynamicatlas/r_qrkh_tiao_2.unity3d

View File

@ -882,9 +882,9 @@ RedPointType = {
Guid_SendPackage = 1053,
Guid_GetPackage = 1054,
--东海寻仙
FindFairy_OneView = 2361,--东海寻仙主界面
FindFairy_ThreeView = 2362,--东海寻仙进阶赠礼
FindFairy_FourView = 2363,--东海寻仙寻仙盛典
-- FindFairy_OneView = 2361,--东海寻仙主界面
-- FindFairy_ThreeView = 2362,--东海寻仙进阶赠礼
-- FindFairy_FourView = 2363,--东海寻仙寻仙盛典
--成就面板
Achievement_Main = 9000,--成就
--Achievement_One = 9001,--成就 玩家等级
@ -1277,7 +1277,7 @@ FORMATION_TYPE = {
--活动Type定义
ActivityTypeDef = {
OnlineGift = 1, --在线奖励
SevenDayRegister = 2, --七日登录
-- SevenDayRegister = 2, --七日登录
ChapterAward = 3, --章节奖励
-- FirstRecharge = 4, --首充
-- AccumulativeRecharge = 5, --累计充值
@ -1315,7 +1315,7 @@ ActivityTypeDef = {
LuckyTurnExper=47,--探宝达人
RecruitExper=48,--征募达人
SecretBoxExper=49,--秘宝达人
FindFairyCeremony=51,--寻仙盛典
-- FindFairyCeremony=51,--寻仙盛典
UpLvAct=52,--升级限量豪礼
BuyCoin=53,--点金狂潮
TreasureOfHeaven=54,--天宫秘宝
@ -2032,7 +2032,7 @@ numExChange = {
[12]= ActivityTypeDef.EquipExper,
[13]= ActivityTypeDef.GoldExper,
[14]= ActivityTypeDef.FightExper,
[15]=ActivityTypeDef.EnergyExper,
-- [15]=ActivityTypeDef.EnergyExper,
[16]=ActivityTypeDef.Talisman,
[17]=ActivityTypeDef.SoulPrint,
[19]=ActivityTypeDef.FindTreasureExper,

View File

@ -77,7 +77,7 @@ UIName = {
BagResolveAnCompoundPanel = 75, --剧情使用对话框
RoleGetInfoPopup = 76, --获得英雄点击详情
ChapterClearanceGiftPanel = 77, --章节奖励
SevenDayGiftPanel = 78, --七日礼包
-- SevenDayGiftPanel = 78, --七日礼包
OnlineGiftPanel = 79, --在线礼包
FightEndLvUpPanel = 80, --关卡等级提升
RewardPreviewPopupPanel = 81, --奖励预览详情弹框

View File

@ -521,8 +521,8 @@ function this.CheckMoneyProgress(v)
or type == ActivityTypeDef.DailyRecharge
-- or v.activityId == ActivityTypeDef.ContinuityRecharge
or type == ActivityTypeDef.AccumulativeRechargeExper
or type == ActivityTypeDef.DynamicAct_recharge
or type == ActivityTypeDef.FindFairyCeremony then
or type == ActivityTypeDef.DynamicAct_recharge then
-- or type == ActivityTypeDef.FindFairyCeremony
for n, m in ipairs(v.mission) do
m.progress = m.progress / 1000

View File

@ -112,8 +112,8 @@ function this.CheckMoneyProgress(v)
or v.activityId == ActivityTypeDef.DailyRecharge
-- or v.activityId == ActivityTypeDef.ContinuityRecharge
or v.activityId == ActivityTypeDef.AccumulativeRechargeExper
or v.activityId == ActivityTypeDef.DynamicAct_recharge
or v.activityId == ActivityTypeDef.FindFairyCeremony then
or v.activityId == ActivityTypeDef.DynamicAct_recharge then
-- or v.activityId == ActivityTypeDef.FindFairyCeremony
for n, m in ipairs(v.mission) do
m.progress = m.progress / 1000

View File

@ -1,447 +0,0 @@
local SevenDayGift = quick_class("SevenDayGift")
local this = SevenDayGift
local selectIndex = 0
local jumpNeedBtn = 0
function SevenDayGift:ctor(mainPanel, gameObject)
self.mainPanel = mainPanel
self.gameObject = gameObject
self:InitComponent(gameObject)
self:BindEvent()
end
function SevenDayGift:InitComponent(gameObject)
this.spLoader = SpriteLoader.New()
self.itemPre = Util.GetGameObject(gameObject, "Bg/ItemPre")
this.btnBack = Util.GetGameObject(gameObject, "btnBack")
this.remaindTimeText = Util.GetGameObject(gameObject, "downLayout/expertRewardGrid/remaindTimeText"):GetComponent("Text")
this.item = Util.GetGameObject(gameObject, "item")
this.onlineBtn = Util.GetGameObject(gameObject, "tabsContent/tabs_1")
this.sevenDayBtn = Util.GetGameObject(gameObject, "tabsContent/tabs_2")
this.chapterRewardBtn = Util.GetGameObject(gameObject, "tabsContent/tabs_3")
this.selected1 = Util.GetGameObject(gameObject, "tabsContent/tabs_1/selected")
this.selected2 = Util.GetGameObject(gameObject, "tabsContent/tabs_2/selected")
this.selected3 = Util.GetGameObject(gameObject, "tabsContent/tabs_3/selected")
this.viewRect = Util.GetGameObject(gameObject, "rect")
this.titleBg = Util.GetGameObject(gameObject, "titleBg"):GetComponent("Image")
this.onlineRedPoint = Util.GetGameObject(gameObject, "tabsContent/tabs_1/redPoint")
this.sevenDayPoint = Util.GetGameObject(gameObject, "tabsContent/tabs_2/redPoint")
this.chapterPoint = Util.GetGameObject(gameObject, "tabsContent/tabs_3/redPoint")
this.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, this.viewRect.transform,
this.item, nil, Vector2.New(940.6, 1220), 1, 1, Vector2.New(0, 0))
this.ScrollView.gameObject:GetComponent("RectTransform").anchoredPosition = Vector2.New(-8, 0)
this.ScrollView.gameObject:GetComponent("RectTransform").anchorMin = Vector2.New(0.5, 0.5)
this.ScrollView.gameObject:GetComponent("RectTransform").anchorMax = Vector2.New(0.5, 0.5)
this.ScrollView.gameObject:GetComponent("RectTransform").pivot = Vector2.New(0.5, 0.5)
this.ScrollView.moveTween.MomentumAmount = 1
this.ScrollView.moveTween.Strength = 2
this.viewCache = {}
--this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft })
end
function SevenDayGift:BindEvent()
Util.AddClick(self.btnBack, function()
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
self:ClosePanel()
end)
Util.AddClick(self.onlineBtn, function()
local getRewardState = ActivityGiftManager.onlineGetRewardState
local canRewardIndex = ActivityGiftManager.currentTimeIndex
local activityType = ActivityTypeDef.OnlineGift
local data = ActivityGiftManager.onlineData
this:OnShowActivityData(data, activityType, getRewardState, canRewardIndex)
self.selected1:SetActive(true)
self.selected2:SetActive(false)
self.selected3:SetActive(false)
selectIndex = ActivityTypeDef.OnlineGift
this.ScrollView:SetIndex(1)
end)
Util.AddClick(self.sevenDayBtn, function()
local getRewardState = ActivityGiftManager.sevenDayGetRewardState
local canRewardIndex = ActivityGiftManager.canRewardDay
local activityType = ActivityTypeDef.SevenDayRegister
local data = ActivityGiftManager.sevenDayData
this:OnShowActivityData(data, activityType, getRewardState, canRewardIndex)
self.selected1:SetActive(false)
self.selected2:SetActive(true)
self.selected3:SetActive(false)
selectIndex = ActivityTypeDef.SevenDayRegister
this.ScrollView:SetIndex(1)
end)
Util.AddClick(self.chapterRewardBtn, function()
local getRewardState = ActivityGiftManager.chapterGetRewardState
local activityType = ActivityTypeDef.ChapterAward
local data = ActivityGiftManager.chapterGiftData
this:OnShowActivityData(data, activityType, getRewardState, nil)
self.selected1:SetActive(false)
self.selected2:SetActive(false)
self.selected3:SetActive(true)
selectIndex = ActivityTypeDef.ChapterAward
this.ScrollView:SetIndex(1)
end)
BindRedPointObject(RedPointType.CourtesyDress_Online, this.onlineRedPoint)
BindRedPointObject(RedPointType.CourtesyDress_SevenDay, this.sevenDayPoint)
BindRedPointObject(RedPointType.CourtesyDress_Chapter, this.chapterPoint)
end
function SevenDayGift:OnOpen()
--local data = { ... }
--this.ActivityId = data[1]
--this.hideBtns=data[2]
--this.onlineBtn:SetActive(true)
--this.sevenDayBtn:SetActive(true)
--this.chapterRewardBtn:SetActive(true)
--if(this.hideBtns) then
this.onlineBtn:SetActive(false)
this.sevenDayBtn:SetActive(false)
this.chapterRewardBtn:SetActive(false)
--end
end
local sortingOrder = 0
function SevenDayGift:OnShow(_sortingOrder)
sortingOrder = _sortingOrder
this:IsGetRewardAll(ActivityGiftManager.sevenDayGetRewardState, ActivityTypeDef.SevenDayRegister, false)
this:IsGetRewardAll(ActivityGiftManager.onlineGetRewardState, ActivityTypeDef.OnlineGift, false)
this:IsGetRewardAll(ActivityGiftManager.chapterGetRewardState, ActivityTypeDef.ChapterAward, false)
this.SetDataSort()
if (this.ActivityId == nil) then
this:OpenActivityPage()
else
this:JumpOpenActivity()
end
this.ScrollView:SetIndex(1)
--this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.RoleInfo})
end
function SevenDayGift:OnSortingOrderChange(cursortingOrder)
if this.viewCache then
for i, v in pairs(this.viewCache) do
for j = 1, #v.views do
v.views[j]:SetEffectLayer(cursortingOrder)
end
end
end
end
--跳转打开页面
function SevenDayGift:JumpOpenActivity()
if (this.ActivityId == ActivityTypeDef.SevenDayRegister) then
local getRewardState = ActivityGiftManager.sevenDayGetRewardState
local canRewardIndex = ActivityGiftManager.canRewardDay
local activityType = ActivityTypeDef.SevenDayRegister
local data = ActivityGiftManager.sevenDayData
this:OnShowActivityData(data, activityType, getRewardState, canRewardIndex)
selectIndex = ActivityTypeDef.SevenDayRegister
self.selected1:SetActive(false)
self.selected2:SetActive(true)
self.selected3:SetActive(false)
elseif (this.ActivityId == ActivityTypeDef.OnlineGift) then
local getRewardState = ActivityGiftManager.onlineGetRewardState
local canRewardIndex = ActivityGiftManager.currentTimeIndex
local activityType = ActivityTypeDef.OnlineGift
local data = ActivityGiftManager.onlineData
this:OnShowActivityData(data, activityType, getRewardState, canRewardIndex)
selectIndex = ActivityTypeDef.OnlineGift
self.selected1:SetActive(true)
self.selected2:SetActive(false)
self.selected3:SetActive(false)
elseif (this.ActivityId == ActivityTypeDef.ChapterAward) then
local getRewardState = ActivityGiftManager.chapterGetRewardState
local activityType = ActivityTypeDef.ChapterAward
local data = ActivityGiftManager.chapterGiftData
this:OnShowActivityData(data, activityType, getRewardState, nil)
selectIndex = ActivityTypeDef.ChapterAward
self.selected1:SetActive(false)
self.selected2:SetActive(false)
self.selected3:SetActive(true)
end
end
--主城打开页面
function SevenDayGift :OpenActivityPage()
if (ActivityGiftManager.sevenDayOpen) then
local getRewardState = ActivityGiftManager.sevenDayGetRewardState
local canRewardIndex = ActivityGiftManager.canRewardDay
local activityType = ActivityTypeDef.SevenDayRegister
local data = ActivityGiftManager.sevenDayData
this:OnShowActivityData(data, activityType, getRewardState, canRewardIndex)
selectIndex = ActivityTypeDef.SevenDayRegister
end
end
--展示活动数据
function SevenDayGift:OnShowActivityData(activityData, activityType, getRewardState, isCanReward,isTop,isAni)
if (activityType == ActivityTypeDef.SevenDayRegister) then
this.titleBg.sprite = this.spLoader:LoadSprite("r_huodong_qitian_zh")
elseif (activityType == ActivityTypeDef.OnlineGift) then
this.titleBg.sprite = this.spLoader:LoadSprite("r_huodong_zaixian_zh")
elseif (activityType == ActivityTypeDef.ChapterAward) then
this.titleBg.sprite = this.spLoader:LoadSprite("r_huodong_tongguan_zh")
end
this.ScrollView:SetData(activityData, function(index, item)
local shows = activityData[index].Reward
if this.viewCache[item] then
local viewCacheNum
local viewCacheItem = { views = {} }
viewCacheNum = table.nums(this.viewCache[item].views)
if (viewCacheNum < #shows) then
for i = 1, viewCacheNum do
this.viewCache[item].views[i].gameObject:SetActive(true)
this.viewCache[item].views[i]:OnOpen(false, { shows[i][1], shows[i][2] }, 0.97,false,false,false,sortingOrder)
viewCacheItem.views[i] = this.viewCache[item].views[i]
end
for i = viewCacheNum + 1, #shows do
--his.viewCache[item].views[i].gameObject:SetActive(true)
local view = SubUIManager.Open(SubUIConfig.ItemView, Util.GetTransform(item, "content").transform)
view:OnOpen(false, { shows[i][1], 0 }, 0.97,false,false,false,sortingOrder)
viewCacheItem.views[i] = view
end
this.viewCache[item] = viewCacheItem
else
for i = 1, #shows do
this.viewCache[item].views[i].gameObject:SetActive(true)
this.viewCache[item].views[i]:OnOpen(false, { shows[i][1], shows[i][2] }, 0.97,false,false,false,sortingOrder)
end
for i = #shows + 1, viewCacheNum do
this.viewCache[item].views[i].gameObject:SetActive(false)
end
end
this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward)
else
local viewCacheItem = { views = {} }
for i = 1, #shows do
local view = SubUIManager.Open(SubUIConfig.ItemView, Util.GetTransform(item, "content").transform)
view:OnOpen(false, { shows[i][1], shows[i][2] }, 0.97,false,false,false,sortingOrder)
viewCacheItem.views[i] = view
end
this.viewCache[item] = viewCacheItem
this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward)
end
--this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward)
end, not isTop,not isAni)
end
--循环滚动活动数据
function SevenDayGift:ScrollActivityDataShow(item, index, data, activityType, getRewardState, isCanReward)
--Util.ClearChild(Util.GetTransform(item, "content").transform)
--for i, v in ipairs(data.Reward) do
-- local view = SubUIManager.Open(SubUIConfig.ItemView, Util.GetTransform(item, "content").transform)
-- view:OnOpen(false, { v[1], v[2] }, 0.97)
--end
local getRewardProgressValue = 0
for i, v in pairs(getRewardState) do
if (v == 1) then
getRewardProgressValue = getRewardProgressValue + 1
end
end
local titleText = Util.GetGameObject(item, "titleImage/titleText"):GetComponent("Text")
local nextOpenBtn = Util.GetGameObject(item, "nextDayOpenBtn")
local nextOpenBtnText = Util.GetGameObject(item, "nextDayOpenBtn/Text"):GetComponent("Text")
local getRewardBtn = Util.GetGameObject(item, "getRewardBtn")
local getFinishText = Util.GetGameObject(item, "getFinishText")
local getRewardProgress = Util.GetGameObject(item, "getRewardProgress"):GetComponent("Text")
--local redPoint = Util.GetGameObject(item, "getRewardBtn/redPoint")
if (activityType == ActivityTypeDef.SevenDayRegister) then
titleText.text = Language[10016] .. data.Sort .. Language[10017]
nextOpenBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite("s_slbz_1anniuhuise")
nextOpenBtnText.text = Language[10018]
--this.remaindTimeText.text = ""
elseif (activityType == ActivityTypeDef.OnlineGift) then
titleText.text = Language[10030] .. data.Values[1][1] .. Language[10031]
nextOpenBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite("s_slbz_1anniuhuise")
nextOpenBtnText.text = Language[10018]
elseif (activityType == ActivityTypeDef.ChapterAward) then
titleText.text = GetLanguageStrById(data.ContentsShow)
nextOpenBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite("s_slbz_1anniuhuangse")
nextOpenBtnText.text = Language[10019]
--this.remaindTimeText.text = ""
end
if (activityType ~= ActivityTypeDef.ChapterAward) then
if (data.Sort >= isCanReward) then
getRewardBtn:SetActive(false)
getFinishText:SetActive(false)
nextOpenBtn:SetActive(true)
getRewardProgress .text = "(0/1)"
end
if (data.Sort <= isCanReward and getRewardState[data.Id] == 0) then
getRewardBtn:SetActive(true)
getFinishText:SetActive(false)
nextOpenBtn:SetActive(false)
--redPoint:SetActive(true)
getRewardProgress .text = "(1/1)"
if (index == 1) then
jumpNeedBtn = getRewardBtn
end
end
if (data.Sort <= isCanReward and getRewardState[data.Id] == 1) then
getRewardBtn:SetActive(false)
getFinishText:SetActive(true)
nextOpenBtn:SetActive(false)
getRewardProgress .text = "(1/1)"
end
else
if (FightPointPassManager.IsChapterPass(data.Sort) and getRewardState[data.Id] == 0) then
getRewardBtn:SetActive(true)
getFinishText:SetActive(false)
nextOpenBtn:SetActive(false)
getRewardProgress .text = "(1/1)"
if (index == 1) then
jumpNeedBtn = getRewardBtn
end
elseif (FightPointPassManager.IsChapterPass(data.Sort) and getRewardState[data.Id] == 1) then
getRewardBtn:SetActive(false)
getFinishText:SetActive(true)
nextOpenBtn:SetActive(false)
getRewardProgress .text = "(1/1)"
elseif (not FightPointPassManager.IsChapterPass(data.Sort)) then
getRewardBtn:SetActive(false)
getFinishText:SetActive(false)
nextOpenBtn:SetActive(true)
getRewardProgress .text = "(0/1)"
end
end
Util.AddOnceClick(getRewardBtn, function()
if (activityType == ActivityTypeDef.SevenDayRegister) then
ActivityGiftManager.GetActivityRewardRequest(ActivityTypeDef.SevenDayRegister, data.Id)
elseif (activityType == ActivityTypeDef.OnlineGift) then
ActivityGiftManager.GetActivityRewardRequest(ActivityTypeDef.OnlineGift, data.Id)
elseif (activityType == ActivityTypeDef.ChapterAward) then
ActivityGiftManager.GetActivityRewardRequest(ActivityTypeDef.ChapterAward, data.Id)
end
end)
Util.AddOnceClick(nextOpenBtn, function()
if (activityType == ActivityTypeDef.ChapterAward) then
--前往跳转
JumpManager.GoJump(data.Jump[1])
end
end)
end
-- 在线奖励倒计时
function SevenDayGift:OnlineCountDown(remainTime, activityData)
local hour = 0
local min = 0
local sec = 0
sec = math.floor(remainTime % 60)
hour = math.floor(remainTime / 3600)
min = 0
if (hour >= 1) then
min = math.floor((remainTime - hour * 3600) / 60)
else
min = math.floor(remainTime / 60)
end
if (selectIndex == ActivityTypeDef.OnlineGift) then
this.remaindTimeText.text = Language[10032] .. string.format("%02d:%02d:%02d", hour, min, sec)
if (ActivityGiftManager.currentTimeIndex == #ActivityGiftManager.onlineData) then
this.remaindTimeText.text = ""
end
local getRewardState = ActivityGiftManager.onlineGetRewardState
if (remainTime == 0) then
this:OnShowActivityData(activityData, selectIndex, getRewardState, ActivityGiftManager.currentTimeIndex)
end
end
end
--领取奖励刷新页面数据
function SevenDayGift:OnRefreshPageDataShow()
local canRewardIndex = 0
local getRewardState = 0
selectIndex = ActivityTypeDef.SevenDayRegister
if (selectIndex == ActivityTypeDef.SevenDayRegister) then
canRewardIndex = ActivityGiftManager.canRewardDay
getRewardState = ActivityGiftManager.sevenDayGetRewardState
elseif (selectIndex == ActivityTypeDef.OnlineGift) then
canRewardIndex = ActivityGiftManager.currentTimeIndex
getRewardState = ActivityGiftManager.onlineGetRewardState
elseif (selectIndex == ActivityTypeDef.ChapterAward) then
getRewardState = ActivityGiftManager.chapterGetRewardState
end
this:OnShowActivityData(ActivityGiftManager.sevenDayData, selectIndex, getRewardState, canRewardIndex)
this:IsGetRewardAll(getRewardState, selectIndex, true)
end
--判断奖励是否领取完毕
function SevenDayGift:IsGetRewardAll(getRewardState, activityType, isInActivityPage)
local isGetAllReward = true
for i, v in pairs(getRewardState) do
if (v == 0) then
isGetAllReward = false
end
end
if (activityType == ActivityTypeDef.SevenDayRegister and isGetAllReward) then
this.sevenDayBtn:SetActive(false)
ActivityGiftManager.sevenDayOpen = false
if (isInActivityPage) then
--UIManager.OpenPanel(UIName.MainPanel)
end
elseif (activityType == ActivityTypeDef.OnlineGift and isGetAllReward) then
this.onlineBtn:SetActive(false)
ActivityGiftManager.onlineOpen = false
if (isInActivityPage) then
--UIManager.OpenPanel(UIName.MainPanel)
end
elseif (activityType == ActivityTypeDef.ChapterAward and isGetAllReward) then
this.chapterRewardBtn:SetActive(false)
ActivityGiftManager.chapterOpen = false
if (isInActivityPage) then
--UIManager.OpenPanel(UIName.MainPanel)
end
end
end
--进行数据排序
function this.SetDataSort()
table.sort(ActivityGiftManager.onlineData, function(a, b)
if ActivityGiftManager.onlineGetRewardState[a.Id] == ActivityGiftManager.onlineGetRewardState[b.Id] then
return a.Id < b.Id
else
return ActivityGiftManager.onlineGetRewardState[a.Id] < ActivityGiftManager.onlineGetRewardState[b.Id]
end
end)
table.sort(ActivityGiftManager.sevenDayData, function(a, b)
if ActivityGiftManager.sevenDayGetRewardState[a.Id] == ActivityGiftManager.sevenDayGetRewardState[b.Id] then
return a.Id < b.Id
else
return ActivityGiftManager.sevenDayGetRewardState[a.Id] < ActivityGiftManager.sevenDayGetRewardState[b.Id]
end
end)
table.sort(ActivityGiftManager.chapterGiftData, function(a, b)
if ActivityGiftManager.chapterGetRewardState[a.Id] and ActivityGiftManager.chapterGetRewardState[b.Id] then
if ActivityGiftManager.chapterGetRewardState[a.Id] == ActivityGiftManager.chapterGetRewardState[b.Id] then
return a.Id < b.Id
else
return ActivityGiftManager.chapterGetRewardState[a.Id] < ActivityGiftManager.chapterGetRewardState[b.Id]
end
else
return ActivityGiftManager.chapterGetRewardState[a.Id] and not ActivityGiftManager.chapterGetRewardState[b.Id]
end
end)
end
--添加事件监听(用于子类重写)
function SevenDayGift:AddListener()
--Game.GlobalEvent:AddEvent(GameEvent.Activity.OnlineState, this.OnlineCountDown, self)
Game.GlobalEvent:AddEvent(GameEvent.Activity.GetRewardRefresh, this.OpenActivityPage, self)
end
--移除事件监听(用于子类重写)
function SevenDayGift:RemoveListener()
--Game.GlobalEvent:RemoveEvent(GameEvent.Activity.OnlineState, this.OnlineCountDown, self)
Game.GlobalEvent:RemoveEvent(GameEvent.Activity.GetRewardRefresh, this.OpenActivityPage, self)
end
--跳转显示新手提示圈
function SevenDayGift.ShowGuideGo()
if jumpNeedBtn ~= 0 then
JumpManager.ShowGuide(UIName.CourtesyDressPanel, jumpNeedBtn)
end
end
function SevenDayGift:OnDestroy()
this.spLoader:Destroy()
ClearRedPointObject(RedPointType.CourtesyDress_Online)
ClearRedPointObject(RedPointType.CourtesyDress_SevenDay)
ClearRedPointObject(RedPointType.CourtesyDress_Chapter)
--SubUIManager.Close(this.UpView)
this.ScrollView = nil
sortingOrder = 0
end
return SevenDayGift

View File

@ -18,6 +18,7 @@ local BuffRegister = {
[BuffName.Blood] = "Blood",
[BuffName.BanBlood] = "BanBlood",
[BuffName.SigilSign] = "SigilSign",
[BuffName.CommonSign] = "CommonSign",
}

View File

@ -2731,63 +2731,90 @@ local effectList = {
end)
end)
end,
-- [a]%概率造成[b],每回合造成[c]%自身[d]的伤害,持续[e]回合;[f]%概率使目标灼烧2层[g]%概率3层
-- a[float]b[持续伤害状态].c[float],d[属性]e[int],f[float],g[float]
--概率[a]添加[b]类型[c]效果,[d]%概率无视免疫,持续[e]回合参数1[f],参数2[g],参数3[h]
--a[float],b[int],c[int],d[float],e[int],f[int/float],g[int/float],h[int/float]
[141] = function(caster, target, args, interval, skill)
local f1 = args[1]
local dot = args[2]
local f2 = args[3]
local pro = args[4]
local i1 = args[5]
local p1 = args[6]
local p2 = args[7]
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target)
BattleLogic.WaitForTrigger(interval, function ()
local floor=0
local rand=Random.Range01()
if rand<=p2 then
floor=3
end
if floor==0 and rand<=p1 then
floor=2
end
if floor==0 and rand<=f2 then
floor=1
end
local damage = BattleUtil.ErrorCorrection(f2 * caster:GetRoleData(BattlePropList[pro]))
if floor~=0 then
for i = 1, floor do
-- local buff = Buff.Create(caster, BuffName.DOT, i1, 1, dot, floor(damage))
-- buff.skill=skill
-- buff.isRealDamage = true
-- target:AddBuff(buff)
BattleUtil.RandomDot(1, dot, caster, target, i1, 1, damage,skill)
end
end
end)
end,
--概率[a]添加[b]类型[c]效果,持续[d]回合参数1[e],参数2[f]
--a[float],b[int],c[int],d[int],e[int/float],f[int/float]
[142] = function(caster, target, args, interval, skill)
local pro=args[1]
local t1=args[2]
local t2=args[3]
local r1=args[4]
local v1=args[5]
local v2=args[6]
BattleLogic.WaitForTrigger(interval, function ()
if t1==BuffName.SigilSign then
local pro2=args[4]
local r1=args[5]
local v1=args[6]
local v2=args[7]
local v3=args[8]
BattleLogic.WaitForTrigger(interval, function ()
BattleUtil.RandomAction(pro,function()
local buff=Buff.Create(target, t1, r1)
target:AddBuff(buff)
local buff=nil
if t1==BuffName.Control then
buff=Buff.Create(caster, t1, r1,t2)
elseif t1==BuffName.Immune then
if t2==4 then --自定义免疫
local imms={}
if v1 then
table.insert(imms,v1)
end
if v2 then
table.insert(imms,v2)
end
if v3 then
table.insert(imms,v3)
end
local emmune=function(buff)
return buff.type == BuffName.Control and (BattleUtil.ChecklistIsContainValue(imms,buff.ctrlType)),caster
end
buff=Buff.Create(caster, t1, r1,t2,emmune)
else
buff=Buff.Create(caster, t1, r1,t2)
end
else
buff=Buff.Create(caster, t1, r1,t2)
end
target:AddBuff(buff,pro2)
end)
end)
end,
--概率[a]%为[b]阵营非[c]职业添加[d]类型[e]效果,[f]%概率无视免疫,持续[g]回合参数1[h],参数2[i],参数3[j]
--a[float],b[int],c[int],d[int],e[int],f[float],g[int],h[int/float],i[int/float]
[142] = function(caster, target, args, interval, skill)
local pro=args[1]
local ele=args[2]
local job=args[3]
local t1=args[4]
local t2=args[5]
local pro2=args[6]
local r1=args[7]
local v1=args[8]
local v2=args[9]
local v3=args[10]
BattleLogic.WaitForTrigger(interval, function ()
if target.element~=ele and ele~=0 then
return
end
if target.job==job and job~=0 then
return
end
if t1==BuffName.CommonSign then
BattleUtil.RandomAction(pro,function()
local buff=Buff.Create(caster, t1, r1)
target:AddBuff(buff,pro2)
end)
end
end)
end,
--回复目标[a]属性[b]%的生命(最终治疗 不暴击,不受被动影响)
--a[int],b[float]
[143] = function(caster, target, args, interval, skill)
local pro=args[1]
local v1=args[2]
BattleLogic.WaitForTrigger(interval, function ()
local treat=floor(target:GetRoleData(RoleDataName.MaxHp)*v1)
BattleUtil.FinalTreat(caster,target,treat,1,skill)
end)
end,
}
return effectList

View File

@ -0,0 +1,47 @@
CommonSign = Buff:New()
--初始化Buff通过传入一些自定义参数控制成长相关的数值
function CommonSign:SetData(...)
self.signType=...
-- 刷新排序等级
self.sort = 4
end
local onRageChange=function(caster,target,func,type,value)
local buff=Buff.Create(caster,BuffName.Control,1,7)
target:AddBuff(buff)
end
local onSkillCast=function(skill)
skill.owner.Event:AddEvent(BattleEventName.RecordRageChange,onRageChange,nil,nil,skill.owner)
end
local onSkillCastEnd=function(skill)
skill.owner.Event:RemoveEvent(BattleEventName.RecordRageChange,onRageChange,nil,nil,skill.owner)
end
--初始化后调用一次
function CommonSign:OnStart()
self.target.Event:AddEvent(BattleEventName.SkillCast,onSkillCast,nil,nil,self.target)
self.target.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,self.target)
end
--间隔N帧触发返回true时表示继续触发返回false立刻触发OnEnd
function CommonSign:OnTrigger()
return true
end
--效果结束时调用一次
function CommonSign:OnEnd()
self.target.Event:RemoveEvent(BattleEventName.SkillCast,onSkillCast,nil,nil,self.target)
self.target.Event:RemoveEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,self.target)
end
--只有当cover字段为true时触发返回true则被新效果覆盖
function CommonSign:OnCover(newBuff)
return true
end
return CommonSign

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0cf9019a7cb99434895c90a114f63b66
guid: 29b13ba3e65292944850a33142e8c29b
DefaultImporter:
externalObjects: {}
userData:

View File

@ -6,7 +6,8 @@ function NoDead:SetData(...)
self.factorCT,
self.isCanRelive,
self.pro,
self.v1 = ... -- buff期间的增伤系数
self.v1,
self.changePro = ... -- buff期间的增伤系数
self.cover = true --控制效果可被覆盖
-- 刷新排序等级
self.sort = 4
@ -26,7 +27,7 @@ end
-- 记录承受伤害
function NoDead:OnRoleBeHit(atkRole, damage, bCrit, finalDmg, damageType, skill,isDirect)
if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill ) and atkRole.camp~=self.target.camp then
self.recordDamage=self.recordDamage+math.floor(damage*0.1)
self.recordDamage=self.recordDamage+math.floor(damage*self.changePro)
end
end

View File

@ -271,6 +271,7 @@ BuffName = {
Blood = 13,
BanBlood = 14,
SigilSign = 15,
CommonSign = 16,
}
DotType = {

View File

@ -370,6 +370,14 @@ function BattleUtil.ChooseTarget(role, chooseId)
elseif chooseLimit == 6 then --两纵排单位
local tempArr=BattleUtil.ChooseTowCol(arr)
arr=tempArr
elseif chooseLimit == 7 then --佛阵营
local tempArr = {}
for i = 1, #arr do
if arr[i].element == BattleRoleElementType.FO then
table.insert(tempArr, arr[i])
end
end
arr = tempArr
end
-- 选择条件
@ -433,6 +441,8 @@ function BattleUtil.ChooseTarget(role, chooseId)
if list and #list>0 then
arr=RoleManager.GetNeighbor(list[1], chooseType)
end
elseif chooseWeight ==15 then --敌方
-- body
end
local finalArr = {}
if num == 0 then
@ -698,7 +708,7 @@ function BattleUtil.CalRage(caster, target, value, countType,isBorrow)
if (countType==3 or countType==4) and target.RoundMaxSubRage~=0 then
target.AllSubRage=target.AllSubRage-deltaRage
end
caster.Event:DispatchEvent(BattleEventName.RecordRageChange, caster, target, deltaRage,countType,value,lastRage,isBorrow)
BattleLogic.Event:DispatchEvent(BattleEventName.RecordRageChange, caster, target, deltaRage,countType,value,lastRage,isBorrow)
-- 用于记录统计
BattleLogic.Event:DispatchEvent(BattleEventName.RecordRage, caster, target, deltaRage)

View File

@ -169,6 +169,13 @@ local _ConditionConfig = {
return false
end,
[9] = function(skill, condition) --6:我方道系非治疗数量
local conId = condition[1]
local comType = condition[2]
local comValue = condition[3]
local list=RoleManager.Query(function(role) return role.camp==skill.owner.camp and role.element==BattleRoleElementType.DAO and role.job~=1 end)
return BattleUtil.CompareValue(#list, comValue, comType)
end,
}
-- 条件检测

View File

@ -118,6 +118,22 @@ local _TriggerConfig = {
local args = {...}
local role = args[1]
return role.camp == skill.owner.camp
end,
[13] = function(skill, ...)--13:敌方攻击最高单位行动后
local args = {...}
local caster = args[1]
local cam=skill.owner.camp
if caster.camp==cam then
return false
end
local list = RoleManager.Query(function(v) return v.camp~=cam end)
if list and #list>0 then
BattleUtil.SortByProp(list,RoleDataName.Attack,0)
if caster==list[1] then
return true
end
end
return false
end
},
[BattleEventName.BattleStart] = {
@ -160,7 +176,13 @@ local _TriggerConfig = {
local args = {...}
local castSkill = args[1]
return castSkill.owner.camp == skill.owner.camp and castSkill.owner.job==2 and (castSkill.type==BattleSkillType.DeadSkill or castSkill.type==BattleSkillType.Extra or castSkill.type==BattleSkillType.Special)
end
end,
[14] =function(skill,...) --14:我方金乌释放技能后
local args = {...}
local castSkill = args[1]
return castSkill.owner.camp == skill.owner.camp and castSkill.owner.type==BattleUnitType.Monster and castSkill.owner.uid==20008
end,
},
}

View File

@ -327,7 +327,7 @@ function RoleLogic:IsAssignHeroAndHeroStar(id,star)
end
function RoleLogic:AddBuff(buff)
function RoleLogic:AddBuff(buff,_ignorePro)
if self:IsRealDead() then
BattleLogic.BuffMgr:PutBuff(buff)
return
@ -352,6 +352,9 @@ function RoleLogic:AddBuff(buff)
--概率忽略免疫
local ignoreProb=0
if _ignorePro then
ignoreProb=_ignorePro
end
local changeIgnore=function(v1,ct)
ignoreProb=BattleUtil.CountValue(ignoreProb,v1,ct)
end

View File

@ -13,6 +13,7 @@ local BuffTypeToConfigType = {
[BuffName.Blood] = 10,
[BuffName.BanBlood] = 11,
[BuffName.SigilSign] = 13,
[BuffName.CommonSign] = 14,
}
local function _GetPropChangeBuffCType(pName)
for cType, pn in ipairs(BattlePropList) do
@ -54,6 +55,8 @@ local function _GetBuffEffectConfig(buff)
elseif bType==BuffName.BanBlood then
cType = 1
elseif bType==BuffName.SigilSign then
cType = 1
elseif bType==BuffName.CommonSign then
cType = 1
end

View File

@ -375,8 +375,8 @@ function ExpertPanel:RefreshActivityBtn(context)
tabBtns[13]:SetActive(context.status == 1)
elseif context.type == ActivityTypeDef.FightExper then
tabBtns[14]:SetActive(context.status == 1)
elseif context.type == ActivityTypeDef.EnergyExper then
tabBtns[15]:SetActive(context.status == 1)
-- elseif context.type == ActivityTypeDef.EnergyExper then
-- tabBtns[15]:SetActive(context.status == 1)
elseif context.type == ActivityTypeDef.Talisman then
tabBtns[16]:SetActive(context.status == 1)
elseif context.type == ActivityTypeDef.SoulPrint then
@ -452,7 +452,7 @@ function ExpertPanel:RefreshActivityShow()
tabBtns[12]:SetActive(not not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.EquipExper))
tabBtns[13]:SetActive(not not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.GoldExper))
tabBtns[14]:SetActive(not not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.FightExper))
tabBtns[15]:SetActive(not not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.EnergyExper))
-- tabBtns[15]:SetActive(not not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.EnergyExper))
tabBtns[16]:SetActive(not not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.Talisman))
tabBtns[17]:SetActive(not not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.SoulPrint))
tabBtns[18]:SetActive(false)--(OperatingManager.IsHeroGiftActive())

View File

@ -22,18 +22,18 @@ end
---------------------------------------------
------登录初始化
function this.LoginGetWorldArenaInfoRequest(fun)
if ActTimeCtrlManager.IsQualifiled(FUNCTION_OPEN_TYPE.JumpServer) then
-- if ActTimeCtrlManager.IsQualifiled(FUNCTION_OPEN_TYPE.JumpServer) then
NetManager.GetWorldArenaInfoRequest(function(_msg)
this.InithightLadderData(_msg)
if fun then
fun()
end
end)
else
if fun then
fun()
end
end
-- else
-- if fun then
-- fun()
-- end
-- end
end
---初始化
function this.GetWorldArenaInfoRequest(fun)
@ -68,6 +68,7 @@ function this.InithightLadderData(_msg)
enterable = _msg.enterable--是否可以参加 竞技场100名以内参加
isGroup = _msg.isGroup--是否被分组 是1 否0
isStart = _msg.isStart--是否在3周内在为0 不在为1 开服三周后功能开始
Log(string.format("获取到了当前为开服第%s周",tostring(isStart)))
end
--推送更新
function this.IndicationHightLadderData(_msg)

View File

@ -680,7 +680,7 @@ function this.ExecuteLoading()
--[[[41] =]]function() MyGuildManager.ReuqsetRedPackage(LoadingPanel.OnStep) end, --请求红包
--[[[42] =]]function() NetManager.HardStageRequest(LoadingPanel.OnStep) end, --山河社稷图
--[[[43] =]]function() NetManager.VipLevelStateRequset(LoadingPanel.OnStep) end, --vip
--function() JumpServerManager.LoginGetWorldArenaInfoRequest(LoadingPanel.OnStep) end,--跨服天梯
function() JumpServerManager.LoginGetWorldArenaInfoRequest(LoadingPanel.OnStep) end,--跨服天梯
--[[[44] =]]function() NetManager.RequestRedPacketData(LoadingPanel.OnStep) end, --福利红包
--[[[45] =]]function() NetManager.BeautyBagWishEquipRequest(nil,LoadingPanel.OnStep) end,--心愿魂印
--[[[46] =]]function() LingLongBaoJingManager.InitData(LoadingPanel.OnStep) end, --玲珑宝镜

View File

@ -54,9 +54,9 @@ local TypeUpdateFunc = {
[ActivityTypeDef.EquipExper] = function ()--装备达人
this.GetExpertData(1,ActivityTypeDef.EquipExper)
end,
[ActivityTypeDef.EnergyExper] = function ()--体力达人
this.GetExpertData(2,ActivityTypeDef.EnergyExper)
end,
-- [ActivityTypeDef.EnergyExper] = function ()--体力达人
-- this.GetExpertData(2,ActivityTypeDef.EnergyExper)
-- end,
[ActivityTypeDef.FindTreasureExper] = function ()--寻宝达人
this.GetExpertData(1,ActivityTypeDef.FindTreasureExper)
end,

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 024846920bd3ddd45b9237ade8d620d9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: