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

dev_chengFeng
gaoxin 2021-06-02 19:49:20 +08:00
commit b7c8ed1ee1
13 changed files with 148 additions and 93 deletions

View File

@ -806,26 +806,27 @@ RedPointType = {
HeadChange_Frame = 23111,
HeadChange_Head = 23112,
--- 限时达人红点 ----
Expert_FastExplore=3110,--极速达人
Expert_AreaExper = 3111,--竞技达人
Expert_FastExplore=3116,--极速达人
Expert_AreaExper = 3117,--竞技达人
Expert_LimitExchange = 3108,--限时兑换
LimitExchange_GoExchange = 31081,-- 限时兑换活动
Expert_UpStarExper = 3109,--进阶达人
Expert_EquipExper = 3112,--装备达人
Expert_GoldExper = 3113,--点金达人
Expert_FightExper = 3114,--副本达人
Expert_EnergyExper = 3115,--体力达人
Expert_Talisman= 3116,--法宝达人
Expert_SoulPrint= 3117,--魂印达人
Expert_AccumulativeRecharge= 3107,--累计充值
Expert_FindTreasure= 3119,--寻宝达人
Expert_LuckyTurn= 3120,--探宝达人
Expert_Recruit= 3121,--征募达人
Expert_SecretBox= 3122,--秘宝达人
Expert_UpStarExper = 3118,--进阶达人
Expert_EquipExper = 3119,--装备达人
Expert_GoldExper = 3120,--点金达人
Expert_FightExper = 3121,--副本达人
Expert_EnergyExper = -1,--体力达人
Expert_Talisman= 3137,--法宝达人
Expert_SoulPrint= 3138,--魂印达人
Expert_AccumulativeRecharge= -1,--累计充值
Expert_FindTreasure= 3146,--寻宝达人
Expert_LuckyTurn= 3147,--探宝达人
Expert_Recruit= 3148,--征募达人
Expert_SecretBox= 3149,--秘宝达人
Expert_UpLv= 3123,--充值限量礼包
--Expert_LuckyTurn= 1118,--秘宝达人
Expert_Expedition= 3126,--天宫达人
Expert_Slhj= 3127,--森罗幻境达人
Expert_Slhj= 3170,--森罗幻境达人
Expert_WeekCard= 3150,--周卡
Expert_YunYouMan = 3128,--云游商人
--战力排行 达标战力
@ -1038,6 +1039,13 @@ JumpType = {
XinJiangLaiXiShangDian = 20200, --社稷大典商店
XingChenShangDian = 20059, --星辰商店
}
NPCPosType={
maincity=1,
}
YaoHunFrame = {
--[6] = "r_tongyong_yaohunkuang002",
--[7] = "r_tongyong_yaohunkuang001",

View File

@ -43,4 +43,23 @@ function PackageManager.GetLoadingList()
local list = string.split(this.config.LoadingImgList, "#")
return list
end
end
function PackageManager.SetVideo(obj,Image)
local video = obj:GetComponent("VideoPlayer")
if this.config.VideoName then
Image:SetActive(true)
Log("加载视频:"..tostring(this.config.VideoName))
video.clip = resMgr:LoadAsset(this.config.VideoName)
video:Play()
else
LogError("包名:"..tostring(this.config.PackageName).."登录视频为空!")
Image:SetActive(false)
video:Pause()
end
end
function PackageManager.UnloadVideo()
Log("卸载视频:"..tostring(this.config.VideoName))
resMgr:UnLoadAsset(this.config.VideoName)
end

View File

@ -147,7 +147,7 @@ function this.InitActivityServerData(msg, isUpdate)
this.onlineGetRewardState[m.missionId] = m.state
this.haveOnlineTime = m.progress
this.onlineTime= m.progress
--LogError("------------------------------------后端刷新在线时长2 "..m.progress.." "..TimeToHMS(m.progress))
------LogGreen("------------------------------------后端刷新在线时长2 "..m.progress.." "..TimeToHMS(m.progress))
this.cuOnLineTimestamp = GetTimeStamp() - m.progress
--this.StartOnlineUpdate()
elseif (v.activityId == ActivityTypeDef.EightDayGift) then
@ -254,7 +254,7 @@ function this.GetActivityIdByType(type)
local missionData = nil
table.walk(globalActConfigs, function(actConfigInfo)
if this.mission[actConfigInfo.Id] then
--LogError("actConfigInfo.Id "..actConfigInfo.Id)
------LogGreen("actConfigInfo.Id "..actConfigInfo.Id)
id = actConfigInfo.Id
end
end)
@ -589,6 +589,7 @@ function this.GetContinuityRechargeRedPoint()
redPoint = redPoint or (rechargeInfo.progress == 1 and rechargeInfo.state == 0)
end
end
LogGreen("积天豪礼红点:"..tostring(redPoint))
return redPoint
end
@ -612,10 +613,10 @@ end
--检测限时活动红点
function this.ExpterActivityIsShowRedPoint(activeIndex)
local activeType = 0
-- Log("activeIndex "..activeIndex)
----LogGreen("activeIndex "..activeIndex)
--注意 红点枚举id %100 就是按钮顺序
activeType = numExChange[math.floor(activeIndex % 100)]
-- Log("activeType "..activeType)
activeType = math.floor(activeIndex % 100)
----LogGreen("activeType "..activeType)
local expertRewardTabs = this.GetActivityTypeInfo(activeType)
if expertRewardTabs then
for i = 1, #expertRewardTabs.mission do
@ -634,15 +635,17 @@ function this.ExpterActivityIsShowRedPoint(activeIndex)
--进阶因为每个都不一样 特殊判断
if expertRewardTabs.mission[i].progress >= value then
--Log("expertRewardTabs.mission[i].progress " .. expertRewardTabs.mission[i].progress)
--Log("限时红点 --------------- true")
----LogGreen("限时红点 --------------- true")
return true
end
elseif activeType == ActivityTypeDef.UpLvAct then
if expertRewardTabs.value >= value and expertRewardTabs.mission[i].progress >= 0 then
----LogGreen("限时红点 --------------- true")
return true
end
elseif activeType == ActivityTypeDef.FastExplore then
if expertRewardTabs.value >= value then
----LogGreen("限时红点 --------------- true")
return true
end
elseif activeType == ActivityTypeDef.AccumulativeRechargeExper then
@ -651,20 +654,21 @@ function this.ExpterActivityIsShowRedPoint(activeIndex)
local curActiveConfig = ConfigManager.TryGetConfigData(ConfigName.GlobalActivity,id)
if curActiveConfig and curActiveConfig.ShowArt == 1 then--1类型的活动是限时活动里的累计充值
if expertRewardTabs.value >= value then
----LogGreen("限时红点 --------------- true")
return true
end
end
end
else
if expertRewardTabs.value >= value then
--Log("限时红点 --------------- true")
----LogGreen("限时红点 --------------- true")
return true
end
end
end
end
end
--Log("限时红点 --------------- false")
----LogGreen("限时红点 --------------- false")
return false
end
--检测升级限时礼包活动红点
@ -674,23 +678,25 @@ function this.ExperyUpLvActivityIsShowRedPoint()
for i = 1, #activeData.mission do
local curConfigData = ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig,activeData.mission[i].missionId)
if curConfigData and activeData.mission[i].state == 0 and activeData.value >= curConfigData.Values[2][1] and activeData.mission[i].progress>0 then
----LogGreen("升级豪礼: true ")
return true
end
end
end
----LogGreen("升级豪礼: false ")
return false
end
--检测周卡活动红点
function this.WeedCardActivityIsShowRedPoint()
local weekCardData = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.WeekCard, 12)
if weekCardData then
--Log("weekCardData.buyTimes "..weekCardData.buyTimes.." "..PatFaceManager.isFirstLog.." "..tostring(this.isOpenWeekCard))
----LogGreen("weekCardData.buyTimes "..weekCardData.buyTimes.." "..PatFaceManager.isFirstLog.." "..tostring(this.isOpenWeekCard))
if weekCardData.buyTimes <= 0 and PatFaceManager.isFirstLog == 0 and this.isOpenWeekCard == false then
--Log("检测周卡活动红点 --------------- true")
----LogGreen("检测周卡活动红点 --------------- true")
return true
end
end
--Log("检测周卡活动红点 --------------- false")
----LogGreen("检测周卡活动红点 --------------- false")
return false
end
--检测战力排行活动红点
@ -1074,7 +1080,7 @@ function this.RefreshAcitvityData(acitvityIds,fun)
if missionInfo.missionId == msg.activityInfo[i].mission[j].missionId then
missionInfo.state = msg.activityInfo[i].mission[j].state
missionInfo.progress = msg.activityInfo[i].mission[j].progress
--LogError("msg.activityInfo[i].mission[j] "..msg.activityInfo[i].mission[j].missionId.." "..msg.activityInfo[i].mission[j].progress)
------LogGreen("msg.activityInfo[i].mission[j] "..msg.activityInfo[i].mission[j].missionId.." "..msg.activityInfo[i].mission[j].progress)
end
end
end
@ -1193,10 +1199,10 @@ function this.CheckYunYouManRedPoint()
if id and id > 0 then
local str = PlayerPrefs.GetInt(PlayerManager.uid.."CommonActPage"..ActivityTypeDef.YunYouShangRen)
if str == 1 then
Log("云游商人红点返回false")
LogGreen("云游商人红点返回false")
return false
else
Log("云游商人红点返回true")
LogGreen("云游商人红点返回true")
return true
end
end

View File

@ -51,6 +51,10 @@ end
function EndLessCarbonPanel:BindEvent()
Util.AddClick(this.btnBack, function ()
if UIManager.IsOpen(UIName.HelpPopup) then
UIManager.ClosePanel(UIName.HelpPopup)
end
-- !!!! PS: 这里必须是主动打开副本选择界面,从地图中返回时,这个界面的上一级是地图界面,
-- 如果只是关闭自己,则会打开地图界面,不会打开副本选择界面,导致报错
PlayerManager.carbonType = 1

View File

@ -89,7 +89,7 @@ function FightSmallChoosePanel:OnShow()
if self.liveNode then
self.liveNode:OnClose()
end
self.liveNode = PlayerLiveView:New(Util.GetGameObject(self.selectMap, "pos"),1)
self.liveNode = PlayerLiveView:New(Util.GetGameObject(self.selectMap, "pos"),self.sortingOrder)
self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale4,Vector3.New(0,40,0))
if FightPointPassManager.GetRoleDirection()==1 then
self.liveNode:SetWalkDir(WALK_DIR.RUN_LEFT)

View File

@ -3,7 +3,6 @@
LoginPanel = Inherit(BasePanel)
local this = LoginPanel
this.LoginWay = { Account = 0, WeChat = 1 }
local PackagerConfig = ConfigManager.GetConfig(ConfigName.PackageConfig)
SERVER_VERSION = tonumber(ServerConfigManager.GetSettingValue(ServerConfigManager.SettingConfig.ServerVersion) or 0)
local ServerVersion = SERVER_VERSION
@ -72,7 +71,8 @@ function this:InitComponent()
this.healthTip = Util.GetGameObject(this.gameObject, "healthTip")
this.healthTip:SetActive(IS_SHOW_HEALTH_TIP)
this.video = Util.GetGameObject(this.gameObject, "bg/GameObject"):GetComponent("VideoPlayer")
this.video = Util.GetGameObject(this.gameObject, "bg/GameObject")
this.rawImage = Util.GetGameObject(this.gameObject, "bg/RawImage")
end
--绑定事件(用于子类重写)
@ -195,19 +195,8 @@ end
--界面打开时调用(用于子类重写)
function this:OnOpen(...)
for _, config in ConfigPairs(PackagerConfig) do
if config.PackageName == PackageManager.PackageName then
if not config.VideoName or config.VideoName == "" then
LogError("包名:"..tostring(config.PackageName).."登录视频为空!")
else
Log("加载视频:"..tostring(config.VideoName))
this.VideoName = config.VideoName
this.video.clip = resMgr:LoadAsset(config.VideoName)
this.video:Play()
end
break
end
end
--设置背景
PackageManager.SetVideo(this.video,this.rawImage)
if AppConst.Code ~= "" then
MsgPanel.ShowOne(GetLanguageStrById(AppConst.Code))
AppConst.Code = ""
@ -282,7 +271,7 @@ end
--界面销毁时调用(用于子类重写)
function this:OnDestroy()
this.spLoader:Destroy()
resMgr:UnLoadAsset(this.VideoName)
PackageManager.UnloadVideo()
end
this.isWaiting = false

View File

@ -29,7 +29,7 @@ function MainPlayerView.New(isSelf, root, rect, pos,_NpvData,sortingOrder)
Util.GetGameObject(instance.leader, "name/text"):SetActive(true)
Util.GetGameObject(instance.leader, "name/text2"):SetActive(false)
_sex = NameManager.roleSex
instance.NpcGO = PlayerLiveView:New(instance.roleRootTran,1, nil,sortingOrder)
instance.NpcGO = PlayerLiveView:New(instance.roleRootTran,1, nil,sortingOrder,NPCPosType.maincity)
if PlayerManager.GetPlayerRide() > 0 then
Util.GetGameObject(instance.leader, "name").transform.localPosition = Vector3.New(0,239.9,0)

View File

@ -770,6 +770,9 @@ function EndLessMapView:OnClose()
if UIManager.IsOpen(UIName.EndLessTreasurePanel) then
UIManager.ClosePanel(UIName.EndLessTreasurePanel)
end
if UIManager.IsOpen(UIName.HelpPopup) then
UIManager.ClosePanel(UIName.HelpPopup)
end
end
function EndLessMapView:OnDestroy()

View File

@ -131,30 +131,38 @@ function this.GetNeedRewardData(sort)
return needData
end
function this.NiuQiCheckRedPoint1()
function this.CheckNiuQiChongTianRedPoint(index)
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.NiuQi)
if not id or id < 1 then
return false
end
local isShow = false
if index == RedPointType.NiuQiChongTian_4 then
isShow = this.NiuQiCheckRedPoint4()
else
local n = 0
if index == RedPointType.NiuQiChongTian_1 then
n = 1
elseif index == RedPointType.NiuQiChongTian_2 then
n = 2
elseif index == RedPointType.NiuQiChongTian_3 then
n = 3
end
isShow = this.NiuQiCheckRedPoint1(n)
end
return isShow
end
function this.NiuQiCheckRedPoint1(index)
for k,v in pairs(this.rewardData) do
if v.state == 1 and v.Sort == 1 then
return true
end
end
return false
end
function this.NiuQiCheckRedPoint2()
for k,v in pairs(this.rewardData) do
if v.state == 1 and v.Sort == 2 then
return true
end
end
return false
end
function this.NiuQiCheckRedPoint3()
for k,v in pairs(this.rewardData) do
if v.state == 1 and v.Sort == 3 then
if v.state == 1 and (not index or v.Sort == index) then
return true
end
end
return false
end
function this.NiuQiCheckRedPoint4()
this.GetScore()
for key, value in pairs(this.configData) do

View File

@ -225,12 +225,12 @@ function this.InitRedPointAllRelate()
-- RPData:SetParent(RedPointType.Expert_EquipExper, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_GoldExper, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_FightExper, RedPointType.Expert)
RPData:SetParent(RedPointType.Expert_EnergyExper, RedPointType.Expert)
--RPData:SetParent(RedPointType.Expert_EnergyExper, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_AccumulativeRecharge, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_Talisman, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_SoulPrint, RedPointType.Expert)
RPData:SetParent(RedPointType.LuckyCat, RedPointType.Expert)
RPData:SetParent(RedPointType.Expert_WeekCard, RedPointType.Expert)
--RPData:SetParent(RedPointType.LuckyCat, RedPointType.Expert)
--RPData:SetParent(RedPointType.Expert_WeekCard, RedPointType.Expert)
-- RPData:SetParent(RedPointType.HERO_STAR_GIFT, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_FindTreasure, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_LuckyTurn, RedPointType.Expert)
@ -408,8 +408,8 @@ function this.RegisterRedCheckFunc()
RPData:AddCheckFunc(RedPointType.Expert_EquipExper,ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_GoldExper, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_FightExper, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_EnergyExper, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_AccumulativeRecharge, ActivityGiftManager.ExpterActivityIsShowRedPoint)
--RPData:AddCheckFunc(RedPointType.Expert_EnergyExper, ActivityGiftManager.ExpterActivityIsShowRedPoint)
--RPData:AddCheckFunc(RedPointType.Expert_AccumulativeRecharge, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_FindTreasure, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_LuckyTurn, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_Recruit, ActivityGiftManager.ExpterActivityIsShowRedPoint)

View File

@ -203,11 +203,11 @@ function this.RefreshPlayerInfo(data)
if not _PlayerHead then
_PlayerHead = SubUIManager.Open(SubUIConfig.PlayerHeadView, this.memHead.transform)
end
if titleLive then
poolManager:UnLoadAsset(titleLiveStr, titleLive, PoolManager.AssetType.GameObject)
titleLive = nil
titleLiveStr = nil
end
-- if titleLive then
-- poolManager:UnLoadAsset(titleLiveStr, titleLive, PoolManager.AssetType.GameObject)
-- titleLive = nil
-- titleLiveStr = nil
-- end
_PlayerHead:Reset()
_PlayerHead:SetScale(Vector3.one * 0.85)
_PlayerHead:SetHead(data.head)
@ -218,18 +218,25 @@ function this.RefreshPlayerInfo(data)
local title=data.userTitle
if title and title>0 then
this.titlePar:SetActive(true)
local curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,title)
local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName)
titleLiveStr = curArtResourcesConfig.Name
titleLive = poolManager:LoadAsset(titleLiveStr, PoolManager.AssetType.GameObject)
titleLive.transform:SetParent(this.titlePar.transform)
titleLive.transform.localPosition = Vector3.New(0,0,0)
titleLive.transform.localScale = Vector3.New(0.5,0.5,0.5)
local sortingorder=0
if this.sortingOrder then
Util.AddParticleSortLayer(titleLive,this.sortingOrder - sortingorder)
sortingorder = this.sortingOrder
-- local curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,title)
-- local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName)
-- titleLiveStr = curArtResourcesConfig.Name
-- titleLive = poolManager:LoadAsset(titleLiveStr, PoolManager.AssetType.GameObject)
-- titleLive.transform:SetParent(this.titlePar.transform)
-- titleLive.transform.localPosition = Vector3.New(0,0,0)
-- titleLive.transform.localScale = Vector3.New(0.5,0.5,0.5)
-- local sortingorder=0
-- if this.sortingOrder then
-- Util.AddParticleSortLayer(titleLive,this.sortingOrder - sortingorder)
-- sortingorder = this.sortingOrder
-- end
LogError("title=="..title)
if not titleLive then
titleLive = SubUIManager.Open(SubUIConfig.PlayerTitle, this.titlePar.transform)
titleLive:SetShow(title, Vector3.New(0,0,0), 0.5, 0.03*20, this.sortingOrder)
end
else
this.titlePar:SetActive(false)
end

View File

@ -7,7 +7,7 @@ local mapNpcOp = "PlayerLiveView"
-- designation = 80010
-- }
function PlayerLiveView:New(gameObject,_Type, PlayerLiveViewData,orginLayer)
function PlayerLiveView:New(gameObject,_Type, PlayerLiveViewData,orginLayer,posType)
-- Type = _Type
-- local b = {}
-- b.gameObject = gameObject
@ -39,7 +39,7 @@ function PlayerLiveView:New(gameObject,_Type, PlayerLiveViewData,orginLayer)
instance.playerLiveGo = Util.GetGameObject(instance.leader, "liveParent/playerLive")
instance.titleLiveGo = Util.GetGameObject(instance.leader, "liveParent/titleLive")
instance.nameHeight=0
instance.posType=posType
--立绘对象
instance.rideLive = nil
instance.playerLive = nil
@ -83,22 +83,23 @@ end
--界面打开时调用(用于子类重写)
function PlayerLiveView:OnOpen(scale,pos,dir)
self:OnShowLive()
if scale then
self.leader.transform.localScale = Vector3.New(scale,scale,scale)
end
if pos then
self.leader.transform.localPosition = pos
end
self:OnShowLive()
if dir then
self:SetWalkDir(dir)
end
end
local sortingorder=0
function PlayerLiveView:OnSortingOrderChange(sortingOrder)
function PlayerLiveView:OnSortingOrderChange(sortingOrder1)
sortingorder=sortingOrder1
if self.titleLive then
self.titleLive:SetLayer(sortingOrder)
self.titleLive:SetLayer(sortingOrder1)
end
end
function PlayerLiveView:RemoveTitleCanvas()
@ -169,7 +170,15 @@ function PlayerLiveView:OnShowLive()
y=y+3
end
local curLocalPosition = Vector3.New(curArtResourcesConfig.Position[1],y,0)
self.titleLive:SetShow(self.PlayerLiveViewData.designation, curLocalPosition, curArtResourcesConfig.Scale, curArtResourcesConfig.Scale* self.transform.localScale.x, self.orginLayer)
LogError("scale=="..curArtResourcesConfig.Scale.." transform scale=="..self.leader.transform.localScale.x)
-- curArtResourcesConfig.Scale* self.transform.localScale.x
local effect=0
if self.posType==NPCPosType.maincity then
effect=self.transform.localScale.x
else
effect=self.leader.transform.localScale.x
end
self.titleLive:SetShow(self.PlayerLiveViewData.designation, curLocalPosition, curArtResourcesConfig.Scale, curArtResourcesConfig.Scale*effect,self.orginLayer)
end
end
function PlayerLiveView:SetNameHeight(hei)

View File

@ -583,7 +583,9 @@ function SingleFightPlayerView:SetIconShow(_eventpoint)
self.eventPointPos:SetDialogueStr(strList1[num])
Timer.New(function()
if self.dialogueRoot then
self.dialogueRoot.gameObject:SetActive(false)
if self.dialogueRoot.gameObject then
self.dialogueRoot.gameObject:SetActive(false)
end
end
if self.state == 1 then
self.eventPointPos:ShowDialogue(true)