| | |
| | | import PlayerCrossChampionship
|
| | | import GameFuncComm
|
| | | import PlayerFamilyTaofa
|
| | | import PlayerBossReborn
|
| | | import PlayerWeekParty
|
| | | import PlayerFeastWeekParty
|
| | | import PlayerFeastTravel
|
| | | import PlayerFeastLogin
|
| | | import PlayerFeastWish
|
| | | import PlayerActLogin
|
| | |
| | | import PlayerActManyDayRecharge
|
| | | import PlayerActSingleRecharge
|
| | | import PlayerSpringSale
|
| | | import GY_Query_BossFirstKill
|
| | | import PlayerCrossYaomoBoss
|
| | | import PlayerLuckyCloudBuy
|
| | | import PlayerLuckyTreasure
|
| | | import Item_ResetAttrPoint
|
| | | import CrossActCTGBillboard
|
| | | import CrossActAllRecharge
|
| | | import PlayerFuncSysPrivilege
|
| | | import PlayerActTurntable
|
| | | import PlayerTongTianLing
|
| | | import OpenServerActivity
|
| | | import CrossRealmPlayer
|
| | | import ChNetSendPack
|
| | | import PlayerArena
|
| | |
| | | import PlayerFaQi
|
| | | import SkillShell
|
| | | import PlayerGubao
|
| | | import PlayerShentong
|
| | | import PlayerCustomAward
|
| | | import PlayerZhanling
|
| | | import PlayerTree
|
| | |
| | | import PlayerTalk
|
| | | import PlayerHero
|
| | | import PlayerOnline
|
| | | import PlayerBeauty
|
| | | import PlayerTravel
|
| | | import TurnAttack
|
| | | import PlayerHJG
|
| | | import ObjPool
|
| | |
| | | #PassiveBuffEffMng.OnLoginGFPassive(curPlayer)
|
| | | # 极品白拿
|
| | | PlayerFreeGoods.OnLogin(curPlayer)
|
| | | # BOSS复活活动
|
| | | PlayerBossReborn.OnLogin(curPlayer)
|
| | | # 周狂欢活动
|
| | | PlayerWeekParty.OnLogin(curPlayer)
|
| | | # 购买次数礼包活动
|
| | |
| | | PlayerFeastLogin.OnPlayerLogin(curPlayer)
|
| | | # 节日祝福活动
|
| | | PlayerFeastWish.OnPlayerLogin(curPlayer)
|
| | | # 节日游历活动
|
| | | PlayerFeastTravel.OnPlayerLogin(curPlayer)
|
| | | # 登录奖励活动
|
| | | PlayerActLogin.OnLogin(curPlayer)
|
| | | # 炼器活动
|
| | |
| | | PlayerActSingleRecharge.OnPlayerLogin(curPlayer)
|
| | | # 转盘活动
|
| | | PlayerActTurntable.OnPlayerLogin(curPlayer)
|
| | | # 分支下载奖励记录通知
|
| | | SyncPackDownloadAward(curPlayer)
|
| | | # 登录触发功能开启(老号处理)
|
| | | GameFuncComm.DoFuncOpenLogic(curPlayer)
|
| | | # 神兽
|
| | |
| | | PlayerFB.OnLogin(curPlayer)
|
| | | #技能专精信息
|
| | | #SkillShell.NotifyElementSkillInfo(curPlayer)
|
| | | #Boss首杀
|
| | | GY_Query_BossFirstKill.OnPlayerLogin(curPlayer)
|
| | | #通天令
|
| | | PlayerTongTianLing.OnPlayerLogin(curPlayer)
|
| | | #创角奖励
|
| | |
| | | PlayerHJG.OnPlayerLogin(curPlayer)
|
| | | PlayerXiangong.OnPlayerLogin(curPlayer)
|
| | | PlayerGubao.OnPlayerLogin(curPlayer)
|
| | | PlayerShentong.OnPlayerLogin(curPlayer)
|
| | | PlayerZhanling.OnPlayerLogin(curPlayer)
|
| | | PlayerTask.OnPlayerLogin(curPlayer)
|
| | | PlayerTree.OnPlayerLogin(curPlayer)
|
| | |
| | | UpdatePlayerName.OnPlayerLogin(curPlayer)
|
| | | PlayerActivity.OnPlayerLogin(curPlayer)
|
| | | PlayerLLMJ.OnPlayerLogin(curPlayer)
|
| | | PlayerBeauty.OnPlayerLogin(curPlayer)
|
| | | PlayerTravel.OnPlayerLogin(curPlayer)
|
| | | OpenServerActivity.OnPlayerLogin(curPlayer)
|
| | |
|
| | | # 上线查询一次充值订单
|
| | | curPlayer.SendDBQueryRecharge()
|
| | | # curPlayer.SendDBQueryRecharge() 不查了,由在线轮询触发即可
|
| | |
|
| | | # 通知GameServer地图最终登录成功了
|
| | | isMixServerFirstLogin = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MixServerFirstLogin)
|
| | |
| | | return
|
| | | ItemCommon.ReduceItem(curPlayer, itemPack, [delIndex], 1, False, ChConfig.ItemDel_ResetAttrPoint)
|
| | |
|
| | | Item_ResetAttrPoint.DoResetAttrPoint(curPlayer, 0, 0, 0)
|
| | | #Item_ResetAttrPoint.DoResetAttrPoint(curPlayer, 0, 0, 0)
|
| | | return
|
| | |
|
| | | def NotifyPlayerBasePoint(curPlayer, syncAttrIDList=[]):
|
| | |
| | | curPlayer.Syn_OfflineTimeQueryResult() # 通知客服端离线时间
|
| | | return
|
| | |
|
| | |
|
| | | #//B0 24 领取家族悬赏奖励 #tagReceiveFamilyArrestAward
|
| | | #
|
| | | #struct tagReceiveFamilyArrestAward
|
| | | #
|
| | | #{
|
| | | # tagHead Head;
|
| | | # DWORD ArrestID; //悬赏任务ID
|
| | | #};
|
| | | ## 领取家族悬赏奖励
|
| | | # @param index: 玩家索引
|
| | | # @param clientData: 封包结构体
|
| | | # @param tick: 时间戳
|
| | | # @return: None
|
| | | def ReceiveFamilyArrestAward(index, clientData, tick):
|
| | | return
|
| | |
|
| | |
|
| | | #//B0 26 请求家族悬赏奖励领取情况 #tagQueryFamilyArrestAwardReceiveState
|
| | | #
|
| | | #struct tagQueryFamilyArrestAwardReceiveState
|
| | | #
|
| | | #{
|
| | | # tagHead Head;
|
| | | #};
|
| | | ## 请求家族悬赏奖励领取情况
|
| | | # @param index: 玩家索引
|
| | | # @param clientData: 封包结构体
|
| | | # @param tick: 时间戳
|
| | | # @return: None
|
| | | def QueryFamilyArrestAwardReceiveState(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | Sync_FamilyArrestAwardReceiveState(curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 通知客户端家族悬赏任务奖励领取情况
|
| | | # @param curPlayer: 玩家实例
|
| | | # @return: None
|
| | | def Sync_FamilyArrestAwardReceiveState(curPlayer):
|
| | | awardReceiveState = ChPyNetSendPack.tagFamilyArrestAwardReceiveState()
|
| | | awardReceiveState.Clear()
|
| | | |
| | | state = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyArrestAwardState)
|
| | | awardReceiveState.ReceiveState = state
|
| | | NetPackCommon.SendFakePack(curPlayer, awardReceiveState)
|
| | | return
|
| | |
|
| | | def PlayerOnDay(curPlayer):
|
| | | #玩法前瞻奖励
|
| | | gameNoticeAwardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GameNoticeAwardState)
|
| | |
| | | PlayerSuccess.GetSuccessAward(curPlayer, dataEx)
|
| | | # 仙树免费减时
|
| | | elif rewardType == ChConfig.Def_RewardType_TreeFreeTime:
|
| | | PlayerTree.FreeReduceTreeLVTime(curPlayer)
|
| | | PlayerTree.FreeReduceTreeLVTime(curPlayer, dataEx)
|
| | | # 广告奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_ADAward:
|
| | | OnGetADAward(curPlayer, dataEx)
|
| | |
| | | # 阵容推荐奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_LineupRecommend:
|
| | | PlayerHero.GetLineupRecommendAward(curPlayer, dataEx, dataExStr)
|
| | | # 功能开启奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_OpenFunc:
|
| | | GameFuncComm.GetFuncOpenAward(curPlayer, dataEx)
|
| | | # 红颜等级奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_BeautyLVAward:
|
| | | PlayerBeauty.GetBeautyLVAward(curPlayer, dataEx)
|
| | | # 领取分包下载奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_DownLoad:
|
| | | GetDownloadAward(curPlayer, dataEx)
|
| | | # 开服庆典积分阶段奖励 |
| | | elif rewardType == ChConfig.Def_RewardType_OSACelebrationPointAward:
|
| | | OpenServerActivity.GetOSACelebrationPointAward(curPlayer, dataEx)
|
| | |
|
| | |
|
| | | # 每日免费直购礼包
|
| | |
| | | # 领取单笔累充领取
|
| | | elif rewardType == ChConfig.Def_RewardType_SingleRecharge:
|
| | | PlayerActSingleRecharge.OnGetSingleRechargeAward(curPlayer, dataEx, dataExStr)
|
| | | # 领取boss复活活动奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_BossReborn:
|
| | | PlayerBossReborn.GetBossRebornActionAward(curPlayer, dataEx)
|
| | | # 领取许愿池奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_WishingWell:
|
| | | PlayerWishingWell.DoGetWishingAward(curPlayer)
|
| | | # 功能开启奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_OpenFunc:
|
| | | GameFuncComm.GetFuncOpenAward(curPlayer, dataEx)
|
| | | # 领取周狂欢活动奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_WeekPartyAct:
|
| | | PlayerWeekParty.GetWeekPartyActionAward(curPlayer, dataEx, dataExStr)
|
| | |
| | | # 领取节日登录奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_FeastLogin:
|
| | | PlayerFeastLogin.GetFeastLoginAward(curPlayer, dataEx)
|
| | | # 领取节日游历奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_FeastTravel:
|
| | | PlayerFeastTravel.GetFeastTravelAward(curPlayer, dataEx)
|
| | | # 领取登录活动奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_ActLoginAwardNew:
|
| | | PlayerActLoginNew.OnGetActLoginAward(curPlayer, dataEx, dataExStr)
|
| | |
| | | #历史累计充值领取
|
| | | elif rewardType == ChConfig.Def_RewardType_HistoryChargeAward:
|
| | | PlayerGoldGift.OnGetHistoryRechargeAward(curPlayer, dataEx)
|
| | | #在线特惠充值额外奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_OnlineRechargeTH:
|
| | | PlayerCoin.OnGetOnlineRechargeTH(curPlayer)
|
| | | #创角奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_CreateRole:
|
| | | OnGetCreateRoleAward(curPlayer)
|
| | |
| | | return
|
| | | adCntMax = ipyData.GetADCntMax()
|
| | | adCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ADCnt % adID)
|
| | | if adCnt >= adCntMax:
|
| | | if adCntMax and adCnt >= adCntMax:
|
| | | GameWorld.DebugLog("今日该广告奖励已达上限! adID=%s,adCnt=%s > %s" % (adID, adCnt, adCntMax))
|
| | | return
|
| | | adCnt += 1
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ADCnt % adID, adCnt)
|
| | | awardItemList = ipyData.GetADAwardItemList()
|
| | | adMapID = ipyData.GetADMapID()
|
| | | GameWorld.DebugLog("领取广告奖励! adID=%s,adCnt=%s,adMapID=%s,awardItemList=%s" % (adID, adCnt, adMapID, awardItemList))
|
| | | adAwardType = ipyData.GetADAwardType()
|
| | | adAwardValue = ipyData.GetADAwardValue()
|
| | | GameWorld.DebugLog("领取广告奖励! adID=%s,adCnt=%s,adAwardType=%s,adAwardValue=%s,awardItemList=%s" % (adID, adCnt, adAwardType, adAwardValue, awardItemList))
|
| | | SyncADCntInfo(curPlayer, [adID])
|
| | |
|
| | | if adMapID:
|
| | | FBCommon.AddFBADCnt(curPlayer, adMapID)
|
| | | |
| | | if awardItemList:
|
| | | ItemControler.GivePlayerItemOrMail(curPlayer, awardItemList, event=["ADAward", False, {}])
|
| | |
|
| | | # 领取祝福树充能奖励
|
| | | if adAwardType == 1:
|
| | | PlayerTree.GetTreeEnergyAward(curPlayer, False)
|
| | | # 副本次数
|
| | | elif adAwardType == 2:
|
| | | adMapID = adAwardValue
|
| | | FBCommon.AddFBADCnt(curPlayer, adMapID)
|
| | | # 寻宝
|
| | | elif adAwardType == 3:
|
| | | treasureType = adAwardValue
|
| | | PlayerTreasure.DoTreasure(curPlayer, treasureType, PlayerTreasure.CostType_ADFree)
|
| | | # 游历体力
|
| | | elif adAwardType == 4:
|
| | | PlayerTravel.AddTravelEnergy(curPlayer, adAwardValue)
|
| | | return
|
| | |
|
| | | def ADCntOnDay(curPlayer):
|
| | |
| | | sendPack = ChPyNetSendPack.tagMCCreateRoleAwardState()
|
| | | sendPack.Clear()
|
| | | sendPack.GetState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CreateRoleAwardState)
|
| | | NetPackCommon.SendFakePack(curPlayer, sendPack)
|
| | | return
|
| | |
|
| | | def GetDownloadAward(curPlayer, dataEx):
|
| | | ##分包下载奖励 dataEx 0直接领取 1发邮件
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | downloadAwardNum = IpyGameDataPY.GetFuncCfg('DownReward', 2)
|
| | | curAwardNum = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DownloadAwardState)
|
| | | if curAwardNum == downloadAwardNum:
|
| | | GameWorld.DebugLog("已领取分包奖励! curAwardNum(%s) == downloadAwardNum(%s)" % (curAwardNum, downloadAwardNum), playerID)
|
| | | return
|
| | | |
| | | awardItemList = IpyGameDataPY.GetFuncEvalCfg('DownReward', 1)
|
| | | if not awardItemList:
|
| | | return
|
| | | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DownloadAwardState, downloadAwardNum)
|
| | | GameWorld.DebugLog("领取分包下载奖励: curAwardNum=%s,downloadAwardNum=%s" % (curAwardNum, downloadAwardNum), playerID)
|
| | | if dataEx == 1:
|
| | | PlayerMail.SendMailByKey('SubpackageDownload', curPlayer.GetID(), awardItemList)
|
| | | else:
|
| | | ItemControler.GivePlayerItemOrMail(curPlayer, awardItemList, event=["PackDownload", False, {}])
|
| | | SyncPackDownloadAward(curPlayer)
|
| | | return
|
| | |
|
| | | def SyncPackDownloadAward(curPlayer):
|
| | | #分包下载奖励记录通知
|
| | | downloadAwardNum = IpyGameDataPY.GetFuncCfg('DownReward', 2)
|
| | | sendPack = ChPyNetSendPack.tagMCPackDownloadRecord()
|
| | | sendPack.Clear()
|
| | | sendPack.Record = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DownloadAwardState) == downloadAwardNum
|
| | | NetPackCommon.SendFakePack(curPlayer, sendPack)
|
| | | return
|
| | |
|
| | |
| | | clientPack.NowMicSecond = serverTime.microsecond
|
| | | clientPack.WeekOfYear = GameWorld.GetWeekOfYear()
|
| | | NetPackCommon.SendFakePack(curPlayer, clientPack)
|
| | | |
| | | #旧包先保留,之后删除
|
| | | gw = GameWorld.GetGameWorld()
|
| | | packData = ChPyNetSendPack.tagOpenServerDay()
|
| | | packData.Clear()
|
| | | packData.Day = gw.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay)
|
| | | packData.IsMixServer = gw.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_IsMixServer)
|
| | | packData.MixDay = gw.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_MixServerDay)
|
| | | packData.OpenWeekday = gw.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_OpenServerWeekday)
|
| | | packData.NowYear = serverTime.year
|
| | | packData.NowMonth = serverTime.month
|
| | | packData.NowDay = serverTime.day
|
| | | packData.NowHour = serverTime.hour
|
| | | packData.NowMinute = serverTime.minute
|
| | | packData.NowSecond = serverTime.second
|
| | | packData.NowMicSecond = serverTime.microsecond
|
| | | packData.WeekOfYear = GameWorld.GetWeekOfYear()
|
| | | NetPackCommon.SendFakePack(curPlayer, packData)
|
| | | return
|
| | |
|
| | | #===============================================================================
|