From 13ea20f8b300bbc7e034395b5848813b9b4c579b Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 10 八月 2018 14:40:28 +0800
Subject: [PATCH] Add: PySysDB转移到git代码库;
---
PySysDB/PySysDBPY.des | 1
PySysDB/生成IpyGameDataPY/IpyGameDataPYTemp.py | 465 ++++++++++++
PySysDB/生成IpyGameDataPY/Ipy系统表使用说明.docx | 0
PySysDB/生成IpyGameDataPY/生成IpyGameDataPY_GameServer.bat | 2
PySysDB/生成IpyGameDataPY/config.ini | 5
PySysDB/PySysDBG.des | 1
PySysDB/生成IpyGameDataPY/生成IpyGameDataPY_MapServer.bat | 2
PySysDB/PySysDBPY.h | 1177 ++++++++++++++++++++++++++++++++
PySysDB/PySysDBG | 0
PySysDB/PySysDBG.h | 294 ++++++++
PySysDB/PySysDBPY | 0
PySysDB/生成IpyGameDataPY/IpyGameDataPYCreater.py | 199 +++++
12 files changed, 2,146 insertions(+), 0 deletions(-)
diff --git a/PySysDB/PySysDBG b/PySysDB/PySysDBG
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/PySysDB/PySysDBG
diff --git a/PySysDB/PySysDBG.des b/PySysDB/PySysDBG.des
new file mode 100644
index 0000000..69656a0
--- /dev/null
+++ b/PySysDB/PySysDBG.des
@@ -0,0 +1 @@
+py自定义表GameServer
diff --git a/PySysDB/PySysDBG.h b/PySysDB/PySysDBG.h
new file mode 100644
index 0000000..f76ad9b
--- /dev/null
+++ b/PySysDB/PySysDBG.h
@@ -0,0 +1,294 @@
+//功能配置表格 #tagFuncConfig
+
+struct tagFuncConfig
+{
+ char _Key; //标识
+ char Numerical1; //数据1
+ char Numerical2; //数据2
+ char Numerical3; //数据3
+ char Numerical4; //数据4
+ char Numerical5; //数据5
+};
+
+//世界等级表格 #tagWorldLV
+
+struct tagWorldLV
+{
+ WORD _WorldLV; //世界等级
+ DWORD OpenServerSecond; //开服时间秒
+};
+
+//仙盟表格 #tagFamily
+
+struct tagFamily
+{
+ BYTE _FamilyLV; //仙盟等级
+ WORD MemberCnt; //成员数量
+ BYTE DeputyLeaderCnt; //副盟主数量
+ BYTE EliteCnt; //精英数量
+ DWORD NeedMoney; //升级需要资金
+ DWORD WeekMissionMoneyMax; //每周任务最大可获得仙盟资金
+};
+
+//集市查询表
+
+struct tagMarketQuery
+{
+ WORD _QueryType; //查询类型
+ dict LimitInfo; //限制条件
+};
+
+//运营活动表
+
+struct tagActionControl
+{
+ WORD _ID; //活动ID
+ char Mark[20]; //活动类型标记
+ char Data[50]; //活动数据
+ WORD LVLimit; //限制等级
+ char OpenDate[10]; //开启日期
+ char CloseDate[10]; //结束日期
+ char ValidOpenServerDay[10]; //有效开服天, 与合服天、星期互斥
+ char ValidMixServerDay[10]; //有效合服天, 与开服天、星期互斥
+ char VaildWeek[10]; //有效星期, 与开服天、合服天互斥
+ char OpenTime[5]; //开启时间
+ char CloseTime[5]; //结束时间
+ BYTE TimeValidType; //时间有效性
+ char SpecTimeState[50]; //特殊活动状态时间控制信息
+ char NotifyInfo[100]; //全服广播信息配置
+};
+
+//日常活动表
+
+struct tagDailyAction
+{
+ DWORD _DailyID; //活动ID
+ BYTE OpenServerDay; //开服第几天开始开启,0为不限制
+ char OpenTime; //开启时间
+ DWORD Duration; //持续时间, 0为不限制
+ dict NotifyInfo; //广播提示信息
+};
+
+//副本状态时间表
+
+struct tagFBStateTime
+{
+ DWORD _ID; //ID
+ DWORD DataMapID; //所属的玩法数据地图ID
+ BYTE OpenServerWeek; //开服X周后开放
+ BYTE OpenServerDay; //开服X天后开放
+ BYTE StartWeekday; //开始星期
+ BYTE StartHour; //开始时
+ BYTE StartMinute; //开始分
+ BYTE EndWeekday; //结束星期
+ BYTE EndHour; //结束时
+ BYTE EndMinute; //结束分
+ BYTE CanEnter; //是否可进入副本
+ BYTE StateValue; //状态值
+ dict NotifyInfoDict; //广播提示信息
+};
+
+//副本功能线路表
+
+struct tagFBLine
+{
+ DWORD _DataMapID; //数据地图ID
+ BYTE _LineID; //功能线路ID
+ DWORD MapID; //场景地图ID
+};
+
+//地图表
+
+struct tagChinMap
+{
+ DWORD _MapID; //地图ID
+ char MapName; //地图名
+ BYTE MapFBType; // 地图类型
+ BYTE TeamLimit; // 队伍限制类型;0不限,1-不可变更,2-不可存在队伍
+};
+
+//BOSS信息表
+
+struct tagBOSSInfo
+{
+ DWORD _NPCID; //ID
+ DWORD MapID; //地图ID
+ char RefreshTime; //刷新时间 参数 onlineCnt
+ list LVLimit; //在线人物等级范围
+ BYTE DiffPer; //百分比与之前的误差小于X%,则更新实时在线数量
+ BYTE NoUpdataCnt; //多少次未更新实时在线数量字段时强制更新
+ DWORD StoneNPCID; //墓碑NPCID
+ WORD RebornPreNotifyTime; //复活前X秒通知
+ char SourceName; //BOSS来源
+};
+
+//宴会题库表
+
+struct tagQuestionBank
+{
+ DWORD _ID; //ID
+ char Answer; //答案
+};
+
+//仙盟红包表
+
+struct tagFamilyRedPack
+{
+ WORD _ID; //ID
+ WORD GetType; //获得途径
+ WORD MoneyNum; //红包额度
+ BYTE MoneyType; //金钱类型
+ BYTE PacketCnt; //红包个数
+ BYTE LeaderOwn; //是否归属盟主
+};
+
+//等级开启功能 #tagFuncOpenLV
+
+struct tagFuncOpenLV
+{
+ DWORD _FuncId; //功能标识
+ DWORD LimitLV; //开启等级
+ DWORD LimitMagicWeapon; //需要解锁法宝ID
+ WORD LimiRealmLV; //需要境界等级
+};
+
+//NPC表
+
+struct tagChinNPC
+{
+ DWORD _NPCID;
+ char NPCName;
+ WORD LV;
+};
+
+
+//玩家等级表
+
+struct tagPlayerLV
+{
+ WORD _LV; //玩家等级
+ DWORD ReFightPower; //战斗力
+};
+
+//限时特惠表
+
+struct tagActSpringSale
+{
+ DWORD _CfgID; //配置ID
+ char ActMark; //活动组标记
+ list ServerIDList; //服务器ID列表
+ BYTE OpenServerDayLimit; //开服X天后有效
+ char StartDate; //开启日期
+ char EndDate; //结束日期
+ list StartTimeList; //开启时间列表, 支持多个时段
+ list EndTimeList; //结束时间列表, 支持多个时段
+ dict NotifyInfoStart; //全服提示信息 - 相对开始时间
+ dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
+ WORD LVLimit; //限制等级
+ BYTE IsDayReset; //是否每天重置
+ list ShopTypeList; //商店类型列表
+};
+
+//限时礼包表
+
+struct tagActFlashGiftbag
+{
+ DWORD _CfgID; //配置ID
+ char ActMark; //活动组标记
+ list ServerIDList; //服务器ID列表
+ BYTE OpenServerDayLimit; //开服X天后有效
+ char StartDate; //开启日期
+ char EndDate; //结束日期
+ list StartTimeList; //开启时间列表, 支持多个时段
+ list EndTimeList; //结束时间列表, 支持多个时段
+ dict NotifyInfoStart; //全服提示信息 - 相对开始时间
+ dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
+ WORD LVLimit; //限制等级
+ BYTE IsDayReset; //是否每天重置
+ list GiftbagTypeList; //礼包类型列表
+};
+
+//双倍经验活动表
+
+struct tagActExpRate
+{
+ DWORD _CfgID; //配置ID
+ char ActMark; //活动组标记
+ list ServerIDList; //服务器ID列表
+ char StartDate; //开启日期
+ char EndDate; //结束日期
+ list StartTimeList; //开启时间列表, 支持多个时段
+ list EndTimeList; //结束时间列表, 支持多个时段
+ dict NotifyInfoStart; //全服提示信息 - 相对开始时间
+ dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
+ WORD LVLimit; //限制等级
+ DWORD AddExpRate; //经验倍率加成,万分率
+};
+
+//消费返利活动表
+
+struct tagActCostRebate
+{
+ DWORD _CfgID; //配置ID
+ char ActMark; //活动组标记
+ list ServerIDList; //服务器ID列表
+ char StartDate; //开启日期
+ char EndDate; //结束日期
+ dict NotifyInfoStart; //全服提示信息 - 相对开始时间
+ dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
+ WORD LVLimit; //限制等级
+ BYTE IsDayReset; //是否每天重置
+ list TemplateIDList; //模板ID列表
+};
+
+//BOSS复活活动时间表
+
+struct tagActBossReborn
+{
+ DWORD _CfgID; //配置ID
+ char ActMark; //活动组标记
+ list ServerIDList; //服务器ID列表
+ char StartDate; //开启日期
+ char EndDate; //结束日期
+ dict NotifyInfoStart; //全服提示信息 - 相对开始时间
+ dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
+ WORD LVLimit; //限制等级
+};
+
+//仙界盛典活动时间表
+
+struct tagActFairyCeremony
+{
+ DWORD _CfgID; //配置ID
+ char ActMark; //活动组标记
+ list ServerIDList; //服务器ID列表
+ char StartDate; //开启日期
+ char EndDate; //结束日期
+ dict NotifyInfoStart; //全服提示信息 - 相对开始时间
+ dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
+ WORD LVLimit; //限制等级
+};
+
+//仙界盛典-绝版降临表
+
+struct tagUniquenessArrive
+{
+ BYTE _WorldLvNum; //世界等级档
+ DWORD _Rank; //排名
+ dict Award; //奖励 {"职业":[[物品ID,个数,是否绑定],...], ...}
+};
+
+//多倍修行点活动时间表
+
+struct tagActRealmPoint
+{
+ DWORD _CfgID; //配置ID
+ char ActMark; //活动组标记
+ list ServerIDList; //服务器ID列表
+ char StartDate; //开启日期
+ char EndDate; //结束日期
+ dict NotifyInfoStart; //全服提示信息 - 相对开始时间
+ dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
+ WORD Multiple; //倍数
+ WORD LVLimit; //限制等级
+};
\ No newline at end of file
diff --git a/PySysDB/PySysDBPY b/PySysDB/PySysDBPY
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/PySysDB/PySysDBPY
diff --git a/PySysDB/PySysDBPY.des b/PySysDB/PySysDBPY.des
new file mode 100644
index 0000000..15972ed
--- /dev/null
+++ b/PySysDB/PySysDBPY.des
@@ -0,0 +1 @@
+py自定义表MapServer
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
new file mode 100644
index 0000000..2c817dd
--- /dev/null
+++ b/PySysDB/PySysDBPY.h
@@ -0,0 +1,1177 @@
+//称号表 #tagDienstgrad
+
+struct tagDienstgrad
+{
+ DWORD _ID; //头衔id
+ WORD Type; //头衔类型
+ DWORD ExpireTime; //有效时间
+ list LightType; //点亮属性类型
+ list LightAttribute; //点亮属性值
+ list Skills; //被动技能
+};
+
+//境界表 #tagRealm
+
+struct tagRealm
+{
+ WORD _Lv; //境界等级
+ BYTE IsBigRealm; //是否大境界
+ DWORD NeedPoint; //开启渡劫需要修炼点
+ DWORD NeedItemID; //开启渡劫需要道具ID
+ WORD NeedItemCnt; //开启渡劫消耗的道具数量
+ dict NeedActiveTreasure; //开启渡劫需要激活法宝条件
+ list AddAttrType; //境界加成属性类型
+ list AddAttrNum; //境界加成属性值
+ DWORD BossID; //渡劫bossid
+ dict SitTime; //打坐时间
+ dict TeamAward; //组队帮打的人的奖励
+};
+
+//神兵表 #tagGodWeapon
+
+struct tagGodWeapon
+{
+ WORD _Type; //神兵类型
+ WORD _LV; //等级
+ DWORD Exp;
+ list AttrType; //属性类型
+ list AttrNum; //属性值
+ DWORD SkillID; //激活技能ID
+};
+
+//功能配置表格 #tagFuncConfig
+
+struct tagFuncConfig
+{
+ char _Key; //标识
+ char Numerical1; //数据1
+ char Numerical2; //数据2
+ char Numerical3; //数据3
+ char Numerical4; //数据4
+ char Numerical5; //数据5
+};
+
+//等级开启功能 #tagFuncOpenLV
+
+struct tagFuncOpenLV
+{
+ DWORD _FuncId; //功能标识
+ DWORD LimitLV; //开启等级
+ DWORD LimitMagicWeapon; //需要解锁法宝ID
+ WORD LimiRealmLV; //需要境界等级
+ DWORD LimitMissionID; //需要完成的任务ID
+};
+
+
+//合成表 #tagItemCompound
+
+struct tagItemCompound
+{
+ WORD _ID; //合成配置编号ID
+ list MakeID; //可合成的道具ID,多个则随机一个
+ list UnfixedItemID; //不固定道具ID, 多个ID时则任意一种均可
+ BYTE UnfixedItemCount; //不固定道具消耗数量
+ list FixedItemID; //消耗固定道具ID, 多个ID时代表每个ID均需消耗
+ list FixedItemCount; //消耗固定道具数量,每个ID对应数量
+ DWORD NeedMoney; // 消耗铜钱
+ WORD SuccessRate; // 成功率万分率
+ WORD SuccessRateMax; // 最大成功率万分率
+ BYTE AddonsCountMax; //最大可附加材料数, 增加概率用, 非必须, 0代表不可附加材料
+ char SysMark; //提示mark
+};
+
+
+//物品强化效果表
+
+struct tagItemPlus
+{
+ BYTE _Type; //强化类型
+ WORD _LV; //强化等级
+ list AttrType; //属性类型
+ list AttrValue; //属性值
+ DWORD CostCount; //消耗铜钱
+ DWORD AddExp; //提升熟练度值
+ DWORD TotalExp; //升级所需熟练度总值
+};
+
+
+//装备强化等级上限
+
+struct tagItemPlusMax
+{
+ BYTE _Type; //按装备位对应类型查找
+ BYTE _ItemRank; // 装备阶数
+ BYTE _ItemColor; //装备颜色 如橙装
+ WORD LevelMax; //强化等级上限
+};
+
+
+//装备全身强化属性
+
+struct tagItemPlusSumAttr
+{
+ WORD _PlusCntNeed; //全身强化等级
+ list AttrType; //全身强化激活属性类型
+ list AttrValue; //全身强化激活属性值
+};
+
+
+//装备全身星数属性
+
+struct tagRoleEquipStars
+{
+ BYTE _StarsNeed; //全身星数
+ list AttrType; //属性类型
+ list AttrValue; //属性值
+};
+
+
+//符印表
+
+struct tagRune
+{
+ DWORD _ID; //编号ID
+ list AttrType; //全身强化激活属性类型
+};
+
+
+//洗练表 #tagEquipWash
+
+struct tagEquipWash
+{
+ BYTE _WashType; // 装备归组类型
+ BYTE _WashLV; // 洗练等级
+ BYTE AttrType1; // 属性1类型
+ DWORD AttrMax1; // 属性1当前等级洗练上限
+ dict AttrRandDict1; // 属性1随机范围
+ DWORD AttrCostGoldMin1; // 属性1仙玉洗练下限值
+ DWORD AttrCostGoldMax1; // 属性1仙玉洗练上限值
+ BYTE AttrType2; // 属性2类型
+ DWORD AttrMax2; // 属性2当前等级洗练上限
+ dict AttrRandDict2; // 属性2随机范围
+ DWORD AttrCostGoldMin2; // 属性2仙玉洗练下限值
+ DWORD AttrCostGoldMax2; // 属性2仙玉洗练上限值
+ BYTE AttrType3; // 属性3类型
+ DWORD AttrMax3; // 属性3当前等级洗练上限
+ dict AttrRandDict3; // 属性3随机范围
+ DWORD AttrCostGoldMin3; // 属性3仙玉洗练下限值
+ DWORD AttrCostGoldMax3; // 属性3仙玉洗练上限值
+ DWORD CostItemID; // 固定消耗物品ID
+ BYTE CostItemCount; // 固定消耗物品个数
+ list GoldWashCostList; // 仙玉洗练条数对应消耗
+};
+
+
+//洗练特殊属性表 #tagEquipWashSpec
+
+struct tagEquipWashSpec
+{
+ BYTE _WashTypeNeed; // 所需装备归组类型
+ BYTE _WashLVNeed; // 所需洗练等级
+ list AddAttrType; //激活加成属性类型
+ list AddAttrValue; //激活加成属性值
+};
+
+
+//属性果实表
+
+struct tagAttrFruit
+{
+ DWORD _ID; //物品ID
+ BYTE FuncID; //所属功能ID
+ WORD MaxUseCnt; //最大可使用数量
+ WORD RecycleMoney; //回收货币值
+};
+
+
+//灵兽表
+
+struct tagPetInfo
+{
+ DWORD _ID; //灵兽NPCID
+ BYTE Quality; //品质
+ DWORD UnLockNeedItemID; //解锁灵兽物品ID
+ BYTE UnLockNeedItemCnt; //解锁所需物品数量
+ DWORD DecomposeExp; //分解单个解锁物品可获得升阶经验
+ BYTE InitRank; //灵兽初始阶数
+ WORD MaxRank; //灵兽最高阶数
+ WORD UseNeedRank; //多少阶可切换外观
+ list SkillID; //灵兽技能ID
+ list SkillUnLock; //灵兽技能解锁需要阶数
+ DWORD InitFightPower; //初始战力
+};
+
+
+//装备分解属性表
+
+struct tagEquipDecompose
+{
+ WORD _LV; //等级
+ DWORD UpNeedExp; //升级所需经验数
+ dict Attr; //属性加成
+};
+
+
+//灵兽升阶消耗表
+
+struct tagPetClassCost
+{
+ DWORD _PetID; //灵兽NPCID
+ DWORD _Class; //灵兽阶数
+ DWORD UpNeedExp; //灵兽升阶所需经验数
+ DWORD AtkAdd; //每阶攻击力加成
+};
+
+
+//灵兽吸收装备表
+
+struct tagPetEatEquip
+{
+ BYTE _EquipColor; //装备品质
+ BYTE _EquipClass; //装备阶数
+ DWORD Exp; //获得灵兽升级经验
+ DWORD FamilyStoreItemScore; //仙盟宝库积分
+};
+
+
+//坐骑表
+
+struct tagHorse
+{
+ DWORD _HorseID; //坐骑编号ID
+ DWORD ItemID; //坐骑物品ID
+ DWORD UnlockItemID; //解锁坐骑物品编号
+ BYTE UnlockItemCnt; //解锁所需物品数量
+ BYTE InitLV; //坐骑初始等级
+ BYTE MaxLV; //坐骑最高等级
+ BYTE UseNeedRank; //多少阶可切换外观
+ BYTE Quality; //坐骑品质
+ DWORD InitFightPower; //初始战力
+};
+
+
+//坐骑升级表
+
+struct tagHorseUp
+{
+ DWORD _HorseID; //坐骑编号ID
+ BYTE _LV; //坐骑等级
+ DWORD NeedExp; //升级所需经验
+ list AttrType; //激活加成属性类型
+ list AttrValue; //激活加成属性值
+ list SkillID; //可获得的技能ID
+};
+
+//玩家等级表
+
+struct tagPlayerLV
+{
+ WORD _LV; //玩家等级
+ DWORD ExpPoint; //升级所需经验点,每个经验点代表的经验由项目决定
+ DWORD Exp; //除经验点总经验外升级还需的经验
+ BYTE TalentPoint; //等级获得的天赋点
+ DWORD ReExp; //等级经验效率(second)
+ DWORD ReMaxHP; //生命
+ DWORD ReAtk; //攻击
+ DWORD ReDef; //防御
+ DWORD ReHit; //命中
+ DWORD ReMiss; //闪避
+ DWORD ReAtkSpeed; //攻速
+ DWORD ReSkillAtkRate; //技能伤害比例
+ DWORD ReDamagePer; //增加伤害
+ DWORD ReDamReduce; //减少伤害
+ DWORD ReIgnoreDefRate; //无视防御比例
+ DWORD ReLuckyHitRate; //会心一击率
+ DWORD ReLuckyHit; //会心一击伤害
+ DWORD ReBleedDamage; //流血伤害增加
+ DWORD ReIceAtk; //真实伤害
+ DWORD ReIceDef; //真实抵御
+ DWORD RePetAtk; //灵宠攻击
+ DWORD RePetSkillAtkRate; //灵宠技能
+ DWORD RePetDamPer; //灵宠伤害增加
+ DWORD ReFinalHurt; //固定伤害增加
+ DWORD ReFinalHurtReduce; //固定伤害减少
+ DWORD RePotionReply; //血瓶恢复量
+ DWORD RePotionCD; //血瓶CD
+ DWORD AttackEff; //挂机效率
+ DWORD ReFightPower; //战斗力
+};
+
+//GM测试属性表
+
+struct tagGMAttr
+{
+ DWORD _GMAttrID; //数据ID
+ BYTE IsValid; //是否有效的
+ char GMAccID; //GM玩家账号
+ WORD GMMaxLV; //有效的最大等级
+ WORD AttrLV; //对应等级表中的属性
+ float AttrPer; //对应等级表中的比例
+ dict AttrSpecDict; //特殊属性值字典 {attrKey:value, ...}
+ dict AttrExDict; //特殊属性值字典 {attrKey:value, ...}
+};
+
+//成长型怪物参数公式表
+
+struct tagNPCStrengthen
+{
+ DWORD _NPCID; //NPCID
+ BYTE IsStrengthenByPlayerCount;//是否根据人数成长
+ BYTE LVStrengthenType;//等级成长类型, 0-不按等级成长;1-按玩家平均等级;2-按玩家最大等级;3-按世界等级;
+ DWORD HitTime;//受击次数
+ DWORD DefCoefficient;//人物防御系数
+ DWORD AtkCoefficient;//人物攻击系数
+ DWORD AdjustCoefficient;//调整系数比例
+ DWORD AtkInterval;//怪物攻击间隔
+ DWORD HitRate;//对人物的命中率
+ DWORD MissRate;//对人物的闪避率
+ DWORD MonterNum;//怪物数
+ DWORD IceAtkCoefficient;//元素攻击比例
+ DWORD IceDefCoefficient;//元素抗性比例
+ DWORD MaxEnduranceTime;//玩家最大承受伤害时间
+ DWORD FightPowerCoefficient;//压制战斗力系数
+};
+
+//装备套装属性表
+
+struct tagEquipSuitAttr
+{
+ BYTE _GroupType; //套装组合类型
+ BYTE _SuiteType; //套装类型
+ WORD _SuiteLV; //套装等级
+ BYTE _Job; //职业
+ BYTE Count1; //阶段1所需数量
+ list AttrType1; //阶段1属性类型
+ list AttrValue1; //阶段1属性值
+ BYTE Count2; //阶段2所需数量
+ list AttrType2; //阶段2属性类型
+ list AttrValue2; //阶段2属性值
+ BYTE Count3; //阶段2所需数量
+ list AttrType3; //阶段2属性类型
+ list AttrValue3; //阶段2属性值
+};
+
+//套装合成表
+
+struct tagEquipSuitCompound
+{
+ BYTE _SuiteType; //套装类型
+ BYTE _EquipPlace; //装备部位
+ WORD _SuiteLV; //套装等级
+ BYTE _Job; //职业
+ list CostItemID; //材料ID
+ list CostItemCnt; //材料数量
+};
+
+//羽翼精炼属性表
+
+struct tagWingRefineAttr
+{
+ BYTE _WingClassLV; //翅膀阶级
+ dict AttrInfo; //精炼属性信息
+ dict ItemColorInfo; //精炼经验对应颜色信息
+ DWORD MaxRefineExp; //本阶最大精炼值
+};
+
+//羽翼精炼经验表
+
+struct tagWingRefineExp
+{
+ DWORD _ItemID; //精炼物品ID
+ DWORD RandExpMin; //最小随机精炼值
+ DWORD RandExpMax; //最大随机精炼值
+ dict ExpMaterial; //翅膀代数对应精炼值
+};
+
+//仙盟科技表
+
+struct tagFamilyTech
+{
+ DWORD _TechID; //科技ID*1000+等级
+ BYTE AttrType; //属性类型
+ DWORD AttrValue; //属性值
+ DWORD Contribution; //需要贡献度
+ DWORD PowerEx; //额外战力
+};
+
+//战斗力参数等级系数表
+
+struct tagFightPowerParam
+{
+ WORD _LV; //等级
+ DWORD CftHit; //命中系数
+ DWORD CftMiss; //闪避系数
+ DWORD CftDamagePer; //增加伤害系数
+ DWORD CftDamReduce; //减少伤害系数
+ DWORD CftIgnoreDefRate; //无视防御系数
+ DWORD CftDamChanceDef; //抵御系数
+ DWORD CftBleedDamage; //流血伤害系数
+ DWORD CftFaintRate; //击晕系数
+ DWORD CftSuperHitReduce; //暴击抗性系数
+ DWORD CftLuckyHitRateReduce; //会心一击抗性系数
+ DWORD CftSkillAtkRate; //技能伤害系数
+ DWORD CftSkillAtkRateReduce; //技能减伤系数
+ DWORD CftDamagePerPVP; //PVP伤害增肌系数
+ DWORD CftDamagePerPVPReduce; //PVP伤害减少系数
+ DWORD CftDamBackPer; //伤害反射系数
+ DWORD CftIgnoreDefRateReduce; //无视防御抗性系数
+ DWORD CftFaintDefRate; //控制抵抗系数
+ DWORD CftAtkSpeed; //攻速系数
+ DWORD CftLuckyHit; //会心一击系数
+};
+
+//NPC掉落表
+
+struct tagNPCDropItem
+{
+ DWORD _NPCID; //NPCID
+ WORD MaxWorldLV; //最大世界等级,0为不限制,不受最大掉落等级影响
+ WORD MaxDropLV; //最大可掉落的玩家等级, 不影响世界等级
+ BYTE CanDropRatePlus; //额外提升掉率的是否有效
+ BYTE IsDropJobSelf; //是否只掉落本职业
+ list PieRateDrop; //饼图概率掉落信息 [(概率,0),(概率,(阶,颜色,部位集合key)),...]
+ BYTE PieRateDoCnt; //饼图概率执行次数
+ dict IndepRateDrop; //独立概率掉落信息 {(阶,颜色,部位集合key):概率,...}
+ BYTE IndepRateDoCnt; //独立概率执行次数
+ dict IndepRateMaxDropCount; //独立概率装备颜色最大掉落物品数 {颜色:上限数量,...}
+ dict EquipStarInfo; //装备颜色对应星级产出规则 {颜色:[(概率, 星级),...], ...}
+ list KillCountDropEquipEx; //第x次击杀附加必掉装备 [次数,阶,颜色,[(概率,星级),...],部位集合key]
+ list KillCountDropEquipEx2; //前x次击杀附加必掉装备 [次数,阶,颜色,[(概率,星级),...],部位集合key]
+ dict ItemIDDropRate; //指定物品ID掉率信息 {物品ID:概率, ...}
+ dict ItemIDMaxDropCount; //指定物品ID最大掉落个数,没配默认1次 {物品ID:随机次数,...}
+ dict ItemKeyDropRate; //物品ID集合Key概率, 随机一个, 优先级低 {物品ID集合key:概率, ...}
+ dict ItemKeyDropRateJob; //物品ID集合Key概率, 自身职业, 优先级高 {物品ID集合key:概率, ...}
+ dict ItemKeyMaxDropCount; //物品ID集合Key随机次数,没配默认1次 {物品ID集合key:随机次数,...}
+ BYTE DropMoneyDoCnt; //掉落金币执行次数
+ WORD DropMoneyRate; //掉落金币概率
+ WORD DropMoneyMin; //掉落金币最小值
+ WORD DropMoneyMax; //掉落金币最大值
+ list KillCountDrop; //击杀次数必掉,防止版本变更重复掉,只支持一次机会 [击杀次数,是否直接放入背包,[物品ID,...]]
+ list PriItemIDDrop; //所有归属者私有掉落物品ID列表,每人一份,默认绑定,没有职业区分[物品ID, ...]
+};
+
+//符印塔表
+
+struct tagRuneTower
+{
+ DWORD _ID; //塔编号
+ DWORD RunePoint; //过关给符印精华
+ DWORD Ysog; //过关给魔精
+ DWORD NPCID; //npcid
+ BYTE IsNotify; //是否广播
+ list FixEndAward; //固定结算奖励
+ dict GoodDrop; //珍稀符印通关掉落概率
+ DWORD SweepRunePoint; //扫荡符印精华
+ DWORD SweepYsog; //扫荡魔精
+ dict SweepGoodDrop; //扫荡珍稀符印
+};
+
+//副本总表
+
+struct tagFBFunc
+{
+ DWORD _DataMapID; //数据地图ID
+ BYTE DayTimes; //每日可挑战次数, 0为不限制
+ BYTE DayResetType; //每日次数重置类型; 0-不重置,1-0点,2-5点
+ BYTE WeekTimes; //每周可挑战次数, 0为不限制
+ BYTE WeekResetType; //每周次数重置类型; 0-不重置,1-0点,2-5点
+ list RewardRate; //评级奖励比例
+ DWORD BuyTimesVIPPriID; //购买次数VIP权限ID
+ DWORD ExtraTimesVIPPriID; //额外次数VIP权限ID
+ DWORD ExtraTimesMWPriID; //额外次数法宝权限ID
+ BYTE GuardPick; //该地图守护是否能拾取
+ WORD OfflineTime; //离线多久退出副本(秒)
+ WORD HelpPoint; //助战积分(0代表不可助战)
+};
+
+//副本功能线路表
+
+struct tagFBLine
+{
+ DWORD _DataMapID; //数据地图ID
+ BYTE _LineID; //功能线路ID
+ DWORD MapID; //场景地图ID
+ WORD LVLimitMin; //最低等级限制, 0为不限制
+ WORD LVLimitMax; //最高等级限制, 0为不限制
+ BYTE JobRankLimit; //所需职业阶
+ DWORD TicketID; //门票ID
+ list TicketCostCnt; //门票消耗数信息
+ WORD TicketPrice; //门票单价(不能用钱抵的配0)
+ WORD SweepLVLimit; //扫荡等级限制, 0为不限制
+ DWORD SweepItemID; //扫荡所需道具ID
+ BYTE SweepCostCnt; //扫荡所需道具个数
+ eval EnterPosInfo; //进入坐标信息
+ eval StepTime; //阶段时间
+ eval RefreshNPC; //标试点刷怪配置
+ eval GradeInfo; //评级规则
+ eval RewardInfo; //奖励信息
+};
+
+//副本刷怪标识点表
+
+struct tagNPCCustomRefresh
+{
+ DWORD _ID; //刷怪规则ID
+ list RefreshMarkInfo; //标试点, 当配置多个时为随机标试点, 不重复
+ DWORD RefreshNPCID; //指定NPCID
+ list RandNPCIDList; //单次随机刷怪NPCID
+ list NPCIDCountList; //单次指定刷怪NPC
+ WORD MaxCount; //单个点最大存在怪物数
+ WORD TotalMaxCount; //相同标试点总刷怪物数
+ BYTE IsLineOneOnly; //是否仅在1线刷怪
+ DWORD RefreshTick; //刷怪间隔秒
+ BYTE IsRepeat; //是否循环刷怪
+};
+
+//日常活动表
+
+struct tagDailyAction
+{
+ DWORD _DailyID; //活动ID
+ DWORD DayTimes; //每日次数, 0为不限制
+ BYTE DayResetType; //每日次数重置类型; 0-不重置,1-0点,2-5点
+ DWORD WeekTimes; //每周次数, 0为不限制
+ BYTE WeekResetType; //每周次数重置类型; 0-不重置,1-0点,2-5点
+};
+
+//装备评分属性系数表
+
+struct tagEquipGSParam
+{
+ BYTE _ClassLV; // 装备阶级
+ BYTE _EquipColor; // 装备颜色
+ BYTE _EquipQualityLV; // 装备星级
+ DWORD AtkPerC; // 攻击百分比系数
+ DWORD DamagePerC; // 增加伤害系数
+ DWORD SuperHitRateC; // 暴击率系数
+ DWORD SuperHitPerC; // 暴击值百分比系数
+ DWORD DamReducePerC; // 减少伤害系数
+ DWORD MaxHPPerC; // 生命上限百分比系数
+ DWORD DefPerC; // 防御力百分比系数
+ DWORD LuckyHitRateC; // 会心一击率系数
+ DWORD PetDamPerC; // 灵宠伤害增加百分比系数
+ DWORD PerLVAtkC; // 每级增加攻击力系数
+ DWORD MissRateC; // 闪避值百分比系数
+ DWORD HitRateC; // 命中力百分比系数
+ DWORD DamBackPerC; // 伤害反射百分比系数
+ DWORD PerLVMaxHPC; // 每级增加生命值系数
+ DWORD DropEquipPerC; // 增加装备掉落几率系数
+ DWORD DropMoneyPerC; // 增加掉落金币量百分比系数
+ DWORD IgnoreDefRateReduceC; // 无视防御抗性百分比系数
+ DWORD DamChanceDefC; // 抵御百分比系数
+ DWORD SuperHitReduceC; // 暴击抗性百分比系数
+ DWORD SkillAtkRateC; // 技能伤害百分比系数
+ DWORD SpeedPerC; // 移动速度百分比系数
+ DWORD AtkSpeedC; // 攻击速度系数
+};
+
+//成就表
+
+struct tagSuccess
+{
+ DWORD _ID; //成就ID
+ WORD Type; //成就类型
+ DWORD NeedCnt; //需要数量
+ list Condition; //辅助条件
+ list PreSuccess; //需要达成前置成就
+ dict AwardItem; //奖励物品列表
+ dict Money; //金钱
+ DWORD Exp; //经验
+ dict AwardAttr; //奖励属性
+ DWORD RedPacketID; //红包ID
+ DWORD MagicWeaponID; //法宝ID
+ DWORD MagicWeaponExp; //法宝升级经验
+};
+
+//法宝表
+
+struct tagTreasure
+{
+ DWORD _ID; //ID
+ BYTE TreasureType; //法宝类型
+ DWORD PreTreasure; //前置法宝
+ list SuccID; //成就ID
+ list Potentials; //技能潜力升级
+ dict NeedItem; //需要消耗物品
+};
+
+//法宝升级表
+
+struct tagTreasureUp
+{
+ DWORD _MWID; //法宝ID
+ BYTE _LV; //法宝等级
+ DWORD NeedExp; //需要经验
+ dict AddAttr; //属性
+ list UnLockSkill; //解锁的技能
+ DWORD PrivilegeID; //特权ID
+};
+
+//法宝特权表
+
+struct tagTreasurePrivilege
+{
+ DWORD _PrivilegeID; //特权ID
+ eval EffectValue; //特殊效果
+ DWORD SingleValue; //进度
+ DWORD MaxValue; //最大进度
+ dict AddAttr; //属性
+ list ItemAward; //物品奖励
+};
+
+//法宝技能升级表
+
+struct tagTreasureSkill
+{
+ BYTE _SkillUpType; //技能升级类型
+ BYTE _SkillLV; //技能等级
+ DWORD NeedPoint; //升到当前级消耗天石精华
+ WORD InitRate; //初始概率
+ list NeedItemID; //升到当前级溶彩石ID
+ list NeedItemCnt; //升到当前级溶彩石数量
+ list MaxRate; //升到当前级概率
+};
+
+//连续签到奖励表
+
+struct tagContineSignAward
+{
+ BYTE _ContineDay; //连续签到天数
+ list ItemID; //奖励物品ID
+ BYTE IsBind; //物品是否绑定
+ list ItemNum; //物品奖励最小值
+ list JobItemList; //职业物品列表
+};
+
+//签到奖励表
+
+struct tagSignAward
+{
+ BYTE _RewardID; //奖励ID
+ list ItemID; //奖励物品ID
+ BYTE IsBind; //物品是否绑定
+ BYTE VipLv; //vip等级
+ list OrdinaryNum; //奖励物品数量
+ BYTE VipMultiple; //奖励倍率
+};
+
+//VIP礼包表
+
+struct tagVIPAward
+{
+ BYTE _VIPLV; //VIP等级
+ dict ItemID; //奖励物品信息
+ WORD Price; //礼包现价
+ WORD OldPrice; //礼包原价
+};
+
+//定制物品表
+
+struct tagAppointItem
+{
+ DWORD _ID; //定制物品ID
+ BYTE SuiteLV; //套装等级
+ BYTE CancelUseLimit; //穿戴限制(除职业)
+ list LegendAttrID; //传奇属性ID
+ list LegendAttrValue; //传奇属性值
+ list OutOfPrintAttr; //绝版属性ID
+ list OutOfPrintAttrValue; //绝版属性最大值
+};
+
+//VIP特权表
+
+struct tagVipPrivilege
+{
+ DWORD _VIPPriID; //特权ID
+ DWORD VIP0; //VIP0对应的特权值
+ DWORD VIP1; //VIP1对应的特权值
+ DWORD VIP2; //VIP2对应的特权值
+ DWORD VIP3; //VIP3对应的特权值
+ DWORD VIP4; //VIP4对应的特权值
+ DWORD VIP5; //VIP5对应的特权值
+ DWORD VIP6; //VIP6对应的特权值
+ DWORD VIP7; //VIP7对应的特权值
+ DWORD VIP8; //VIP8对应的特权值
+ DWORD VIP9; //VIP9对应的特权值
+ DWORD VIP10; //VIP10对应的特权值
+ DWORD VIP11; //VIP11对应的特权值
+ DWORD VIP12; //VIP12对应的特权值
+ DWORD VIP13; //VIP13对应的特权值
+ DWORD VIP14; //VIP14对应的特权值
+ DWORD VIP15; //VIP15对应的特权值
+};
+
+//商城表
+
+struct tagStore
+{
+ DWORD _ID; //ID
+ DWORD ShopType; //商店类型
+ BYTE OperationActionShop; //是否运营活动商店
+ DWORD ItemID; //物品ID
+ WORD ItemCnt; //物品数量
+ BYTE IsBind; //是否绑定
+ list ItemListEx; //扩展物品列表[[物品ID,个数,是否绑定],...]
+ DWORD MainItemID; //标的物品ID
+ list JobItem; //职业替换物品
+ BYTE RefreshType; //刷新类型 0-不重置,1-onWeek0点,2-onWeek5点,3-OnDay0点,4-OnDay5点
+ list LimitVIPLV; //VIP限制
+ DWORD LimitLV; //等级限制
+ list LimitCnt; //限制数量
+ BYTE MoneyType; //金钱类型
+ DWORD MoneyNum; //金钱数量
+ DWORD MoneyOriginal; //原价
+ DWORD LimitValue; //限制条件
+ char NotifyMark; //广播提示
+};
+
+//限时特惠表
+
+struct tagActSpringSale
+{
+ DWORD _CfgID; //配置ID
+ char StartDate; //开启日期
+ char EndDate; //结束日期
+ list StartTimeList; //开启时间列表, 支持多个时段
+ list EndTimeList; //结束时间列表, 支持多个时段
+ WORD LVLimit; //限制等级
+ BYTE IsDayReset; //是否每天重置
+ list ShopTypeList; //商店类型列表
+};
+
+//日常任务表
+
+struct tagDailyQuest
+{
+ DWORD _ID; //ID
+ BYTE RelatedType; //关联类型
+ DWORD RelatedID; //关联ID
+ WORD UnLockFuncID; //解锁功能ID
+ BYTE OnceActivityTime; //增加活跃所需次数
+ BYTE OnceActivity; //单次活跃值
+ WORD TotalActiveValue; //总活跃
+};
+
+//日常活跃奖励表
+
+struct tagDailyLivenessReward
+{
+ BYTE _ID; //ID
+ WORD Liveness; //所需活跃度
+ list StageLV; //阶段等级
+ list ItemID; //物品ID
+ list ItemCount; //物品数量
+ list ItemBind; //是否绑定
+};
+
+//法宝铸炼表
+
+struct tagTreasureRefine
+{
+ WORD _TreasureID; //法宝id
+ BYTE _TreasureLV; //法宝阶数
+ dict TreasureAttr; //属性(最多3条)
+ dict Material; //铸炼材料
+ WORD SuccessRate; //成功率
+ DWORD OpenSkill; //解锁技能
+ BYTE NeedAlchemyLV; //所需炼丹等级
+ BYTE NeedAllTreasureLV; //所需所有法宝等级
+};
+
+//炼丹炉等级表
+
+struct tagRefineStove
+{
+ BYTE _StoveLV; //炼丹炉等级
+ DWORD UpNeedExp; //升下一级所需经验
+ list AddAttrType; //等级加成属性类型
+ list AddAttrNum; //等级加成属性值
+};
+
+//炼丹表
+
+struct tagAlchemy
+{
+ WORD _AlchemyID; //炼丹编号
+ dict Material; //所需所有材料和数量
+ WORD AlchemyExp; //炼丹获得经验值
+ list AlchemyItem; //产出物品及数量及权重
+ list SpecAlchemyID; //特殊炼丹ID组
+ list AlchemyUp; //产出包含的进阶丹药
+ BYTE NeedAlchemyLV; //所需炼丹等级
+};
+
+//炼丹特殊产出表
+
+struct tagAlchemySpec
+{
+ WORD _SpecAlchemyID; //特殊炼丹ID
+ DWORD MaterialID; //特殊材料ID
+ BYTE MaterialCnt; //特殊材料ID消耗个数
+ WORD AlchemyExp; //特殊材料经验
+ list AlchemyItem; //产出物品及数量及权重
+ BYTE NeedAlchemyLV; //所需炼丹等级
+};
+
+//BOSS信息表
+
+struct tagBOSSInfo
+{
+ DWORD _NPCID; //ID
+ DWORD MapID; //地图ID
+ BYTE RefreshMark; //刷新标识点
+ DWORD StoneNPCID; //墓碑NPCID
+};
+
+//古神禁地表
+
+struct tagElderGodArea
+{
+ DWORD _NPCID; //ID
+ BYTE MonsterAnger; //怪物怒气值
+};
+
+//个人BOSS表
+
+struct tagPersonalBoss
+{
+ DWORD _NPCID; //ID
+ DWORD ChanllengeLv; //可挑战等级
+};
+
+//仙盟活跃表
+
+struct tagFamilyActivity
+{
+ DWORD _ID; //ID
+ WORD UnLockFuncID; //解锁功能ID
+ BYTE TotalActivityTime; //总次数
+ WORD SingleTimes; //增加活跃需要次数
+ WORD SingleActiveValue; //每轮增加活跃积分
+};
+
+//仙盟红包表
+
+struct tagFamilyRedPack
+{
+ WORD _ID; //ID
+ WORD GetType; //获得途径
+ WORD MoneyNum; //红包额度
+ BYTE MoneyType; //金钱类型
+ BYTE PacketCnt; //红包个数
+};
+
+//NPC秀表
+
+struct tagNPCShow
+{
+ DWORD _NPCID;
+ DWORD _MapID;
+ BYTE LineID;
+ DWORD ProtectTime; //保护时间, 毫秒
+ DWORD BindMissionID; //绑定的任务ID
+ BYTE ShowType; //0-服务端通知,>0前端处理
+};
+
+
+//封魔坛BOSS表
+
+struct tagSealDemon
+{
+ DWORD _NPCID; //ID
+ BYTE LineID;
+ WORD KillTime; //击杀总时间秒
+};
+
+//副本鼓舞表
+
+struct tagFbEncourage
+{
+ DWORD _DataMapID; //地图ID
+ BYTE _InspireType; //鼓舞类型
+ WORD InspireMaxLV; //鼓舞等级限制
+ DWORD MoneyCount; //单次消耗金钱数量
+};
+
+//符印合成表
+
+struct tagRuneCompound
+{
+ DWORD _TagItemID; //合成的符印物品ID
+ list NeedItem; //需要的物品ID
+ WORD NeedMJ; //需要的魔精数量
+};
+
+//资源找回表
+
+struct tagResourcesBack
+{
+ BYTE _ID; //ID
+ DWORD RelatedID; //关联日常任务表ID
+ BYTE CanBackTimes; //能否找回次数
+ BYTE NormalCostJade; //绑玉找回普通次数价格
+ WORD VipCostJade; //绑玉找回VIP次数找回价格
+ dict JadeReward; //绑玉找回奖励
+ DWORD CostCopper; //铜钱找回铜钱消耗
+ dict CopperReward; //铜钱找回奖励
+};
+
+//宝箱表开启
+
+struct tagChests
+{
+ DWORD _ChestsItemID; //宝箱物品ID
+ DWORD CostItemID; //消耗物品ID
+ BYTE CostItemCount; //消耗物品个数
+ WORD CostGold; //消耗仙玉
+ BYTE ShowType; //前端表现类型0-无表现, >0有表现需同步结果,具体类型前端自定义
+ BYTE IsBind; //开出物品是否绑定
+};
+
+//宝箱表产出表
+
+struct tagChestsAward
+{
+ DWORD _ChestsItemID; //宝箱物品ID
+ WORD AwardLV; //宝箱奖励等级
+ dict SelectItemDict; //选择物品ID对应个数字典,规定只能选一个
+ dict FixedItemDict; //固定产出物品ID对应个数字典
+ list RandItemList1; //随机物品饼图列表1
+ list RandTimeList1; //随机次数饼图列表1
+ list RandItemList2; //随机物品饼图列表2
+ list RandTimeList2; //随机次数饼图列表2
+ list JobItemList; //职业物品列表
+ BYTE MoneyType; //货币类型
+ DWORD MoneyCount; //货币数量
+ list NeedNotifyItemList; //需要广播的物品ID列表
+};
+
+//VIP杀怪加攻击表
+
+struct tagVIPKillNPC
+{
+ WORD _KillLV; //杀怪成长等级
+ DWORD LVExpPoint; //升级所需经验点,每个经验点代表的经验由项目决定
+ DWORD LVExp; //除经验点总经验外升级还需的经验
+ DWORD AddMinAtk; //增加最小攻击
+ DWORD AddMaxAtk; //增加最大攻击
+};
+
+
+//全民冲榜排行奖励表
+
+struct tagOSCBillRankAward
+{
+ BYTE _OSCBillType; //冲榜类型
+ BYTE RankA; //排名A
+ BYTE RankB; //至排名B
+ dict RankAward; //排名奖励 {"职业":[[物品ID,个数],...], ...}
+};
+
+
+//全民冲榜达成奖励表
+
+struct tagOSCBillTagAward
+{
+ BYTE _OSCBillType; //冲榜类型
+ WORD TagCondition; //目标条件值
+ dict TagAward; //目标奖励 {"职业":[[物品ID,个数],...], ...}
+};
+
+//七天登录奖励表
+
+struct tagLoginDayAward
+{
+ BYTE _DayID; //天数
+ dict Reward; //奖励 {"职业":[[物品ID,个数],...], ...}
+};
+
+//七天在线奖励表
+
+struct tagOnlineAward
+{
+ BYTE _DayID; //天数
+ list StageTime; //阶段所需时间(分钟)
+ dict Reward; //奖励 {"索引":[[物品ID,个数],...], ...}
+};
+
+//七天限时特惠表
+
+struct tagSpringSale
+{
+ BYTE _GiftID; //礼包ID
+ BYTE SellDay; //创角第几天上架
+ BYTE BuyNumLimit; //每人限购数量
+ WORD GiftPrice; //礼包价格,仙玉
+ list GiftItemList; //礼包物品信息列表[[物品ID,个数,是否绑定], ...]
+};
+
+//充值商品编号表
+
+struct tagOrderInfo
+{
+ char _OrderInfo; //商品编号
+ char _AppID; //appID
+ float PayRMBNum; //付费额度,元
+ DWORD CTGID; //对应充值ID
+ DWORD GiftbagID; //对应限时礼包编号
+};
+
+//充值表
+
+struct tagCTG
+{
+ BYTE _RecordID; //记录ID
+ BYTE DailyBuyCount; //每日限购次数
+ WORD GainGold; //获得仙玉数
+ WORD GainGoldPrize; //赠送仙玉数
+ WORD FirstGoldPrize; //首次充值该档位赠送仙玉
+ list GainItemList; //获得物品列表[[物品ID,个数,是否绑定], ...]
+};
+
+//等级奖励表
+
+struct tagLVAward
+{
+ BYTE _AwardID; //奖励ID
+ WORD LV; //等级
+ WORD LimitCnt; //全服限制数量
+ dict Reward; //奖励 {"职业":[[物品ID,个数],...], ...}
+ BYTE VIPLimit; //需要VIP几
+ list VIPAward; //vip奖励[[物品ID,个数],...]
+};
+
+//投资表
+
+struct tagInvest
+{
+ WORD _ID; //ID
+ BYTE Type; //投资类型
+ BYTE NeedDay; //需要天数
+ WORD NeedLV; //需要等级
+ dict Reward; //奖励 {"key":[[物品ID,个数,是否绑定],...], ...}
+};
+
+//仙宝寻主表
+
+struct tagXBXZ
+{
+ DWORD _ID; //ID
+ BYTE Type; //类型
+ DWORD NeedCnt; //需要数量
+ list Condition; //条件
+ WORD MWID; //法宝ID
+ list AwardItem; //奖励物品列表
+ list Money; //金钱
+};
+
+//寻宝产出库表
+
+struct tagTreasureHouse
+{
+ BYTE _TreasureType; //寻宝类型
+ WORD MinLV; //最小等级
+ dict GridItemInfo; //格子编号对应物品信息 {"编号":[物品ID, 个数], ...}
+ list JobItemList; //职业物品组列表 [[职业1物品, 职业2物品, ...], ...]
+ list GridItemRateListFree; //免费产出格子编号饼图 [[概率, 格子编号], ...]
+ list GridItemRateList1; //常规产出格子编号饼图 [[概率, 格子编号], ...]
+ list GridItemRateList2; //每满x次保底产出格子编号饼图 [[概率, 格子编号], ...]
+ dict GridItemRateList3; //第x次必出产出格子编号饼图 {次数:[[概率, 格子编号], ...], ...}
+ BYTE LuckyGridNum; //幸运加成格子编号
+};
+
+//极品白拿表
+
+struct tagFreeGoods
+{
+ BYTE _ID; //ID
+ dict AwardItem; //奖励 {"职业":[[物品ID,个数],...], ...}
+ WORD NeedMoney; //需要仙玉
+ DWORD ReturnTime; //返还时间(s)
+};
+
+//限时礼包活动表
+
+struct tagActFlashGiftbag
+{
+ DWORD _CfgID; //配置ID
+ char StartDate; //开启日期
+ char EndDate; //结束日期
+ list StartTimeList; //开启时间列表, 支持多个时段
+ list EndTimeList; //结束时间列表, 支持多个时段
+ WORD LVLimit; //限制等级
+ BYTE IsDayReset; //是否每天重置
+ list GiftbagList; //礼包模板类型列表
+};
+
+//限时礼包模板表
+
+struct tagFlashGiftbag
+{
+ DWORD _GiftbagID; //礼包编号
+ WORD GiftbagType; //礼包类型
+ DWORD OriginalRMB; //原价(RMB)
+ WORD BuyCountLimit; //限购次数,0不限购
+ list GiftItemList; //礼包物品信息列表 [(物品ID,个数,是否绑定),...]
+ DWORD MainItemID; //标的物品ID
+ char NotifyKey; //全服广播key,默认两个参数(玩家名, 档位额度)
+};
+
+//消费返利模板表
+
+struct tagCostRebateTemplate
+{
+ DWORD _TemplateID; //模板ID
+ DWORD NeedCostGold; //需要消费仙玉数
+ BYTE AwardIndex; //返利奖励索引0~31,同个模板中不重复
+ list AwardItemList; //返利物品信息列表 [(物品ID,个数,是否绑定),...]
+ char NotifyKey; //全服广播key,默认两个参数(玩家名, 档位额度)
+};
+
+//BOSS复活表
+
+struct tagBossReborn
+{
+ BYTE _ID; //ID
+ DWORD TotalTimes; //可完成的总次数,0表示不限次数
+ WORD SingleTimes; //单次领奖需要的次数
+ list RewardItemID1; //奖励物品ID1
+ list RewardItemCnt1; //奖励物品数量1
+ list RewardItemID2; //奖励物品ID2
+ list RewardItemCnt2; //奖励物品数量2
+ list RewardItemID3; //奖励物品ID3
+ list RewardItemCnt3; //奖励物品数量3
+ list WorldLVList; //世界等级
+};
+
+
+//宗门试炼兑换表
+
+struct tagTrialExchange
+{
+ DWORD _ID; //兑换ID
+ DWORD ExchangeItemID; //兑换物品ID
+ DWORD ExchangeItemCount; //兑换物品个数
+ DWORD ExchangeItemIsBind; //兑换物品是否绑定
+ DWORD CostItemID; //消耗物品ID
+ DWORD CostItemCount; //消耗物品个数
+};
+
+//仙界盛典-全民来嗨表
+
+struct tagAllPeopleParty
+{
+ BYTE _ID; //ID
+ WORD TotalTimes; //总次数
+ WORD AddPoint; //每完成次数获得嗨点
+};
+
+//仙界盛典-全民来嗨奖励表
+
+struct tagAllPeoplePartyAward
+{
+ BYTE _WorldLvNum; //世界等级档
+ DWORD _Index; //索引
+ DWORD NeedPoint; //需要点数
+ dict Award; //奖励 {"职业":[[物品ID,个数,是否绑定],...], ...}
+};
\ No newline at end of file
diff --git "a/PySysDB/\347\224\237\346\210\220IpyGameDataPY/IpyGameDataPYCreater.py" "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/IpyGameDataPYCreater.py"
new file mode 100644
index 0000000..05734ce
--- /dev/null
+++ "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/IpyGameDataPYCreater.py"
@@ -0,0 +1,199 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+# 导出PY版本用的 IpyGameDataPY.py
+import ConfigParser
+import sys
+import os
+import re
+
+cfg = ConfigParser.ConfigParser()
+cfg.read("config.ini")
+CodeProjectPath = cfg.get("config", "CodeProjectPath") # 代码项目路径
+
+IpyGameDataFile = "IpyGameDataPY.py" # 生成的py文件名
+
+# 表结构定义字典模板
+TableDefKey = " \"%s\":(%s"
+TableDefValue = " (\"%s\", \"%s\", %s),%s"
+TableDefEnd = " ),%s"
+
+# 类结构模板
+ClassTemp = '''
+# %s
+class IPY_%s():
+
+ def __init__(self):
+%s
+ return
+
+%s
+'''
+# 类初始化数值对象模板
+ClassInitTemp = " self.%s = %s%s"
+# 获取类对象函数模板
+ClassFuncTemp = " def Get%s(self): return self.%s%s%s"
+
+# 管理器初始化表数据缓存列表对象模板
+MgrTableCacheInit = " self.ipy%sCache = self.__LoadFileData(\"%s\", IPY_%s)%s"
+MgrTableLenInit = " self.ipy%sLen = len(self.ipy%sCache)%s"
+# 管理器获取表数据条数函数模板
+MgrGetCountFunc = " def Get%sCount(self): return self.ipy%sLen%s"
+# 管理器根据索引获取表数据函数模板
+MgrGetByIndexFunc = " def Get%sByIndex(self, index): return self.ipy%sCache[index]%s"
+
+Def_RN = "\r\n"
+
+def DoCreateIpyGameDataPY():
+ print "================================================="
+ print "Number of arguments:", len(sys.argv), "arguments."
+ StructFileName = sys.argv[1]
+ if StructFileName == "PySysDBPY.h":
+ IpyGameDataPYFile = CodeProjectPath + "\\ZoneServerGroup\\map1_8G\\MapServer\\MapServerData\\Script\\"
+ LoadStructPath = "ChConfig.GetDBPath()"
+ elif StructFileName == "PySysDBG.h":
+ IpyGameDataPYFile = CodeProjectPath + "\\CoreServerGroup\\GameServer\\Script\\"
+ LoadStructPath = "ChConfig.GetAppPath()"
+ else:
+ print "不支持该表结构文件!%s" % StructFileName
+ raise
+ IpyGameDataPYFile += IpyGameDataFile
+
+ # 读取表结构定义
+ print "加载配置表结构: %s" % StructFileName
+ fileObj = open("../%s" % StructFileName, 'rb')
+ content = fileObj.read()
+ fileObj.close()
+
+ # 解析表结构定义
+ Def_FuncConfigName = "FuncConfig" # 功能配置表, 此表特殊处理
+ TableNameList = [] # 确保表结构导出顺序一致, 防止版本对比混乱
+ Def_IpyTable = {}
+ Def_FieldTypeList = ["DWORD", "WORD", "BYTE", "char", "dict", "list", "eval", "float"]
+ structList = re.findall("\/\/.*?struct.*?\{.*?\};", content, re.S)
+ for structStr in structList:
+ lineList = structStr.split(Def_RN)
+
+ tableInfoStr = lineList[0]
+ if "#tag" in tableInfoStr:
+ tagIndex = tableInfoStr.index("#tag")
+ tableNameCh = tableInfoStr[2:tagIndex].replace(" ", "") # 表名中文名
+ else:
+ tableNameCh = tableInfoStr[2:].replace(" ", "") # 表名中文名
+ tableName = "" # 表名英文名
+ fieldInfoList = []
+ for line in lineList[1:]:
+ if not line:
+ continue
+
+ if "struct" in line:
+ tagIndex = line.index("tag")
+ if "{" in line:
+ tableName = line[tagIndex + 3:line.index("{")]
+ else:
+ tableName = line[tagIndex + 3:]
+ tableName = tableName.replace(" ", "") # 表名英文名
+ continue
+
+ noteInfo = "" # 字段注释说明
+ if "//" in line:
+ signIndex = line.index("//")
+ noteInfo = " # %s" % line[signIndex+2:].rstrip()
+ line = line[:signIndex]
+ fieldType = ""
+ for ft in Def_FieldTypeList:
+ if ft in line:
+ fieldType = ft
+ break
+ if not fieldType:
+ if "struct" not in line and "{" not in line and "}" not in line:
+ print "### 类型定义错误表 ###"
+ print "struct tag%s" % tableName
+ print line
+ raise
+ continue
+ nameIndex = line.index(fieldType) + len(fieldType)
+ if "[" in line:
+ endIndex = line.index("[")
+ elif ";" in line:
+ endIndex = line.index(";")
+ else:
+ continue
+
+ isIndex = 0 # 是否搜索索引
+ fieldName = line[nameIndex:endIndex].replace(" ", "").replace("\t", "")
+ if fieldName.startswith("_"):
+ fieldName = fieldName[1:]
+ isIndex = 1
+ fieldInfoList.append([fieldType, fieldName, isIndex, noteInfo])
+ Def_IpyTable[tableName] = [tableNameCh, fieldInfoList]
+ TableNameList.append(tableName)
+
+ # 模板所需替换的内容参数
+ ipyTableDef = "" # 表结构定义
+ classContent = "" # 表对应的类
+ mgrTableCacheObjInit = "" # 表数据对象缓存
+ mgrTableFunc = "" # 表数据对象获取函数
+
+ for i, tableName in enumerate(TableNameList):
+ tableNameCh, fieldInfoList = Def_IpyTable[tableName]
+ classInitInfo = ""
+ classFuncInfo = ""
+
+ ipyTableDef += TableDefKey % (tableName, Def_RN)
+
+ for j, fieldInfo in enumerate(fieldInfoList):
+ lineEnd = "" if j == len(fieldInfoList) - 1 else Def_RN
+ fieldType, fieldName, isIndex, noteInfo = fieldInfo
+ ipyTableDef += TableDefValue % (fieldType, fieldName, isIndex, Def_RN)
+ if fieldType == "char":
+ classInitInfo += ClassInitTemp % (fieldName, "\"\"", lineEnd)
+ elif fieldType == "dict":
+ classInitInfo += ClassInitTemp % (fieldName, "{}", lineEnd)
+ elif fieldType == "list":
+ classInitInfo += ClassInitTemp % (fieldName, "[]", lineEnd)
+ elif fieldType == "float":
+ classInitInfo += ClassInitTemp % (fieldName, "0.0", lineEnd)
+ else:
+ classInitInfo += ClassInitTemp % (fieldName, "0", lineEnd)
+ classFuncInfo += ClassFuncTemp % (fieldName, fieldName, noteInfo, lineEnd)
+
+ ipyTableDef += TableDefEnd % (Def_RN if i == len(Def_IpyTable) - 1 else (Def_RN * 2))
+ classContent += ClassTemp % (tableNameCh, tableName, classInitInfo, classFuncInfo)
+
+ # 表列表、长度对象缓存
+ mgrTableCacheObjInit += MgrTableCacheInit % (tableName, tableName, tableName, Def_RN)
+ mgrTableCacheObjInit += MgrTableLenInit % (tableName, tableName, Def_RN)
+
+ # 表列表、长度获取函数
+ mgrTableFunc += MgrGetCountFunc % (tableName, tableName, Def_RN)
+ mgrTableFunc += MgrGetByIndexFunc % (tableName, tableName, Def_RN)
+
+
+ # 读取模板生成py代码
+ createPYContent = ""
+ template = open("IpyGameDataPYTemp.py", 'rb')
+ for line in template:
+ if "#<%Table_Def%>" in line:
+ line = ipyTableDef
+ elif "#<%Table_Class%>" in line:
+ line = classContent
+ elif "#<%Ipy_Cache_Init%>" in line:
+ line = mgrTableCacheObjInit
+ elif "\"<%LoadStructPath%>\"" in line:
+ line = line.replace("\"<%LoadStructPath%>\"", LoadStructPath)
+ elif "#<%Ipy_Cache_Func%>" in line:
+ line = mgrTableFunc
+ createPYContent += line
+ template.close()
+
+ pyFile = open(IpyGameDataPYFile, "wb")
+ pyFile.write("%s" % createPYContent)
+ pyFile.close()
+ print "成功生成: %s" % IpyGameDataFile
+ print "导出路径: %s" % IpyGameDataPYFile
+ return
+
+DoCreateIpyGameDataPY()
+
+
+
diff --git "a/PySysDB/\347\224\237\346\210\220IpyGameDataPY/IpyGameDataPYTemp.py" "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/IpyGameDataPYTemp.py"
new file mode 100644
index 0000000..940810b
--- /dev/null
+++ "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/IpyGameDataPYTemp.py"
@@ -0,0 +1,465 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#-------------------------------------------------------------------------------
+#
+##@package
+#
+# @todo:读取PY表
+# @author hxp
+# @date 2018-05-10
+# @version 1.0
+#
+# 详细描述: 读取PY表
+#
+#-------------------------------------------------------------------------------
+#"""Version = 2018-05-10 12:00"""
+#-------------------------------------------------------------------------------
+
+import FormulaControl
+import ChConfig
+import LogUI
+
+import hashlib
+import os
+
+'''表结构定义字典
+{
+ 表名:(
+ (字段类型, 字段名, 是否查询索引),
+ ...
+ ),
+ ...
+}
+'''
+Def_IpyTable = {
+ #<%Table_Def%>
+ }
+
+#<%Table_Class%>
+
+
+def Log(msg, playerID=0, par=0):
+ LogUI.Msg("%s\t%s\t%s" % (par, playerID, msg))
+ return
+
+def ErrLog(msg, playerID=0, par=0):
+ LogUI.Msg("%s\t%s\t###Error:%s" % (par, playerID, msg))
+ return
+
+## PY表数据管理类
+class IPY_DataMgr():
+
+ def __init__(self):
+ self.fileMD5Dict = {} # 数据表文件md5字典, 用于对比文件差异判断是否重读 {dtName:md5, ...}
+ self.ipyConfigEx = {} # 自定义数据缓存 {key:configData, ...}
+ self.ipyDataIndexMap = {} # 数据表索引查询缓存 {dtName:{args:[index, ...], ...}, ...}
+ self.ipyDataIndexMapEx = {} # 数据表自定义查询条件查询缓存 {dtName_(findKey,...):{(findKeyValue, ...):[index, ...], ...}, ...}
+ self.ipyFuncConfigDict = {} # 功能配置表缓存 {key:IPY_FuncConfig, ...}
+ self.IpyDataClear()
+ return
+
+ def IpyDataClear(self):
+ Log("IPY_DataMgr Init...")
+ self.ipyConfigEx = {}
+ #<%Ipy_Cache_Init%>
+ Log("IPY_FuncConfig count=%s" % len(self.ipyFuncConfigDict))
+ Log("IPY_DataMgr InitOK!")
+ return
+
+ def __LoadFileData(self, tableName, Class):
+ curPath = "<%LoadStructPath%>" + "\\PySysDB\\tag" + tableName + ".txt"
+ if not os.path.isfile(curPath):
+ ErrLog("can not find file = %s,%s" % (tableName, curPath))
+ raise Exception("can not find file = %s,%s" % (tableName, curPath))
+
+ fileObj = open(curPath, 'rb')
+ content = fileObj.read()
+ fileObj.close()
+
+ md5_obj = hashlib.md5()
+ md5_obj.update(content)
+ newMD5Code = md5_obj.hexdigest()
+ if tableName in self.fileMD5Dict:
+ oldMD5Code = self.fileMD5Dict[tableName]
+ if newMD5Code == oldMD5Code:
+ return getattr(self, "ipy%sCache" % tableName)
+
+ if tableName in self.ipyDataIndexMap:
+ self.ipyDataIndexMap.pop(tableName)
+ for dtName_Findkey in self.ipyDataIndexMapEx.keys():
+ findStr = "%s_" % tableName
+ if findStr in dtName_Findkey:
+ self.ipyDataIndexMapEx.pop(dtName_Findkey)
+ if tableName == "FuncConfig":
+ self.ipyFuncConfigDict = {}
+ self.fileMD5Dict[tableName] = newMD5Code
+
+ dataIndex = 0
+ indexDict = {}
+ cacheList = []
+ fieldList = Def_IpyTable[tableName]
+ infoList = content.split('\r\n')
+ for line in xrange(len(infoList)):
+ if line == 0:
+ continue
+ if not infoList[line]:
+ #ErrLog("line not content! %s, line=%s" % (tableName, line))
+ continue
+ rowList = infoList[line].split('\t')
+ if len(fieldList) != len(rowList):
+ ErrLog("field count error!, %s, line=%s, len=%s,rowCount=%s" % (tableName, line, len(fieldList), len(rowList)))
+ raise Exception("field count error!, %s, line=%s, len=%s,rowCount=%s" % (tableName, line,len(fieldList), len(rowList)))
+
+ try:
+ indexKey = []
+ classObj = Class()
+ for j, value in enumerate(rowList):
+ fieldType, fieldName, isIndex = fieldList[j]
+ if fieldType == "char":
+ attrValue = value
+ elif fieldType == "dict":
+ attrValue = self.__StrToDict(value)
+ elif fieldType == "list":
+ attrValue = self.__StrToList(value)
+ elif fieldType == "eval":
+ attrValue = self.__StrToEval(value)
+ elif fieldType == "float":
+ attrValue = float(value)
+ else:
+ attrValue = 0 if not value.isdigit() else int(value)
+ setattr(classObj, "%s" % fieldName, attrValue)
+ if isIndex:
+ indexKey.append(attrValue)
+ cacheList.append(classObj)
+ indexKey = tuple(indexKey)
+ indexList = indexDict.get(indexKey, [])
+ indexList.append(dataIndex)
+ indexDict[indexKey] = indexList
+ dataIndex += 1
+ except BaseException:
+ ErrLog("SetIpyDataError: tableName=%s,line=%s,fieldName=%s,fieldType=%s,value=%s" % (tableName, line, fieldName, fieldType, value))
+ raise
+ if tableName == "FuncConfig":
+ self.__LoadFuncConfigData(fieldList, rowList)
+ if tableName != "FuncConfig":
+ self.ipyDataIndexMap[tableName] = indexDict
+ Log("LoadIpydata: %s, content count=%s" % (tableName, len(cacheList)))
+ return cacheList
+
+ def __LoadFuncConfigData(self, fieldList, rowList):
+ funcConfigObj = IPY_FuncConfig()
+ key = rowList[0]
+ funcConfigObj.Key = key
+ 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)
+ setattr(funcConfigObj, fieldName, configValue)
+ self.ipyFuncConfigDict[key] = funcConfigObj
+ return
+
+ def __ToFloat(self, strValue):
+ try:
+ value = float(strValue)
+ except:
+ return strValue
+ return value
+
+ def __StrToEval(self, strValue):
+ if not strValue or strValue in ["0", "-", ""]:
+ return
+ return eval(strValue)
+
+ def __StrToDict(self, strValue):
+ setDict = {}
+ if "{" in strValue and "}" in strValue:
+ setDict = eval(strValue)
+ elif strValue in ["0", "-", ""]:
+ pass
+ else:
+ keyValueList = strValue.split(ChConfig.Def_Str_Montant)
+ for keyValue in keyValueList:
+ if "_" not in keyValue:
+ continue
+ kv = keyValue.split("_")
+ if len(kv) != 2:
+ return
+ key, value = kv
+ if key.isdigit():
+ key = int(key)
+ if value.isdigit():
+ value = int(value)
+ setDict[key] = value
+ return setDict
+
+ def __StrToList(self, strValue):
+ setList = []
+ if ("[" in strValue and "]" in strValue) or ("(" in strValue and ")" in strValue):
+ setList = eval(strValue)
+ elif strValue in ["0", "-", ""]:
+ pass
+ elif strValue.isdigit():
+ setList = (int(strValue),)
+ else:
+ for value in strValue.split(ChConfig.Def_Str_Montant):
+ if value.isdigit():
+ value = int(value)
+ setList.append(value)
+ if setList:
+ setList = tuple(setList)
+ return setList
+
+#<%Ipy_Cache_Func%>
+
+IPYData = IPY_DataMgr()
+def IPY_Data(): return IPYData
+
+def GetConfigEx(key):
+ '''获取自定义key缓存数据
+ '''
+ if key in IPYData.ipyConfigEx:
+ return IPYData.ipyConfigEx[key]
+ return
+def SetConfigEx(key, configData):
+ '''设置自定义key缓存数据
+ 有些表的配置内容可能在实际功能使用中直接使用表数据的话会比较麻烦,比如每次都要遍历获取一些表数据
+ 如果经过一层数据转换后再来使用该数据的话会简化功能逻辑或提高效率,则可以通过函数保存一些自定义的缓存内容,方便功能使用
+ 也可以适用于其他自定义缓存存储
+ '''
+ IPYData.ipyConfigEx[key] = configData
+ return configData
+
+def GetIpyGameData(dtName, *args):
+ '''获取表数据,适用于数据唯一的,返回单条数据实例
+ @param dtName: 表名,不含tag
+ @param args: 建表时设置的索引字段顺序对应的查询值
+ @return: 对应查询条件的 ipyData 数据实例,只返回单个实例
+ @使用说明: IpyGameDataPY.GetIpyGameData(表名, 索引1查询值, 索引2查询值, … )
+ '''
+ if dtName not in IPYData.ipyDataIndexMap:
+ ErrLog("Can not found ipyData dtName=%s" % (dtName))
+ return
+ indexDict = IPYData.ipyDataIndexMap[dtName]
+ if args not in indexDict:
+ ErrLog("Can not found ipyData dtName=%s,indexValue=%s" % (dtName, args))
+ return
+ indexList = indexDict[args]
+ return getattr(IPYData, "ipy%sCache" % dtName)[indexList[0]]
+
+def GetIpyGameDataList(dtName, *args):
+ '''获取表数据,适用于查询结果有多条数据的
+ @param dtName: 表名,不含tag
+ @param args: 建表时设置的索引字段顺序对应的查询值
+ @return: 对应查询条件的 ipyData 数据实例列表
+ @使用说明: 与 GetIpyGameData 函数相同
+ '''
+ if dtName not in IPYData.ipyDataIndexMap:
+ ErrLog("Can not found ipyDataList dtName=%s" % (dtName))
+ return
+ indexDict = IPYData.ipyDataIndexMap[dtName]
+ if args not in indexDict:
+ ErrLog("Can not found ipyDataList dtName=%s,indexValue=%s" % (dtName, args))
+ return
+ indexList = indexDict[args]
+ dataCache = getattr(IPYData, "ipy%sCache" % dtName)
+ return [dataCache[i] for i in indexList]
+
+def GetIpyGameDataNotLog(dtName, *args):
+ '''与 GetIpyGameData 函数相同, 只是找不到数据时不会输出日志
+ '''
+ if dtName not in IPYData.ipyDataIndexMap:
+ #ErrLog("Can not found ipyData dtName=%s" % (dtName))
+ return
+ indexDict = IPYData.ipyDataIndexMap[dtName]
+ if args not in indexDict:
+ #ErrLog("Can not found ipyData dtName=%s,indexValue=%s" % (dtName, args))
+ return
+ indexList = indexDict[args]
+ return getattr(IPYData, "ipy%sCache" % dtName)[indexList[0]]
+
+def GetIpyGameDataListNotLog(dtName, *args):
+ '''与 GetIpyGameDataList 函数相同, 只是找不到数据时不会输出日志
+ '''
+ if dtName not in IPYData.ipyDataIndexMap:
+ #ErrLog("Can not found ipyDataList dtName=%s" % (dtName))
+ return
+ indexDict = IPYData.ipyDataIndexMap[dtName]
+ if args not in indexDict:
+ #ErrLog("Can not found ipyDataList dtName=%s,indexValue=%s" % (dtName, args))
+ return
+ indexList = indexDict[args]
+ dataCache = getattr(IPYData, "ipy%sCache" % dtName)
+ return [dataCache[i] for i in indexList]
+
+def GetIpyGameDataByCondition(dtName, keyDict={}, returnList=False, isLogNone=True):
+ '''根据自定义查询条件查询表数据,由于目前只支持建立一组查询索引,所以使用其他查询条件查表时只能通过该函数查找
+ @param dtName: 表名,不含tag
+ @param keyDict: 查询条件字典 {查询字段名:查询值, ...}
+ @param returnList: 是否以列表的形式返回查询数据,默认否
+ @param isLogNone: 找不到数据时是否数据日志,默认是
+ @return: 找不到数据时返回 None,有数据时根据参数是否返回列表返回对应的数据实例或数据实例列表
+ '''
+ fieldList = keyDict.keys()
+ valueList = keyDict.values()
+ findFieldKey = "%s_%s" % (dtName, fieldList)
+ findValueKey = tuple(valueList)
+
+ cacheList = getattr(IPYData, "ipy%sCache" % dtName)
+ if findFieldKey not in IPYData.ipyDataIndexMapEx:
+ indexMapDict = {}
+ for index, iData in enumerate(cacheList):
+ valuekey = tuple([getattr(iData, "%s" % field) for field in fieldList])
+ indexList = indexMapDict.get(valuekey, [])
+ indexList.append(index)
+ indexMapDict[valuekey] = indexList
+ IPYData.ipyDataIndexMapEx[findFieldKey] = indexMapDict
+
+ indexMapDict = IPYData.ipyDataIndexMapEx[findFieldKey]
+ if findValueKey not in indexMapDict:
+ if isLogNone:
+ ErrLog("GetIpyGameDataByCondition can not found data! %s %s" % (dtName, keyDict))
+ return
+ indexList = indexMapDict[findValueKey]
+ if not returnList:
+ return cacheList[indexList[0]]
+ return [cacheList[index] for index in indexList]
+
+def GetFuncCfgIpyData(key):
+ '''读功能配置表配置实例
+ @param key: 配置key
+ @return: 直接返回该配置key对应的配置ipyData实例
+ '''
+ if key not in IPYData.ipyFuncConfigDict:
+ ErrLog("Can not found ipyData FuncConfig key=%s!" % key)
+ return ""
+ return IPYData.ipyFuncConfigDict[key]
+
+def GetFuncCfg(key, index=1):
+ '''读功能配置表配置专用函数
+ @param key: 配置key
+ @param index: 第几个配置值,支持1~5
+ @return: 直接返回对应的数据类型 int、str,不用再手动转int
+ '''
+ if key not in IPYData.ipyFuncConfigDict:
+ ErrLog("Can not found ipyData FuncConfig key=%s!" % key)
+ return ""
+ cfgObj = IPYData.ipyFuncConfigDict[key]
+ if index == 1:
+ return cfgObj.Numerical1
+ if index == 2:
+ return cfgObj.Numerical2
+ if index == 3:
+ return cfgObj.Numerical3
+ if index == 4:
+ return cfgObj.Numerical4
+ if index == 5:
+ return cfgObj.Numerical5
+ ErrLog("Can not found ipyData FuncConfig key=%s,index=%s!" % (key, index))
+ return ""
+
+def GetFuncEvalCfg(key, index=1, defaultValue=[]):
+ '''读取功能配置表配置列表、字典格式专用函数
+ @param key: 配置key
+ @param index: 第几个配置值,支持1~5
+ @return: 直接返回对应的数据类型 list、dict、tuple,不用再eval
+
+ 由于策划有自定义的列表结构 obj|… , 当该列表配置只有一个元素时,此时配置的内容为单个数值,加载的配置的时候此条数据会被转为int型
+ 故使用该专用函数返回列表结构,方便功能开发时不用再考虑列表为int时的情况;
+ 当然如果配置的内容本身就为python的列表、字典结构的话可使用上面的函数
+ 不过为了统一,建议功能配置表读列表、字典时都使用该函数
+ '''
+ if key not in IPYData.ipyFuncConfigDict:
+ ErrLog("Can not found ipyData FuncConfig key=%s!" % key)
+ return defaultValue
+ cfgObj = IPYData.ipyFuncConfigDict[key]
+ if index == 1:
+ curConfig = cfgObj.Numerical1
+ elif index == 2:
+ curConfig = cfgObj.Numerical2
+ elif index == 3:
+ curConfig = cfgObj.Numerical3
+ elif index == 4:
+ curConfig = cfgObj.Numerical4
+ elif index == 5:
+ curConfig = cfgObj.Numerical5
+ else:
+ ErrLog("Can not found ipyData FuncConfig key=%s,index=%s!" % (key, index))
+ return defaultValue
+ curType = type(curConfig)
+ if curType in [list, tuple, dict]:
+ return curConfig
+ if curType == int:
+ return [curConfig]
+ return defaultValue
+
+def GetFuncCompileCfg(key, index=1):
+ '''获取功能配置表已编译过的公式
+ @param key: 配置key
+ @param index: 第几个配置值,支持1~5
+ @return: 返回已编译过的公式
+ '''
+ return FormulaControl.GetCompileFormula(key + str(index), str(GetFuncCfg(key, index)))
+
+def InterpolationSearch(dtName, keyName, keyValue, conditionDict={}):
+ '''查询条件下与对应查询字段参考值相近的数据实例;参考值小于配置表最小值时返回none,大于最大值时返回最大值对应的实例
+ @param dtName: 表名,不含tag
+ @param keyName: 参考字段名
+ @param keyValue: 参考字段值
+ @param conditionDict: 查询条件,{查询字段名:字段值, ...}
+ @return: 找不到数据返回 None , 否则返回对应的 ipyData 数据实例
+ '''
+ if not conditionDict:
+ dataList = getattr(IPYData, "ipy%sCache" % dtName)
+ else:
+ dataList = GetIpyGameDataByCondition(dtName, conditionDict, True)
+ if not dataList:
+ return
+
+ low = 0
+ lowData = dataList[0]
+ lowValue = getattr(lowData, "%s" % keyName)
+ if keyValue < lowValue:
+ return
+
+ high = len(dataList) - 1
+ highData = dataList[high]
+ highValue = getattr(highData, "%s" % keyName)
+ if keyValue >= highValue:
+ return highData
+
+ near = low + int((high - low) * (keyValue - lowValue)/(highValue - lowValue))
+
+ nearData = dataList[near]
+ nearValue = getattr(nearData, "%s" % keyName)
+
+ if keyValue < nearValue:
+ for i in xrange(near - 1, low - 1, -1):
+ nearData = dataList[i]
+ nearValue = getattr(nearData, "%s" % keyName)
+ if nearValue < keyValue:
+ return nearData
+
+ elif keyValue > nearValue:
+ for i in xrange(near + 1, high + 1):
+ nearData = dataList[i]
+ nearValue = getattr(nearData, "%s" % keyName)
+ if nearValue > keyValue:
+ return dataList[i - 1]
+
+ return nearData
+
diff --git "a/PySysDB/\347\224\237\346\210\220IpyGameDataPY/Ipy\347\263\273\347\273\237\350\241\250\344\275\277\347\224\250\350\257\264\346\230\216.docx" "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/Ipy\347\263\273\347\273\237\350\241\250\344\275\277\347\224\250\350\257\264\346\230\216.docx"
new file mode 100644
index 0000000..10cfcca
--- /dev/null
+++ "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/Ipy\347\263\273\347\273\237\350\241\250\344\275\277\347\224\250\350\257\264\346\230\216.docx"
Binary files differ
diff --git "a/PySysDB/\347\224\237\346\210\220IpyGameDataPY/config.ini" "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/config.ini"
new file mode 100644
index 0000000..7be5aa3
--- /dev/null
+++ "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/config.ini"
@@ -0,0 +1,5 @@
+[config]
+
+; 椤圭洰鏍硅矾寰�
+CodeProjectPath = E:\U3DGameGit\SnxxServerCode\ServerPython
+
diff --git "a/PySysDB/\347\224\237\346\210\220IpyGameDataPY/\347\224\237\346\210\220IpyGameDataPY_GameServer.bat" "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/\347\224\237\346\210\220IpyGameDataPY_GameServer.bat"
new file mode 100644
index 0000000..49d8ac1
--- /dev/null
+++ "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/\347\224\237\346\210\220IpyGameDataPY_GameServer.bat"
@@ -0,0 +1,2 @@
+python IpyGameDataPYCreater.py PySysDBG.h
+pause
\ No newline at end of file
diff --git "a/PySysDB/\347\224\237\346\210\220IpyGameDataPY/\347\224\237\346\210\220IpyGameDataPY_MapServer.bat" "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/\347\224\237\346\210\220IpyGameDataPY_MapServer.bat"
new file mode 100644
index 0000000..fb0a8ed
--- /dev/null
+++ "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/\347\224\237\346\210\220IpyGameDataPY_MapServer.bat"
@@ -0,0 +1,2 @@
+python IpyGameDataPYCreater.py PySysDBPY.h
+pause
\ No newline at end of file
--
Gitblit v1.8.0