| | |
| | | import ItemControler
|
| | | import IpyGameDataPY
|
| | | import PyGameData
|
| | | import ObjPool
|
| | |
|
| | | #成就奖励是否已领取
|
| | | def GetSuccHasGot(curPlayer, succID):
|
| | |
| | | syncTypeCondList.append(tcList)
|
| | |
|
| | | successInfoList = []
|
| | | objPoolMgr = ObjPool.GetPoolMgr()
|
| | | for succType, conds in syncTypeCondList:
|
| | | curValue = GetSuccValue(curPlayer, succType, conds)
|
| | | # 不发送为0的数据
|
| | | if not isSendZero and curValue <= 0:
|
| | | continue
|
| | | succInfo = objPoolMgr.acquire(ChPyNetSendPack.tagSCSuccessInfo)
|
| | | succInfo = ChPyNetSendPack.tagSCSuccessInfo()
|
| | | succInfo.SuccType = succType
|
| | | succInfo.Conds = conds
|
| | | succInfo.CLen = len(succInfo.Conds)
|
| | |
| | | if not successInfoList:
|
| | | return
|
| | |
|
| | | clientPack = objPoolMgr.acquire(ChPyNetSendPack.tagSCSuccessInfoList)
|
| | | clientPack = ChPyNetSendPack.tagSCSuccessInfoList()
|
| | | clientPack.SuccessInfoList = successInfoList
|
| | | clientPack.Count = len(clientPack.SuccessInfoList)
|
| | | NetPackCommon.SendFakePack(curPlayer, clientPack)
|
| | |
| | | maxSuccID = ipyDataMgr.GetSuccessByIndex(succCnt - 1).GetSuccID()
|
| | | recordIndexList = xrange(maxSuccID / 31 + 1)
|
| | |
|
| | | objPoolMgr = ObjPool.GetPoolMgr()
|
| | | recordList = []
|
| | | for i in recordIndexList:
|
| | | awardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SuccessAward % i)
|
| | | if not isSyncZero and not awardRecord:
|
| | | continue
|
| | | recordInfo = objPoolMgr.acquire(ChPyNetSendPack.tagSCSuccessAwardRecord)
|
| | | recordInfo = ChPyNetSendPack.tagSCSuccessAwardRecord()
|
| | | recordInfo.RecordIndex = i
|
| | | recordInfo.Record = awardRecord
|
| | | recordList.append(recordInfo)
|
| | |
| | | if not recordList:
|
| | | return
|
| | |
|
| | | clientPack = objPoolMgr.acquire(ChPyNetSendPack.tagSCSuccessAwardRecordList)
|
| | | clientPack = ChPyNetSendPack.tagSCSuccessAwardRecordList()
|
| | | clientPack.RecordList = recordList
|
| | | clientPack.RecordCnt = len(clientPack.RecordList)
|
| | | NetPackCommon.SendFakePack(curPlayer, clientPack)
|