添加红点

dev_chengFeng
jiaoyangna 2022-01-20 11:22:39 +08:00
parent a797e80b39
commit 1c24a85612
5 changed files with 32 additions and 5 deletions

View File

@ -1046,7 +1046,7 @@ RedPointType = {
HomeLand = 700,--主城家园红点
FestevalRed = 9501,
zhognzhichengcheng = 9601,
zhognzhichengcheng = 10096,
}
RedPointStatus = {

View File

@ -140,7 +140,7 @@ function this.InitActivityServerData(msg, isUpdate)
this.mission[v.activityId] = v
LogYellow("刷新活动数据activityId" .. v.activityId .. " value" .. v.value)
for n, m in ipairs(v.mission) do
LogGreen(" 刷新活动数据missionId" .. m.missionId .. " state" .. m.state .. " progress" .. m.progress)
--LogGreen(" 刷新活动数据missionId" .. m.missionId .. " state" .. m.state .. " progress" .. m.progress)
if (v.activityId == ActivityTypeDef.OnlineGift) then
this.onlineOpen = true
this.onlineGetRewardState[m.missionId] = m.state
@ -632,7 +632,7 @@ function this.ExpterActivityIsShowRedPoint(activeIndex)
local conFigData = ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig, expertRewardTabs.mission[i].missionId)
local value = 0
--限时累计活动特殊数值读取处理
if activeType == ActivityTypeDef.AccumulativeRechargeExper then
if activeType == ActivityTypeDef.AccumulativeRechargeExper or activeType == ActivityTypeDef.zhongzhichengcheng then
value = conFigData.Values[1][1]
else
value = conFigData.Values[2][1]
@ -668,6 +668,11 @@ function this.ExpterActivityIsShowRedPoint(activeIndex)
end
end
end
elseif activeType == ActivityTypeDef.zhongzhichengcheng then
if MyGuildManager.GetMyGuildExploreNums() >= value then
----LogGreen("限时红点 --------------- true")
return true
end
else
if expertRewardTabs.value >= value then
----LogGreen("限时红点 --------------- true")

View File

@ -47,10 +47,10 @@ end
function MyGuildManager.SetMyGuildInfo(msg)
-- 公会信息
this.MyGuildInfo = msg.familyBaseInfo
MyGuildManager.SetMyGuildExploreNums(this.MyGuildInfo.id,this.MyGuildInfo.exploreTimes)
this.MyFeteInfo.score= this.MyGuildInfo.fete --登录时的奖励进度信息 后续数据刷新由MyGuildManager.MyFeteInfo.score操作
--Log("我的公会ID:"..this.MyGuildInfo.id)
if this.MyGuildInfo.id then
MyGuildManager.SetMyGuildExploreNums(this.MyGuildInfo.id,this.MyGuildInfo.exploreTimes)
PlayerManager.familyId = this.MyGuildInfo.id
end
-- 发送数据更新事件
@ -964,6 +964,9 @@ function MyGuildManager.SetMyGuildExploreNums(id,nums)
end
function MyGuildManager.GetMyGuildExploreNums()
if not this.MyGuildInfo or not this.MyGuildInfo.id then
return 0
end
return this.exploreNums[this.MyGuildInfo.id] or 0
end
return this

View File

@ -383,6 +383,9 @@ local TypeUpdateFunc = {
-- end
end
end,
[ActivityTypeDef.zhongzhichengcheng] = function ()--秘宝达人
this.GetExpertData(5,ActivityTypeDef.zhongzhichengcheng)
end,
}
--超凡入圣
@ -554,8 +557,23 @@ function this.GetExpertData(indexType,actType)
else
curData.rewards[i].otherData.info = string.format("%s/%s",PlayerManager.level,curData.rewards[i].otherData.Values)
end
elseif indexType == 5 then
curData.rewards[i].otherData.Values = actRewardConfigs[j].Values[1][1]
curData.rewards[i].otherData.info = ""
if curData.rewards[i].state == 1 then
curData.rewards[i].otherData.state = 2
curData.rewards[i].otherData.info = string.format("%s/%s",curData.rewards[i].otherData.Values,curData.rewards[i].otherData.Values)
else
if MyGuildManager.GetMyGuildExploreNums() >= curData.rewards[i].otherData.Values then
curData.rewards[i].otherData.state = 0
curData.rewards[i].otherData.info = string.format("%s/%s",curData.rewards[i].otherData.Values,curData.rewards[i].otherData.Values)
else
curData.rewards[i].otherData.state = 1
curData.rewards[i].otherData.info = string.format("%s/%s",MyGuildManager.GetMyGuildExploreNums(),curData.rewards[i].otherData.Values)
end
end
else --日累计充值 达人
if actType == ActivityTypeDef.AccumulativeRechargeExper or actType == ActivityTypeDef.DynamicAct_recharge then
if actType == ActivityTypeDef.AccumulativeRechargeExper or actType == ActivityTypeDef.DynamicAct_recharge then
curData.rewards[i].otherData.Values = actRewardConfigs[j].Values[1][1]
else
curData.rewards[i].otherData.Values = actRewardConfigs[j].Values[2][1]

View File

@ -450,6 +450,7 @@ function this.RegisterRedCheckFunc()
RPData:AddCheckFunc(RedPointType.Expert_UpStarExper, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_EquipExper,ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_GoldExper, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.zhognzhichengcheng, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_FightExper, ActivityGiftManager.ExpterActivityIsShowRedPoint)
--RPData:AddCheckFunc(RedPointType.Expert_EnergyExper, ActivityGiftManager.ExpterActivityIsShowRedPoint)
--RPData:AddCheckFunc(RedPointType.Expert_AccumulativeRecharge, ActivityGiftManager.ExpterActivityIsShowRedPoint)