| | |
| | | if equipPlace not in ChConfig.EquipPlace_LingQi:
|
| | | return
|
| | |
|
| | | if trainType <= 0 or trainType > GetLingQiTrainTypes():
|
| | | if trainType <= 0 or trainType > GetLingQiTrainTypes(equipPlace):
|
| | | return
|
| | |
|
| | | if trainLV <= 0:
|
| | |
| | | GameWorld.DebugLog(" 该培养已满级!")
|
| | | return
|
| | |
|
| | | costItemIDList = IpyGameDataPY.GetFuncEvalCfg("LingQiTrain", 1)
|
| | | costItemIDList = IpyGameDataPY.GetFuncEvalCfg("LingQiTrain", 1, {}).get(str(equipPlace), [])
|
| | | costItemID = costItemIDList[trainType - 1]
|
| | | if not costItemID or not costItemCount:
|
| | | return
|
| | |
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | return
|
| | |
|
| | | def GetLingQiTrainTypes():
|
| | | return len(IpyGameDataPY.GetFuncEvalCfg("LingQiTrain", 1))
|
| | | def GetLingQiTrainTypes(equipPlace):
|
| | | return len(IpyGameDataPY.GetFuncEvalCfg("LingQiTrain", 1, {}).get(str(equipPlace), []))
|
| | |
|
| | | def Sync_LingQiTrainData(curPlayer, equipPlace):
|
| | | clientPack = ChPyNetSendPack.tagMCLingQiTrainInfo()
|
| | | clientPack.EquipPlace = equipPlace
|
| | | clientPack.TrainLVList = []
|
| | | clientPack.TrainItemCountList = []
|
| | | for trainType in xrange(1, GetLingQiTrainTypes() + 1):
|
| | | for trainType in xrange(1, GetLingQiTrainTypes(equipPlace) + 1):
|
| | | trainLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType))
|
| | | if trainLV == 0:
|
| | | trainLV = 1
|