6509 子 【2.0】五行灵根 / 【后端】【2.0】五行灵根修改
| | |
| | | {
|
| | | BYTE _AttrID; //属性ID
|
| | | dict AddAttrInfoPerPoint; //每点增加属性信息
|
| | | BYTE PointQualityAttrID; //点数品质进阶增加属性ID
|
| | | list PointQualityAttrValueList; //点数品质进阶增加属性值列表
|
| | | dict PointQualityAttrIDDict; //点数品质进阶增加属性ID, 根据职业区分
|
| | | dict PointQualityAttrValueDict; //点数品质进阶增加属性值列表, 根据职业区分
|
| | | list PointQualityIntervalList; //点数品质进阶属性点区间列表
|
| | | };
|
| | |
|
| | |
| | | "RolePoint":(
|
| | | ("BYTE", "AttrID", 1),
|
| | | ("dict", "AddAttrInfoPerPoint", 0),
|
| | | ("BYTE", "PointQualityAttrID", 0),
|
| | | ("list", "PointQualityAttrValueList", 0),
|
| | | ("dict", "PointQualityAttrIDDict", 0),
|
| | | ("dict", "PointQualityAttrValueDict", 0),
|
| | | ("list", "PointQualityIntervalList", 0),
|
| | | ),
|
| | |
|
| | |
| | | def __init__(self): |
| | | self.AttrID = 0
|
| | | self.AddAttrInfoPerPoint = {}
|
| | | self.PointQualityAttrID = 0
|
| | | self.PointQualityAttrValueList = []
|
| | | self.PointQualityAttrIDDict = {}
|
| | | self.PointQualityAttrValueDict = {}
|
| | | self.PointQualityIntervalList = [] |
| | | return |
| | | |
| | | def GetAttrID(self): return self.AttrID # 属性ID
|
| | | def GetAddAttrInfoPerPoint(self): return self.AddAttrInfoPerPoint # 每点增加属性信息
|
| | | def GetPointQualityAttrID(self): return self.PointQualityAttrID # 点数品质进阶增加属性ID
|
| | | def GetPointQualityAttrValueList(self): return self.PointQualityAttrValueList # 点数品质进阶增加属性值列表
|
| | | def GetPointQualityAttrIDDict(self): return self.PointQualityAttrIDDict # 点数品质进阶增加属性ID, 根据职业区分
|
| | | def GetPointQualityAttrValueDict(self): return self.PointQualityAttrValueDict # 点数品质进阶增加属性值列表, 根据职业区分
|
| | | def GetPointQualityIntervalList(self): return self.PointQualityIntervalList # 点数品质进阶属性点区间列表 |
| | | |
| | | # 境界表 |
| | |
| | | curLV = curPlayer.GetLV()
|
| | | if curLV < openLV:
|
| | | return 0
|
| | | # 初始点+升级点+境界点
|
| | | setFreePoint = IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 2)
|
| | | |
| | | addPointDict = IpyGameDataPY.GetFuncEvalCfg("LVUPAddPoint", 1, {})
|
| | | initFreePoint = IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 2)
|
| | | setFreePoint = initFreePoint
|
| | | for lv in xrange(openLV, curLV+1):
|
| | | setFreePoint += GameWorld.GetDictValueByRangeKey(addPointDict, lv, 0)
|
| | | for rangLVs, point in addPointDict.items():
|
| | | if curLV < rangLVs[0]:
|
| | | continue
|
| | | setFreePoint += point * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
|
| | | |
| | | #境界提升点数
|
| | | setFreePoint += curPlayer.GetOfficialRank() * IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 3)
|
| | | return setFreePoint
|
| | |
|
| | | def DoAddPointOpen(curPlayer):
|
| | | '''加点功能开启 处理给自由属性点及老号处理 |
| | | 清除老服玩家未加点的点数(清零),以前加的加点属性不清除,属性不变,战力不减, 根据最新的加点开启等级和老服玩家的当前等级,相差的差值给予玩家对应的加点点数'''
|
| | | '''加点功能开启'''
|
| | | beforeFreePoint = curPlayer.GetFreePoint()
|
| | |
|
| | | setFreePoint = GetAllPointByLV(curPlayer)
|
| | |
| | | # @remarks 玩家升级 加点 2010-05-26 adaws修改 原来有加技能点 现将升级加技能提出
|
| | | def __DoLVUPAddPoint(self):
|
| | | curPlayer = self.__Player
|
| | | if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_AddPoint):
|
| | | # 未开启前不可加点,因为DoAddPointOpen会一次性补齐,避免意外情况多加了点数
|
| | | return
|
| | |
|
| | | curFreePoint = curPlayer.GetFreePoint()
|
| | | addPoint = GetLvUp_AddPoint(curPlayer)
|
| | |
| | | pointFuncInfo[1](curPlayer, curPQLV)
|
| | | if not curPQLV:
|
| | | continue
|
| | | pqAttrID = ipyData.GetPointQualityAttrID()
|
| | | pqAttrValueList = ipyData.GetPointQualityAttrValueList()
|
| | | pqAttrIDDict = ipyData.GetPointQualityAttrIDDict()
|
| | | pqAttrID = pqAttrIDDict[curPlayer.GetJob()]
|
| | | pqAttrValueDict = ipyData.GetPointQualityAttrValueDict()
|
| | | pqAttrValueList = pqAttrValueDict[str(curPlayer.GetJob())]
|
| | | pqAttrValue = 0 if curPQLV > len(pqAttrValueList) else pqAttrValueList[curPQLV - 1]
|
| | | CalcAttrDict_Type(pqAttrID, pqAttrValue, lingGenQualityAttrList)
|
| | | #GameWorld.DebugLog(" 属性点(%s)品阶等级属性: curPQLV=%s,pqAttrID=%s,pqAttrValue=%s" % (pointAttrID, curPQLV, pqAttrID, pqAttrValue))
|
| | |
| | | DoRealmLVUpLogic(curPlayer)
|
| | | return
|
| | |
|
| | | # 提升1级境界加点
|
| | | def __DoRealmLVUpAddPoint(curPlayer):
|
| | | if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_AddPoint):
|
| | | # 未开启前不可加点,因为DoAddPointOpen会一次性补齐,避免意外情况多加了点数
|
| | | return
|
| | |
|
| | | curFreePoint = curPlayer.GetFreePoint()
|
| | | addPoint = IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 3)
|
| | | if addPoint != 0:
|
| | | setFreePoint = curFreePoint + addPoint
|
| | | DataRecordPack.DR_Freepoint(curPlayer, "RealmLVUp", addPoint)
|
| | | curPlayer.SetFreePoint(setFreePoint)
|
| | |
|
| | | return
|
| | |
|
| | |
|
| | | def DoRealmLVUpLogic(curPlayer, needSys=True):
|
| | | curRealmLV = curPlayer.GetOfficialRank()
|
| | |
| | | return
|
| | |
|
| | | curPlayer.SetOfficialRank(nextRealmLv)
|
| | | # 提升1级境界加点
|
| | | __DoRealmLVUpAddPoint(curPlayer)
|
| | | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmFBIsOpen, 0)
|
| | | if needSys:
|
| | | addBuffID = nextRealmIpyData.GetBuffID()
|