miduo_client/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua

1077 lines
45 KiB
Lua
Raw Normal View History

2021-07-16 14:49:35 +08:00
IndicationManager = {}
2020-05-09 13:31:21 +08:00
local this = IndicationManager
function this.Initialize()
Game.GlobalEvent:AddEvent(Protocal.Connect, this.RegisterMessage)
this.canPopUpBagMaxMessage=false
this.getRewardFromMailMessage=false
end
function this.RegisterMessage(network)
if network.type ~= SocketType.LOGIN then
return
end
local socket = network.socket
2021-05-27 17:34:59 +08:00
-- 无尽换期刷新地图信息
socket:RegistNetMessage(MessageTypeProto_pb.ENDLESS_MAP_CHANGE_INDICATION, this.RefreshMapData)
2020-05-09 13:31:21 +08:00
-- 监听服务器跨天状态N
socket:RegistNetMessage(MessageTypeProto_pb.FIVE_PLAYER_REFLUSH_INDICATION, this.RefreshUpdateIndication)
2020-12-28 13:56:06 +08:00
socket:RegistNetMessage(MessageTypeProto_pb.ZeroPlayerUpdateIndication, this.ZeroRefreshUpdateIndication)
2020-05-09 13:31:21 +08:00
--监听红点推送
socket:RegistNetMessage(MessageTypeProto_pb.SEND_RED_POINT_INDICATION, this.ReceiveRedPoint)
2021-05-21 17:32:52 +08:00
--福利红包推送
2021-05-28 10:36:55 +08:00
socket:RegistNetMessage(MessageTypeProto_pb.WELFARE_RED_PACKET_INFO, this.WelfareRedPacketPush)
2020-05-09 13:31:21 +08:00
socket:RegistNetMessage(MessageTypeProto_pb.UPDATE_BAG_INDICATION, this.BackUpDataBagItemIdNumber)
socket:RegistNetMessage(MessageTypeProto_pb.SEND_CHAT_INFO_INDICATION, this.ReceiveFriendChat)
socket:RegistNetMessage(MessageTypeProto_pb.MISSION_UPDATE_INDICATION, this.RefreshMissionList)
-- 监听服务器推送
socket:RegistNetMessage(MessageTypeProto_pb.ADVENTURE_BOSS_FIND_INDICATION, this.ReceiveChatMsg)
-- 监听Boss被杀
socket:RegistNetMessage(MessageTypeProto_pb.ADVENTURE_BOSS_KILL_INDICATION, this.GetBossInfo)
socket:RegistNetMessage(MessageTypeProto_pb.ALL_GIFTGOODS_INDICATION, this.RefreshGiftGoods)
-- 监听服务器好友删除,好友赠送体力推送 --type 1:申请好友 2: 添加好友
socket:RegistNetMessage(MessageTypeProto_pb.SEND_FRIEND_INFO_INDICATION, this.ReceiveFriendApplication)
-- 监听服务器好友申请,好友添加推送 --type 1:删除好友 2: 赠送体力
socket:RegistNetMessage(MessageTypeProto_pb.SEND_FRIEND_STATE_INDICATION, this.ReceiveFriendDeleteState)
-- 监听商店数据推送
socket:RegistNetMessage(MessageTypeProto_pb.STORE_UPDATE_INDICATION, this.ReceiveShopData)
--刷新活动
socket:RegistNetMessage(MessageTypeProto_pb.ACTIVITY_UPDATE_INDICATION, this.RefreshActivityList)
socket:RegistNetMessage(MessageTypeProto_pb.ACTIVITY_UPDATE_PROGRESS_INDICATION, this.ActivityUpdateProgressIndication)
-- 公会推送
socket:RegistNetMessage(MessageTypeProto_pb.FAMILY_JOIN_INDICATION, this.GuildJoinSuccess)
socket:RegistNetMessage(MessageTypeProto_pb.FAMILY_KICK_INDICATION, this.GuildKickOut)
socket:RegistNetMessage(MessageTypeProto_pb.FAMILY_POSITION_UPDATE_INDICAITON, this.GuildPositionUpdate)
socket:RegistNetMessage(MessageTypeProto_pb.FAMILY_CHANGE_BASE_INDICATION, this.GuildDataUpdate)
socket:RegistNetMessage(MessageTypeProto_pb.FAMILY_WALK_INDICATION, this.GuildWalkUpdate)
socket:RegistNetMessage(MessageTypeProto_pb.FAMILY_QUICK_SET_DEFEND_INDICATION, this.GuildFightDefendUpdate)
socket:RegistNetMessage(MessageTypeProto_pb.FAMILY_FIGHT_MATCHING_SUCCESS_INDICATION, this.GuildFightMatchingSuccess)
socket:RegistNetMessage(MessageTypeProto_pb.FAMILY_DEFEATE_INDICATION, this.GuildFightBeKilled)
socket:RegistNetMessage(MessageTypeProto_pb.FAMILY_REFUSE_JOIN_INDICATION, this.GuildBeRefused)
socket:RegistNetMessage(MessageTypeProto_pb.FamilyFeteRewardProcessIndication, this.GuildFeteRewardProcess)
2020-05-11 09:38:52 +08:00
socket:RegistNetMessage(MessageTypeProto_pb.DEATH_PATH_STATUS_CHANGE_INDICATION, this.GuildRefreshDeathPosStatus)
socket:RegistNetMessage(MessageTypeProto_pb.DEATH_PATH_DO_REWARD_INDICATION, this.GuildDoRewardIndication)
2020-05-25 19:16:23 +08:00
socket:RegistNetMessage(MessageTypeProto_pb.DEATH_PATH_FIRST_CHANGE_INDICATION, this.GuildFirstChangeIndication)
2021-05-21 17:32:52 +08:00
2020-05-09 13:31:21 +08:00
--
socket:RegistNetMessage(MessageTypeProto_pb.UPDATE_USER_EXP_INDICATION, this.UpdateUserExp)
--秘盒跨季度刷新
socket:RegistNetMessage(MessageTypeProto_pb.UPDATE_SECRET_BOX_SEASON_INDICATION, this.UpdateSecretSeasonData)
-- 服务器要让我滚出图
socket:RegistNetMessage(MessageTypeProto_pb.MAP_OUT_INDICATION, this.TimeToFuckOutMap)
-- 刷新事件点时间
socket:RegistNetMessage(MessageTypeProto_pb.ENDLESS_REFRESH_INDICAITON, this.FreshPointShowTime)
-- 支付成功推送
socket:RegistNetMessage(MessageTypeProto_pb.NOTIFY_PAY_SUCCESS_INDICATION, this.PaySuccess)
-- 渠道强制改名推送
socket:RegistNetMessage(MessageTypeProto_pb.PLAYER_BACKCINFO_INDICATION, this.PlayerBackCInfo)
---调查问卷推送
socket:RegistNetMessage(MessageTypeProto_pb.QUESTION_INDICATION, this.RefreshQuestionnaire)
-- 空刷小怪
socket:RegistNetMessage(MessageTypeProto_pb.ENDLESS_MONSTER_REFRESH_INDICATION, this.MapNewAMonster)
-- 血战奖励积分变化刷新
socket:RegistNetMessage(MessageTypeProto_pb.BLOODY_SCORE_CHANGE_INDICATION, this.BloodyScoreChanged)
-- 无尽副本编队数据变化
socket:RegistNetMessage(MessageTypeProto_pb.ENDLESS_MAP_SET_TEAM_INDICATION, this.EndLessTeamChange)
--道具直购
socket:RegistNetMessage(MessageTypeProto_pb.DIRECT_BUY_GOODS_INDICATION, this.DirectBuyGoods)
-- 任务重置刷新
socket:RegistNetMessage(MessageTypeProto_pb.TREASURE_REFRESH_INDICATION, this.RestTreasureTaskData)
-- 戒灵秘宝等级推送
socket:RegistNetMessage(MessageTypeProto_pb.TREASURE_LEVELUP_INDICATION, this.RefreshTreasureLevel)
-- 幸运转盘
socket:RegistNetMessage(MessageTypeProto_pb.LUCKWHEEL_POOL_INDICATION, this.ReceiveLuckyTurnData)
-- 战斗胜利更新关卡ID
socket:RegistNetMessage(MessageTypeProto_pb.MAIN_LEVEL_FIGHT_UPDATE_INDICATION, this.FreshFightId)
-- 累充金额推送
socket:RegistNetMessage(MessageTypeProto_pb.REFRESH_RECHARGE_INDICATION, this.RefreshAccuMoneyNum)
-- 巅峰战阶段切换
socket:RegistNetMessage(MessageTypeProto_pb.CHAMPION_PROGRESS_UPDATE_INDICATION, this.TopMatchStageUpdate)
-- 竞猜成功
socket:RegistNetMessage(MessageTypeProto_pb.CHAMPION_GUESS_SUCCESS_INDICATION, this.TopMatchGuessSuccess)
-- 特权解锁
socket:RegistNetMessage(MessageTypeProto_pb.PRIVILLEGE_ADD_INDICATION, this.OnPrivilegeUpdate)
-- 远征更新圣物信息
socket:RegistNetMessage(MessageTypeProto_pb.EXPEDITION_HOLY_BAG_INDICATION, this.RefreshExpeditionHalidom)
-- 远征更新节点和己方信息
socket:RegistNetMessage(MessageTypeProto_pb.EXPEDITION_NOINFO_INDICATION, this.RefreshExpeditionNodeAndHeros)
-- 月卡激活推送
socket:RegistNetMessage(MessageTypeProto_pb.MONTHCARD_INDICATION, this.RefreshMonthCardData)
-- 公会车迟阶段推送
socket:RegistNetMessage(MessageTypeProto_pb.CAR_DELAY_PROGRESS_INDICATION, this.RefreshGuildCarDelayProgressData)
2020-05-15 16:52:35 +08:00
-- 公会援助信息推送
socket:RegistNetMessage(MessageTypeProto_pb.GuildHelpInfoIndication, this.RefreshGuildAidInfoData)
-- 公会援助日志信息推送
socket:RegistNetMessage(MessageTypeProto_pb.GuildHelpLogIndication, this.GuildHelpLogIndication)
2020-05-25 19:16:23 +08:00
-- 猎妖之路推送
socket:RegistNetMessage(MessageTypeProto_pb.ExpeditionResetIndication, this.ExpeditionResetIndication)
2020-06-03 19:09:01 +08:00
--大闹天宫 天宫秘宝 积分 和 任务状态推送
2020-06-18 20:39:29 +08:00
socket:RegistNetMessage(MessageTypeProto_pb.EXPEDITION_TREASURE_STATE_INDICATION, this.TreasureStateIndicaion)
2020-08-11 09:48:21 +08:00
socket:RegistNetMessage(MessageTypeProto_pb.SITUATION_INFO_INDICATION, this.SiTuaTionInfoIndication)
2020-08-20 20:05:38 +08:00
--公户副本推送
socket:RegistNetMessage(MessageTypeProto_pb.GUILD_CHALLENGE_INDICATION, this.GuildTranscriptIndication)
2020-08-21 15:52:49 +08:00
--公户副本推送
socket:RegistNetMessage(MessageTypeProto_pb.GUILD_CHALLENGE_BUY_BUFF_INDICATION, this.GuildChallengeBuyBuffIndication)
2020-11-03 17:27:32 +08:00
socket:RegistNetMessage(MessageTypeProto_pb.HERO_SKIN_USE_INDICATION, this.HeroSkinUseIndication)
2020-12-21 18:19:38 +08:00
-- 鸿蒙阵数据推送
socket:RegistNetMessage(MessageTypeProto_pb.HONGMENG_INFO_INDICATION,this.HongMengIndication)
2021-01-04 09:57:42 +08:00
socket:RegistNetMessage(MessageTypeProto_pb.HONGMENG_STELE_NEW_HAND_INDICATION,this.OpenHongMengTowerGuideIndication)
--跨服天梯信息推送
2021-07-14 20:27:04 +08:00
socket:RegistNetMessage(MessageTypeProto_pb.GetWorldArenaInfoIndication, this.GetWorldArenaInfoIndication)
socket:RegistNetMessage(MessageTypeProto_pb.WorldLevelIndication, this.WorldLevelIndication)
2021-02-05 17:57:59 +08:00
socket:RegistNetMessage(MessageTypeProto_pb.SendFourChallengeInfoIndication, this.SendFourChallengeInfoIndication)
-- 充值成功订单推送
socket:RegistNetMessage(MessageTypeProto_pb.RECHARGE_SUCCESS_INDICATION, this.RechargeSuccessOrder)
2021-04-26 13:44:31 +08:00
-- 礼包拍脸推送
socket:RegistNetMessage(MessageTypeProto_pb.PUSH_WELFARE_RESPONSE, this.BackPatFaceData)
2021-05-13 09:56:11 +08:00
-- 山河社稷图推送
socket:RegistNetMessage(MessageTypeProto_pb.HARD_STAGE_INFO_RESPONSE, this.HardStageResponse)
2021-05-12 18:47:47 +08:00
-- 神印信息推送
socket:RegistNetMessage(MessageTypeProto_pb.PurpleMansionSealIndication, this.PracticeImprintData)
2021-05-20 14:18:48 +08:00
-- Vip等级奖励信息推送
socket:RegistNetMessage(MessageTypeProto_pb.VIP_LEVEL_STATE_RESPONSE, this.RefreshLevleRewardDatas)
2021-06-29 15:25:05 +08:00
-- --心愿抽卡信息推送
socket:RegistNetMessage(MessageTypeProto_pb.wishDrawCardIndication, this.WishDrawCardInfoIndication)
2021-07-22 16:05:58 +08:00
-- --心愿抽卡信息推送
socket:RegistNetMessage(MessageTypeProto_pb.ENDLESS_TREASURE_REFRESH_INDICATION, this.EenlessTreasureRefreshIndication)
--称号激活推送
socket:RegistNetMessage(MessageTypeProto_pb.USER_TITLE_ADD_INDICATION, this.UserTitleAddIndicaiton)
2021-07-30 15:14:52 +08:00
--是否跨服推送
socket:RegistNetMessage(MessageTypeProto_pb.IsCrossIndication, this.IsCrossIndication)
2021-09-18 15:04:32 +08:00
--七界试炼推送
socket:RegistNetMessage(MessageTypeProto_pb.SevenWorldInfoIndication, this.SevenWorldInfoIndication)
2021-10-14 15:05:36 +08:00
socket:RegistNetMessage(MessageTypeProto_pb.EQUIP_BOOK_INDICATION, this.EquipBookInfoIndication)
-- 周卡推送
socket:RegistNetMessage(MessageTypeProto_pb.WeekCardIndicationInfoResponse, this.WeekCardIndication)
2021-11-18 18:43:22 +08:00
-- 灵脉被抢夺推送
socket:RegistNetMessage(MessageTypeProto_pb.CrossLingmaiIndicationResponse, this.LingMaiIndication)
2021-10-14 15:05:36 +08:00
end
function this.EquipBookInfoIndication(buff)
local data = buff:DataByte()
local msg = HeroInfoProto_pb.EquipBookIndication()
msg:ParseFromString(data)
EquipManager.InitHaveEquipDatas(msg.changeEquipList)
2021-07-22 16:05:58 +08:00
end
2021-05-21 15:05:09 +08:00
--后端推送激活的称号
function this.UserTitleAddIndicaiton(buff)
local data = buff:DataByte()
local msg = PlayerInfoProto_pb.UserTitleAddIndication()
msg:ParseFromString(data)
LogRed(" id=="..msg.decorationId.." time=="..msg.time)
PlayerManager.SetPlayerTitleTime(msg.decorationId,msg.time)
end
2021-07-22 16:05:58 +08:00
--后端推送福利红包数据
function this.EenlessTreasureRefreshIndication(buffer)
local data = buffer:DataByte()
local msg = MapInfoProto_pb.EndlessTreasureInfoResponse()
msg:ParseFromString(data)
local num = BagManager.GetItemCountById(EndLessMapManager.scoreValueId)
BagManager.HeroLvUpUpdateItemsNum(EndLessMapManager.scoreValueId, num)
2021-07-22 16:05:58 +08:00
EndLessMapManager.InitTreasureData(msg)
Game.GlobalEvent:DispatchEvent(GameEvent.EndLess.QinglongSerectRefresh)
2020-08-11 09:48:21 +08:00
end
2021-05-21 14:47:04 +08:00
--后端推送福利红包数据
function this.WelfareRedPacketPush(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.WelfareRedPacketPush()
msg:ParseFromString(data)
if msg.redpacket then
MyGuildManager.SetMyGuidRedPackage(msg.redpacket)
--CheckRedPointStatus(RedPointType.Guid_SendPackage)
--CheckRedPointStatus(RedPointType.Guid_GetPackage)
MyGuildManager.ReuqsetRedPackage()
2021-05-21 14:47:04 +08:00
end
-- BagManager.BagIndicationRefresh(msg)
end
2021-01-04 09:57:42 +08:00
function this.OpenHongMengTowerGuideIndication(buffer)
local data = buffer:DataByte()
local msg = HeroInfoProto_pb.HongmengSteleNewHandIndication()
msg:ParseFromString(data)
GuideManager.HongMengGuideFun(msg.state)
2020-12-21 18:19:38 +08:00
end
function this.HongMengIndication(buffer)
local data = buffer:DataByte()
2020-12-24 14:43:32 +08:00
local msg = HeroInfoProto_pb.HongmengInfoIndication()
2020-12-21 18:19:38 +08:00
msg:ParseFromString(data)
HarmonyManager.GetHongMengServerData(msg)
-- local data2 = ConfigManager.GetConfigData(ConfigName.SpecialConfig,101).Value
-- LogError("data2:"..tostring(data2))
-- local d = string.split(data2,"#")
-- LogError("msg.hongmengTabletMax:"..tostring(msg.hongmengTabletMax))
-- if msg.hongmengTabletMax >= tonumber(d[2]) then
-- HarmonyManager:SetHongMengTowerUpLimit(msg.hongmengTabletMax)
-- end
-- LogError("服务器发来的hongmengGuards长度"..tostring(#msg.hongmengGuards))
-- if msg.hongmengGuards then
-- -- for i = 1, #msg.hongmengGuards do
-- -- if msg.hongmengGuards[i].heroId == "" then
-- -- Log("鸿蒙守卫:"..i.."为nil")
-- -- else
-- -- Log("鸿蒙守卫:"..i..HeroManager.GetSingleHeroData(msg.hongmengGuards[i].heroId).name)
-- -- end
-- -- end
-- HarmonyManager.UpdateHongMengDataGuards(msg.hongmengGuards)
-- end
-- LogError("服务器发来的hongmengAdditions长度"..tostring(#msg.hongmengAdditions))
-- if msg.hongmengAdditions then
-- for i = 1, #msg.hongmengAdditions do
-- -- body
-- end
-- HarmonyManager.UpdateHongMengDataAdditions(msg.hongmengAdditions)
-- end
-- if msg.hongmengResonacnes then
-- HarmonyManager.UpdateHongMengDataHeroInfos(msg.hongmengResonacnes)
-- end
-- if GuideManager.IsFirstOpenHarmonyBei then
-- GuideManager.IsFirstOpenHarmonyBei = false
-- for i = 1, #HarmonyManager.hongmengGuards do
-- if HarmonyManager.hongmengGuards[i].heroId ~= "" then
-- local _heroData = HeroManager.GetSingleHeroData(HarmonyManager.hongmengGuards[i].heroId)
-- HeroManager.UpdateSingleHeroDatas(_heroData.dynamicId, 1, _heroData.star, 0, _heroData.upStarId)
-- end
-- end
-- end
-- --鸿蒙数据有变化时更新英雄战力数据
-- for i = 1, #msg.hongmengGuards do
-- if msg.hongmengGuards[i].heroId~="" then
-- HeroManager.UpdateSingleHeroWarPower(msg.hongmengGuards[i].heroId)
-- end
-- end
-- for i = 1, #msg.hongmengResonacnes do
-- if msg.hongmengResonacnes[i].heroId~="" then
-- HeroManager.UpdateSingleHeroWarPower(msg.hongmengResonacnes[i].heroId)
-- end
-- end
2020-08-11 09:48:21 +08:00
end
2021-02-05 17:57:59 +08:00
function this.SendFourChallengeInfoIndication(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.FourChallengeGetInfoResponse()
msg:ParseFromString(data)
LogGreen("刷新四灵")
MonsterCampManager.InitFourMonsterData(msg)
MonsterCampManager.SetFriendHelpHero({},nil)
MonsterCampManager.SetMyHelpHeroData(nil)
end
2020-11-03 17:27:32 +08:00
function this.HeroSkinUseIndication(buffer)
local data = buffer:DataByte()
local msg = HeroInfoProto_pb.GetSkinIndication()
msg:ParseFromString(data)
--LogGreen("获得了新的皮肤")
2020-11-03 17:27:32 +08:00
if msg.skinInfo then
LogBlue("msg.skinInfo.skinId:"..msg.skinInfo.skinId.." msg.skinInfo[i].overTime:"..msg.skinInfo.overTime)
HeroSkinManager.InitialSkin(msg,1)
else
LogBlue("没有皮肤")
end
end
2020-08-12 19:17:05 +08:00
function this.SiTuaTionInfoIndication(buffer)
2020-08-11 09:48:21 +08:00
local data = buffer:DataByte()
2020-08-12 19:58:09 +08:00
local msg = MapInfoProto_pb.GetAllSituationInfoResponse()
2020-08-11 09:48:21 +08:00
msg:ParseFromString(data)
--LogGreen("5点到了开始刷新了,发了消息GameEvent.FunctionCtrl.OnXuanYuanFunctionClose")
2020-08-11 09:48:21 +08:00
XuanYuanMirrorManager.UpdateMirrorState(msg)
2020-08-12 19:17:05 +08:00
Game.GlobalEvent:DispatchEvent(GameEvent.FunctionCtrl.OnXuanYuanFunctionChange)
2020-05-09 13:31:21 +08:00
end
function this.RefreshActivityList(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.ActivityUpateIndication()
msg:ParseFromString(data)
ActivityGiftManager.RefreshActivityData(msg)
2020-08-11 09:48:21 +08:00
Game.GlobalEvent:DispatchEvent(GameEvent.FunctionCtrl.OnFunctionOpen)
2020-05-09 13:31:21 +08:00
end
--服务器五点刷新推送相关任务的状态数据
function this.RefreshUpdateIndication(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.FivePlayerUpdateIndication()
msg:ParseFromString(data)
ActivityGiftManager.FiveAMRefreshActivityProgress(msg)
TaskManager.RefreshTypeTaskInfo(msg.userMissionInfo)
VipManager.FiveAMRefreshLocalData(msg.hadTakeDailyBox)
PrivilegeManager.FiveAMRefreshLocalData(msg.privilege)
MapTrialManager.RefreshAttachVipData()
OperatingManager.SetSignInData(msg.SignInInfo)
CheckRedPointStatus(RedPointType.FirstRecharge)
PatFaceManager.SetisFirstLogVal(0)
ShopManager.isOpenNoviceGift=false
ActivityGiftManager.isFirstForSupremeHero=false
BindPhoneNumberManager.InitBindInfo(msg.playerBindPhone)
LuckyTurnTableManager.ReceiveServerDataForFive(msg.posInfos,msg.posInfosAdvance)
MonthCardManager.BackSetMonthCardGetStateData(msg.MonthDailyTake)
2020-05-09 13:31:21 +08:00
MyGuildManager.SetMyFeteInfo_FiveRefresh(msg)
2020-05-15 16:52:35 +08:00
MyGuildManager.SetGuildHelpInfo_FiveRefresh(msg)
2020-05-09 13:31:21 +08:00
-- CarbonManager.dailyChallengeInfo=msg.dailyChallengeInfo
-- LogBlue("Indication 推送数据"..#msg.dailyChallengeInfo)
Timer.New(function()
AdventureManager.RefreshAttachVipData()
Game.GlobalEvent:DispatchEvent(GameEvent.Adventure.OnRefreshNextDayData)
end, 2, 1, true):Start()
--先刷新完数据,再派发事件做界面刷新
Game.GlobalEvent:DispatchEvent(GameEvent.FiveAMRefresh.ServerNotifyRefresh)
--刷新极速探险免费次数
Game.GlobalEvent:DispatchEvent(GameEvent.Adventure.OnFastBattleChanged)
--五点刷新拍脸
Game.GlobalEvent:DispatchEvent(GameEvent.Activity.OnPatFaceRedRefresh)
2021-09-29 18:23:13 +08:00
Game.GlobalEvent:DispatchEvent(GameEvent.LikeAbility.RefreshRemainTimes)
2021-09-26 09:54:58 +08:00
CheckRedPointStatus(RedPointType.LikeabilityRed)
2020-05-09 13:31:21 +08:00
CheckRedPointStatus(RedPointType.SecretTer_HaveFreeTime)
CheckRedPointStatus(RedPointType.DailyGift)
2020-06-08 13:57:30 +08:00
CheckRedPointStatus(RedPointType.GrowthPackage)
CheckRedPointStatus(RedPointType.Guild_Fete)
CheckRedPointStatus(RedPointType.Guild_AidBox)
CheckRedPointStatus(RedPointType.Guild_AidGuild)
CheckRedPointStatus(RedPointType.Guild_AidMy)
CheckRedPointStatus(RedPointType.TaiChuMiJuan)
2020-07-16 20:24:28 +08:00
LuckyTurnTableManager.SetTimes(msg.hadLuckTime,msg.hadAdvanceLuckyTime)
CheckRedPointStatus(RedPointType.Arena_Free)
2021-01-06 17:30:48 +08:00
--抽奖勾选重置
PlayerManager.ResetLocalData(1)--初始化所有本地的每日一刷--1是五点推送、2是登陆检测
GuildTranscriptManager.SetCanSweep1()
2021-07-19 17:30:17 +08:00
DeathPosManager.InitData()--十绝阵跨天状态刷新
2020-05-09 13:31:21 +08:00
end
2020-12-28 13:56:06 +08:00
function this.ZeroRefreshUpdateIndication()
end
2020-05-09 13:31:21 +08:00
--服务器推送红点信息
function this.ReceiveRedPoint(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.RedPointInfo()
msg:ParseFromString(data)
-- 显示红点
RedpotManager.SetServerRedPointStatus(msg.type, RedPointStatus.Show)
end
--后端更新背包数据
function this.BackUpDataBagItemIdNumber(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.UpdateBagIndication()
msg:ParseFromString(data)
2020-06-03 19:09:01 +08:00
BagManager.BagIndicationRefresh(msg)
2020-05-09 13:31:21 +08:00
end
-- 好友数据单独处理
function this.ReceiveFriendChat(buffer)
local data = buffer:DataByte()
local msg = ChatProto_pb.SendChatInfoIndication()
msg:ParseFromString(data)
2021-05-17 17:28:37 +08:00
for i = 1, #msg.chatInfo do
msg.chatInfo[i].senderName = PracticeManager.SetNameColor(msg.chatInfo[i].senderName,msg.chatInfo[i].practiceLevel)
end
2020-05-09 13:31:21 +08:00
if msg.type == 1 then
FriendChatManager.ReceiveFriendChat(msg)
elseif msg.type == 2 then
2021-03-10 17:31:40 +08:00
LogGreen("收到了跑马灯消息")
2020-05-09 13:31:21 +08:00
ChatManager.ReceiveFamilyChat(msg)
end
end
--服务器推送相关任务的状态数据
function this.RefreshMissionList(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.MissionUpdateListIndication()
msg:ParseFromString(data)
2021-01-05 20:44:14 +08:00
--LogBlue("收到了服务器的刷新数据")
2020-05-09 13:31:21 +08:00
TaskManager.RefreshTypeTaskInfo(msg.userMissionInfo)
2020-08-19 10:05:01 +08:00
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.TaskRefresh)
2020-05-09 13:31:21 +08:00
end
-- 接收服务器数据
function this.ReceiveChatMsg(buffer)
--Log("收到新的外敌数据")
local data = buffer:DataByte()
local msg = FightInfoProto_pb.AdventureBossFindIndication()
msg:ParseFromString(data)
--TODO: 服务器主动推送的数据与原数据不同,需特殊处理
-- 只保留三十条数据
table.insert(AdventureManager.adventureChatList, msg.adventureBossInfo)
if #AdventureManager.adventureChatList > 30 then
table.remove(AdventureManager.adventureChatList, 1)
end
-- 是否需要刷新显示标志位
AdventureManager.IsChatListNew = true
-- 聊天数据刷新
Game.GlobalEvent:DispatchEvent(GameEvent.Adventure.OnChatListChanged)
-- 判断新增外敌是否在外敌列表中,不在则保存
local data = AdventureManager.GetEnemyDataByBossId(msg.adventureBossInfo.bossId)
if not data then
table.insert(AdventureManager.adventrueEnemyList, msg.adventureBossInfo)
AdventureManager.SortEnemyList()
-- 数据刷新
Game.GlobalEvent:DispatchEvent(GameEvent.Adventure.OnEnemyListChanged)
end
end
--拉去Boss外敌信息
function this.GetBossInfo(buffer)
local data = buffer:DataByte()
local msg = FightInfoProto_pb.AdventureBossKillIndication()
msg:ParseFromString(data)
AdventureManager.GetAdventureBossFlushRequest(msg)
local removeIndex = nil
for i, v in ipairs(AdventureManager.adventrueEnemyList) do
if v.bossId == msg.bossId then
removeIndex = i
end
end
if removeIndex then
table.remove(AdventureManager.adventrueEnemyList, removeIndex)
AdventureManager.SortEnemyList()
-- 是否需要刷新显示标志位
AdventureManager.IsChatListNew = true
-- 聊天数据刷新
Game.GlobalEvent:DispatchEvent(GameEvent.Adventure.OnChatListChanged)
Game.GlobalEvent:DispatchEvent(GameEvent.Adventure.OnEnemyListChanged)
end
end
function this.RefreshGiftGoods(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.AllGiftGoodsIndication()
msg:ParseFromString(data)
OperatingManager.SetBasicValues(msg.GiftGoodsInfo)
2020-12-26 11:47:16 +08:00
Game.GlobalEvent:DispatchEvent(GameEvent.GrowGift.RechargeGift)
2021-05-28 10:33:53 +08:00
-- LogYellow("发送了GameEvent.GrowGift.RechargeGift")
2020-05-09 13:31:21 +08:00
end
-- 接收服务器好友申请,添加
function this.ReceiveFriendApplication(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.sendFriendInfoIndication()
msg:ParseFromString(data)
local friendApplicationData = msg.Friends
if (msg.type == 1) then
GoodFriendManager.OnFriendDataRefresh(3, msg)
--GoodFriendManager.friendApplicationData[friendApplicationData.id] = friendApplicationData
Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendApplication, GoodFriendManager.friendApplicationData)
end
if (msg.type == 2) then
GoodFriendManager.OnFriendDataRefresh(1, msg)
-- GoodFriendManager.friendAllData[friendApplicationData.id] = friendApplicationData
GoodFriendManager.friendApplicationData[friendApplicationData.id] = nil
RedPointManager.PlayerPrefsSetStr(PlayerManager.uid .. "redPointApplication", 1)
Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendList, GoodFriendManager.friendAllData)
Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendApplication, GoodFriendManager.friendApplicationData)
end
CheckRedPointStatus(RedPointType.Friend_Application)
2020-09-03 10:50:25 +08:00
CheckRedPointStatus(RedPointType.Friend_GetAllReward)
2020-05-09 13:31:21 +08:00
end
-- 接收服务器好友删除,赠送体力推送
function this.ReceiveFriendDeleteState(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.SendFriendStateIndication()
msg:ParseFromString(data)
if (msg.type == 1) then
GoodFriendManager.friendAllData[msg.friendId] = nil
--this.friendSearchData[msg.friendId].isHaveApplication=1
Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendDelete, msg.friendId)
end
if (msg.type == 2) then
GoodFriendManager.friendAllData[msg.friendId].haveReward = 1
end
2020-09-03 10:50:25 +08:00
CheckRedPointStatus(RedPointType.Friend_GetAllReward)
2020-05-09 13:31:21 +08:00
Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendList, GoodFriendManager.friendAllData)
end
-- 接收商店数据
function this.ReceiveShopData(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.storeUpdateIndication()
msg:ParseFromString(data)
ShopManager.UpdateShopData(msg)
end
-- 加入公会成功推送
function this.GuildJoinSuccess(buffer)
local data = buffer:DataByte()
local msg = Family_pb.FamilyJoinIndicaion()
msg:ParseFromString(data)
local isSelf = msg.familyUserInfo.roleUid == PlayerManager.uid
Log("服务器推送:有人成功加入公会,是不是自己:" .. tostring(isSelf))
2020-05-09 13:31:21 +08:00
if isSelf then
MyGuildManager.SetMyGuildInfo(msg)
MyGuildManager.SetMyMemInfo(msg)
MyGuildManager.SetMyFeteInfo(msg)
-- 初始化一遍数据
MyGuildManager.InitAllData(function()
-- 发送数据更新事件
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.JoinGuildSuccess)
-- 显示tip
GuildManager.AddGuildTip(GUILD_TIP_TYPE.JOIN, msg.familyBaseInfo.name)
end)
else
-- 不是自己暂不做处理
--MyGuildManager.RequestMyGuildMembers()
end
end
-- 被踢出公会推送
function this.GuildKickOut(buffer)
local data = buffer:DataByte()
local msg = Family_pb.KickOutIndication()
msg:ParseFromString(data)
Log("服务器推送:被踢出公会, uid" .. msg.uid)
2020-05-09 13:31:21 +08:00
MyGuildManager.BeKickOut(msg)
end
-- 被踢出公会推送
function this.GuildBeRefused(buffer)
Log("服务器推送:公会申请被拒绝")
2020-05-09 13:31:21 +08:00
local data = buffer:DataByte()
local msg = Family_pb.RefuseJoinFamily()
msg:ParseFromString(data)
GuildManager.AddGuildTip(GUILD_TIP_TYPE.REFUSE, msg.name)
end
-- 职位变更推送
function this.GuildPositionUpdate(buffer)
local data = buffer:DataByte()
local msg = Family_pb.FamilyPositionUpdateIndication()
msg:ParseFromString(data)
Log("服务器推送:公会职位变化, uid = "..msg.uid..", pos = "..msg.position)
2020-05-09 13:31:21 +08:00
MyGuildManager.UpdateGuildPosition(msg)
end
-- 公会信息推送
function this.GuildDataUpdate(buffer)
Log("服务器推送:公会信息改变")
2020-05-09 13:31:21 +08:00
local data = buffer:DataByte()
local msg = Family_pb.FamilyChangeIndication()
msg:ParseFromString(data)
MyGuildManager.SetMyGuildInfo(msg)
end
-- 公会成员行走
function this.GuildWalkUpdate(buffer)
-- 不在公会主界面不接收,打开公会主界面时会刷新
if not UIManager.IsOpen(UIName.GuildMainCityPanel) then
return
end
Log("服务器推送:公会行走信息改变")
2020-05-09 13:31:21 +08:00
local data = buffer:DataByte()
local msg = Family_pb.FamilyWalkIndicaiton()
msg:ParseFromString(data)
MyGuildManager.UpdateWalkData(msg)
end
-- 公会战防守阵容改变推送
function this.GuildFightDefendUpdate(buffer)
-- 不在公会主界面不接收,打开界面时会刷新
if not UIManager.IsOpen(UIName.GuildMainCityPanel) then
return
end
Log("服务器推送:公会战防守阵容信息改变")
2020-05-09 13:31:21 +08:00
local data = buffer:DataByte()
local msg = Family_pb.FamilyDefendInfo()
msg:ParseFromString(data)
GuildFightManager.UpdateDefendStageData(msg)
end
-- 公会战匹配成功
function this.GuildFightMatchingSuccess(buffer)
-- 不在公会主界面不接收,打开界面时会刷新
if not UIManager.IsOpen(UIName.GuildMainCityPanel) then
return
end
Log("服务器推送:公会战匹配成功")
2020-05-09 13:31:21 +08:00
local data = buffer:DataByte()
local msg = Family_pb.EnemyFamily()
msg:ParseFromString(data)
GuildFightManager.SetEnemyBaseData(msg)
end
-- 公会战匹配成功
function this.GuildFightBeKilled(buffer)
Log("服务器推送:公会战有人被打败")
2020-05-09 13:31:21 +08:00
-- 不在公会主界面不接收,打开界面时会刷新
local data = buffer:DataByte()
local msg = Family_pb.DefeatResponse()
msg:ParseFromString(data)
Log("服务器推送:公会战有人被打败, uid = " .. msg.uid)
2020-05-09 13:31:21 +08:00
GuildFightManager.KillSomeBody(msg)
end
-- 公会祭祀进度
function this.GuildFeteRewardProcess(buffer)
local data = buffer:DataByte()
local msg = Family_pb.FamilyFeteRewardProcessIndication()
msg:ParseFromString(data)
Log("服务器推送:公会祭祀进度更新,score= "..msg.score)
2020-05-09 13:31:21 +08:00
MyGuildManager.SetMyFeteInfo_ByScore(msg)
2020-05-11 09:38:52 +08:00
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.OnRefreshFeteProcess)
end
--公会十绝阵阶段刷新
function this.GuildRefreshDeathPosStatus(buffer)
local data = buffer:DataByte()
local msg = Family_pb.DeathPathStatusChangeIndication()
msg:ParseFromString(data)
Log("服务器推送:公会十绝阵阶段刷新,status= "..msg.status)
2020-05-11 09:38:52 +08:00
DeathPosManager.status=msg.status
2020-07-22 17:28:34 +08:00
if msg.status == 1 then
DeathPosManager.battleTime=DeathPosManager.maxBattleTime
else
DeathPosManager.battleTime = 0
end
2020-05-11 09:38:52 +08:00
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshDeathPosStatus)
end
--公会十绝阵 其他玩家领取奖励推送
function this.GuildDoRewardIndication(buffer)
local data = buffer:DataByte()
local msg = Family_pb.DoRewardIndication()
msg:ParseFromString(data)
-- --LogGreen("indicationmanager "..msg.info.uid.." itemId"..msg.info.itemId.." itemCount "..msg.info.itemCount.." position "..msg.info.position.." username "..msg.info.username)
2020-05-15 16:52:35 +08:00
DeathPosManager.SetDoRewardIndication(msg.info)
2020-05-11 09:38:52 +08:00
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshDeathPosReward)
2020-05-09 13:31:21 +08:00
end
2020-05-25 19:16:23 +08:00
--十绝阵第一名修改推送
function this.GuildFirstChangeIndication(buffer)
local data = buffer:DataByte()
local msg = Family_pb.DeathPathFirstChangeIndication()
msg:ParseFromString(data)
-- LogBlue("indicationmanager 公会Id "..msg.changeInfo.gid.." 公会名 "..msg.changeInfo.guildName.." 位置 "..msg.changeInfo.pathId)
DeathPosManager.SetGuildInfoIndication(msg.changeInfo)
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshFirstChangeData)
end
2020-05-09 13:31:21 +08:00
function this.ActivityUpdateProgressIndication(buffer)
local data = buffer:DataByte()
local message = PlayerInfoProto_pb.ActivityUpateProgressIndication()
message:ParseFromString(data)
ActivityGiftManager.RefreshActivityProgressData(message)
end
function this.UpdateUserExp(buffer)
local data = buffer:DataByte()
local message = PlayerInfoProto_pb.UpdateUserExpIndicaiton()
message:ParseFromString(data)
PlayerManager.BcakUpdateUserExp(message)
if message.drop and #message.drop > 0 then
BagManager.GetItemListFromTempBag(message.drop)
end
2020-05-09 13:31:21 +08:00
end
function this.UpdateSecretSeasonData(buffer)
local data = buffer:DataByte()
local message = PlayerInfoProto_pb.UpdateSecretBoxSeasonIndication()
message:ParseFromString(data)
SecretBoxManager.RefreshSeasonTime(message)
end
-- 滚出图
function this.TimeToFuckOutMap(buffer)
if UIManager.IsOpen(UIName.BattleFailPopup) then
UIManager.ClosePanel(UIName.BattleFailPopup)
end
if UIManager.IsOpen(UIName.BattleWinPopup) then
UIManager.ClosePanel(UIName.BattleWinPopup)
end
if UIManager.IsOpen(UIName.BattlePanel) then
BattleLogic.IsEnd = true
UIManager.ClosePanel(UIName.BattlePanel)
end
if UIManager.IsOpen(UIName.FormationPanel) then
UIManager.ClosePanel(UIName.FormationPanel)
end
Game.GlobalEvent:DispatchEvent(GameEvent.Map.OnForceGetOutMap)
end
-- 刷新地图事件点的显示时间
function this.FreshPointShowTime(buffer)
local data = buffer:DataByte()
local msg = MapInfoProto_pb.EndlessTimeIndication()
msg:ParseFromString(data)
EndLessMapManager.InitRefreshPoint(msg.infos)
EndLessMapManager.isAddPoint = true
MapManager.PanelCloseCallBack(UIName.MapOptionPanel, function()
Game.GlobalEvent:DispatchEvent(GameEvent.Map.OnAddCountTimePoint)
end)
end
-- 强制改名
function this.PlayerBackCInfo(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.PlayerBackCInfoIndication()
msg:ParseFromString(data)
Log("服务器推送:强制改名为:" .. msg.nickName)
2020-05-09 13:31:21 +08:00
NameManager.SetRoleName(msg.nickName)
PlayerManager.nickName = msg.nickName
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
end
--支付成功
function this.PaySuccess(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.NotifyPaySuccessfulIndicaiton()
msg:ParseFromString(data)
Log("支付成功!道具名称:" .. msg.goodsId)
2020-05-09 13:31:21 +08:00
--if LoginManager.pt_pId == 2 then --TODO:九游渠道不允许客户端接受回调处理,通过监听服务器推送处理
2021-01-26 17:08:39 +08:00
local tip = GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, msg.goodsId).Tip)
2020-05-09 13:31:21 +08:00
PopupTipPanel.ShowTip(tip)
--FirstRechargeManager.RefreshAccumRechargeValue(msg.goodsId)
-- 延时0.5秒刷新。避免sdk支付时商店次数未刷新界面刷新的问题
Timer.New(function()
Game.GlobalEvent:DispatchEvent(GameEvent.MoneyPay.OnPayResultSuccess, msg.goodsId)
end, 0.5):Start()
2020-05-09 13:31:21 +08:00
--end
end
--调查问卷
function this.RefreshQuestionnaire(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.QuestionIndication()
msg:ParseFromString(data)
if msg.state == 1 then
QuestionnaireManager.SetQuestionState(0)
QuestionnaireManager.RefreshQuestionData()
else
QuestionnaireManager.ResetArgs()
QuestionnaireManager.SetQuestionState(-1)
end
Game.GlobalEvent:DispatchEvent(GameEvent.Questionnaire.OnQuestionnaireChange, msg.state)
end
-- 空地生成小怪
function this.MapNewAMonster(buffer)
local data = buffer:DataByte()
local msg = MapInfoProto_pb.RefreshMonsterResponse()
msg:ParseFromString(data)
for i = 1, #msg.cell do
local pos = msg.cell[i].cellId
local mapPointId = msg.cell[i].pointId
2021-05-27 17:34:59 +08:00
local config = ConfigManager.GetConfigData(ConfigName.MapPointConfig, mapPointId)
if config.Style == 5 and config.icon == 10 and CarbonManager.carbonType == CARBON_TYPE.ENDLESS then
PopupTipPanel.ShowTip("遗迹中央传来一股令人不安的气息~")
end
2020-05-09 13:31:21 +08:00
MapManager.pointAtkPower[msg.cell[i].cellId] = msg.cell[i].monsterForce
Log("无尽副本服务器推送数据,在空地上生成小怪!")
2020-05-09 13:31:21 +08:00
MapManager.PanelCloseCallBack(UIName.BattleEndPanel, function()
CallBackOnPanelOpen(UIName.MapPanel, function ()
Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointAdd, pos, mapPointId)
end)
--local u, v = Map_Pos2UV(pos)
--Log(string.format("生成一只小怪,位置是(%s, %s)", u, v))
end)
end
end
-- 空地生成小怪
function this.BloodyScoreChanged(buffer)
local data = buffer:DataByte()
local msg = RoomProto_pb.BloodyScoreChangeIndication()
msg:ParseFromString(data)
MatchDataManager.SetRewardScore(msg.myscore)
end
-- 无尽副本换编队刷新最大血量值
function this.EndLessTeamChange(buffer)
local data = buffer:DataByte()
local msg = MapInfoProto_pb.EndlessSetTeamIndication()
msg:ParseFromString(data)
EndLessMapManager.UpDateTeamMaxHp(msg.info)
end
2021-05-26 11:52:32 +08:00
2020-05-09 13:31:21 +08:00
function this.DirectBuyGoods(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.DirectBuyIndication()
msg:ParseFromString(data)
Log("异妖直购 购买成功 " .. msg.goodsId)
2020-05-09 13:31:21 +08:00
PatFaceManager.ShowBuyLaterDrop(msg)
end
function this.RefreshMapData(buffer)
local data = buffer:DataByte()
local msg = MapInfoProto_pb.EndlessMapChange()
msg:ParseFromString(data)
Log("推送的世界ID " .. msg.mapId)
2021-05-27 18:08:26 +08:00
EndLessMapManager.openMapId = msg.mapId
NetManager.RefreshEnergyRequest({1},function()
end)
2020-05-09 13:31:21 +08:00
end
function this.RestTreasureTaskData(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.TreasureRefreshIndication()
msg:ParseFromString(data)
TaskManager.ResetTreasureTaskInfo(msg.tasks)
end
function this.RefreshTreasureLevel(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.TreasureLevelUpIndication()
msg:ParseFromString(data)
--LogGreen("青龙秘宝等级更新了:"..msg.level)
2020-08-19 10:05:01 +08:00
QinglongSerectTreasureManager.SetLevel(msg.level)
2020-09-30 11:00:12 +08:00
QinglongSerectTreasureManager.SetTreasureBuyStatus(msg.hadBuy)
2020-08-22 20:22:30 +08:00
QinglongSerectTreasureManager.UpdateTreasureState2()
2020-05-09 13:31:21 +08:00
end
--幸运转盘
function this.ReceiveLuckyTurnData(buffer)
local data=buffer:DataByte()
local msg=PlayerInfoProto_pb.LuckWheelIndication()
msg:ParseFromString(data)
--Log("==YSP== 服务器推送 幸运转盘数据 "..tostring(msg.posInfos))
LuckyTurnTableManager.ReceiveServerData(msg.posInfos,msg.posInfosAdvance)
end
-- 更新关卡ID
function this.FreshFightId(buffer)
local data=buffer:DataByte()
local msg=FightInfoProto_pb.MainLevelFightUpdateIndication()
msg:ParseFromString(data)
FightPointPassManager.RefreshFightId(msg)
end
-- 后端推送累充金额
function this.RefreshAccuMoneyNum(buffer)
2021-11-08 15:59:56 +08:00
-- Log("推送充值金额")
2020-05-09 13:31:21 +08:00
local data=buffer:DataByte()
local msg=PlayerInfoProto_pb.RefreshRechargeIndication()
msg:ParseFromString(data)
VipManager.RefreshChargeMoney(msg.amount, false)
MonthCardManager.RefreshMonthCardChargeMoney(msg)
2020-05-09 13:31:21 +08:00
end
-- 巅峰战阶段更新
function this.TopMatchStageUpdate(buffer)
2021-11-08 15:59:56 +08:00
-- Log("巅峰战阶段切换")
2020-05-09 13:31:21 +08:00
local data = buffer:DataByte()
local msg = ArenaInfoProto_pb.ChampionProgressUpdateIndication()
msg:ParseFromString(data)
ArenaTopMatchManager.UpdateTopMatchStage(msg)
end
-- 巅峰战竞猜成功
function this.TopMatchGuessSuccess(buffer)
2021-11-08 15:59:56 +08:00
-- Log("巅峰战竞猜奖励发放")
2020-05-09 13:31:21 +08:00
local data = buffer:DataByte()
local msg = ArenaInfoProto_pb.ChampionGuessSuccessIndication()
msg:ParseFromString(data)
2020-07-31 15:40:43 +08:00
-- ArenaTopMatchManager.OnGuessSuccess(msg)
2020-05-09 13:31:21 +08:00
end
-- 巅峰战竞猜成功
function this.OnPrivilegeUpdate(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.PrivilegeIndication()
msg:ParseFromString(data)
2021-11-08 15:59:56 +08:00
-- Log("特权解锁")
2020-05-09 13:31:21 +08:00
PrivilegeManager.OnPrivilegeUpdate(msg.infos)
end
function this.RefreshExpeditionHalidom(buffer)
local data = buffer:DataByte()
local msg = Expedition_pb.ExpeditionEquipIndication()
msg:ParseFromString(data)
ExpeditionManager.UpdateHalidomValue(msg)
end
function this.RefreshExpeditionNodeAndHeros(buffer)
local data = buffer:DataByte()
local msg = Expedition_pb.ExpeditionNodeInfoIndication()
msg:ParseFromString(data)
2020-07-02 14:53:44 +08:00
-- if msg.nodeInfo then
-- --LogGreen(" ******* 推送更新远征 msg.nodeInfo "..#msg.nodeInfo)
2020-07-02 14:53:44 +08:00
-- else
-- --LogGreen(" ******* 推送更新远征 msg.nodeInfo nil")
2020-07-02 14:53:44 +08:00
-- end
-- if msg.heroInfo then
-- --LogGreen(" ******* 推送更新远征 msg.heroInfo "..#msg.heroInfo)
2020-07-02 14:53:44 +08:00
-- else
-- --LogGreen(" ******* 推送更新远征 msg.heroInfo nil")
2020-07-02 14:53:44 +08:00
-- end
2020-05-09 13:31:21 +08:00
ExpeditionManager.UpdateHeroHpValue(msg.heroInfo)
ExpeditionManager.UpdateNodeValue(msg.nodeInfo)
end
function this.RefreshMonthCardData(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.MonthCardIndication()
msg:ParseFromString(data)
MonthCardManager.UpdateMonthCardData(msg)
2020-05-09 13:31:21 +08:00
end
function this.RefreshGuildCarDelayProgressData(buffer)
local data = buffer:DataByte()
local msg = Family_pb.CarDelayProgressIndication()
msg:ParseFromString(data)
GuildCarDelayManager.SetProgressData(msg)
end
2020-05-15 16:52:35 +08:00
function this.RefreshGuildAidInfoData(buffer)
local data = buffer:DataByte()
local msg = Family_pb.GuildHelpInfoIndication()
msg:ParseFromString(data)
MyGuildManager.SetSingleGuildHelpInfo(msg)
end
function this.GuildHelpLogIndication(buffer)
local data = buffer:DataByte()
local msg = Family_pb.GuildHelpLogIndication()
msg:ParseFromString(data)
MyGuildManager.SetSingleGuildHelpLogInfo(msg)
end
2020-05-25 19:16:23 +08:00
function this.ExpeditionResetIndication(buffer)
local data = buffer:DataByte()
local msg = Expedition_pb.GetExpeditionResponse()--ExpeditionResetIndication()
msg:ParseFromString(data)
PlayerPrefs.SetInt(PlayerManager.uid.."Expedition", 0)
2020-06-30 18:59:44 +08:00
ExpeditionManager.SetExpeditionState(3)
2020-06-28 17:48:49 +08:00
ExpeditionManager.expeditionLeve = 1
ExpeditionManager.allSHoly = {}
2020-05-25 19:16:23 +08:00
ExpeditionManager.InitExpeditionData(msg)
2020-06-28 17:52:29 +08:00
ExpeditionManager.RefreshPanelShowByState()
2020-05-25 19:16:23 +08:00
end
2020-06-03 19:09:01 +08:00
function this.TreasureStateIndicaion(buffer)
local data = buffer:DataByte()
local msg = Expedition_pb.TreasureStateIndicaion()--ExpeditionResetIndication()
msg:ParseFromString(data)
-- --LogGreen("msg.score :"..msg.score.." msg.resetTime:"..msg.resetTime)
2020-08-27 22:10:08 +08:00
TreasureOfHeavenManger.UpdateData(msg)
LogPink("推回来的数据长度"..#msg.treasureRewardState)
2020-06-03 19:09:01 +08:00
end
2020-08-20 20:05:38 +08:00
function this.GuildTranscriptIndication(buffer)
local data = buffer:DataByte()
local msg = Family_pb.GuildChallengeIndication()
msg:ParseFromString(data)
-- --LogGreen("%%%%%%%%%%msg.curBoss: "..msg.curBoss.." msg.blood: "..msg.blood.." msg.isKill: "..msg.isKill)
2020-08-20 20:05:38 +08:00
GuildTranscriptManager.RefreshGuildTranscriptInfo(msg)
end
2020-08-21 15:52:49 +08:00
function this.GuildChallengeBuyBuffIndication(buffer)
local data = buffer:DataByte()
local msg = Family_pb.GuildChallengeBuyBuffIndication()
msg:ParseFromString(data)
-- --LogGreen("%%%%%%%%%%%msg.buffCount: "..msg.buffCount.." msg.buffTime: "..msg.buffTime)
2020-08-21 15:52:49 +08:00
GuildTranscriptManager.RefreshGuildTranscriptBuffInfo(msg)
end
function this.WorldLevelIndication(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.WorldLevelIndication()
msg:ParseFromString(data)
PlayerManager.RefreshWorldLeveData(msg.worldLeve)
end
function this.RechargeSuccessOrder(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.RechargeSuccessIndication()
msg:ParseFromString(data)
PayManager.RechargeSuccessOrder(msg)
end
2021-04-26 13:44:31 +08:00
--后端拍脸推送
function this.BackPatFaceData(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.PushWelfareResponse()
msg:ParseFromString(data)
PatFaceManager.SetPatFaceDaqta(msg)
end
2021-05-22 15:26:30 +08:00
--山河社稷图推送
2021-05-13 09:56:11 +08:00
function this.HardStageResponse(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.HardStageResponse()
msg:ParseFromString(data)
2021-05-14 15:03:48 +08:00
FightLevelManager.UpdataChapterData(msg.info,true)
FightLevelManager.SetDailyRewardData(msg)
2021-05-13 09:56:11 +08:00
end
2021-05-12 18:47:47 +08:00
--神印信息推送
function this.PracticeImprintData(buffer)
local data = buffer:DataByte()
local msg = HeroInfoProto_pb.PurpleMansionSealIndication()
msg:ParseFromString(data)
2021-05-14 17:48:47 +08:00
PracticeManager.UpdataImprintDataFromServer(msg.sealList)
2021-05-12 18:47:47 +08:00
end
2021-05-20 14:18:48 +08:00
--Vip等级奖励推送
function this.RefreshLevleRewardDatas(buffer)
local data = buffer:DataByte()
2021-05-20 15:47:15 +08:00
local msg = PlayerInfoProto_pb.VipLevelStateResponse()
2021-05-20 14:18:48 +08:00
msg:ParseFromString(data)
VipManager.InitLevleRewardDatas(msg)
end
2021-06-15 20:08:14 +08:00
--跨服天梯
function this.GetWorldArenaInfoIndication(buffer)
local data = buffer:DataByte()
2021-07-14 22:12:40 +08:00
-- local msg = WorldProto_pb.GetWorldArenaInfoIndication()
-- msg:ParseFromString(data)
2021-06-15 20:08:14 +08:00
-- LogPink("%%%%%%%%%%%msg.arenaInfo: "..#msg.arenaInfo.arenaEnemys.." msg.stage: "..msg.stage.." msg.endTime: "..msg.endTime)
-- LogPink("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
2021-07-14 20:27:04 +08:00
-- JumpServerManager.IndicationHightLadderData(msg)
2021-07-22 19:01:46 +08:00
JumpServerManager.ZeroRefreshPanel()
2021-06-15 20:08:14 +08:00
end
2021-05-20 14:18:48 +08:00
2021-06-29 15:25:05 +08:00
--心愿抽卡信息推送
function this.WishDrawCardInfoIndication(buffer)
local data = buffer:DataByte()
local msg = HeroInfoProto_pb.wishDrawCardIndication()
msg:ParseFromString(data)
RecruitManager.GetWishCardData(msg)
end
2021-07-30 15:14:52 +08:00
--是否跨服推送
function this.IsCrossIndication(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.IsCrossIndication()
msg:ParseFromString(data)
PlayerManager.isCross = msg.isCross
Game.GlobalEvent:DispatchEvent(GameEvent.JumpServerHeightLadder.CrossStateChange)
2021-07-30 15:14:52 +08:00
end
2021-09-10 10:30:50 +08:00
--七界试炼信息推送
function this.SevenWorldInfoIndication(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.SevenWorldInfoResponse()
2021-09-10 10:30:50 +08:00
msg:ParseFromString(data)
2021-09-18 15:04:32 +08:00
QiJieShiLianManager.GetServerData(msg,function ()
Game.GlobalEvent:DispatchEvent(GameEvent.QiJieShiLian.RefreshPanel)
2021-09-24 19:23:30 +08:00
if UIManager.IsOpen(UIName.FormationPanelV2) then
UIManager.ClosePanel(UIName.FormationPanelV2)
end
if UIManager.IsOpen(UIName.ExpeditionMonsterInfoPopup) then
UIManager.ClosePanel(UIName.ExpeditionMonsterInfoPopup)
end
2021-09-18 15:04:32 +08:00
end)
2021-09-10 10:30:50 +08:00
end
-- 周卡推送
function this.WeekCardIndication(buffer)
local data = buffer:DataByte()
local msg = ActivityProto_pb.WeekCardIndicationInfoResponse()
msg:ParseFromString(data)
WeekCardManager.UpdateAllWeekCard(msg)
end
2021-11-18 15:49:39 +08:00
-- 灵脉被抢夺推送
function this.LingMaiIndication(buffer)
local data = buffer:DataByte()
local msg = ArenaInfoProto_pb.CrossLingmaiIndicationResponse()
msg:ParseFromString(data)
2021-11-18 18:43:22 +08:00
NetManager.LingMaiRecordRequest(function ()
if #LingMaiMiJingManager.recordData > 0 then
PlayerPrefs.SetString(PlayerManager.uid.."LingMai", tostring(LingMaiMiJingManager.recordData[1].time))
else
PlayerPrefs.SetString(PlayerManager.uid.."LingMai","")
end
CheckRedPointStatus(RedPointType.LingMaiMiJing)
Game.GlobalEvent:DispatchEvent(GameEvent.LingMaiMiJing.RefreshPanel)
LogError("收到了后端发来的Indication")
end)
2021-11-18 15:49:39 +08:00
end
2020-06-23 18:36:24 +08:00
return this