| | |
| | | import PlayerControl
|
| | | import IpyGameDataPY
|
| | | import ChPyNetSendPack
|
| | | import FunctionNPCCommon
|
| | | import NetPackCommon
|
| | | import ItemControler
|
| | | import PlayerCoin
|
| | | import GameWorld
|
| | | import ChConfig
|
| | |
|
| | |
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActLunhuidian", cfgID)
|
| | | if ipyData:
|
| | | roundSetDict = ipyData.GetRoundSetInfo()
|
| | | ctgIDDict = ipyData.GetRoundCTGIDInfo()
|
| | | shopTypeDict = ipyData.GetRoundShopTypeInfo()
|
| | | resetCTGIDList, resetShopTypeList = [], []
|
| | | for roundType in roundSetDict.keys():
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActLunhuidianValue % (actNum, roundType), 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActLunhuidianRound % (actNum, roundType), 1) # 从第1轮开始
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActLunhuidianAward % (actNum, roundType), 0)
|
| | | Sync_ActLunhuidianPlayerInfo(curPlayer, actNum, roundType)
|
| | | resetCTGIDList += ctgIDDict.get(roundType, [])
|
| | | shopType = shopTypeDict.get(roundType, 0)
|
| | | if shopType and shopType not in resetShopTypeList:
|
| | | resetShopTypeList.append(shopType)
|
| | | |
| | | PlayerCoin.DoResetCTGCountByIDList(curPlayer, "ActLunhuidian", resetCTGIDList)
|
| | | FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, resetShopTypeList)
|
| | | |
| | | return True
|
| | |
|
| | | def GetRoundSetValue(roundSet, setIndex): return roundSet[setIndex] if len(roundSet) > setIndex else 0
|
| | |
| | | clientPack.LimitLV = ipyData.GetLVLimit()
|
| | |
|
| | | roundSetDict = ipyData.GetRoundSetInfo()
|
| | | ctgIDDict = ipyData.GetRoundCTGIDInfo()
|
| | | shopTypeDict = ipyData.GetRoundShopTypeInfo()
|
| | | for roundType, roundSet in roundSetDict.items():
|
| | | roundInfo = ChPyNetSendPack.tagMCActLunhuidianRound()
|
| | | roundInfo.RoundType = roundType
|
| | |
| | |
|
| | | roundInfo.AwardList.append(award)
|
| | | roundInfo.AwardCount = len(roundInfo.AwardList)
|
| | | roundInfo.CTGIDList = ctgIDDict.get(roundType, [])
|
| | | roundInfo.CTGIDCount = len(roundInfo.CTGIDList)
|
| | | roundInfo.ShopType = shopTypeDict.get(roundType, 0)
|
| | |
|
| | | clientPack.RoundList.append(roundInfo)
|
| | | clientPack.RoundCount = len(clientPack.RoundList)
|