| | |
| | | DWORD NeedExp; //升级需要经验
|
| | | dict AttrInfo; //属性
|
| | | BYTE SkinIndex; //外观
|
| | | };
|
| | |
|
| | | //骑宠幻化表
|
| | |
|
| | | struct tagEquipStarUpRate
|
| | | {
|
| | | DWORD _ClassLV; //装备阶级
|
| | | DWORD _EquipColor; //品质
|
| | | DWORD _EquipPlace; //部位
|
| | | DWORD _IsSuite; //是否套装
|
| | | DWORD Rate; //概率
|
| | | }; |
| | |
| | | totalEquipStars = ChEquip.GetTotalEquipStars(curPlayer)
|
| | |
|
| | | if not costEquipCnt:
|
| | | curRate = suitTotalRate / 2
|
| | | curRate = 100
|
| | | else:
|
| | | singleSuitRate = float(suitTotalRate) / costEquipCnt
|
| | | curRate = 0 #成功概率
|
| | |
|
| | | for i, index in enumerate(clientData.CostEquipIndex):
|
| | |
| | | if equipID != clientData.CostEquipID[i]:
|
| | | GameWorld.ErrLog(' 装备升星 客户端发的物品索引与实际物品ID不对应 index=%s,eatItemID=%s,wantEatItemID=%s' % (index, equipID, clientData.CostEquipID[i]))
|
| | | return result
|
| | | if costEquip.GetItemColor() not in costEquipColorList:
|
| | | itemColor = costEquip.GetItemColor()
|
| | | equipPlace = costEquip.GetEquipPlace()
|
| | | if itemColor not in costEquipColorList:
|
| | | return result
|
| | | if costEquip.GetEquipPlace() not in costEquipPlaceList:
|
| | | if equipPlace not in costEquipPlaceList:
|
| | | return result
|
| | | if isJobLimit and not ItemCommon.CheckJob(curPlayer, costEquip):
|
| | | return result
|
| | | delEquipIndexList.append(index)
|
| | | isSuite = costEquip.GetSuiteID()
|
| | | addRate = singleSuitRate if isSuite else singleSuitRate / 2
|
| | | curRate += addRate
|
| | | |
| | | ipyData = IpyGameDataPY.GetIpyGameData('EquipStarUpRate', ItemCommon.GetItemClassLV(costEquip), |
| | | itemColor, equipPlace, isSuite
|
| | | )
|
| | | if not ipyData:
|
| | | return
|
| | | curRate += ipyData.GetRate()
|
| | | if totalEquipStars < IpyGameDataPY.GetFuncCfg('EquipStarCustomized'):
|
| | | curRate = 100
|
| | | if curRate <= 0:
|
| | |
| | | ("dict", "AttrInfo", 0),
|
| | | ("BYTE", "SkinIndex", 0),
|
| | | ),
|
| | |
|
| | | "EquipStarUpRate":(
|
| | | ("DWORD", "ClassLV", 1),
|
| | | ("DWORD", "EquipColor", 1),
|
| | | ("DWORD", "EquipPlace", 1),
|
| | | ("DWORD", "IsSuite", 1),
|
| | | ("DWORD", "Rate", 0),
|
| | | ),
|
| | | }
|
| | |
|
| | | |
| | |
| | | def GetNeedExp(self): return self.NeedExp # 升级需要经验
|
| | | def GetAttrInfo(self): return self.AttrInfo # 属性
|
| | | def GetSkinIndex(self): return self.SkinIndex # 外观 |
| | | |
| | | # 骑宠幻化表 |
| | | class IPY_EquipStarUpRate(): |
| | | |
| | | def __init__(self): |
| | | self.ClassLV = 0
|
| | | self.EquipColor = 0
|
| | | self.EquipPlace = 0
|
| | | self.IsSuite = 0
|
| | | self.Rate = 0 |
| | | return |
| | | |
| | | def GetClassLV(self): return self.ClassLV # 装备阶级
|
| | | def GetEquipColor(self): return self.EquipColor # 品质
|
| | | def GetEquipPlace(self): return self.EquipPlace # 部位
|
| | | def GetIsSuite(self): return self.IsSuite # 是否套装
|
| | | def GetRate(self): return self.Rate # 概率 |
| | |
|
| | |
|
| | | def Log(msg, playerID=0, par=0):
|
| | |
| | | self.ipyLingGenEffectLen = len(self.ipyLingGenEffectCache)
|
| | | self.ipyHorsePetSkinCache = self.__LoadFileData("HorsePetSkin", IPY_HorsePetSkin)
|
| | | self.ipyHorsePetSkinLen = len(self.ipyHorsePetSkinCache)
|
| | | self.ipyEquipStarUpRateCache = self.__LoadFileData("EquipStarUpRate", IPY_EquipStarUpRate)
|
| | | self.ipyEquipStarUpRateLen = len(self.ipyEquipStarUpRateCache)
|
| | | Log("IPY_FuncConfig count=%s" % len(self.ipyFuncConfigDict))
|
| | | Log("IPY_DataMgr InitOK!")
|
| | | return
|
| | |
| | | def GetLingGenEffectByIndex(self, index): return self.ipyLingGenEffectCache[index]
|
| | | def GetHorsePetSkinCount(self): return self.ipyHorsePetSkinLen
|
| | | def GetHorsePetSkinByIndex(self, index): return self.ipyHorsePetSkinCache[index]
|
| | | def GetEquipStarUpRateCount(self): return self.ipyEquipStarUpRateLen
|
| | | def GetEquipStarUpRateByIndex(self, index): return self.ipyEquipStarUpRateCache[index]
|
| | |
|
| | | IPYData = IPY_DataMgr()
|
| | | def IPY_Data(): return IPYData
|