| | |
| | | for i in xrange(ipyDataMgr.GetTreasureSetCount()):
|
| | | ipyData = ipyDataMgr.GetTreasureSetByIndex(i)
|
| | | treasureType = ipyData.GetTreasureType()
|
| | | if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureFreeCount % (treasureType)):
|
| | | if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureCountToday % (treasureType)) and \
|
| | | not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureFreeCount % (treasureType)):
|
| | | continue
|
| | | syncTypeList.append(treasureType)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCountToday % (treasureType), 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureFreeCount % (treasureType), 0)
|
| | | if syncTypeList:
|
| | | Sync_TreasureInfo(curPlayer, syncTypeList)
|
| | |
| | | ItemControler.RecycleItem(curPlayer, costItemID, recycleItemMail)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureFreeCount % (treasureType), 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCount % (treasureType), 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCountToday % (treasureType), 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureLuck % (treasureType), 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCntAward % (treasureType), 0)
|
| | |
|
| | |
| | | treasureCount = treasureCountList[treasureIndex]
|
| | | if not treasureCount:
|
| | | GameWorld.DebugLog("没有寻宝次数配置!", playerID)
|
| | | return
|
| | | dailyMaxCount = setIpyData.GetDailyMaxCount()
|
| | | curTreasureCountToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureCountToday % (treasureType)) # 今日已寻宝次数
|
| | | updTreasureCountToday = curTreasureCountToday + treasureCount
|
| | | if dailyMaxCount and updTreasureCountToday > dailyMaxCount:
|
| | | GameWorld.DebugLog("寻宝后将超过每日最大次数,无法寻宝! treasureCount(%s) + curTreasureCountToday(%s) = %s > %s" |
| | | % (treasureCount, curTreasureCountToday, updTreasureCountToday, dailyMaxCount), playerID)
|
| | | return
|
| | |
|
| | | packType = setIpyData.GetPackType()
|
| | |
| | | GameWorld.DebugLog("扣除货币,costGoldType=%s,costGold=%s" % (costGoldType, costGold), playerID)
|
| | |
|
| | | # 加数据
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCountToday % (treasureType), updTreasureCountToday)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCount % (treasureType), updTreasureCount)
|
| | | for luckyGridNum in luckyGridNumList:
|
| | | if luckyGridNum in getGridResult:
|
| | |
| | | if mailItemList:
|
| | | PlayerControl.SendMailByKey("HappyXBUnEnough", [playerID], mailItemList)
|
| | |
|
| | | GameWorld.DebugLog("寻宝成功: treasureType=%s,updTreasureCount=%s,updLuck=%s,addScoreType=%s,addScore=%s,gridNumCountInfo=%s" |
| | | % (treasureType, updTreasureCount, updLuck, addScoreType, addScore, gridNumCountInfo), playerID)
|
| | | GameWorld.DebugLog("寻宝成功: treasureType=%s,updTreasureCount=%s(%s),updLuck=%s,addScoreType=%s,addScore=%s,gridNumCountInfo=%s" |
| | | % (treasureType, updTreasureCount, updTreasureCountToday, updLuck, addScoreType, addScore, gridNumCountInfo), playerID)
|
| | | GameWorld.DebugLog(" treasureResult=%s" % (treasureResult), playerID)
|
| | | GameWorld.DebugLog(" mailItemList=%s" % (mailItemList), playerID)
|
| | |
|
| | |
| | | tTypeInfo.TreasureType = tType
|
| | | tTypeInfo.LuckValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureLuck % (tType))
|
| | | tTypeInfo.TreasureCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureCount % (tType))
|
| | | tTypeInfo.TreasureCountToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureCountToday % (tType))
|
| | | tTypeInfo.FreeCountToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureFreeCount % (tType))
|
| | | tTypeInfo.TreasureCntAward = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureCntAward % (tType))
|
| | | for gridNumStr in gridNumMaxLimitInfo.keys():
|