| | |
| | | ("list", "RandTimeList1", 0),
|
| | | ("list", "RandItemList2", 0),
|
| | | ("list", "RandTimeList2", 0),
|
| | | ("dict", "RandItemByUseCount", 0),
|
| | | ("list", "JobItemList", 0),
|
| | | ("BYTE", "MoneyType", 0),
|
| | | ("DWORD", "MoneyCount", 0),
|
| | |
| | | ("WORD", "LowLV", 0),
|
| | | ("WORD", "HighestLV", 0),
|
| | | ("DWORD", "Defense", 0),
|
| | | ),
|
| | |
|
| | | "TalentSkill":(
|
| | | ("DWORD", "SkillID", 1),
|
| | | ("BYTE", "TalentType", 0),
|
| | | ("BYTE", "Series", 0),
|
| | | ),
|
| | | }
|
| | |
|
| | |
| | | self.RandTimeList1 = []
|
| | | self.RandItemList2 = []
|
| | | self.RandTimeList2 = []
|
| | | self.RandItemByUseCount = {}
|
| | | self.JobItemList = []
|
| | | self.MoneyType = 0
|
| | | self.MoneyCount = 0
|
| | |
| | | def GetRandTimeList1(self): return self.RandTimeList1 # 随机次数饼图列表1
|
| | | def GetRandItemList2(self): return self.RandItemList2 # 随机物品饼图列表2
|
| | | def GetRandTimeList2(self): return self.RandTimeList2 # 随机次数饼图列表2
|
| | | def GetRandItemByUseCount(self): return self.RandItemByUseCount # 宝箱开启X次对应特殊产出,与饼图列表2互斥
|
| | | def GetJobItemList(self): return self.JobItemList # 职业物品列表
|
| | | def GetMoneyType(self): return self.MoneyType # 货币类型
|
| | | def GetMoneyCount(self): return self.MoneyCount # 货币数量
|
| | |
| | | def GetLowLV(self): return self.LowLV # 推荐最低等级
|
| | | def GetHighestLV(self): return self.HighestLV # 推荐最高等级
|
| | | def GetDefense(self): return self.Defense # 推荐防御 |
| | | |
| | | # 天赋技能表 |
| | | class IPY_TalentSkill(): |
| | | |
| | | def __init__(self): |
| | | self.SkillID = 0
|
| | | self.TalentType = 0
|
| | | self.Series = 0 |
| | | return |
| | | |
| | | def GetSkillID(self): return self.SkillID # 技能ID
|
| | | def GetTalentType(self): return self.TalentType # 天赋类型
|
| | | def GetSeries(self): return self.Series # 天赋系别 |
| | |
|
| | |
|
| | | def Log(msg, playerID=0, par=0):
|
| | |
| | | self.ipyAllPeoplePartyAwardLen = len(self.ipyAllPeoplePartyAwardCache)
|
| | | self.ipyMapEventPointCache = self.__LoadFileData("MapEventPoint", IPY_MapEventPoint)
|
| | | self.ipyMapEventPointLen = len(self.ipyMapEventPointCache)
|
| | | self.ipyTalentSkillCache = self.__LoadFileData("TalentSkill", IPY_TalentSkill)
|
| | | self.ipyTalentSkillLen = len(self.ipyTalentSkillCache)
|
| | | Log("IPY_FuncConfig count=%s" % len(self.ipyFuncConfigDict))
|
| | | Log("IPY_DataMgr InitOK!")
|
| | | return
|
| | |
| | | def GetAllPeoplePartyAwardByIndex(self, index): return self.ipyAllPeoplePartyAwardCache[index]
|
| | | def GetMapEventPointCount(self): return self.ipyMapEventPointLen
|
| | | def GetMapEventPointByIndex(self, index): return self.ipyMapEventPointCache[index]
|
| | | def GetTalentSkillCount(self): return self.ipyTalentSkillLen
|
| | | def GetTalentSkillByIndex(self, index): return self.ipyTalentSkillCache[index]
|
| | |
|
| | | IPYData = IPY_DataMgr()
|
| | | def IPY_Data(): return IPYData
|
| | |
| | | '''查询条件下与对应查询字段参考值相近的数据实例;参考值小于配置表最小值时返回none,大于最大值时返回最大值对应的实例
|
| | | @param dtName: 表名,不含tag
|
| | | @param keyName: 参考字段名
|
| | | @param keyValue: 参考字段值
|
| | | @param keyValue: 参考字段值,大于等于字段值时返回对应数据
|
| | | @param conditionDict: 查询条件,{查询字段名:字段值, ...}
|
| | | @return: 找不到数据返回 None , 否则返回对应的 ipyData 数据实例
|
| | | '''
|
| | |
| | | for i in xrange(near - 1, low - 1, -1):
|
| | | nearData = dataList[i]
|
| | | nearValue = getattr(nearData, "%s" % keyName)
|
| | | if nearValue < keyValue:
|
| | | if nearValue <= keyValue:
|
| | | return nearData
|
| | |
|
| | | elif keyValue > nearValue:
|