ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -62,6 +62,7 @@
                        ("list", "AttrType", 0),
                        ("list", "AttrNum", 0),
                        ("DWORD", "SkillID", 0),
                        ("char", "SysMark", 0),
                        ),
                "FuncConfig":(
@@ -124,6 +125,22 @@
                        ("list", "AttrValue", 0),
                        ),
                "Dogz":(
                        ("BYTE", "DogzID", 1),
                        ("list", "BaseAttrTypes", 0),
                        ("list", "BaseAttrValues", 0),
                        ("list", "HelpBattleSkills", 0),
                        ("list", "EquipPlaceColorList", 0),
                        ),
                "DogzEquipPlus":(
                        ("BYTE", "EquipPlace", 1),
                        ("BYTE", "PlusLV", 1),
                        ("list", "PlusAttrTypes", 0),
                        ("list", "PlusAttrValues", 0),
                        ("DWORD", "PlusLVUPTotalExp", 0),
                        ),
                "Rune":(
                        ("DWORD", "ID", 1),
                        ("list", "AttrType", 0),
@@ -169,6 +186,7 @@
                "PetInfo":(
                        ("DWORD", "ID", 1),
                        ("BYTE", "Quality", 0),
                        ("char", "UnlockSys", 0),
                        ("DWORD", "UnLockNeedItemID", 0),
                        ("BYTE", "UnLockNeedItemCnt", 0),
                        ("DWORD", "DecomposeExp", 0),
@@ -177,6 +195,7 @@
                        ("WORD", "UseNeedRank", 0),
                        ("list", "SkillID", 0),
                        ("list", "SkillUnLock", 0),
                        ("list", "SkillUnLockSys", 0),
                        ("DWORD", "InitFightPower", 0),
                        ),
@@ -210,6 +229,7 @@
                        ("BYTE", "UseNeedRank", 0),
                        ("BYTE", "Quality", 0),
                        ("DWORD", "InitFightPower", 0),
                        ("char", "UnlockSys", 0),
                        ),
                "HorseUp":(
@@ -219,6 +239,7 @@
                        ("list", "AttrType", 0),
                        ("list", "AttrValue", 0),
                        ("list", "SkillID", 0),
                        ("char", "SysMark", 0),
                        ),
                "PlayerLV":(
@@ -506,7 +527,8 @@
                        ("DWORD", "NeedExp", 0),
                        ("dict", "AddAttr", 0),
                        ("list", "UnLockSkill", 0),
                        ("DWORD", "PrivilegeID", 0),
                        ("DWORD", "ActiveMWID", 0),
                        ("list", "ItemAward", 0),
                        ),
                "TreasurePrivilege":(
@@ -516,6 +538,7 @@
                        ("DWORD", "MaxValue", 0),
                        ("dict", "AddAttr", 0),
                        ("list", "ItemAward", 0),
                        ("list", "SuccessList", 0),
                        ),
                "TreasureSkill":(
@@ -674,6 +697,9 @@
                        ("DWORD", "NPCID", 1),
                        ("DWORD", "MapID", 0),
                        ("BYTE", "RefreshMark", 0),
                        ("BYTE", "IsNeedShunt", 0),
                        ("BYTE", "RelatedType", 0),
                        ("WORD", "RelatedID", 0),
                        ("DWORD", "StoneNPCID", 0),
                        ),
@@ -856,6 +882,8 @@
                        ("dict", "GridItemInfo", 0),
                        ("list", "JobItemList", 0),
                        ("list", "GridItemRateListFree", 0),
                        ("list", "FreeGridItemRateList2", 0),
                        ("dict", "FreeGridItemRateList3", 0),
                        ("list", "GridItemRateList1", 0),
                        ("list", "GridItemRateList2", 0),
                        ("dict", "GridItemRateList3", 0),
@@ -908,7 +936,7 @@
                "TrialExchange":(
                        ("DWORD", "ID", 1),
                        ("DWORD", "ExchangeItemID", 0),
                        ("list", "ExchangeItemIDList", 0),
                        ("DWORD", "ExchangeItemCount", 0),
                        ("DWORD", "ExchangeItemIsBind", 0),
                        ("DWORD", "CostItemID", 0),
@@ -926,6 +954,14 @@
                        ("DWORD", "Index", 1),
                        ("DWORD", "NeedPoint", 0),
                        ("dict", "Award", 0),
                        ),
                "MapEventPoint":(
                        ("DWORD", "MapID", 1),
                        ("DWORD", "NPCID", 1),
                        ("WORD", "LowLV", 0),
                        ("WORD", "HighestLV", 0),
                        ("DWORD", "Defense", 0),
                        ),
                }
@@ -987,7 +1023,8 @@
        self.Exp = 0
        self.AttrType = []
        self.AttrNum = []
        self.SkillID = 0
        self.SkillID = 0
        self.SysMark = ""
        return
        
    def GetType(self): return self.Type # 神兵类型
@@ -995,7 +1032,8 @@
    def GetExp(self): return self.Exp
    def GetAttrType(self): return self.AttrType # 属性类型
    def GetAttrNum(self): return self.AttrNum # 属性值
    def GetSkillID(self): return self.SkillID # 激活技能ID
    def GetSkillID(self): return self.SkillID # 激活技能ID
    def GetSysMark(self): return self.SysMark # 系统提示
# 功能配置表格
class IPY_FuncConfig():
@@ -1124,6 +1162,40 @@
    def GetAttrType(self): return self.AttrType # 属性类型
    def GetAttrValue(self): return self.AttrValue # 属性值
# 神兽表
class IPY_Dogz():
    def __init__(self):
        self.DogzID = 0
        self.BaseAttrTypes = []
        self.BaseAttrValues = []
        self.HelpBattleSkills = []
        self.EquipPlaceColorList = []
        return
    def GetDogzID(self): return self.DogzID # 神兽ID
    def GetBaseAttrTypes(self): return self.BaseAttrTypes # 基础属性类型列表
    def GetBaseAttrValues(self): return self.BaseAttrValues # 基础属性值列表
    def GetHelpBattleSkills(self): return self.HelpBattleSkills # 助战技能ID列表
    def GetEquipPlaceColorList(self): return self.EquipPlaceColorList # 穿戴装备颜色限制
# 神兽强化表
class IPY_DogzEquipPlus():
    def __init__(self):
        self.EquipPlace = 0
        self.PlusLV = 0
        self.PlusAttrTypes = []
        self.PlusAttrValues = []
        self.PlusLVUPTotalExp = 0
        return
    def GetEquipPlace(self): return self.EquipPlace # 装备位
    def GetPlusLV(self): return self.PlusLV # 强化等级
    def GetPlusAttrTypes(self): return self.PlusAttrTypes # 强化属性类型列表
    def GetPlusAttrValues(self): return self.PlusAttrValues # 强化属性值列表
    def GetPlusLVUPTotalExp(self): return self.PlusLVUPTotalExp # 升级所需累计熟练度总值
# 符印表
class IPY_Rune():
    
@@ -1218,6 +1290,7 @@
    def __init__(self):
        self.ID = 0
        self.Quality = 0
        self.UnlockSys = ""
        self.UnLockNeedItemID = 0
        self.UnLockNeedItemCnt = 0
        self.DecomposeExp = 0
@@ -1226,11 +1299,13 @@
        self.UseNeedRank = 0
        self.SkillID = []
        self.SkillUnLock = []
        self.SkillUnLockSys = []
        self.InitFightPower = 0
        return
        
    def GetID(self): return self.ID # 灵兽NPCID
    def GetQuality(self): return self.Quality # 品质
    def GetUnlockSys(self): return self.UnlockSys # 解锁广播提示
    def GetUnLockNeedItemID(self): return self.UnLockNeedItemID # 解锁灵兽物品ID
    def GetUnLockNeedItemCnt(self): return self.UnLockNeedItemCnt # 解锁所需物品数量
    def GetDecomposeExp(self): return self.DecomposeExp # 分解单个解锁物品可获得升阶经验
@@ -1239,6 +1314,7 @@
    def GetUseNeedRank(self): return self.UseNeedRank # 多少阶可切换外观
    def GetSkillID(self): return self.SkillID # 灵兽技能ID
    def GetSkillUnLock(self): return self.SkillUnLock # 灵兽技能解锁需要阶数
    def GetSkillUnLockSys(self): return self.SkillUnLockSys # 灵兽技能解锁提示
    def GetInitFightPower(self): return self.InitFightPower # 初始战力
# 装备分解属性表
@@ -1296,7 +1372,8 @@
        self.MaxLV = 0
        self.UseNeedRank = 0
        self.Quality = 0
        self.InitFightPower = 0
        self.InitFightPower = 0
        self.UnlockSys = ""
        return
        
    def GetHorseID(self): return self.HorseID # 坐骑编号ID
@@ -1307,7 +1384,8 @@
    def GetMaxLV(self): return self.MaxLV # 坐骑最高等级
    def GetUseNeedRank(self): return self.UseNeedRank # 多少阶可切换外观
    def GetQuality(self): return self.Quality # 坐骑品质
    def GetInitFightPower(self): return self.InitFightPower # 初始战力
    def GetInitFightPower(self): return self.InitFightPower # 初始战力
    def GetUnlockSys(self): return self.UnlockSys # 解锁广播提示
# 坐骑升级表
class IPY_HorseUp():
@@ -1318,7 +1396,8 @@
        self.NeedExp = 0
        self.AttrType = []
        self.AttrValue = []
        self.SkillID = []
        self.SkillID = []
        self.SysMark = ""
        return
        
    def GetHorseID(self): return self.HorseID # 坐骑编号ID
@@ -1326,7 +1405,8 @@
    def GetNeedExp(self): return self.NeedExp # 升级所需经验
    def GetAttrType(self): return self.AttrType # 激活加成属性类型
    def GetAttrValue(self): return self.AttrValue # 激活加成属性值
    def GetSkillID(self): return self.SkillID # 可获得的技能ID
    def GetSkillID(self): return self.SkillID # 可获得的技能ID
    def GetSysMark(self): return self.SysMark # 广播提示
# 玩家等级表
class IPY_PlayerLV():
@@ -1913,7 +1993,8 @@
        self.NeedExp = 0
        self.AddAttr = {}
        self.UnLockSkill = []
        self.PrivilegeID = 0
        self.ActiveMWID = 0
        self.ItemAward = []
        return
        
    def GetMWID(self): return self.MWID # 法宝ID
@@ -1921,7 +2002,8 @@
    def GetNeedExp(self): return self.NeedExp # 需要经验
    def GetAddAttr(self): return self.AddAttr # 属性
    def GetUnLockSkill(self): return self.UnLockSkill # 解锁的技能
    def GetPrivilegeID(self): return self.PrivilegeID # 特权ID
    def GetActiveMWID(self): return self.ActiveMWID # 激活法宝ID
    def GetItemAward(self): return self.ItemAward # 物品奖励[itemID,cnt,isbind]
# 法宝特权表
class IPY_TreasurePrivilege():
@@ -1932,7 +2014,8 @@
        self.SingleValue = 0
        self.MaxValue = 0
        self.AddAttr = {}
        self.ItemAward = []
        self.ItemAward = []
        self.SuccessList = []
        return
        
    def GetPrivilegeID(self): return self.PrivilegeID # 特权ID
@@ -1940,7 +2023,8 @@
    def GetSingleValue(self): return self.SingleValue # 进度
    def GetMaxValue(self): return self.MaxValue # 最大进度
    def GetAddAttr(self): return self.AddAttr # 属性
    def GetItemAward(self): return self.ItemAward # 物品奖励
    def GetItemAward(self): return self.ItemAward # 物品奖励
    def GetSuccessList(self): return self.SuccessList # 需要完成成就
# 法宝技能升级表
class IPY_TreasureSkill():
@@ -2267,12 +2351,18 @@
        self.NPCID = 0
        self.MapID = 0
        self.RefreshMark = 0
        self.IsNeedShunt = 0
        self.RelatedType = 0
        self.RelatedID = 0
        self.StoneNPCID = 0
        return
        
    def GetNPCID(self): return self.NPCID # ID
    def GetMapID(self): return self.MapID # 地图ID
    def GetRefreshMark(self): return self.RefreshMark # 刷新标识点
    def GetIsNeedShunt(self): return self.IsNeedShunt # 是否需要分流
    def GetRelatedType(self): return self.RelatedType # 刷怪关联类型
    def GetRelatedID(self): return self.RelatedID # 关联ID
    def GetStoneNPCID(self): return self.StoneNPCID # 墓碑NPCID
# 古神禁地表
@@ -2652,6 +2742,8 @@
        self.GridItemInfo = {}
        self.JobItemList = []
        self.GridItemRateListFree = []
        self.FreeGridItemRateList2 = []
        self.FreeGridItemRateList3 = {}
        self.GridItemRateList1 = []
        self.GridItemRateList2 = []
        self.GridItemRateList3 = {}
@@ -2663,6 +2755,8 @@
    def GetGridItemInfo(self): return self.GridItemInfo # 格子编号对应物品信息 {"编号":[物品ID, 个数], ...}
    def GetJobItemList(self): return self.JobItemList # 职业物品组列表 [[职业1物品, 职业2物品, ...], ...]
    def GetGridItemRateListFree(self): return self.GridItemRateListFree # 免费产出格子编号饼图 [[概率, 格子编号], ...]
    def GetFreeGridItemRateList2(self): return self.FreeGridItemRateList2 # 免费每满x次保底产出格子编号饼图 [[概率, 格子编号], ...]
    def GetFreeGridItemRateList3(self): return self.FreeGridItemRateList3 # 免费第x次必出产出格子编号饼图 {次数:[[概率, 格子编号], ...], ...}
    def GetGridItemRateList1(self): return self.GridItemRateList1 # 常规产出格子编号饼图 [[概率, 格子编号], ...]
    def GetGridItemRateList2(self): return self.GridItemRateList2 # 每满x次保底产出格子编号饼图 [[概率, 格子编号], ...]
    def GetGridItemRateList3(self): return self.GridItemRateList3 # 第x次必出产出格子编号饼图 {次数:[[概率, 格子编号], ...], ...}
@@ -2766,7 +2860,7 @@
    
    def __init__(self):
        self.ID = 0
        self.ExchangeItemID = 0
        self.ExchangeItemIDList = []
        self.ExchangeItemCount = 0
        self.ExchangeItemIsBind = 0
        self.CostItemID = 0
@@ -2774,7 +2868,7 @@
        return
        
    def GetID(self): return self.ID # 兑换ID
    def GetExchangeItemID(self): return self.ExchangeItemID # 兑换物品ID
    def GetExchangeItemIDList(self): return self.ExchangeItemIDList # 兑换物品ID
    def GetExchangeItemCount(self): return self.ExchangeItemCount # 兑换物品个数
    def GetExchangeItemIsBind(self): return self.ExchangeItemIsBind # 兑换物品是否绑定
    def GetCostItemID(self): return self.CostItemID # 消耗物品ID
@@ -2807,6 +2901,23 @@
    def GetIndex(self): return self.Index # 索引
    def GetNeedPoint(self): return self.NeedPoint # 需要点数
    def GetAward(self): return self.Award # 奖励 {"职业":[[物品ID,个数,是否绑定],...], ...}
# 地图NPC配置表-挂机点
class IPY_MapEventPoint():
    def __init__(self):
        self.MapID = 0
        self.NPCID = 0
        self.LowLV = 0
        self.HighestLV = 0
        self.Defense = 0
        return
    def GetMapID(self): return self.MapID
    def GetNPCID(self): return self.NPCID
    def GetLowLV(self): return self.LowLV #  推荐最低等级
    def GetHighestLV(self): return self.HighestLV #  推荐最高等级
    def GetDefense(self): return self.Defense #  推荐防御
def Log(msg, playerID=0, par=0):
@@ -2852,6 +2963,10 @@
        self.ipyItemPlusSumAttrLen = len(self.ipyItemPlusSumAttrCache)
        self.ipyRoleEquipStarsCache = self.__LoadFileData("RoleEquipStars", IPY_RoleEquipStars)
        self.ipyRoleEquipStarsLen = len(self.ipyRoleEquipStarsCache)
        self.ipyDogzCache = self.__LoadFileData("Dogz", IPY_Dogz)
        self.ipyDogzLen = len(self.ipyDogzCache)
        self.ipyDogzEquipPlusCache = self.__LoadFileData("DogzEquipPlus", IPY_DogzEquipPlus)
        self.ipyDogzEquipPlusLen = len(self.ipyDogzEquipPlusCache)
        self.ipyRuneCache = self.__LoadFileData("Rune", IPY_Rune)
        self.ipyRuneLen = len(self.ipyRuneCache)
        self.ipyEquipWashCache = self.__LoadFileData("EquipWash", IPY_EquipWash)
@@ -3004,6 +3119,8 @@
        self.ipyAllPeoplePartyLen = len(self.ipyAllPeoplePartyCache)
        self.ipyAllPeoplePartyAwardCache = self.__LoadFileData("AllPeoplePartyAward", IPY_AllPeoplePartyAward)
        self.ipyAllPeoplePartyAwardLen = len(self.ipyAllPeoplePartyAwardCache)
        self.ipyMapEventPointCache = self.__LoadFileData("MapEventPoint", IPY_MapEventPoint)
        self.ipyMapEventPointLen = len(self.ipyMapEventPointCache)
        Log("IPY_FuncConfig count=%s" % len(self.ipyFuncConfigDict))
        Log("IPY_DataMgr InitOK!")
        return
@@ -3095,22 +3212,26 @@
        for i, strValue in enumerate(rowList):
            if i == 0:
                continue
            fieldName = fieldList[i][1]
            strValue = strValue.lstrip().rstrip()
            if strValue.isdigit():
                configValue = int(strValue)
            elif (strValue.startswith("{") and strValue.endswith("}")) \
                or (strValue.startswith("[") and strValue.endswith("]")) \
                or (strValue.startswith("(") and strValue.endswith(")")):
                configValue = eval(strValue)
            elif "_" in strValue and type(self.__StrToDict(strValue)) == dict:
                configValue = self.__StrToDict(strValue)
            elif ChConfig.Def_Str_Montant in strValue:
                configValue = eval("(%s,)" % strValue.replace(ChConfig.Def_Str_Montant, ","))
            elif strValue in ["-", ""]:
                configValue = ""
            else:
                configValue = self.__ToFloat(strValue)
            try:
                fieldName = fieldList[i][1]
                strValue = strValue.lstrip().rstrip()
                if strValue.isdigit():
                    configValue = int(strValue)
                elif (strValue.startswith("{") and strValue.endswith("}")) \
                    or (strValue.startswith("[") and strValue.endswith("]")) \
                    or (strValue.startswith("(") and strValue.endswith(")")):
                    configValue = eval(strValue)
                elif "_" in strValue and type(self.__StrToDict(strValue)) == dict:
                    configValue = self.__StrToDict(strValue)
                elif ChConfig.Def_Str_Montant in strValue:
                    configValue = eval("(%s,)" % strValue.replace(ChConfig.Def_Str_Montant, ","))
                elif strValue in ["-", ""]:
                    configValue = ""
                else:
                    configValue = self.__ToFloat(strValue)
            except BaseException:
                ErrLog("SetIpyDataError: tableName=%s,key=%s,i=%s,value=%s" % ("FuncConfig", key, i, strValue))
                raise
            setattr(funcConfigObj, fieldName, configValue)
        self.ipyFuncConfigDict[key] = funcConfigObj
        return
@@ -3186,6 +3307,10 @@
    def GetItemPlusSumAttrByIndex(self, index): return self.ipyItemPlusSumAttrCache[index]
    def GetRoleEquipStarsCount(self): return self.ipyRoleEquipStarsLen
    def GetRoleEquipStarsByIndex(self, index): return self.ipyRoleEquipStarsCache[index]
    def GetDogzCount(self): return self.ipyDogzLen
    def GetDogzByIndex(self, index): return self.ipyDogzCache[index]
    def GetDogzEquipPlusCount(self): return self.ipyDogzEquipPlusLen
    def GetDogzEquipPlusByIndex(self, index): return self.ipyDogzEquipPlusCache[index]
    def GetRuneCount(self): return self.ipyRuneLen
    def GetRuneByIndex(self, index): return self.ipyRuneCache[index]
    def GetEquipWashCount(self): return self.ipyEquipWashLen
@@ -3338,6 +3463,8 @@
    def GetAllPeoplePartyByIndex(self, index): return self.ipyAllPeoplePartyCache[index]
    def GetAllPeoplePartyAwardCount(self): return self.ipyAllPeoplePartyAwardLen
    def GetAllPeoplePartyAwardByIndex(self, index): return self.ipyAllPeoplePartyAwardCache[index]
    def GetMapEventPointCount(self): return self.ipyMapEventPointLen
    def GetMapEventPointByIndex(self, index): return self.ipyMapEventPointCache[index]
IPYData = IPY_DataMgr()
def IPY_Data(): return IPYData