| | |
| | | import PlayerWing
|
| | | import PlayerExpandPackCfgMgr
|
| | | import PlayerWorldAverageLv
|
| | | import GameLogic_ManorWar
|
| | | import PlayerActivity
|
| | | import HighLadderTube
|
| | | import FBCommon
|
| | | import PlayerViewCacheTube
|
| | | import PassiveBuffEffMng
|
| | | import PlayerGameEvent
|
| | | import EventReport
|
| | | import PlayerTeHui
|
| | | import PlayerGatherSoul
|
| | | import PlayerSuccess
|
| | | import PlayerPet
|
| | |
| | | NPCCommon.ClearCollectNPC(curPlayer)
|
| | | #结束事件
|
| | | EventShell.DoExitEvent(curPlayer)
|
| | | |
| | | # 结束摆摊/查看摆摊
|
| | | EventShell.ExitShopItem(curPlayer)
|
| | | EventShell.ExitWatchShopItem(curPlayer)
|
| | |
|
| | | #设置玩家的地图位置, 如果是副本, 离开副本
|
| | | # 副本规则:
|
| | |
| | | PyGameData.g_lastExitFBType[fbIndex] = [exitFBType, tick]
|
| | | #GameWorld.DebugLog("玩家离开副本:fbIndex=%s,exitFBType=%s, %s" % (fbIndex, exitFBType, PyGameData.g_lastExitFBType), curPlayer.GetPlayerID())
|
| | | FBLogic.DoExitFBLogic(curPlayer, tick)
|
| | | |
| | | GameLogic_ManorWar.DoExitFB(curPlayer, tick)
|
| | |
|
| | | #清空所有不属于自己的光环
|
| | | #__ClearNoMeAuraBuff(curPlayer)
|
| | |
| | | PlayerTruck.PlayerTruckDown(curPlayer, curTruck)
|
| | |
|
| | | curPlayer.SetChangeMapTakeTruck(takeTruck)
|
| | | |
| | | # 如果在摆摊中,提示摆摊关闭
|
| | | playerShop = curPlayer.GetPlayerShop()
|
| | | if playerShop.GetIsStartShop():
|
| | | NotifyCode(curPlayer, "GeRen_admin_70569")
|
| | |
|
| | | #离开地图服务器
|
| | | __PlayerLeaveServerLogic(curPlayer, tick, False)
|
| | |
| | | def HaveMoneyEx(curPlayer, TYPE_Price, Price, needNotify=True):
|
| | | if Price < 0:
|
| | | return []
|
| | | |
| | | if TYPE_Price == ShareDefine.TYPE_Price_Gold_Paper_Money:
|
| | | TYPE_Price = IPY_GameWorld.TYPE_Price_Gold_Money #新版无绑玉,原先绑玉再仙玉的扣法改成 扣仙玉 2019/3/26
|
| | | |
| | | if TYPE_Price in [IPY_GameWorld.TYPE_Price_Gold_Money, IPY_GameWorld.TYPE_Price_Gold_Paper,
|
| | | IPY_GameWorld.TYPE_Price_Silver_Money, IPY_GameWorld.TYPE_Price_Silver_Paper]:
|
| | | if HaveMoney(curPlayer, TYPE_Price, Price, needNotify):
|
| | |
| | | # 绝版降临
|
| | | PlayerFairyCeremony.AddFCCostGold(curPlayer, costType, price)
|
| | | PlayerNewFairyCeremony.AddFCCostGold(curPlayer, costType, price)
|
| | | # 消费VIP
|
| | | # if costVIPGold < 0:
|
| | | # costVIPGold = price
|
| | | #PlayerCostVIP.AddCostVIPExp(curPlayer, costType, costVIPGold)
|
| | |
|
| | | # 事件汇报
|
| | | #===========================================================================
|
| | |
| | | '''加点功能开启 处理给自由属性点及老号处理
|
| | | 清除老服玩家未加点的点数(清零),以前加的加点属性不清除,属性不变,战力不减, 根据最新的加点开启等级和老服玩家的当前等级,相差的差值给予玩家对应的加点点数'''
|
| | | beforeFreePoint = curPlayer.GetFreePoint()
|
| | |
|
| | | |
| | | setFreePoint = GetAllPointByLV(curPlayer)
|
| | | curLV = curPlayer.GetLV()
|
| | | addDataDict = {'beforeFreePoint':beforeFreePoint}
|
| | |
| | | return True
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ## 获取下一次转生所需等级
|
| | | def GetNextReincarnationLV(self, curPlayer):
|
| | | Reincarnation_ConditionDict = ReadChConfig.GetEvalChConfig("Reincarnation_Condition")
|
| | | curReinCnt = curPlayer.GetReincarnationLv() # 当前转生次数
|
| | | nextReinCnt = curReinCnt + 1
|
| | | nextReinLV = IpyGameDataPY.GetFuncCfg("PlayerMaxLV")
|
| | | if nextReinCnt in Reincarnation_ConditionDict:
|
| | | nextReinLV = Reincarnation_ConditionDict[nextReinCnt][0]
|
| | | return nextReinLV
|
| | |
|
| | | ## 加经验值
|
| | | # @param self 类实例
|
| | |
| | | if addExp == 0:
|
| | | # 不进入计算
|
| | | return addExp, expViewType
|
| | | #nextReinLV = self.GetNextReincarnationLV(curPlayer)
|
| | |
|
| | | #取得人物当前经验
|
| | | #curTotalExp = GetPlayerTotalExp(curPlayer)
|
| | |
| | | # if expViewType == ShareDefine.Def_ViewExpType_KillNPC:
|
| | | # #mapID = GameWorld.GetMap().GetMapID()
|
| | | # #if mapID in ChConfig.Def_FBMapID_BZZDAll:
|
| | | # # nobleVIPOuterRate = PlayerCostVIP.GetBZZDExpAddRate(curPlayer)
|
| | | # # nobleVIPOuterRate = ...
|
| | | # # #nobleVIPAddExp += 0 if not nobleVIPOuterRate else int(addExp * nobleVIPOuterRate / float(ChConfig.Def_MaxRateValue))
|
| | | # # nobleVIPAddExp += nobleVIPOuterRate
|
| | | #
|
| | |
| | | job = curPlayer.GetJob()
|
| | |
|
| | | lvAttrDict = IpyGameDataPY.GetFuncEvalCfg("LVUPAttr%s" % job, 1)
|
| | | pointAttrDict = IpyGameDataPY.GetFuncEvalCfg("PointAttr%s" % job, 1)
|
| | |
|
| | | if not lvAttrDict:
|
| | | GameWorld.ErrLog('无此职业等级刷属性配置!job=%s' % (job), curPlayerID)
|
| | | return
|
| | |
|
| | | if not pointAttrDict:
|
| | | GameWorld.ErrLog('无此职业属性点刷属性配置!job=%s' % (job), curPlayerID)
|
| | | return
|
| | | |
| | | #参与计算的玩家基础属性
|
| | | LV = curPlayer.GetLV()
|
| | | STR = curPlayer.GetSTR()
|
| | | PNE = curPlayer.GetPNE()
|
| | | PHY = curPlayer.GetPHY()
|
| | | CON = curPlayer.GetCON()
|
| | | baseSTR = curPlayer.GetBaseSTR()
|
| | | basePNE = curPlayer.GetBasePNE()
|
| | | basePHY = curPlayer.GetBasePHY()
|
| | | baseCON = curPlayer.GetBaseCON()
|
| | | GameWorld.DebugLog("CalcRoleBaseAttr LV=%s,STR=(%s~%s),PNE=(%s~%s),PHY=(%s~%s),CON=(%s~%s)" |
| | | % (LV, baseSTR, STR, basePNE, PNE, basePHY, PHY, baseCON, CON))
|
| | |
|
| | | allAttrList = [{} for _ in range(4)]
|
| | |
|
| | | # 职业初始属性
|
| | | roleBaseAttrDict = IpyGameDataPY.GetFuncEvalCfg("CreatRoleBaseAttr", 1)
|
| | | if job in roleBaseAttrDict:
|
| | | for attrEffID, value in roleBaseAttrDict[job].items():
|
| | | CalcAttrDict_Type(attrEffID, value, allAttrList)
|
| | | for roleBaseAttrID, value in roleBaseAttrDict[job].items():
|
| | | CalcAttrDict_Type(roleBaseAttrID, value, allAttrList)
|
| | | #GameWorld.DebugLog("初始加属性: %s" % allAttrList)
|
| | |
|
| | | for attrEffID, formula in lvAttrDict.items():
|
| | | calcValue = eval(FormulaControl.GetCompileFormula("LVUPAttr%s_%s" % (job, attrEffID), formula))
|
| | | CalcAttrDict_Type(attrEffID, calcValue, allAttrList)
|
| | | #GameWorld.DebugLog(" attrEffID=%s,value=%s" % (attrEffID, calcValue))
|
| | | |
| | | # 等级成长属性
|
| | | LV = curPlayer.GetLV()
|
| | | for lvAttrID, formula in lvAttrDict.items():
|
| | | calcValue = eval(FormulaControl.GetCompileFormula("LVUPAttr%s_%s" % (job, lvAttrID), formula))
|
| | | CalcAttrDict_Type(lvAttrID, calcValue, allAttrList)
|
| | | #GameWorld.DebugLog(" lvAttrID=%s,calcValue=%s" % (lvAttrID, calcValue))
|
| | | #GameWorld.DebugLog("等级加属性: %s" % allAttrList)
|
| | |
|
| | | for attrEffID, formula in pointAttrDict.items():
|
| | | calcValue = eval(FormulaControl.GetCompileFormula("PointAttr%s_%s" % (job, attrEffID), formula))
|
| | | CalcAttrDict_Type(attrEffID, calcValue, allAttrList)
|
| | | #GameWorld.DebugLog(" attrEffID=%s,value=%s" % (attrEffID, calcValue))
|
| | | # 属性点属性
|
| | | pointValueInfo = {ShareDefine.Def_Effect_Metal:[lambda curObj:GetMetal(curObj), lambda curObj, value:SetMetalQualityLV(curObj, value)],
|
| | | ShareDefine.Def_Effect_Wood:[lambda curObj:GetWood(curObj), lambda curObj, value:SetWoodQualityLV(curObj, value)],
|
| | | ShareDefine.Def_Effect_Water:[lambda curObj:GetWater(curObj), lambda curObj, value:SetWaterQualityLV(curObj, value)],
|
| | | ShareDefine.Def_Effect_Fire:[lambda curObj:GetFire(curObj), lambda curObj, value:SetFireQualityLV(curObj, value)],
|
| | | ShareDefine.Def_Effect_Earth:[lambda curObj:GetEarth(curObj), lambda curObj, value:SetEarthQualityLV(curObj, value)],
|
| | | }
|
| | | lingGenQualityAttrList = [{} for _ in range(4)]
|
| | | for pointAttrID, pointFuncInfo in pointValueInfo.items():
|
| | | pointValue = pointFuncInfo[0](curPlayer)
|
| | | pointFuncInfo[1](curPlayer, 0)
|
| | | if not pointValue:
|
| | | continue
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("RolePoint", pointAttrID)
|
| | | if not ipyData:
|
| | | continue
|
| | | # 每点属性
|
| | | perPointAddAttrDict = ipyData.GetAddAttrInfoPerPoint()
|
| | | for perPointAttrID, perPointAttrValue in perPointAddAttrDict.items():
|
| | | pointAddValue = perPointAttrValue * pointValue
|
| | | CalcAttrDict_Type(perPointAttrID, pointAddValue, allAttrList)
|
| | | #GameWorld.DebugLog(" 属性点(%s)加属性: pointValue=%s,perPointAttrID=%s,pointAddValue=%s" % (pointAttrID, pointValue, perPointAttrID, pointAddValue))
|
| | | |
| | | # 点数品质属性
|
| | | curPQLV = 0
|
| | | pqIntervalList = ipyData.GetPointQualityIntervalList()
|
| | | for pqLV, pqValue in enumerate(pqIntervalList, 1):
|
| | | if pointValue >= pqValue:
|
| | | curPQLV = pqLV
|
| | | else:
|
| | | break
|
| | | pointFuncInfo[1](curPlayer, curPQLV)
|
| | | if not curPQLV:
|
| | | continue
|
| | | pqAttrID = ipyData.GetPointQualityAttrID()
|
| | | pqAttrValueList = ipyData.GetPointQualityAttrValueList()
|
| | | 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))
|
| | | |
| | | #GameWorld.DebugLog("等级属性点加属性: %s" % allAttrList)
|
| | | |
| | | SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_RoleBase, allAttrList) |
| | | #GameWorld.DebugLog("灵根品阶等级属性: %s" % lingGenQualityAttrList) |
| | | SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_RoleBase, allAttrList)
|
| | | SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_LingGenQuailty, lingGenQualityAttrList)
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | # 2.1 获取所有功能计算点计算的属性值, 统计基础属性累加
|
| | | baseAttrDict = {}
|
| | | baseAttrNolineDict = {}
|
| | | roleBaseAttrInfo = [{} for _ in range(4)]
|
| | | funcAttrInfoList = []
|
| | | for funcIndex in ChConfig.CalcAttrFuncList:
|
| | | if funcIndex in ChConfig.CalcAttrExFuncListNoFightPower:
|
| | |
| | | continue
|
| | |
|
| | | # 基础属性等功能汇总完后统一刷新,因为各功能可能会加属性点数
|
| | | if funcIndex == ChConfig.Def_CalcAttrFunc_RoleBase:
|
| | | funcAttrInfoList.append(roleBaseAttrInfo)
|
| | | if funcIndex in [ChConfig.Def_CalcAttrFunc_RoleBase, ChConfig.Def_CalcAttrFunc_LingGenQuailty]:
|
| | | funcAttrInfoList.append([{} for _ in range(4)])
|
| | | continue
|
| | | attrInfo = GetCalcAttrListValue(curPlayer, funcIndex)
|
| | | if attrInfo != notAttrList:
|
| | |
| | | # 功能有加基础属性值,这里再重新刷新一下基础属性, 基础属性会影响战斗属性, 每次都刷新角色基础属性
|
| | | self.CalcRoleBaseAttr(curPlayer)
|
| | | roleBaseAttrInfo = GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_RoleBase)
|
| | | lingGenQualityAttrList = GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_LingGenQuailty)
|
| | | funcAttrInfoList[ChConfig.Def_CalcAttrFunc_RoleBase] = roleBaseAttrInfo
|
| | | funcAttrInfoList[ChConfig.Def_CalcAttrFunc_LingGenQuailty] = lingGenQualityAttrList
|
| | | GameWorld.DebugLog("功能点属性: %s, %s" % (ChConfig.Def_CalcAttrFunc_RoleBase, roleBaseAttrInfo))
|
| | | GameWorld.DebugLog("功能点属性: %s, %s" % (ChConfig.Def_CalcAttrFunc_LingGenQuailty, lingGenQualityAttrList))
|
| | |
|
| | | #self.PrintAttr(curPlayer, "基础后")
|
| | |
|
| | |
| | |
|
| | | #再根据BUFF 加上状态
|
| | | SkillShell.CalcBuffer_ActionState(curPlayer)
|
| | | #---------------------------------------------------------------------
|
| | | |
| | | #---------------------------------------------------------------------
|
| | | ## 存入数据库玩家基本属性
|
| | | # @param self 类实例
|
| | | # @return 返回值无意义
|
| | | # @remarks 存入数据库玩家基本属性
|
| | | def __SetPlayerStateInDB(self):
|
| | | curPlayer = self.__Player
|
| | | #力量
|
| | | curPlayerSTR = curPlayer.GetSTR()
|
| | | if curPlayer.GetTotalSTR() != curPlayerSTR: |
| | | curPlayer.SetTotalSTR(curPlayerSTR)
|
| | | #真元
|
| | | curPlayerPNE = curPlayer.GetPNE()
|
| | | if curPlayer.GetTotalPNE() != curPlayerPNE:
|
| | | curPlayer.SetTotalPNE(curPlayerPNE)
|
| | | #筋骨
|
| | | curPlayerPHY = curPlayer.GetPHY()
|
| | | if curPlayer.GetTotalPHY() != curPlayerPHY:
|
| | | curPlayer.SetTotalPHY(curPlayerPHY)
|
| | | #体魄
|
| | | curPlayerCON = curPlayer.GetCON()
|
| | | if curPlayer.GetTotalCON() != curPlayerCON: |
| | | curPlayer.SetTotalCON(curPlayerCON)
|
| | | |
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ## 刷新血量和魔
|
| | |
| | | curPlayer.ClearBattleEffect()
|
| | |
|
| | | initAttrDict = {
|
| | | ChConfig.TYPE_Calc_AttrCurSTR:curPlayer.GetBaseSTR(),
|
| | | ChConfig.TYPE_Calc_AttrCurPNE:curPlayer.GetBasePNE(),
|
| | | ChConfig.TYPE_Calc_AttrCurPHY:curPlayer.GetBasePHY(),
|
| | | ChConfig.TYPE_Calc_AttrCurCON:curPlayer.GetBaseCON(),
|
| | | #ChConfig.TYPE_Calc_AttrCurSTR:curPlayer.GetBaseSTR(),
|
| | | #ChConfig.TYPE_Calc_AttrCurPNE:curPlayer.GetBasePNE(),
|
| | | #ChConfig.TYPE_Calc_AttrCurPHY:curPlayer.GetBasePHY(),
|
| | | #ChConfig.TYPE_Calc_AttrCurCON:curPlayer.GetBaseCON(),
|
| | | #ChConfig.TYPE_Calc_AttrSpeed:curPlayer.GetBaseSpeed(),
|
| | | ChConfig.TYPE_Calc_AttrAtkSpeed:ChConfig.Def_BaseAtkSpeed,
|
| | | ChConfig.TYPE_Calc_AttrFightExpRate:GameWorld.GetGameWorld().GetExpRate(),
|
| | |
| | | if not curPlayer.GetCanAttack():
|
| | | curPlayer.SetCanAttack(True)
|
| | |
|
| | | #初始化灵根
|
| | | SetMetal(curPlayer, curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AddPointValue % ShareDefine.Def_Effect_Metal))
|
| | | SetWood(curPlayer, curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AddPointValue % ShareDefine.Def_Effect_Wood))
|
| | | SetWater(curPlayer, curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AddPointValue % ShareDefine.Def_Effect_Water))
|
| | | SetFire(curPlayer, curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AddPointValue % ShareDefine.Def_Effect_Fire))
|
| | | SetEarth(curPlayer, curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AddPointValue % ShareDefine.Def_Effect_Earth))
|
| | | return True
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | if BuffSkill.DelBuffBySkillID(curPlayer, ChConfig.Def_SkillID_LimitSuperBuff, tick):
|
| | |
|
| | | PlayerControl(curPlayer).RefreshPlayerAttrByBuff()
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##清除生产采集BUF
|
| | | # @param curPlayer 玩家实例
|
| | | # @param tick 时间戳
|
| | | # @param isLeaveServer 玩家是否离开服务器
|
| | | # @return 返回值无意义
|
| | | # @remarks 清除生产采集BUF
|
| | | def DelProduceBuff(curPlayer, tick, isLeaveServer=False):
|
| | | |
| | | if not isLeaveServer:
|
| | | if curPlayer.GetPlayerAction() != IPY_GameWorld.paProduce:
|
| | | #玩家当前状态不在生产采集,不处理
|
| | | return
|
| | | |
| | | #清除生产buff(ID20021)
|
| | | BuffSkill.DelBuffBySkillID(curPlayer, ChConfig.Def_ProduceBuffID, tick)
|
| | | |
| | | #清除活动无敌Buff
|
| | | BuffSkill.DelBuffBySkillID(curPlayer, ChConfig.Def_SkillID_ActionWuDi, tick)
|
| | | |
| | | if not isLeaveServer:
|
| | | #设置玩家空闲状态
|
| | | ChangePlayerAction(curPlayer, IPY_GameWorld.paNull)
|
| | | #通知客户端
|
| | | curPlayer.Notify_ProductionState(ChConfig.Def_EndProduction)
|
| | | |
| | | #PlayerControl(curPlayer).RefreshAllState()
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##特殊状态处理
|
| | |
| | | totalExpRate -= effExpRate
|
| | |
|
| | | return totalExpRate
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | | ## 获取玩家基础属性点
|
| | | # @param job 职业类型
|
| | | # @return baseSTR, basePNE, basePHY, baseCON
|
| | | def GetPlayerBasePoint(job):
|
| | | baseSTR, basePNE, basePHY, baseCON = (0, 0, 0, 0)
|
| | | |
| | | jobDict = IpyGameDataPY.GetFuncEvalCfg("CreatRolePoint%s" % job, 1)
|
| | | |
| | | if not jobDict:
|
| | | GameWorld.ErrLog('CreatRolePoint, job = %s' % (job))
|
| | | return baseSTR, basePNE, basePHY, baseCON
|
| | | |
| | | for key, value in jobDict.items():
|
| | | |
| | | if type(key) == str:
|
| | | key = key.upper()
|
| | | |
| | | if key in ['STR', ShareDefine.Def_Effect_STR]:
|
| | | baseSTR = value
|
| | | |
| | | elif key in ['PNE', ShareDefine.Def_Effect_PNE]:
|
| | | basePNE = value
|
| | | |
| | | elif key in ['PHY', ShareDefine.Def_Effect_PHY]:
|
| | | basePHY = value
|
| | | |
| | | elif key in ['CON', ShareDefine.Def_Effect_CON]:
|
| | | baseCON = value
|
| | | |
| | | else:
|
| | | GameWorld.ErrLog('CreatRolePoint, key = %s' % (key))
|
| | | |
| | | return baseSTR, basePNE, basePHY, baseCON
|
| | |
|
| | |
|
| | | ##记录玩家失去金钱的流向记录,消息中会记录玩家拥有的金钱信息
|
| | | # @param curPlayer 玩家实例
|
| | |
| | | #===============================================================================
|
| | |
|
| | |
|
| | | # 灵根 - 金木水火土
|
| | | def GetMetal(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_Metal)
|
| | | def SetMetal(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_Metal, value)
|
| | | def GetWood(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_Wood)
|
| | | def SetWood(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_Wood, value)
|
| | | def GetWater(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_Water)
|
| | | def SetWater(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_Water, value)
|
| | | def GetFire(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_Fire)
|
| | | def SetFire(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_Fire, value)
|
| | | def GetEarth(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_Earth)
|
| | | def SetEarth(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_Earth, value)
|
| | | # 灵根品级 - 金木水火土
|
| | | def GetMetalQualityLV(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MetalQualityLV)
|
| | | def SetMetalQualityLV(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_MetalQualityLV, value)
|
| | | def GetWoodQualityLV(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_WoodQualityLV)
|
| | | def SetWoodQualityLV(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_WoodQualityLV, value)
|
| | | def GetWaterQualityLV(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_WaterQualityLV)
|
| | | def SetWaterQualityLV(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_WaterQualityLV, value)
|
| | | def GetFireQualityLV(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_FireQualityLV)
|
| | | def SetFireQualityLV(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_FireQualityLV, value)
|
| | | def GetEarthQualityLV(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_EarthQualityLV)
|
| | | def SetEarthQualityLV(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_EarthQualityLV, value)
|
| | |
|
| | | #---玩家扩展接口, 战斗属性,不存数据库,只通知本人---
|
| | |
|
| | | ##玩家移动速度值, 不含buff对速度的影响; 功能等对速度的影响直接改变此值
|
| | |
| | | #---功能层防御值----
|
| | | def GetFuncDef(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr % (ChConfig.TYPE_Calc_AttrDEF - 1))
|
| | | def SetFuncDef(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttr % (ChConfig.TYPE_Calc_AttrDEF - 1), value)
|
| | |
|
| | | #---诛仙一击概率---
|
| | | def GetZhuXianRate(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ZhuxianRate)
|
| | | def SetZhuXianRate(curPlayer, value): |
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_ZhuxianRate, value)
|
| | | curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_ZhuxianRate, value, False) |
| | |
|
| | | #---诛仙一击伤害百分比---
|
| | | def GetZhuXianHurtPer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ZhuxianHurtPer)
|
| | | def SetZhuXianHurtPer(curPlayer, value): |
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_ZhuxianHurtPer, value)
|
| | | curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_ZhuxianHurtPer, value, False)
|
| | |
|
| | |
|
| | | ## 增加天梯竞技场积分
|
| | | # @param curPlayer 玩家实例
|
| | | # @return
|
| | | def AddHighLadderCurrency(curPlayer, addCount, isSysMsg=True, isRefresh=True):
|
| | | curCurrency = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HighLadder_Currency)
|
| | | curCurrency += addCount
|
| | | NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HighLadder_Currency, curCurrency)
|
| | | |
| | | if isSysMsg:
|
| | | #通知客户端得到金钱
|
| | | NotifyCode(curPlayer, "GetMoney", [ShareDefine.TYPE_Price_HighLadder_Currency, addCount])
|
| | | if isRefresh:
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | HighLadderTube.SendHighLadderState(curPlayer, tick)
|
| | | return
|
| | |
|
| | |
|
| | | ## 用天梯竞技场积分付费
|
| | | # @param curPlayer 玩家实例
|
| | | # @return
|
| | | def PayHighLadderCurrency(curPlayer, payCount, isSysMsg=True, isRefresh=True):
|
| | | curCurrency = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HighLadder_Currency)
|
| | | if (curCurrency < payCount) or (payCount < 0):
|
| | | return False, curCurrency, curCurrency
|
| | | updCurrency = max(0, curCurrency - payCount)
|
| | | NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HighLadder_Currency, updCurrency)
|
| | | if isSysMsg:
|
| | | #通知客户端失去点数
|
| | | NotifyCode(curPlayer, "LostMoney", [ShareDefine.TYPE_Price_HighLadder_Currency, payCount]) |
| | | if isRefresh:
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | HighLadderTube.SendHighLadderState(curPlayer, tick) |
| | | return True, curCurrency, updCurrency
|
| | |
|
| | | ## 计算功能背包物品属性
|
| | | # @param curPlayer 当前玩家
|