7220 【后端】【2.0】灵器开发1.0版(删除绝版属性,原绝版属性转移到灵器属性)
| | |
| | | BYTE CancelUseLimit; //穿戴限制(除职业)
|
| | | list LegendAttrID; //传奇属性ID
|
| | | list LegendAttrValue; //传奇属性值
|
| | | list OutOfPrintAttr; //绝版属性ID
|
| | | list OutOfPrintAttrValue; //绝版属性最大值
|
| | | };
|
| | |
|
| | | //拍卖物品表
|
| | |
| | | Def_IudetMapLoaction = 15 # 物品记录地图坐标[mapid, posx, posy]
|
| | | Def_IudetLegendAttrID = 17 # 物品传奇属性ID列表
|
| | | Def_IudetLegendAttrValue = 19 # 物品传奇属性值列表
|
| | | Def_IudetOutOfPrintAttrID = 21 # 物品绝版属性ID列表
|
| | | Def_IudetOutOfPrintAttrValue = 23 # 物品绝版属性值列表
|
| | | Def_IudetPartSuiteLV = 25 # 部位套装等级 [套装类型1等级, 套装类型2等级, ...]
|
| | | Def_IudetWingMaterialItemID = 27 # 翅膀精炼材料ID列表
|
| | | Def_IudetWingMaterialItemCount = 29 # 翅膀精炼材料个数列表
|
| | |
| | | Def_CalcAttrFunc_GodWeapon, # 神兵 12
|
| | | Def_CalcAttrFunc_Dienstgrad, # 称号 13
|
| | | Def_CalcAttrFunc_Rune, # 符印 14
|
| | | Def_CalcAttrFunc_EquipOutOfPrint, # 绝版属性随等级变化 15
|
| | | Def_CalcAttrFunc_15,
|
| | | Def_CalcAttrFunc_Success, # 成就属性 16
|
| | | Def_CalcAttrFunc_VIP, # VIP属性 17
|
| | | Def_CalcAttrFunc_Stove, # 炼丹炉 18(废弃)
|
| | |
| | | #战斗力分组类型对应功能点属性分类索引列表,并不是一一对应的,有些战斗力类型可由多个功能点组成
|
| | | #***注意***: 以下功能点需包含上面定义的所有功能点,不然会导致有些属性无法加上
|
| | | MFPTypeAttrFuncIndexDict = {ShareDefine.Def_MFPType_Role:[Def_CalcAttrFunc_RoleBase],
|
| | | ShareDefine.Def_MFPType_Equip:[Def_CalcAttrFunc_Equip, Def_CalcAttrFunc_EquipOutOfPrint],
|
| | | ShareDefine.Def_MFPType_Equip:[Def_CalcAttrFunc_Equip],
|
| | | ShareDefine.Def_MFPType_LingGen:[Def_CalcAttrFunc_LingGenQuailty, Def_CalcAttrFunc_LingGen],
|
| | | ShareDefine.Def_MFPType_Star:[Def_CalcAttrFunc_Star],
|
| | | ShareDefine.Def_MFPType_Plus:[Def_CalcAttrFunc_Plus],
|
| | |
| | | ChConfig.Def_CalcAttrFunc_GodWeapon:"神兵",
|
| | | ChConfig.Def_CalcAttrFunc_Dienstgrad:"称号",
|
| | | ChConfig.Def_CalcAttrFunc_Rune:"符印",
|
| | | ChConfig.Def_CalcAttrFunc_EquipOutOfPrint:"绝版属性",
|
| | | ChConfig.Def_CalcAttrFunc_GatherSoul:"聚魂",
|
| | | ChConfig.Def_CalcAttrFunc_Success:"成就",
|
| | | ChConfig.Def_CalcAttrFunc_VIP:"VIP",
|
| | |
| | | ("BYTE", "CancelUseLimit", 0),
|
| | | ("list", "LegendAttrID", 0),
|
| | | ("list", "LegendAttrValue", 0),
|
| | | ("list", "OutOfPrintAttr", 0),
|
| | | ("list", "OutOfPrintAttrValue", 0),
|
| | | ),
|
| | |
|
| | | "AuctionItem":(
|
| | |
| | | self.CancelUseLimit = 0
|
| | | self.LegendAttrID = []
|
| | | self.LegendAttrValue = []
|
| | | self.OutOfPrintAttr = []
|
| | | self.OutOfPrintAttrValue = [] |
| | | return |
| | | |
| | | def GetID(self): return self.ID # 定制物品ID
|
| | |
| | | def GetCancelUseLimit(self): return self.CancelUseLimit # 穿戴限制(除职业)
|
| | | def GetLegendAttrID(self): return self.LegendAttrID # 传奇属性ID
|
| | | def GetLegendAttrValue(self): return self.LegendAttrValue # 传奇属性值
|
| | | def GetOutOfPrintAttr(self): return self.OutOfPrintAttr # 绝版属性ID
|
| | | def GetOutOfPrintAttrValue(self): return self.OutOfPrintAttrValue # 绝版属性最大值 |
| | | |
| | | # 拍卖物品表 |
| | | class IPY_AuctionItem(): |
| | |
| | | equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | equipScoreTotal = 0
|
| | | lv = curPlayer.GetLV()
|
| | | OutOfPrintAttrFormatDict = IpyGameDataPY.GetFuncEvalCfg("OutOfPrintValue", 2, {})
|
| | | lqAttrFormatDict = IpyGameDataPY.GetFuncEvalCfg("OutOfPrintValue", 2, {})
|
| | |
|
| | | for equipPlace in ChConfig.EquipPlace_LingQi:
|
| | |
|
| | |
| | | lingQiAttrIDList = lingQiIpyData.GetLingQiAttrID()
|
| | | lingQiAttrValueList = lingQiIpyData.GetLingQiAttrValue()
|
| | | for lqIndex, lqAttrID in enumerate(lingQiAttrIDList):
|
| | | if str(lqAttrID) in OutOfPrintAttrFormatDict:
|
| | | attrFormat = OutOfPrintAttrFormatDict[str(lqAttrID)]
|
| | | if str(lqAttrID) in lqAttrFormatDict:
|
| | | attrFormat = lqAttrFormatDict[str(lqAttrID)]
|
| | | maxOOPValue = lingQiAttrValueList[lqIndex]
|
| | | lqAttrValue = eval(FormulaControl.GetCompileFormula("OutOfPrintAttrFormat_%s" % lqAttrID, attrFormat))
|
| | | lqAttrValue = eval(FormulaControl.GetCompileFormula("LingQiAttrFormat_%s" % lqAttrID, attrFormat))
|
| | | else:
|
| | | lqAttrValue = lingQiAttrValueList[lqIndex]
|
| | |
|
| | |
| | | 1.1 装备本身属性: 不能有影响其他境界装备的属性
|
| | | 基础属性: 物品表中的配置
|
| | | 传奇属性:
|
| | | 绝版属性: |
| | |
|
| | | 2.装备位星级模块
|
| | | 2.1 装备位升星属性:不能有影响其他境界装备的属性
|
| | |
| | | #stone_addEquipBaseAttrPerList = [{}, {}, {}] # 宝石功能点对装备基础的加成信息 [所有部位, 基础部位, 指定部位]
|
| | | allAttrListWash = [{} for _ in range(4)] # 洗练属性
|
| | | #wash_addEquipBaseAttrPerList = [{}, {}, {}] # 洗练功能点对装备基础的加成信息 [所有部位, 基础部位, 指定部位]
|
| | | #allAttrListOutOfPrintEquip = [{} for _ in range(4)] # 绝版装备属性 需在等级变化独立计算
|
| | |
|
| | | packType = IPY_GameWorld.rptEquip
|
| | | playerEquip = curPlayer.GetItemManager().GetPack(packType)
|
| | |
| | | curItem.AddUserAttr(ShareDefine.Def_IudetLegendAttrID, equipData.legendAttrIDList[i])
|
| | | curItem.AddUserAttr(ShareDefine.Def_IudetLegendAttrValue, equipData.legendAttrValueList[i])
|
| | |
|
| | | #绝版属性
|
| | | if equipData.OutOfPrintAttrIDList and equipData.OutOfPrintAttrValueList:
|
| | | curItem.ClearUserAttr(ShareDefine.Def_IudetOutOfPrintAttrID)
|
| | | curItem.ClearUserAttr(ShareDefine.Def_IudetOutOfPrintAttrValue)
|
| | | for i in xrange(len(equipData.OutOfPrintAttrIDList)):
|
| | | curItem.AddUserAttr(ShareDefine.Def_IudetOutOfPrintAttrID, equipData.OutOfPrintAttrIDList[i])
|
| | | curItem.AddUserAttr(ShareDefine.Def_IudetOutOfPrintAttrValue, equipData.OutOfPrintAttrValueList[i])
|
| | | |
| | | ItemCommon.MakeEquipGS(curItem)
|
| | | return
|
| | |
|
| | |
| | | # return
|
| | | # playerID = curPlayer.GetPlayerID()
|
| | | # GameWorld.Log("玩家上线处理装备属性! curVersion=%s,checkVersion=%s" % (curVersion, checkVersion), playerID)
|
| | | # |
| | | # outOfPrintAttrItemDict = {} # 有绝版属性的定制物品属性信息 {itemID:[绝版属性ID列表, 绝版属性数值列表], ...}
|
| | | # ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | # for i in xrange(ipyDataMgr.GetAppointItemCount()):
|
| | | # ipyData = ipyDataMgr.GetAppointItemByIndex(i)
|
| | | # outOfPrintAttrList = ipyData.GetOutOfPrintAttr()
|
| | | # outOfPrintAttrValueList = ipyData.GetOutOfPrintAttrValue()
|
| | | # if not outOfPrintAttrList or len(outOfPrintAttrList) != len(outOfPrintAttrValueList):
|
| | | # continue
|
| | | # itemID = GetAppointItemRealID(ipyData.GetID())
|
| | | # if not itemID:
|
| | | # continue
|
| | | # outOfPrintAttrItemDict[itemID] = [outOfPrintAttrList, outOfPrintAttrValueList]
|
| | | # |
| | | # checkPackList = [IPY_GameWorld.rptEquip, IPY_GameWorld.rptItem, IPY_GameWorld.rptWarehouse]
|
| | | # for packType in checkPackList:
|
| | | # curPack = curPlayer.GetItemManager().GetPack(packType)
|
| | | # for i in xrange(curPack.GetCount()):
|
| | | # curItem = curPack.GetAt(i)
|
| | | # #GameWorld.DebugLog("packType=%s,i=%s" % (packType, i))
|
| | | # if curItem.IsEmpty():
|
| | | # continue
|
| | | # isEquip = ItemCommon.CheckItemIsEquip(curItem)
|
| | | # if not isEquip:
|
| | | # continue
|
| | | # itemID = curItem.GetItemTypeID()
|
| | | # self.CheckEquipAttr(packType, curItem)
|
| | | # |
| | | # # 重刷绝版属性
|
| | | # if itemID in outOfPrintAttrItemDict:
|
| | | # outOfPrintAttrList, outOfPrintAttrValueList = outOfPrintAttrItemDict[itemID]
|
| | | # curItem.ClearUserAttr(ShareDefine.Def_IudetOutOfPrintAttrID)
|
| | | # curItem.ClearUserAttr(ShareDefine.Def_IudetOutOfPrintAttrValue)
|
| | | # for outOfPrintAttrIndex in xrange(len(outOfPrintAttrList)):
|
| | | # curItem.AddUserAttr(ShareDefine.Def_IudetOutOfPrintAttrID, outOfPrintAttrList[outOfPrintAttrIndex])
|
| | | # curItem.AddUserAttr(ShareDefine.Def_IudetOutOfPrintAttrValue, outOfPrintAttrValueList[outOfPrintAttrIndex])
|
| | | # GameWorld.Log(" 玩家登录重刷装备绝版属性: packType=%s,i=%s,itemID=%s,outOfPrintAttrList=%s,outOfPrintAttrValueList=%s" |
| | | # % (packType, i, itemID, outOfPrintAttrList, outOfPrintAttrValueList), playerID)
|
| | | # |
| | | # PlayerControl.NomalDictSetProperty(curPlayer, key, checkVersion)
|
| | | return
|
| | |
|
| | |
| | |
|
| | | itemDictData['IsAuctionItem'] = isAuctionItem
|
| | |
|
| | | #装备绝版属性,随等级变化
|
| | | itemDictData['OutOfPrintAttrID'] = ipyData.GetOutOfPrintAttr()
|
| | | itemDictData['OutOfPrintAttrValue'] = ipyData.GetOutOfPrintAttrValue()
|
| | | return itemDictData
|
| | |
|
| | | def GetAppointItemRealID(itemID):
|
| | |
| | |
|
| | | tmpEquipData.legendAttrIDList = itemData.get('legendAttrID', [])
|
| | | tmpEquipData.legendAttrValueList = itemData.get('legendAttrValue', [])
|
| | | |
| | | tmpEquipData.OutOfPrintAttrIDList = itemData.get('OutOfPrintAttrID', []) # 绝版属性ID
|
| | | tmpEquipData.OutOfPrintAttrValueList = itemData.get('OutOfPrintAttrValue', []) # 绝版属性最大值
|
| | |
|
| | | # 装备附加属性
|
| | | ChItem.EquipAddAdditionEx(equipItem, tmpEquipData)
|
| | |
| | | self.source = ShareDefine.Item_Source_Unkown #物品来源
|
| | | self.legendAttrIDList = [] # 传奇属性ID
|
| | | self.legendAttrValueList = [] # 传奇属性值
|
| | | |
| | | self.OutOfPrintAttrIDList = [] # 绝版属性ID
|
| | | self.OutOfPrintAttrValueList = [] # 绝版属性最大值
|
| | | return
|
| | |
|
| | | def ClearPack(curPlayer, packType):
|
| | |
| | |
|
| | | def CalcEquipGS(curItem):
|
| | | '''计算装备评分
|
| | | 评分组成:装备基础 + 传奇属性 + 绝版属性
|
| | | 评分组成:装备基础 + 传奇属性
|
| | | '''
|
| | | if not CheckNoteEquipGS(curItem):
|
| | | #GameWorld.DebugLog("不设置装备评分")
|
| | |
| | | # 攻速不默认乘,仅作为参数提供策划使用
|
| | | AtkSpeed = 0#attrDict.get(ShareDefine.Def_Effect_AtkSpeed, 0)
|
| | | AtkSpeedC = 1#1 if not gsParamIpyData else gsParamIpyData.GetAtkSpeedC()
|
| | | |
| | | # 绝版
|
| | | outOfPrintAttrIDCnt = curItem.GetUserAttrCount(ShareDefine.Def_IudetOutOfPrintAttrID)
|
| | | outOfPrintAttrValueCnt = curItem.GetUserAttrCount(ShareDefine.Def_IudetOutOfPrintAttrValue)
|
| | | if outOfPrintAttrIDCnt and outOfPrintAttrIDCnt == outOfPrintAttrValueCnt:
|
| | | for i in xrange(legendAttrIDCnt):
|
| | | attrID = curItem.GetUserAttrByIndex(ShareDefine.Def_IudetOutOfPrintAttrID, i)
|
| | | attrValue = curItem.GetUserAttrByIndex(ShareDefine.Def_IudetOutOfPrintAttrValue, i)
|
| | | attrDict[attrID] = attrDict.get(attrID, 0) + attrValue
|
| | |
|
| | | OnlyFinalHurt = attrDict.get(ShareDefine.Def_Effect_OnlyFinalHurt, 0)
|
| | | PVPAtkBackHP = attrDict.get(ShareDefine.Def_Effect_PVPAtkBackHP, 0)
|
| | |
| | | Def_IudetMapLoaction = 15 # 物品记录地图坐标[mapid, posx, posy]
|
| | | Def_IudetLegendAttrID = 17 # 物品传奇属性ID列表
|
| | | Def_IudetLegendAttrValue = 19 # 物品传奇属性值列表
|
| | | Def_IudetOutOfPrintAttrID = 21 # 物品绝版属性ID列表
|
| | | Def_IudetOutOfPrintAttrValue = 23 # 物品绝版属性值列表
|
| | | Def_IudetPartSuiteLV = 25 # 部位套装等级 [套装类型1等级, 套装类型2等级, ...]
|
| | | Def_IudetWingMaterialItemID = 27 # 翅膀精炼材料ID列表
|
| | | Def_IudetWingMaterialItemCount = 29 # 翅膀精炼材料个数列表
|