9046 【主干】【BT2】【BT3】【后端】培养功能(同步主干 冲突内容)
| | |
| | | DWORD NextItemID; //突破后物品ID
|
| | | };
|
| | |
|
| | | //灵器培养表
|
| | |
|
| | | struct tagLingQiTrain
|
| | | {
|
| | | BYTE _EquipPlace; //灵器装备位
|
| | | BYTE _TrainType; //培养类型
|
| | | BYTE _TrainLV; //培养等阶
|
| | | WORD NeedRealmLV; //培养所需境界
|
| | | DWORD EatCntTotal; //升阶所需个数(非累计)
|
| | | DWORD EatCntEverytime; //每次培养消耗x个
|
| | | list EatItemAttrTypeList; //每X个培养丹增加属性类型=EatCntEverytime
|
| | | list EatItemAttrValueList; //每X个培养丹增加属性值=EatCntEverytime
|
| | | list LVAttrTypeList; //每级额外属性类(非累积)
|
| | | list LVAttrValueList; //每级额外属性值(非累积)
|
| | | };
|
| | |
|
| | | //境界表 #tagRealm
|
| | |
|
| | | struct tagRealm
|
| | |
| | | DWORD InitFightPower; //初始战力
|
| | | };
|
| | |
|
| | | //灵宠培养表
|
| | |
|
| | | struct tagPetTrain
|
| | | {
|
| | | BYTE _TrainType; //培养类型
|
| | | BYTE _TrainLV; //培养等阶
|
| | | WORD NeedRealmLV; //培养所需境界
|
| | | DWORD EatCntTotal; //升阶所需个数(非累计)
|
| | | DWORD EatCntEverytime; //每次培养消耗x个
|
| | | list EatItemAttrTypeList; //每X个培养丹增加属性类型=EatCntEverytime
|
| | | list EatItemAttrValueList; //每X个培养丹增加属性值=EatCntEverytime
|
| | | list LVAttrTypeList; //每级额外属性类(非累积)
|
| | | list LVAttrValueList; //每级额外属性值(非累积)
|
| | | };
|
| | |
|
| | | //装备分解属性表
|
| | |
|
| | |
| | | list LVAttrValue; //每级额外属性值(非累积)
|
| | | };
|
| | |
|
| | | //坐骑培养表
|
| | |
|
| | | struct tagHorseTrain
|
| | | {
|
| | | BYTE _TrainType; //培养类型
|
| | | BYTE _TrainLV; //培养等阶
|
| | | WORD NeedRealmLV; //培养所需境界
|
| | | DWORD EatCntTotal; //升阶所需个数(非累计)
|
| | | DWORD EatCntEverytime; //每次培养消耗x个
|
| | | list EatItemAttrTypeList; //每X个培养丹增加属性类型=EatCntEverytime
|
| | | list EatItemAttrValueList; //每X个培养丹增加属性值=EatCntEverytime
|
| | | list LVAttrTypeList; //每级额外属性类(非累积)
|
| | | list LVAttrValueList; //每级额外属性值(非累积)
|
| | | };
|
| | |
|
| | | //坐骑幻化表
|
| | |
|
| | | struct tagHorseSkinPlus
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 27 灵器培养 #tagCMLingQiTrain
|
| | |
|
| | | class tagCMLingQiTrain(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("EquipPlace", c_ubyte), #灵器装备位
|
| | | ("TrainType", c_ubyte), #培养类型: 1-基础培养,2-特殊培养,3-百分比培养
|
| | | ("UseItemCnt", c_ushort), #消耗材料个数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x27
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x27
|
| | | self.EquipPlace = 0
|
| | | self.TrainType = 0
|
| | | self.UseItemCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMLingQiTrain)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 27 灵器培养 //tagCMLingQiTrain:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | EquipPlace:%d,
|
| | | TrainType:%d,
|
| | | UseItemCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.EquipPlace,
|
| | | self.TrainType,
|
| | | self.UseItemCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMLingQiTrain=tagCMLingQiTrain()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMLingQiTrain.Cmd,m_NAtagCMLingQiTrain.SubCmd))] = m_NAtagCMLingQiTrain
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 02 丢弃背包物品 #tagPlayerDropItem
|
| | |
|
| | | class tagPlayerDropItem(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 31 坐骑培养 #tagCMHorseTrain
|
| | |
|
| | | class tagCMHorseTrain(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("TrainType", c_ubyte), #培养类型: 1-基础培养,2-特殊培养,3-百分比培养
|
| | | ("UseItemCnt", c_ushort), #消耗材料个数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x31
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x31
|
| | | self.TrainType = 0
|
| | | self.UseItemCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMHorseTrain)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A5 31 坐骑培养 //tagCMHorseTrain:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | TrainType:%d,
|
| | | UseItemCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.TrainType,
|
| | | self.UseItemCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMHorseTrain=tagCMHorseTrain()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHorseTrain.Cmd,m_NAtagCMHorseTrain.SubCmd))] = m_NAtagCMHorseTrain
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 27 坐骑提升 #tagCMHorseUp
|
| | |
|
| | | class tagCMHorseUp(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A7 05 宠物培养 #tagCMPetTrain
|
| | |
|
| | | class tagCMPetTrain(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("TrainType", c_ubyte), #培养类型: 1-基础培养,2-特殊培养,3-百分比培养
|
| | | ("UseItemCnt", c_ushort), #消耗材料个数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA7
|
| | | self.SubCmd = 0x05
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xA7
|
| | | self.SubCmd = 0x05
|
| | | self.TrainType = 0
|
| | | self.UseItemCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMPetTrain)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A7 05 宠物培养 //tagCMPetTrain:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | TrainType:%d,
|
| | | UseItemCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.TrainType,
|
| | | self.UseItemCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMPetTrain=tagCMPetTrain()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPetTrain.Cmd,m_NAtagCMPetTrain.SubCmd))] = m_NAtagCMPetTrain
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A8 04 购买VIP礼包 #tagCMBuyVIPItem
|
| | |
|
| | | class tagCMBuyVIPItem(Structure):
|
| | |
| | |
|
| | | Def_Effect_ReduceSkillCDPer = 149 # 减少技能CD, a值为万分率
|
| | |
|
| | | Def_Effect_ZhuXianRate = 150 # 诛仙一击: 概率直接减少BOSS当前10%血量
|
| | | Def_Effect_ZhuXianReducePer = 151 # 诛仙护体: 受到BOSS伤害减免 万分率
|
| | |
|
| | | Def_Effect_HorseMaxHPPer = 152 # 坐骑生命加成
|
| | | Def_Effect_PetAtkPer = 153 # 灵宠攻击加成
|
| | | Def_Effect_HorseTrainAttrPer = 154 # 坐骑培养属性加成(攻防血)
|
| | | Def_Effect_PetTrainAttrPer = 155 # 灵宠培养属性加成(攻防血)
|
| | | Def_Effect_GuardTrainAttrPer = 156 # 守护培养属性加成(攻防血)
|
| | | Def_Effect_WingTrainAttrPer = 157 # 翅膀培养属性加成(攻防血)
|
| | | Def_Effect_PeerlessWeaponTrainAttrPer = 158 # 灭世培养属性加成(攻防血)
|
| | | Def_Effect_PeerlessWeapon2TrainAttrPer = 159 # 弑神培养属性加成(攻防血)
|
| | |
|
| | | #增加%d物理伤害值,其中a值为伤害值
|
| | | Def_Effect_AddAtk = 1005
|
| | | #增加%d魔法伤害值,其中a值为伤害值
|
| | |
| | | Def_BuffValue_Count = 3 # buff记录的value个数
|
| | |
|
| | | #游戏对象属性--------------------------------------------
|
| | | Def_Calc_AllAttrType_MAX = 149
|
| | | Def_Calc_AllAttrType_MAX = 159
|
| | | #基本属性BUFF计算,顺序与 ObjProperty_AttrByIndex 对应,同时也为buff效果ID同步通知策划
|
| | | TYPE_Calc_AttrList = (
|
| | | TYPE_Calc_Metal, # 金 1
|
| | |
| | | TYPE_Calc_SkillReducePer5, # 受到技能伤害减少5
|
| | | TYPE_Calc_SkillReducePer6, # 受到技能伤害减少6
|
| | | TYPE_Calc_SkillReducePer7, # 受到技能伤害减少7
|
| | | TYPE_Calc_ZhuXianRate, # 诛仙一击: 概率直接减少BOSS当前10%血量
|
| | | TYPE_Calc_ZhuXianReducePer, # 诛仙护体: 受到BOSS伤害减免 万分率 150
|
| | | TYPE_Calc_HorseMaxHPPer, # 坐骑生命加成
|
| | | TYPE_Calc_PetAtkPer, # 灵宠攻击加成
|
| | | TYPE_Calc_HorseTrainAttrPer, # 坐骑培养属性加成(攻防血)
|
| | | TYPE_Calc_PetTrainAttrPer, # 灵宠培养属性加成(攻防血)
|
| | | TYPE_Calc_GuardTrainAttrPer, # 守护培养属性加成(攻防血) 155
|
| | | TYPE_Calc_WingTrainAttrPer, # 翅膀培养属性加成(攻防血)
|
| | | TYPE_Calc_PeerlessWeaponTrainAttrPer, # 灭世培养属性加成(攻防血)
|
| | | TYPE_Calc_PeerlessWeapon2TrainAttrPer, # 弑神培养属性加成(攻防血)
|
| | | ) = range(1, Def_Calc_AllAttrType_MAX)
|
| | |
|
| | | ## 支持大数值属性,超过20E
|
| | |
| | | Def_PlayerKey_CurePer = "CurePer" # 治疗加成 默认百分百
|
| | | Def_PlayerKey_BeHurtPer = "BeHurtPer" # 加深受到伤害百分比
|
| | | Def_PlayerKey_HorseAtkPer = "HorseAtkPer" # 坐骑攻击百分比
|
| | | Def_PlayerKey_HorseMaxHPPer = "HorseMaxHPPer" # 坐骑生命加成
|
| | | Def_PlayerKey_PetAtkPer = "PetAtkPer" # 灵宠攻击加成
|
| | | Def_PlayerKey_HorseTrainAttrPer = "HorseTrainAttrPer" # 坐骑培养属性加成
|
| | | Def_PlayerKey_PetTrainAttrPer = "PetTrainAttrPer" # 灵宠培养属性加成
|
| | | Def_PlayerKey_GuardTrainAttrPer = "GuardTrainAttrPer" # 守护培养属性加成
|
| | | Def_PlayerKey_WingTrainAttrPer = "WingTrainAttrPer" # 翅膀培养属性加成
|
| | | Def_PlayerKey_PeerlessWeaponTrainAttrPer = "PeerlessWeaponTrainAttrPer" # 灭世培养属性加成
|
| | | Def_PlayerKey_PeerlessWeapon2TrainAttrPer = "PeerlessWeapon2TrainAttrPer" # 弑神培养属性加成
|
| | | Def_PlayerKey_StoneBasePer = "StoneBasePer" # 宝石基础属性百分比
|
| | | Def_PlayerKey_RealmBasePer = "RealmBasePer" # 境界基础属性百分比
|
| | | Def_PlayerKey_WingHPPer = "WingHPPer" # 翅膀生命百分比
|
| | |
| | | Def_PDict_EquipWashValue = "EquipWashV_%s_%s" # 装备部位洗练当前值,参数为(place, 属性编号)
|
| | | Def_PDict_EquipWashValueTemp = "EquipWashVT_%s_%s" # 装备部位洗练当前临时洗练值,参数为(place, 属性编号)
|
| | |
|
| | | # 灵器培养
|
| | | Def_PDict_LingQiTrainLV = "LingQiTrainLV_%s_%s" # 培养等阶,参数为(place, 培养类型)
|
| | | Def_PDict_LingQiTrainItemCount = "LingQiTrainItemCount_%s_%s" # 培养当前阶已吃培养丹个数,参数为(place, 培养类型)
|
| | |
|
| | | # 百战之地
|
| | | Def_PDict_BZZD_TotalFightExp = "BZZD_TExp" # 最后一次进入副本挑战获得总经验, 领取多倍奖励时用
|
| | | Def_PDict_BZZD_TotalFightExpPoint = "BZZD_TExpPoint" # 最后一次进入副本挑战获得总经验点, 领取多倍奖励时用
|
| | |
| | |
|
| | | # 宠物
|
| | | Def_PDict_FightPetIndex = "FightPetIndex" # 出战的宠物索引
|
| | | Def_PDict_PetTrainLV = "PetTrainLV_%s" # 灵宠培养等阶,参数(培养类型)
|
| | | Def_PDict_PetTrainItemCount = "PetTrainItemCount_%s" # 灵宠培养当前阶已吃培养丹个数,参数(培养类型)
|
| | |
|
| | | #装备分解
|
| | | Def_PDict_EquipDecomposeLV = "EquipDecomposeLV" #等级
|
| | |
| | | Def_PDict_HorserLV = "HorserLV" # 坐骑等级
|
| | | Def_PDict_HorserEatItemCount = "HorserEatItemCount" # 当前阶已吃培养丹个数
|
| | | Def_PDict_HorserSkinPlusState = "HorserSkinPlusState" # 坐骑幻化皮肤激活状态,按二进制位存储,每位代表幻化ID是否已激活
|
| | | Def_PDict_HorserTrainLV = "HorserTrainLV_%s" # 坐骑培养等阶,参数(培养类型)
|
| | | Def_PDict_HorserTrainItemCount = "HorserTrainItemCount_%s" # 坐骑培养当前阶已吃培养丹个数,参数(培养类型)
|
| | |
|
| | | #骑宠觉醒
|
| | | Def_PDict_HorsePetSkinData = "HorsePetSkinData%d_%s" #觉醒等级*100+外观索引 参数(类型,关联ID) 1-坐骑 2-灵宠
|
| | |
| | | ShareDefine.Def_Effect_MissRate:[[TYPE_Calc_AttrMiss], False, TYPE_NoLinear],
|
| | | #ShareDefine.Def_Effect_AddMAtkByPer:[[TYPE_Calc_AttrMATKMin, TYPE_Calc_AttrMATKMax], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_AddAtkByPer:[[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_PetAtkPer:[[TYPE_Calc_PetMinAtk, TYPE_Calc_PetMaxAtk], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_SpeedPer:[[TYPE_Calc_AttrSpeed], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_LuckPer:[[TYPE_Calc_Luck], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_IceAtkPer:[[TYPE_Calc_AttrIceAtk], False, TYPE_NoLinear],
|
| | |
| | | ShareDefine.Def_Effect_StoneBasePer:[[TYPE_Calc_StoneBasePer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_RealmBasePer:[[TYPE_Calc_RealmBasePer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_HorseAtkPer:[[TYPE_Calc_HorseAtkPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_HorseMaxHPPer:[[TYPE_Calc_HorseMaxHPPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_HorseTrainAttrPer:[[TYPE_Calc_HorseTrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_PetTrainAttrPer:[[TYPE_Calc_PetTrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_GuardTrainAttrPer:[[TYPE_Calc_GuardTrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_WingTrainAttrPer:[[TYPE_Calc_WingTrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_PeerlessWeaponTrainAttrPer:[[TYPE_Calc_PeerlessWeaponTrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_PeerlessWeapon2TrainAttrPer:[[TYPE_Calc_PeerlessWeapon2TrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_WingHPPer:[[TYPE_Calc_WingHPPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_SuiteBasePer:[[TYPE_Calc_SuiteBasePer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_PlusBaseAtkPer:[[TYPE_Calc_PlusBaseAtkPer], False, TYPE_NoLinear],
|
| | |
| | | TYPE_Calc_RealmBasePer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax,
|
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_HorseAtkPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax],
|
| | | TYPE_Calc_HorseMaxHPPer:[TYPE_Calc_AttrMaxHP],
|
| | | TYPE_Calc_HorseTrainAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_PetTrainAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_WingTrainAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_GuardTrainAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_PeerlessWeaponTrainAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_PeerlessWeapon2TrainAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_WingHPPer:[TYPE_Calc_AttrMaxHP],
|
| | | TYPE_Calc_SuiteBasePer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax,
|
| | | TYPE_Calc_AttrMaxHP],
|
| | |
| | | Def_CalcAttrFunc_LingQiAttr, # 灵器属性 38
|
| | | Def_CalcAttrFunc_HorseSkin, # 坐骑觉醒 39
|
| | | Def_CalcAttrFunc_PetSkin, # 灵宠觉醒 40
|
| | | ) = range(41)
|
| | | Def_CalcAttrFunc_LingQiJingLianAttr, # 灵器精炼 41
|
| | | Def_CalcAttrFunc_HorseTarin, # 坐骑培养 42
|
| | | Def_CalcAttrFunc_PetTarin, # 灵宠培养 43
|
| | | Def_CalcAttrFunc_GuardTarin, # 守护培养 44
|
| | | Def_CalcAttrFunc_WingTarin, # 翅膀培养 45
|
| | | Def_CalcAttrFunc_PeerlessWeaponTrain, # 灭世培养 46
|
| | | Def_CalcAttrFunc_PeerlessWeapon2Train, # 噬魂培养 47
|
| | | ) = range(48)
|
| | |
|
| | | # 技能功能点列表 - 默认不算战力,不享受百分比加成,技能功能点暂时配置,之后优化技能属性逻辑后可去掉
|
| | | CalcAttrFuncSkillList = [Def_CalcAttrFunc_HorseSkill, Def_CalcAttrFunc_PetSkill, Def_CalcAttrFunc_DogzBattleSkill]
|
| | |
| | | ShareDefine.Def_MFPType_Star:[Def_CalcAttrFunc_Star],
|
| | | ShareDefine.Def_MFPType_Plus:[Def_CalcAttrFunc_Plus],
|
| | | ShareDefine.Def_MFPType_Stone:[Def_CalcAttrFunc_Stone],
|
| | | ShareDefine.Def_MFPType_LingQi:[Def_CalcAttrFunc_LingQi, Def_CalcAttrFunc_LingQiAttr],
|
| | | ShareDefine.Def_MFPType_LingQi:[Def_CalcAttrFunc_LingQi, Def_CalcAttrFunc_LingQiAttr, Def_CalcAttrFunc_LingQiJingLianAttr, Def_CalcAttrFunc_GuardTarin, |
| | | Def_CalcAttrFunc_WingTarin, Def_CalcAttrFunc_PeerlessWeaponTrain, Def_CalcAttrFunc_PeerlessWeapon2Train],
|
| | | ShareDefine.Def_MFPType_Wash:[Def_CalcAttrFunc_Wash],
|
| | | ShareDefine.Def_MFPType_Pet:[Def_CalcAttrFunc_Pet, Def_CalcAttrFunc_PetSign, Def_CalcAttrFunc_PetSkill, Def_CalcAttrFunc_PetSkin],
|
| | | ShareDefine.Def_MFPType_Pet:[Def_CalcAttrFunc_Pet, Def_CalcAttrFunc_PetSign, Def_CalcAttrFunc_PetSkill, Def_CalcAttrFunc_PetSkin, Def_CalcAttrFunc_PetTarin],
|
| | | ShareDefine.Def_MFPType_PetSoul:[Def_CalcAttrFunc_PetSoul],
|
| | | ShareDefine.Def_MFPType_Horse:[Def_CalcAttrFunc_Horse, Def_CalcAttrFunc_HorseSkill, Def_CalcAttrFunc_HorseSkin],
|
| | | ShareDefine.Def_MFPType_Horse:[Def_CalcAttrFunc_Horse, Def_CalcAttrFunc_HorseSkill, Def_CalcAttrFunc_HorseSkin, Def_CalcAttrFunc_HorseTarin],
|
| | | ShareDefine.Def_MFPType_HorseSoul:[Def_CalcAttrFunc_HorseSoul],
|
| | | ShareDefine.Def_MFPType_Prestige:[Def_CalcAttrFunc_Prestige],
|
| | | ShareDefine.Def_MFPType_GodWeapon:[Def_CalcAttrFunc_GodWeapon],
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 27 灵器培养 #tagCMLingQiTrain
|
| | |
|
| | | class tagCMLingQiTrain(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("EquipPlace", c_ubyte), #灵器装备位
|
| | | ("TrainType", c_ubyte), #培养类型: 1-基础培养,2-特殊培养,3-百分比培养
|
| | | ("UseItemCnt", c_ushort), #消耗材料个数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x27
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x27
|
| | | self.EquipPlace = 0
|
| | | self.TrainType = 0
|
| | | self.UseItemCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMLingQiTrain)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 27 灵器培养 //tagCMLingQiTrain:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | EquipPlace:%d,
|
| | | TrainType:%d,
|
| | | UseItemCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.EquipPlace,
|
| | | self.TrainType,
|
| | | self.UseItemCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMLingQiTrain=tagCMLingQiTrain()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMLingQiTrain.Cmd,m_NAtagCMLingQiTrain.SubCmd))] = m_NAtagCMLingQiTrain
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 02 丢弃背包物品 #tagPlayerDropItem
|
| | |
|
| | | class tagPlayerDropItem(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 31 坐骑培养 #tagCMHorseTrain
|
| | |
|
| | | class tagCMHorseTrain(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("TrainType", c_ubyte), #培养类型: 1-基础培养,2-特殊培养,3-百分比培养
|
| | | ("UseItemCnt", c_ushort), #消耗材料个数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x31
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x31
|
| | | self.TrainType = 0
|
| | | self.UseItemCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMHorseTrain)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A5 31 坐骑培养 //tagCMHorseTrain:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | TrainType:%d,
|
| | | UseItemCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.TrainType,
|
| | | self.UseItemCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMHorseTrain=tagCMHorseTrain()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHorseTrain.Cmd,m_NAtagCMHorseTrain.SubCmd))] = m_NAtagCMHorseTrain
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 27 坐骑提升 #tagCMHorseUp
|
| | |
|
| | | class tagCMHorseUp(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A7 05 宠物培养 #tagCMPetTrain
|
| | |
|
| | | class tagCMPetTrain(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("TrainType", c_ubyte), #培养类型: 1-基础培养,2-特殊培养,3-百分比培养
|
| | | ("UseItemCnt", c_ushort), #消耗材料个数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA7
|
| | | self.SubCmd = 0x05
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xA7
|
| | | self.SubCmd = 0x05
|
| | | self.TrainType = 0
|
| | | self.UseItemCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMPetTrain)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A7 05 宠物培养 //tagCMPetTrain:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | TrainType:%d,
|
| | | UseItemCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.TrainType,
|
| | | self.UseItemCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMPetTrain=tagCMPetTrain()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPetTrain.Cmd,m_NAtagCMPetTrain.SubCmd))] = m_NAtagCMPetTrain
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A8 04 购买VIP礼包 #tagCMBuyVIPItem
|
| | |
|
| | | class tagCMBuyVIPItem(Structure):
|
| | |
| | | ("DWORD", "NextItemID", 0),
|
| | | ),
|
| | |
|
| | | "LingQiTrain":(
|
| | | ("BYTE", "EquipPlace", 1),
|
| | | ("BYTE", "TrainType", 1),
|
| | | ("BYTE", "TrainLV", 1),
|
| | | ("WORD", "NeedRealmLV", 0),
|
| | | ("DWORD", "EatCntTotal", 0),
|
| | | ("DWORD", "EatCntEverytime", 0),
|
| | | ("list", "EatItemAttrTypeList", 0),
|
| | | ("list", "EatItemAttrValueList", 0),
|
| | | ("list", "LVAttrTypeList", 0),
|
| | | ("list", "LVAttrValueList", 0),
|
| | | ),
|
| | |
|
| | | "Realm":(
|
| | | ("WORD", "Lv", 1),
|
| | | ("BYTE", "LvLarge", 0),
|
| | |
| | | ("DWORD", "InitFightPower", 0),
|
| | | ),
|
| | |
|
| | | "PetTrain":(
|
| | | ("BYTE", "TrainType", 1),
|
| | | ("BYTE", "TrainLV", 1),
|
| | | ("WORD", "NeedRealmLV", 0),
|
| | | ("DWORD", "EatCntTotal", 0),
|
| | | ("DWORD", "EatCntEverytime", 0),
|
| | | ("list", "EatItemAttrTypeList", 0),
|
| | | ("list", "EatItemAttrValueList", 0),
|
| | | ("list", "LVAttrTypeList", 0),
|
| | | ("list", "LVAttrValueList", 0),
|
| | | ),
|
| | |
|
| | | "EquipDecompose":(
|
| | | ("WORD", "LV", 1),
|
| | | ("DWORD", "UpNeedExp", 0),
|
| | |
| | | ("WORD", "NeedEatCount", 0),
|
| | | ("list", "LVAttrType", 0),
|
| | | ("list", "LVAttrValue", 0),
|
| | | ),
|
| | |
|
| | | "HorseTrain":(
|
| | | ("BYTE", "TrainType", 1),
|
| | | ("BYTE", "TrainLV", 1),
|
| | | ("WORD", "NeedRealmLV", 0),
|
| | | ("DWORD", "EatCntTotal", 0),
|
| | | ("DWORD", "EatCntEverytime", 0),
|
| | | ("list", "EatItemAttrTypeList", 0),
|
| | | ("list", "EatItemAttrValueList", 0),
|
| | | ("list", "LVAttrTypeList", 0),
|
| | | ("list", "LVAttrValueList", 0),
|
| | | ),
|
| | |
|
| | | "HorseSkinPlus":(
|
| | |
| | | def GetUpCostItem(self): return self.UpCostItem # 突破需要材料
|
| | | def GetNextItemID(self): return self.NextItemID # 突破后物品ID |
| | | |
| | | # 灵器培养表 |
| | | class IPY_LingQiTrain(): |
| | | |
| | | def __init__(self): |
| | | self.EquipPlace = 0
|
| | | self.TrainType = 0
|
| | | self.TrainLV = 0
|
| | | self.NeedRealmLV = 0
|
| | | self.EatCntTotal = 0
|
| | | self.EatCntEverytime = 0
|
| | | self.EatItemAttrTypeList = []
|
| | | self.EatItemAttrValueList = []
|
| | | self.LVAttrTypeList = []
|
| | | self.LVAttrValueList = [] |
| | | return |
| | | |
| | | def GetEquipPlace(self): return self.EquipPlace # 灵器装备位
|
| | | def GetTrainType(self): return self.TrainType # 培养类型
|
| | | def GetTrainLV(self): return self.TrainLV # 培养等阶
|
| | | def GetNeedRealmLV(self): return self.NeedRealmLV # 培养所需境界
|
| | | def GetEatCntTotal(self): return self.EatCntTotal # 升阶所需个数(非累计)
|
| | | def GetEatCntEverytime(self): return self.EatCntEverytime # 每次培养消耗x个
|
| | | def GetEatItemAttrTypeList(self): return self.EatItemAttrTypeList # 每X个培养丹增加属性类型=EatCntEverytime
|
| | | def GetEatItemAttrValueList(self): return self.EatItemAttrValueList # 每X个培养丹增加属性值=EatCntEverytime
|
| | | def GetLVAttrTypeList(self): return self.LVAttrTypeList # 每级额外属性类(非累积)
|
| | | def GetLVAttrValueList(self): return self.LVAttrValueList # 每级额外属性值(非累积) |
| | | |
| | | # 境界表 |
| | | class IPY_Realm(): |
| | | |
| | |
| | | def GetSkillUnLockSys(self): return self.SkillUnLockSys # 灵兽技能解锁提示
|
| | | def GetInitFightPower(self): return self.InitFightPower # 初始战力 |
| | | |
| | | # 灵宠培养表 |
| | | class IPY_PetTrain(): |
| | | |
| | | def __init__(self): |
| | | self.TrainType = 0
|
| | | self.TrainLV = 0
|
| | | self.NeedRealmLV = 0
|
| | | self.EatCntTotal = 0
|
| | | self.EatCntEverytime = 0
|
| | | self.EatItemAttrTypeList = []
|
| | | self.EatItemAttrValueList = []
|
| | | self.LVAttrTypeList = []
|
| | | self.LVAttrValueList = [] |
| | | return |
| | | |
| | | def GetTrainType(self): return self.TrainType # 培养类型
|
| | | def GetTrainLV(self): return self.TrainLV # 培养等阶
|
| | | def GetNeedRealmLV(self): return self.NeedRealmLV # 培养所需境界
|
| | | def GetEatCntTotal(self): return self.EatCntTotal # 升阶所需个数(非累计)
|
| | | def GetEatCntEverytime(self): return self.EatCntEverytime # 每次培养消耗x个
|
| | | def GetEatItemAttrTypeList(self): return self.EatItemAttrTypeList # 每X个培养丹增加属性类型=EatCntEverytime
|
| | | def GetEatItemAttrValueList(self): return self.EatItemAttrValueList # 每X个培养丹增加属性值=EatCntEverytime
|
| | | def GetLVAttrTypeList(self): return self.LVAttrTypeList # 每级额外属性类(非累积)
|
| | | def GetLVAttrValueList(self): return self.LVAttrValueList # 每级额外属性值(非累积) |
| | | |
| | | # 装备分解属性表 |
| | | class IPY_EquipDecompose(): |
| | | |
| | |
| | | def GetNeedEatCount(self): return self.NeedEatCount # 升级所需个数(非累计)
|
| | | def GetLVAttrType(self): return self.LVAttrType # 每级额外属性类型(非累积)
|
| | | def GetLVAttrValue(self): return self.LVAttrValue # 每级额外属性值(非累积) |
| | | |
| | | # 坐骑培养表 |
| | | class IPY_HorseTrain(): |
| | | |
| | | def __init__(self): |
| | | self.TrainType = 0
|
| | | self.TrainLV = 0
|
| | | self.NeedRealmLV = 0
|
| | | self.EatCntTotal = 0
|
| | | self.EatCntEverytime = 0
|
| | | self.EatItemAttrTypeList = []
|
| | | self.EatItemAttrValueList = []
|
| | | self.LVAttrTypeList = []
|
| | | self.LVAttrValueList = [] |
| | | return |
| | | |
| | | def GetTrainType(self): return self.TrainType # 培养类型
|
| | | def GetTrainLV(self): return self.TrainLV # 培养等阶
|
| | | def GetNeedRealmLV(self): return self.NeedRealmLV # 培养所需境界
|
| | | def GetEatCntTotal(self): return self.EatCntTotal # 升阶所需个数(非累计)
|
| | | def GetEatCntEverytime(self): return self.EatCntEverytime # 每次培养消耗x个
|
| | | def GetEatItemAttrTypeList(self): return self.EatItemAttrTypeList # 每X个培养丹增加属性类型=EatCntEverytime
|
| | | def GetEatItemAttrValueList(self): return self.EatItemAttrValueList # 每X个培养丹增加属性值=EatCntEverytime
|
| | | def GetLVAttrTypeList(self): return self.LVAttrTypeList # 每级额外属性类(非累积)
|
| | | def GetLVAttrValueList(self): return self.LVAttrValueList # 每级额外属性值(非累积) |
| | | |
| | | # 坐骑幻化表 |
| | | class IPY_HorseSkinPlus(): |
| | |
| | | self.ipyRolePointLen = len(self.ipyRolePointCache)
|
| | | self.ipyLingQiAttrCache = self.__LoadFileData("LingQiAttr", IPY_LingQiAttr)
|
| | | self.ipyLingQiAttrLen = len(self.ipyLingQiAttrCache)
|
| | | self.ipyLingQiTrainCache = self.__LoadFileData("LingQiTrain", IPY_LingQiTrain)
|
| | | self.ipyLingQiTrainLen = len(self.ipyLingQiTrainCache)
|
| | | self.ipyRealmCache = self.__LoadFileData("Realm", IPY_Realm)
|
| | | self.ipyRealmLen = len(self.ipyRealmCache)
|
| | | self.ipyGodWeaponCache = self.__LoadFileData("GodWeapon", IPY_GodWeapon)
|
| | |
| | | self.ipyAttrFruitLen = len(self.ipyAttrFruitCache)
|
| | | self.ipyPetInfoCache = self.__LoadFileData("PetInfo", IPY_PetInfo)
|
| | | self.ipyPetInfoLen = len(self.ipyPetInfoCache)
|
| | | self.ipyPetTrainCache = self.__LoadFileData("PetTrain", IPY_PetTrain)
|
| | | self.ipyPetTrainLen = len(self.ipyPetTrainCache)
|
| | | self.ipyEquipDecomposeCache = self.__LoadFileData("EquipDecompose", IPY_EquipDecompose)
|
| | | self.ipyEquipDecomposeLen = len(self.ipyEquipDecomposeCache)
|
| | | self.ipyPetClassCostCache = self.__LoadFileData("PetClassCost", IPY_PetClassCost)
|
| | |
| | | self.ipyPetEatEquipLen = len(self.ipyPetEatEquipCache)
|
| | | self.ipyHorseLVUpCache = self.__LoadFileData("HorseLVUp", IPY_HorseLVUp)
|
| | | self.ipyHorseLVUpLen = len(self.ipyHorseLVUpCache)
|
| | | self.ipyHorseTrainCache = self.__LoadFileData("HorseTrain", IPY_HorseTrain)
|
| | | self.ipyHorseTrainLen = len(self.ipyHorseTrainCache)
|
| | | self.ipyHorseSkinPlusCache = self.__LoadFileData("HorseSkinPlus", IPY_HorseSkinPlus)
|
| | | self.ipyHorseSkinPlusLen = len(self.ipyHorseSkinPlusCache)
|
| | | self.ipyPlayerLVCache = self.__LoadFileData("PlayerLV", IPY_PlayerLV)
|
| | |
| | | def GetRolePointByIndex(self, index): return self.ipyRolePointCache[index]
|
| | | def GetLingQiAttrCount(self): return self.ipyLingQiAttrLen
|
| | | def GetLingQiAttrByIndex(self, index): return self.ipyLingQiAttrCache[index]
|
| | | def GetLingQiTrainCount(self): return self.ipyLingQiTrainLen
|
| | | def GetLingQiTrainByIndex(self, index): return self.ipyLingQiTrainCache[index]
|
| | | def GetRealmCount(self): return self.ipyRealmLen
|
| | | def GetRealmByIndex(self, index): return self.ipyRealmCache[index]
|
| | | def GetGodWeaponCount(self): return self.ipyGodWeaponLen
|
| | |
| | | def GetAttrFruitByIndex(self, index): return self.ipyAttrFruitCache[index]
|
| | | def GetPetInfoCount(self): return self.ipyPetInfoLen
|
| | | def GetPetInfoByIndex(self, index): return self.ipyPetInfoCache[index]
|
| | | def GetPetTrainCount(self): return self.ipyPetTrainLen
|
| | | def GetPetTrainByIndex(self, index): return self.ipyPetTrainCache[index]
|
| | | def GetEquipDecomposeCount(self): return self.ipyEquipDecomposeLen
|
| | | def GetEquipDecomposeByIndex(self, index): return self.ipyEquipDecomposeCache[index]
|
| | | def GetPetClassCostCount(self): return self.ipyPetClassCostLen
|
| | |
| | | def GetPetEatEquipByIndex(self, index): return self.ipyPetEatEquipCache[index]
|
| | | def GetHorseLVUpCount(self): return self.ipyHorseLVUpLen
|
| | | def GetHorseLVUpByIndex(self, index): return self.ipyHorseLVUpCache[index]
|
| | | def GetHorseTrainCount(self): return self.ipyHorseTrainLen
|
| | | def GetHorseTrainByIndex(self, index): return self.ipyHorseTrainCache[index]
|
| | | def GetHorseSkinPlusCount(self): return self.ipyHorseSkinPlusLen
|
| | | def GetHorseSkinPlusByIndex(self, index): return self.ipyHorseSkinPlusCache[index]
|
| | | def GetPlayerLVCount(self): return self.ipyPlayerLVLen
|
| | |
| | | GameWorld.DebugLog("登录更新装备相关值汇总: orangeEquipCount=%s,totalStar=%s,totalPlusLV=%s,totalEvolveLV=%s,totalWashLV=%s,totalStoneLV=%s"
|
| | | % (orangeEquipCount, totalStar, totalPlusLV, totalEvolveLV, totalWashLV, totalStoneLV))
|
| | | Sync_EquipPartSuiteActivateInfo(curPlayer)
|
| | | |
| | | for equipPlace in ChConfig.EquipPlace_LingQi:
|
| | | Sync_LingQiTrainData(curPlayer, equipPlace)
|
| | | |
| | | return
|
| | |
|
| | | ## 刷新所有装备对人物属性的改变
|
| | |
| | | PlayerControl.WorldNotify(0, 'SpiritOrgan', [curPlayer.GetName(), breakItemID, nextItemID])
|
| | | return
|
| | |
|
| | | #// A3 27 灵器培养 #tagCMLingQiTrain
|
| | | #
|
| | | #struct tagCMLingQiTrain
|
| | | #{
|
| | | # tagHead Head;
|
| | | # BYTE EquipPlace; //灵器装备位
|
| | | # BYTE TrainType; //培养类型: 1-基础培养,2-特殊培养,3-百分比培养
|
| | | # WORD UseItemCnt; //消耗材料个数
|
| | | #};
|
| | | def OnLingQiTrain(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | |
| | | equipPlace = clientData.EquipPlace # 灵器装备位
|
| | | trainType = clientData.TrainType # 培养类型
|
| | | costItemCount = clientData.UseItemCnt # 消耗材料个数
|
| | | |
| | | trainLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType))
|
| | | curEatItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LingQiTrainItemCount % (equipPlace, trainType))
|
| | | GameWorld.DebugLog("灵器培养: equipPlace=%s,trainType=%s,trainLV=%s,costItemCount=%s,curEatItemCount=%s" |
| | | % (equipPlace, trainType, trainLV, costItemCount, curEatItemCount))
|
| | | |
| | | if equipPlace not in ChConfig.EquipPlace_LingQi:
|
| | | return
|
| | | |
| | | if trainType <= 0 or trainType > GetLingQiTrainTypes():
|
| | | return
|
| | | |
| | | if trainLV <= 0:
|
| | | GameWorld.DebugLog(" 培养未激活 trainType=%s" % trainType)
|
| | | return
|
| | | |
| | | trainIpyData = IpyGameDataPY.GetIpyGameData("LingQiTrain", equipPlace, trainType, trainLV)
|
| | | if not trainIpyData:
|
| | | return
|
| | | |
| | | needRealmLV = trainIpyData.GetNeedRealmLV()
|
| | | curRealmLV = curPlayer.GetOfficialRank()
|
| | | if curRealmLV < needRealmLV:
|
| | | GameWorld.DebugLog(" 境界不足,无法培养! curRealmLV(%s) < needRealmLV(%s)" % (curRealmLV, needRealmLV))
|
| | | return
|
| | | |
| | | needEatCountTotal = trainIpyData.GetEatCntTotal()
|
| | | if not needEatCountTotal:
|
| | | GameWorld.DebugLog(" 该培养已满级!")
|
| | | return
|
| | | |
| | | costItemIDList = IpyGameDataPY.GetFuncEvalCfg("LingQiTrain", 1)
|
| | | costItemID = costItemIDList[trainType - 1]
|
| | | if not costItemID or not costItemCount:
|
| | | return
|
| | | |
| | | costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, costItemID, costItemCount)
|
| | | lackCnt = costItemCount - bindCnt - unBindCnt
|
| | | if lackCnt > 0:
|
| | | GameWorld.DebugLog(" 消耗道具不足,无法培养!costItemID=%s,costItemCount=%s,bindCnt=%s,unBindCnt=%s,lackCnt=%s" |
| | | % (costItemID, costItemCount, bindCnt, unBindCnt, lackCnt))
|
| | | return
|
| | | |
| | | delCnt = costItemCount
|
| | | |
| | | # 扣除消耗
|
| | | if delCnt:
|
| | | ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, delCnt, "LingQiTrain")
|
| | | |
| | | updClassLV = trainLV
|
| | | updEatItemCount = curEatItemCount + costItemCount
|
| | | GameWorld.DebugLog(" updEatItemCount=%s,needEatCountTotal=%s" % (updEatItemCount, needEatCountTotal))
|
| | | |
| | | if updEatItemCount >= needEatCountTotal:
|
| | | updClassLV += 1
|
| | | updEatItemCount -= needEatCountTotal
|
| | | GameWorld.DebugLog(" 进阶: updClassLV=%s,updEatItemCount=%s" % (updClassLV, updEatItemCount))
|
| | | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType), updClassLV)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LingQiTrainItemCount % (equipPlace, trainType), updEatItemCount)
|
| | | |
| | | # 升阶
|
| | | if updClassLV > trainLV:
|
| | | pass
|
| | | |
| | | Sync_LingQiTrainData(curPlayer, equipPlace)
|
| | | # 刷属性
|
| | | RefreshPlayerLingQiEquipAttr(curPlayer)
|
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | return
|
| | |
|
| | | def GetLingQiTrainTypes():
|
| | | return len(IpyGameDataPY.GetFuncEvalCfg("LingQiTrain", 1))
|
| | |
|
| | | def Sync_LingQiTrainData(curPlayer, equipPlace):
|
| | | clientPack = ChPyNetSendPack.tagMCLingQiTrainInfo()
|
| | | clientPack.EquipPlace = equipPlace
|
| | | clientPack.TrainLVList = []
|
| | | clientPack.TrainItemCountList = []
|
| | | for trainType in xrange(1, GetLingQiTrainTypes() + 1):
|
| | | trainLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType))
|
| | | if trainLV == 0:
|
| | | trainLV = 1
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType), trainLV)
|
| | | clientPack.TrainLVList.append(trainLV)
|
| | | clientPack.TrainItemCountList.append(curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LingQiTrainItemCount % (equipPlace, trainType)))
|
| | | clientPack.TrainTypes = len(clientPack.TrainLVList)
|
| | | NetPackCommon.SendFakePack(curPlayer, clientPack)
|
| | | return
|
| | |
|
| | | def RefreshPlayerLingQiEquipAttr(curPlayer):
|
| | | ''' 刷新玩家灵器装备属性
|
| | | '''
|
| | |
| | | PlayerControl.CalcAttrDict_Type(lqAttrID, lqAttrValue, lingQiAttrList)
|
| | |
|
| | | #灵器各部位其他属性
|
| | | if equipPlace == ShareDefine.retWing:
|
| | | PlayerWing.CalcWingAttrEx(curPlayer, curEquip, allAttrList)
|
| | | #if equipPlace == ShareDefine.retWing:
|
| | | # PlayerWing.CalcWingAttrEx(curPlayer, curEquip, allAttrList)
|
| | | |
| | | # 新培养属性
|
| | | guardTrainAttrList = [{} for _ in range(4)]
|
| | | wingTrainAttrList = [{} for _ in range(4)]
|
| | | peerlessWeaponTrainAttrList = [{} for _ in range(4)]
|
| | | peerlessWeapon2TrainAttrList = [{} for _ in range(4)]
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | for index in xrange(ipyDataMgr.GetLingQiTrainCount()):
|
| | | trainIpyData = ipyDataMgr.GetLingQiTrainByIndex(index)
|
| | | equipPlace = trainIpyData.GetEquipPlace()
|
| | | trainType = trainIpyData.GetTrainType()
|
| | | dataTrainLV = trainIpyData.GetTrainLV()
|
| | | |
| | | if equipPlace == ShareDefine.retGuard1:
|
| | | lingQiTrainAttrList = guardTrainAttrList
|
| | | elif equipPlace == ShareDefine.retWing:
|
| | | lingQiTrainAttrList = wingTrainAttrList
|
| | | elif equipPlace == ShareDefine.retPeerlessWeapon:
|
| | | lingQiTrainAttrList = peerlessWeaponTrainAttrList
|
| | | elif equipPlace == ShareDefine.retPeerlessWeapon2:
|
| | | lingQiTrainAttrList = peerlessWeapon2TrainAttrList
|
| | | else:
|
| | | continue
|
| | | |
| | | trainLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType))
|
| | | |
| | | if dataTrainLV > trainLV:
|
| | | continue
|
| | | elif dataTrainLV == trainLV:
|
| | | trainItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LingQiTrainItemCount % (equipPlace, trainType))
|
| | | else:
|
| | | trainItemCount = trainIpyData.GetEatCntTotal()
|
| | | |
| | | # 等阶额外属性
|
| | | lvAttrTypeList = trainIpyData.GetLVAttrTypeList()
|
| | | lvAttrValueList = trainIpyData.GetLVAttrValueList()
|
| | | for i, attrID in enumerate(lvAttrTypeList):
|
| | | attrValue = lvAttrValueList[i]
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, lingQiTrainAttrList)
|
| | | |
| | | # 培养丹增加属性
|
| | | eatCntEverytime = trainIpyData.GetEatCntEverytime()
|
| | | if trainItemCount and eatCntEverytime:
|
| | | eatItemAttrTypeList = trainIpyData.GetEatItemAttrTypeList()
|
| | | eatItemAttrValueList = trainIpyData.GetEatItemAttrValueList()
|
| | | attrMultiple = trainItemCount / eatCntEverytime
|
| | | for i, attrID in enumerate(eatItemAttrTypeList):
|
| | | attrValue = eatItemAttrValueList[i]
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue * attrMultiple, lingQiTrainAttrList)
|
| | | |
| | | #GameWorld.DebugLog("守护培养属性: %s" % guardTrainAttrList)
|
| | | #GameWorld.DebugLog("翅膀培养属性: %s" % wingTrainAttrList)
|
| | | #GameWorld.DebugLog("灭世培养属性: %s" % peerlessWeaponTrainAttrList)
|
| | | #GameWorld.DebugLog("噬魂培养属性: %s" % peerlessWeapon2TrainAttrList)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_GuardTarin, guardTrainAttrList)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_WingTarin, wingTrainAttrList)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PeerlessWeaponTrain, peerlessWeaponTrainAttrList)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PeerlessWeapon2Train, peerlessWeapon2TrainAttrList)
|
| | |
|
| | | lqFightPowerEx = eval(IpyGameDataPY.GetFuncCompileCfg("FightpowerFormula", 2))
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPEx % ShareDefine.Def_MFPType_LingQi, lqFightPowerEx)
|
| | |
| | | def GetSkillReducePer7(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_SkillReducePer7)
|
| | | def SetSkillReducePer7(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_SkillReducePer7, value)
|
| | |
|
| | | #---诛仙一击概率---
|
| | | def GetZhuXianRate(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ZhuxianRate)
|
| | | def SetZhuXianRate(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_ZhuxianRate, value)
|
| | |
|
| | | #---诛仙护体减伤---
|
| | | def GetZhuXianReducePer(curPlayer): return 0#curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ZhuXianReducePer)
|
| | | def SetZhuXianReducePer(curPlayer, value): return #curPlayer.SetDict(ChConfig.Def_PlayerKey_ZhuXianReducePer, value)
|
| | |
|
| | | ## 计算功能背包物品属性
|
| | | # @param curPlayer 当前玩家
|
| | | # @param packType 背包类型
|
| | |
| | |
|
| | | Def_Effect_ReduceSkillCDPer = 149 # 减少技能CD, a值为万分率
|
| | |
|
| | | Def_Effect_ZhuXianRate = 150 # 诛仙一击: 概率直接减少BOSS当前10%血量
|
| | | Def_Effect_ZhuXianReducePer = 151 # 诛仙护体: 受到BOSS伤害减免 万分率
|
| | |
|
| | | Def_Effect_HorseMaxHPPer = 152 # 坐骑生命加成
|
| | | Def_Effect_PetAtkPer = 153 # 灵宠攻击加成
|
| | | Def_Effect_HorseTrainAttrPer = 154 # 坐骑培养属性加成(攻防血)
|
| | | Def_Effect_PetTrainAttrPer = 155 # 灵宠培养属性加成(攻防血)
|
| | | Def_Effect_GuardTrainAttrPer = 156 # 守护培养属性加成(攻防血)
|
| | | Def_Effect_WingTrainAttrPer = 157 # 翅膀培养属性加成(攻防血)
|
| | | Def_Effect_PeerlessWeaponTrainAttrPer = 158 # 灭世培养属性加成(攻防血)
|
| | | Def_Effect_PeerlessWeapon2TrainAttrPer = 159 # 弑神培养属性加成(攻防血)
|
| | |
|
| | | #增加%d物理伤害值,其中a值为伤害值
|
| | | Def_Effect_AddAtk = 1005
|
| | | #增加%d魔法伤害值,其中a值为伤害值
|
| | |
| | | TYPE_Price_Environment:CDBPlayerRefresh_Environment,
|
| | | }
|
| | |
|
| | | # 支持负值的货币及对应0418刷新类型,不需要通知的话配置None
|
| | | # 支持负值的货币及对应0418刷新类型
|
| | | MoneyMinusRefreshDict = {
|
| | | 1:CDBPlayerRefresh_MoneyMinusGold,
|
| | | 2:CDBPlayerRefresh_MoneyMinusGoldPaper,
|
| | |
| | | [lambda curObj:PlayerControl.GetSkillReducePer5(curObj), lambda curObj, value:PlayerControl.SetSkillReducePer5(curObj, value), ShareDefine.CDBPlayerRefresh_SkillReducePer5, 1, 0], # 受到技能伤害减少5
|
| | | [lambda curObj:PlayerControl.GetSkillReducePer6(curObj), lambda curObj, value:PlayerControl.SetSkillReducePer6(curObj, value), ShareDefine.CDBPlayerRefresh_SkillReducePer6, 1, 0], # 受到技能伤害减少6
|
| | | [lambda curObj:PlayerControl.GetSkillReducePer7(curObj), lambda curObj, value:PlayerControl.SetSkillReducePer7(curObj, value), ShareDefine.CDBPlayerRefresh_SkillReducePer7, 1, 0], # 受到技能伤害减少7
|
| | | [lambda curObj:PlayerControl.GetZhuXianRate(curObj), lambda curObj, value:PlayerControl.SetZhuXianRate(curObj, value), 0, 0, 0], # 诛仙一击: 概率直接减少BOSS当前10%血量
|
| | | [lambda curObj:PlayerControl.GetZhuXianReducePer(curObj), lambda curObj, value:PlayerControl.SetZhuXianReducePer(curObj, value), 0, 0, 0], # 诛仙护体: 受到BOSS伤害减免 万分率
|
| | | [lambda curObj:PlayerControl.GetHorseMaxHPPer(curObj), lambda curObj, value:PlayerControl.SetHorseMaxHPPer(curObj, value), 0, 0, 0], # 坐骑生命加成
|
| | | [lambda curObj:PlayerControl.GetPetAtkPer(curObj), lambda curObj, value:PlayerControl.SetPetAtkPer(curObj, value), 0, 0, 0], # 灵宠攻击加成
|
| | | [lambda curObj:PlayerControl.GetHorseTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetHorseTrainAttrPer(curObj, value), 0, 0, 0], # 坐骑培养属性加成
|
| | | [lambda curObj:PlayerControl.GetPetTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetPetTrainAttrPer(curObj, value), 0, 0, 0], # 灵宠培养属性加成
|
| | | [lambda curObj:PlayerControl.GetGuardTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetGuardTrainAttrPer(curObj, value), 0, 0, 0], # 守护培养属性加成
|
| | | [lambda curObj:PlayerControl.GetWingTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetWingTrainAttrPer(curObj, value), 0, 0, 0], # 翅膀培养属性加成
|
| | | [lambda curObj:PlayerControl.GetPeerlessWeaponTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetPeerlessWeaponTrainAttrPer(curObj, value), 0, 0, 0], # 灭世培养属性加成
|
| | | [lambda curObj:PlayerControl.GetPeerlessWeapon2TrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetPeerlessWeapon2TrainAttrPer(curObj, value), 0, 0, 0], # 弑神培养属性加成
|
| | | ]
|
| | |
|
| | | ## 通过索引获得属性值
|