| | |
| | | import ChConfig
|
| | | import ChPlayer
|
| | | import PlayerActivity
|
| | | import PlayerBillboard
|
| | |
|
| | |
|
| | | g_runeTypeDict = {}
|
| | |
| | | ttInfo = ChPyNetSendPack.tagMCSkyTowerInfo()
|
| | | ttInfo.Clear()
|
| | | ttInfo.Floor = __GetSkyTowerCurFloor(curPlayer)
|
| | | ttInfo.ServerRewardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_SkyTowerChallengeRewardRecord)
|
| | | NetPackCommon.SendFakePack(curPlayer, ttInfo)
|
| | | return
|
| | |
|
| | |
| | | if not ipyData:
|
| | | return
|
| | |
|
| | | |
| | | if ipyData.GetIsNotify():
|
| | | #IPY_Data = IpyGameDataPY.IPY_Data()
|
| | | #maxLevel = IPY_Data.GetRuneTowerByIndex(IPY_Data.GetRuneTowerCount()-1).GetID()
|
| | |
| | |
|
| | | SyncSkyTowerInfo(curPlayer) # 同步最新关卡信息
|
| | | __SetFBToFreeTime(tick)
|
| | | |
| | | if floorID >= 10:
|
| | | PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_SkyTower, floorID)
|
| | | |
| | | # 全服目标
|
| | | ipyDataServer = IpyGameDataPY.GetIpyGameDataNotLog("SkyTowerServerChallenge", floorID)
|
| | | if ipyDataServer:
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | playerName = curPlayer.GetPlayerName()
|
| | | job = curPlayer.GetJob()
|
| | | playerLV = curPlayer.GetLV()
|
| | | realmLV = curPlayer.GetOfficialRank()
|
| | | msgInfo = str(["ServerChallengePass", [floorID, playerID, playerName, job, playerLV, realmLV]])
|
| | | GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(playerID, 0, 0, "SkyTower", msgInfo, len(msgInfo))
|
| | | |
| | | return
|
| | |
|
| | |
|
| | |
| | | StartfloorID(curPlayer, floorID, tick)
|
| | | return
|
| | |
|
| | | def OnGetSkyTowerServerChallengeReward(curPlayer, floorID):
|
| | | ## 领取全服挑战层奖励
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("SkyTowerServerChallenge", floorID)
|
| | | if not ipyData:
|
| | | return
|
| | | recordIndex = ipyData.GetRewardRecordIndex()
|
| | | rewardInfo = ipyData.GetReward()
|
| | | |
| | | rewardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_SkyTowerChallengeRewardRecord)
|
| | | if rewardRecord & pow(2, recordIndex):
|
| | | GameWorld.DebugLog("天星塔全服挑战层已领奖!floorID=%s,recordIndex=%s,rewardRecord=%s" % (floorID, recordIndex, rewardRecord))
|
| | | return
|
| | | |
| | | ipyData.GetRewardRecordIndex()
|
| | | msgInfo = str(["ServerChallengeReward", [floorID, recordIndex, rewardInfo]])
|
| | | GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(playerID, 0, 0, "SkyTower", msgInfo, len(msgInfo))
|
| | | return
|
| | |
|
| | | def GameServer_SkyTowerInfo(curPlayer, resultList):
|
| | | ## GameServer 返回信息
|
| | | msgType, msgData = resultList[:2]
|
| | | |
| | | if msgType == "ServerChallengeReward":
|
| | | isPass = resultList[2]
|
| | | floorID, recordIndex, rewardInfo = msgData
|
| | | if not isPass:
|
| | | return
|
| | | |
| | | rewardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_SkyTowerChallengeRewardRecord)
|
| | | if rewardRecord & pow(2, recordIndex):
|
| | | GameWorld.DebugLog("返回时天星塔全服挑战层已领奖!floorID=%s,recordIndex=%s,rewardRecord=%s" % (floorID, recordIndex, rewardRecord))
|
| | | return
|
| | | updRewardRecord = rewardRecord | pow(2, recordIndex)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_SkyTowerChallengeRewardRecord, updRewardRecord)
|
| | | SyncSkyTowerInfo(curPlayer)
|
| | | |
| | | giveItemList = [[itemID, itemCnt, 0] for itemID, itemCnt in rewardInfo.items()]
|
| | | event = ["SKYTowerServerChallengeReward", False, {"floorID":floorID}]
|
| | | ItemControler.GivePlayerItemOrMail(curPlayer, giveItemList, None, event)
|
| | | |
| | | return
|
| | |
|
| | |
|