| | |
| | | import CrossRealmPlayer
|
| | | import CrossPlayerData
|
| | | import ChNetSendPack
|
| | | #import EquipZhuXian
|
| | | import PlayerCoat
|
| | | import PlayerState
|
| | | import QuestCommon
|
| | |
| | | CrossPlayerData.ClearCrossSyncDataCache(curPlayer)
|
| | | PyGameData.g_fbBuyBuffTimeDict.pop(playerID, None)
|
| | | #清除地图玩家缓存
|
| | | PyGameData.g_zhuXianSkillAddPerDict.pop(playerID, None)
|
| | | PyGameData.g_zhuXianSkillReducePerDict.pop(playerID, None)
|
| | | PyGameData.g_playerFuncAttrDict.pop(playerID, None)
|
| | | PyGameData.g_playerEquipPartAttrDict.pop(playerID, None)
|
| | | PyGameData.g_equipChangeClassLVInfo.pop(playerID, None)
|
| | |
| | | lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromLineID)
|
| | | GameWorld.DebugLog("最后一次离开的非中立常规地图不变!mapID=%s,lineID=%s,Pos(%s,%s)" % (mapID, lineID, posX, posY))
|
| | |
|
| | | # 从副本中切图
|
| | | if GameWorld.GetMap().GetMapFBType() != IPY_GameWorld.fbtNull:
|
| | | #默认回满血
|
| | | if curPlayer.GetHP() > 0 and curPlayer.GetPlayerAction() != IPY_GameWorld.paDie and curPlayer.GetHP() < curPlayer.GetMaxHP():
|
| | | curPlayer.SetHP(curPlayer.GetMaxHP())
|
| | | |
| | | #2. 调用切换地图接口
|
| | | curPlayer.DoResetWorldPosAndClear()
|
| | |
|
| | |
| | | newbielineList = IpyGameDataPY.GetFuncEvalCfg('SealDemonNewbieLine', 1)
|
| | | # 新手线路特殊处理,直接进入
|
| | | if lineID in newbielineList:
|
| | | PlayerResetWorldPosFB(curPlayer, mapID, posX, posY, False, fbID, funcLineID=lineID)
|
| | | GameWorld.DebugLog("封魔坛虚拟线路只能通过自定义场景进入挑战!")
|
| | | #PlayerResetWorldPosFB(curPlayer, mapID, posX, posY, False, fbID, funcLineID=lineID)
|
| | | return
|
| | | else:
|
| | | bossID = GameLogic_SealDemon.CurFBLineBOSSID(lineID)
|
| | |
| | | elif mapID == ChConfig.Def_FBMapID_DemonKing:
|
| | | bossID = GameLogic_CrossDemonKing.GetCurFBLineBOSSID(mapID, lineID)
|
| | | extendParamList = [bossID]
|
| | | |
| | | elif mapID in ChConfig.Def_MapID_LineIDToPropertyID:
|
| | | enterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntDay % mapID)
|
| | | extendParamList = [enterCnt]
|
| | | SendToGameServerEnterFB(curPlayer, mapID, lineID, tick, extendParamList)
|
| | | return
|
| | |
|
| | |
| | | return playerlist
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##转变付费货币类型
|
| | | # @param curPlayer 玩家实例
|
| | | # @param moneyType 货币类型 1表示金子,2表示金票,3表示银子,4表示银票, 5:金子/金票 6:银子/银票
|
| | | # @return 返回值, 货币类型
|
| | | # @remarks 转变付费货币类型 |
| | | def ChangeMoneyType(curPlayer, moneyType):
|
| | | # if moneyType == 5:
|
| | | # return curPlayer.GetUseGoldType()
|
| | | # |
| | | # if moneyType == 6:
|
| | | # return curPlayer.GetUseSilverType()
|
| | | if moneyType not in ChConfig.Def_MoneyType_All:
|
| | | GameWorld.ErrLog("金钱类型填写错误 %s" % moneyType)
|
| | | |
| | | return moneyType
|
| | | #---------------------------------------------------------------------
|
| | | ##获取玩家货币数
|
| | | # @param curPlayer 玩家实例
|
| | | # @param TYPE_Price ,货币类型
|
| | |
| | | return []
|
| | | if TYPE_Price == ShareDefine.TYPE_Price_Gold_Paper_Money:
|
| | | TYPE_Price = IPY_GameWorld.TYPE_Price_Gold_Money #新版无绑玉,原先绑玉再仙玉的扣法改成 扣仙玉 2019/3/26
|
| | | #恺英版: 恢复绑玉,但是不使用先绑玉再仙玉的规则,原来先绑玉再仙玉的规则一样为默认扣仙玉 2019/10/8
|
| | |
|
| | | 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]:
|
| | |
| | | GameWorld.Log('###---扣钱异常 = %s' % (price), curPlayer.GetPlayerID())
|
| | | return False
|
| | |
|
| | | #20190917 恢复绑玉
|
| | | # if type_Price == IPY_GameWorld.TYPE_Price_Gold_Paper:
|
| | | # type_Price = IPY_GameWorld.TYPE_Price_Gold_Money #新版无绑玉,原先绑玉再仙玉的扣法改成 扣仙玉 2019/6/3
|
| | | |
| | | #金子支付
|
| | | if type_Price == IPY_GameWorld.TYPE_Price_Gold_Money:
|
| | | curPlayerGold = curPlayer.GetGold()
|
| | |
| | |
|
| | | # 消费返利
|
| | | PlayerCostRebate.AddCostRebateGold(curPlayer, costType, price, infoDict)
|
| | | # 绝版降临
|
| | | PlayerFairyCeremony.AddFCCostGold(curPlayer, costType, price)
|
| | | PlayerNewFairyCeremony.AddFCCostGold(curPlayer, costType, price)
|
| | |
|
| | | # 事件汇报
|
| | | #===========================================================================
|
| | |
| | | GameWorld.SendMsgToClientServer(ShareDefine.CrossServerMsg_GiveMoney, msgInfo, [serverGroupID])
|
| | | return True
|
| | |
|
| | | ## 恺英版去除了仙缘币,改为直接获得绑玉灵石
|
| | | if priceType == ShareDefine.TYPE_Price_XianyuanCoin:
|
| | | priceType = IPY_GameWorld.TYPE_Price_Gold_Paper
|
| | | |
| | | if priceType == IPY_GameWorld.TYPE_Price_Gold_Money:
|
| | | if curPlayer.GetGold() + value > ChConfig.Def_PlayerTotalMoney_Gold:
|
| | | #超过金钱上限
|
| | |
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_GetRealmPoint, value)
|
| | | EventShell.EventRespons_GetRealmPoint(curPlayer)
|
| | | else:
|
| | | GameWorld.Log("金钱类型错误, priceType = %s" % (priceType), curPlayer.GetPlayerID())
|
| | | GameWorld.ErrLog("金钱类型错误, priceType=%s,value=%s,giveType=%s" % (priceType, value, giveType), curPlayer.GetPlayerID())
|
| | | DataRecordPack.DR_GiveMoneyError(curPlayer, priceType, value, giveType, addDataDict)
|
| | | return
|
| | |
|
| | | if isSysHint and priceType != ShareDefine.TYPE_Price_BourseMoney:
|
| | |
| | | if addPoint == None:
|
| | | raise Exception('玩家获得升级属性点异常, curLV = %s PlayerID = %s' % (curLV, curPlayerID))
|
| | | return
|
| | | |
| | | return int(addPoint) + GetFabaoAddPoint(curPlayer)
|
| | | return int(addPoint+ GetFabaoAddPoint(curPlayer) + GetTitleAddExtraPoint(curPlayer))
|
| | |
|
| | | def GetAllPointByLV(curPlayer):
|
| | | ##获取当前等级可得到属性点数
|
| | |
| | | curLV = curPlayer.GetLV()
|
| | | if curLV < openLV:
|
| | | return 0
|
| | | # 初始点+升级点+境界点
|
| | | # 初始点+(升级点+法宝效果)*称号效果倍数+境界点
|
| | | setFreePoint = IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 2)
|
| | | fabaoAddPoint = GetFabaoAddPoint(curPlayer)
|
| | | titleAddPoint = GetTitleAddExtraPoint(curPlayer)
|
| | | addPointDict = IpyGameDataPY.GetFuncEvalCfg("LVUPAddPoint", 1, {})
|
| | | for rangLVs, point in addPointDict.items():
|
| | | if curLV < rangLVs[0]:
|
| | | continue
|
| | | setFreePoint += (point + fabaoAddPoint) * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
|
| | | setFreePoint += (point + fabaoAddPoint + titleAddPoint) * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
|
| | |
|
| | | #境界提升点数
|
| | | setFreePoint += curPlayer.GetOfficialRank() * IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 3)
|
| | | return setFreePoint
|
| | |
|
| | | def GetTitleAddExtraPoint(curPlayer):
|
| | | # 称号额外增加玩家每级获得的灵根点
|
| | | titleID = IpyGameDataPY.GetFuncCfg("TitleAddPoint")
|
| | | if titleID and curPlayer.GetDienstgradManager().GetDienstgrad(titleID):
|
| | | return IpyGameDataPY.GetFuncCfg("TitleAddPoint", 2)
|
| | | return 0
|
| | |
|
| | | def GetFabaoAddPoint(curPlayer):
|
| | | #法宝额外增加玩家每级获得的灵根点
|
| | |
| | | # @param expViewType 经验获得的渠道
|
| | | # @param isSysHint 是否系统提示(默认是)
|
| | | # @return 布尔值
|
| | | def AddExp(self, addExp, expViewType=ShareDefine.Def_ViewExpType_Mission, isSysHint=True):
|
| | | def AddExp(self, addExp, expViewType=ShareDefine.Def_ViewExpType_Mission, isSysHint=True, addSkillID=0):
|
| | | curPlayer = self.__Player
|
| | | finalAddExp, expNotifyType = self.__AddExp(curPlayer, addExp, expViewType, isSysHint)
|
| | | finalAddExp, expNotifyType = self.__AddExp(curPlayer, addExp, expViewType, isSysHint, addSkillID)
|
| | |
|
| | | # 通知客户端经验来源
|
| | | if finalAddExp:
|
| | |
| | |
|
| | | return finalAddExp
|
| | |
|
| | | def __AddExp(self, curPlayer, addExp, expViewType, isSysHint):
|
| | | # 参数 addSkillID 表示因什么技能杀死NPC获得经验
|
| | | def __AddExp(self, curPlayer, addExp, expViewType, isSysHint, addSkillID=0):
|
| | | if addExp == 0:
|
| | | # 不进入计算
|
| | | return addExp, expViewType
|
| | |
| | | if expViewType == ShareDefine.Def_ViewExpType_KillNPC:
|
| | | exp_rate = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_TotalExpRate)
|
| | | superRate = PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(curPlayer, None, None, ChConfig.TriggerType_AddExpRate)
|
| | | exp_rate += superRate
|
| | | if superRate:
|
| | | # 龙凤镯 经验
|
| | | expViewType = ShareDefine.Def_ViewExpType_KillNPCSuper
|
| | | if addSkillID == ChConfig.Def_SkillID_LXHY_AddExpRate:
|
| | | addSkill = GameWorld.GetGameData().GetSkillBySkillID(addSkillID)
|
| | | hasEffect = SkillCommon.GetSkillEffectByEffectID(addSkill, ChConfig.Def_Skill_Effect_AddExpRate)
|
| | | if hasEffect:
|
| | | #烈焰战神 经验
|
| | | superRate += hasEffect.GetEffectValue(0)
|
| | | expViewType = ShareDefine.Def_ViewExpType_LYZS
|
| | | exp_rate += superRate
|
| | |
|
| | | elif expViewType in [ShareDefine.Def_ViewExpType_GameEvent, ShareDefine.Def_ViewExpType_Sit]:
|
| | | exp_rate = curPlayer.GetGameEventExpRate()
|
| | |
| | | # 记录玩家升级
|
| | | DataRecordPack.DR_PlayerUpgrade(curPlayer, curPlayer.GetLV(), GetPlayerTotalExp(curPlayer), lvUpNeedExp)
|
| | | DataRecordPack.Cache_FightPowerChangeInfo(curPlayer, ChConfig.PowerDownType_LVUP, {'lv':curLV})
|
| | | |
| | | self.__GiveLVMailAward(curLV)
|
| | | self.__DoLVUPAddPoint() # 升级加点
|
| | | #self.__DoLvUpAddSkill() # 升级加技能
|
| | |
|
| | |
| | | if aftLV > befLV:
|
| | | curPlayer.SetLV(aftLV, False) # 这里不再通知GameServer
|
| | | PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_HeroLV, aftLV)
|
| | | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_LVUP, aftLV - befLV)
|
| | | PlayerActivity.DoAddActivityByLV(curPlayer, befLV, aftLV)
|
| | | |
| | | if aftFreePoint > befFreePoint:
|
| | | curPlayer.SetFreePoint(aftFreePoint)
|
| | | #NotifyCode(curPlayer, "ObtainAttributeDot", [aftFreePoint - befFreePoint])
|
| | |
| | | PlayerGreatMaster.Sync_GreatMasterFreeSkillPoint(curPlayer)
|
| | | # 升级需要执行的游戏功能处理
|
| | | GameFuncComm.DoFuncOpenLogic(curPlayer)
|
| | | #ChEquip.CalcEquips_OutOfPrint(curPlayer) # 缓存绝版属性
|
| | | ChEquip.RefreshPlayerLingQiEquipAttr(curPlayer) # 灵器属性会随等级成长
|
| | | if aftLV%10 == 0:
|
| | | # 控制下刷新次数
|
| | | PlayerPet.CalcPetItemAddPlayerAttr(curPlayer) # 宠物有随等级变化的技能
|
| | |
| | |
|
| | | FBLogic.OnPlayerLVUp(curPlayer)
|
| | | # 记录开服活动冲级数据
|
| | | OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_LV, curPlayer.GetLV())
|
| | | #OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_LV, curPlayer.GetLV())
|
| | | #神秘限购
|
| | | FunctionNPCCommon.MysticalLimitShopOpen(curPlayer, befLV, aftLV)
|
| | |
|
| | | #不需要做升级任务, 设置玩家经验
|
| | | SetPlayerTotalExp(curPlayer, curTotalExp)
|
| | | return
|
| | | |
| | | def __GiveLVMailAward(self, curLV):
|
| | | # 给等级邮件奖励
|
| | | mailLVAwardDict = IpyGameDataPY.GetFuncEvalCfg("MailLVAward", 1, {})
|
| | | if curLV not in mailLVAwardDict:
|
| | | return
|
| | | mailTypeKey, mailItemList = mailLVAwardDict[curLV]
|
| | | curPlayer = self.__Player
|
| | | SendMailByKey(mailTypeKey, [curPlayer.GetPlayerID()], mailItemList, [curLV])
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | ShareDefine.Def_Effect_Fire:[lambda curObj:GetFire(curObj), lambda curObj, value:SetFireQualityLV(curObj, value), lambda curObj:GetFireQualityLV(curObj)],
|
| | | ShareDefine.Def_Effect_Earth:[lambda curObj:GetEarth(curObj), lambda curObj, value:SetEarthQualityLV(curObj, value), lambda curObj:GetEarthQualityLV(curObj)],
|
| | | }
|
| | | hasChange_Qualitylv = False #灵根品级是否有变更
|
| | | lingGenQualityAttrList = [{} for _ in range(4)]
|
| | | for pointAttrID, pointFuncInfo in pointValueInfo.items():
|
| | | pointValue = pointFuncInfo[0](curPlayer)
|
| | | befPQLV = pointFuncInfo[2](curPlayer)
|
| | | pointFuncInfo[1](curPlayer, 0)
|
| | | if not pointValue:
|
| | | if 0 != befPQLV:
|
| | | hasChange_Qualitylv = True
|
| | | continue
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("RolePoint", pointAttrID)
|
| | | if not ipyData:
|
| | |
| | | else:
|
| | | break
|
| | | pointFuncInfo[1](curPlayer, curPQLV)
|
| | | if curPQLV != befPQLV:
|
| | | hasChange_Qualitylv = True
|
| | | if not curPQLV:
|
| | | continue
|
| | | pqAttrInfoDict = ipyData.GetPointQualityAttrDict().get(str(curPlayer.GetJob()), {})
|
| | |
| | | CalcAttrDict_Type(int(pqAttrID), pqAttrValue, lingGenQualityAttrList)
|
| | | #GameWorld.DebugLog(" 属性点(%s)品阶等级属性: befPQLV=%s,curPQLV=%s,pqAttrInfoDict=%s" % (pointAttrID, befPQLV, curPQLV, pqAttrInfoDict))
|
| | | if hadRefreshAttr and befPQLV < curPQLV:
|
| | | EventShell.EventRespons_LingGenQualityUP(curPlayer, pointAttrID, curPQLV)
|
| | | for pqlv in xrange(befPQLV+1, curPQLV+1):
|
| | | EventShell.EventRespons_LingGenQualityUP(curPlayer, pointAttrID, pqlv)
|
| | |
|
| | | #GameWorld.DebugLog("等级属性点加属性: %s" % allAttrList)
|
| | | #GameWorld.DebugLog("灵根品阶等级属性: %s" % lingGenQualityAttrList)
|
| | |
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPEx % ShareDefine.Def_MFPType_Role, pointFightPowerEx)
|
| | | SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_RoleBase, allAttrList)
|
| | | SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_LingGenQuailty, lingGenQualityAttrList)
|
| | | return
|
| | | return hasChange_Qualitylv
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | def NotifyAllState(self, playerStateDict):
|
| | |
| | | ChEquip.RefreshPlayerEquipAttribute(curPlayer)
|
| | | ChEquip.RefreshPlayerLingQiEquipAttr(curPlayer)
|
| | | #SkillShell.RefreshPlayerBuffOnAttrAddEffect(curPlayer)
|
| | | #PlayerWing.CalcWingAttr(curPlayer) # 翅膀暂时算在灵器里面
|
| | | PlayerHorse.CalcHorseAttrEx(curPlayer)
|
| | | PlayerPrestigeSys.CalcOfficialRankAttr(curPlayer)
|
| | | PlayerGodWeapon.CalcGodWeaponAttr(curPlayer)
|
| | |
| | | PlayerFamilyTech.CalcFamilyTechAttr(curPlayer)
|
| | | PlayerEquipDecompose.RefreshEDAttr(curPlayer)
|
| | | PlayerDogz.RefreshDogzAttr(curPlayer)
|
| | | #EquipZhuXian.CalcZhuXianAttr(curPlayer)
|
| | | PlayerGatherSoul.RefreshGatherSoulAttr(curPlayer)
|
| | | PlayerCoat.CalcClothesCoatSkinAttr(curPlayer)
|
| | | self.RefreshAllState(isForce=True)
|
| | |
| | | CalcNoLineEffect.ChangePlayerAttrInNoLineEffectList(curPlayer, baseAttrNolineDict)
|
| | |
|
| | | # 功能有加基础属性值,这里再重新刷新一下基础属性, 基础属性会影响战斗属性, 每次都刷新角色基础属性
|
| | | self.CalcRoleBaseAttr(curPlayer)
|
| | | hasChange_Qualitylv = self.CalcRoleBaseAttr(curPlayer)
|
| | | roleBaseAttrInfo, roleInsidePerAttrDict = GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_RoleBase)
|
| | | lingGenQualityAttrList, lingGenQualityInsidePerAttrDict = GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_LingGenQuailty)
|
| | | funcAttrInfoList[ChConfig.Def_CalcAttrFunc_RoleBase] = roleBaseAttrInfo
|
| | |
| | | # 3.1 战斗属性层级交叉影响基值数值汇总
|
| | | # 基础层级(角色基础属性)
|
| | | baseAttrList = AddAttrListValue([funcAttrInfoList[ChConfig.Def_CalcAttrFunc_RoleBase],
|
| | | funcAttrInfoList[ChConfig.Def_CalcAttrFunc_LingGen],
|
| | | funcAttrInfoList[ChConfig.Def_CalcAttrFunc_LingGenQuailty],
|
| | | ])
|
| | | #GameWorld.DebugLog("基础层级: %s" % baseAttrList)
|
| | |
|
| | |
| | | ChConfig.TYPE_Calc_StoneBasePer:funcAttrInfoList[ChConfig.Def_CalcAttrFunc_Stone],
|
| | | ChConfig.TYPE_Calc_RealmBasePer:funcAttrInfoList[ChConfig.Def_CalcAttrFunc_Prestige],
|
| | | ChConfig.TYPE_Calc_HorseAtkPer:funcAttrInfoList[ChConfig.Def_CalcAttrFunc_Horse],
|
| | | ChConfig.TYPE_Calc_WingHPPer:funcAttrInfoList[ChConfig.Def_CalcAttrFunc_Wing],
|
| | | }
|
| | | # 3.2 统计各功能之间非线性属性交叉影响累加
|
| | | funcCrossAttrPerInfoDict = {} # 百分比交叉影响所提升的属性值 {功能属性编号:{提升的属性类型:数值, ...}, ...}
|
| | |
| | | # 3.3 统计所有功能固定属性影响累加
|
| | | allFixAttrDict = {} # 固定属性层级总属性基值
|
| | | for funcIndex, funcAttrList in enumerate(funcAttrInfoList):
|
| | | # 技能模块不算计入功能固定属性、不计战力
|
| | | # 技能模块不计入功能固定属性、不计战力
|
| | | if funcIndex in ChConfig.CalcAttrFuncSkillList:
|
| | | continue
|
| | | AddAttrDictValue(allFixAttrDict, funcAttrList[ChConfig.CalcAttr_Battle])
|
| | |
| | | mfpAttrList = [{} for _ in range(4)]
|
| | | mfpAttrExDict = {}
|
| | | for funcIndex in attrFuncIndexList:
|
| | | if funcIndex in ChConfig.CalcAttrFuncSkillList:
|
| | | # 技能模块不计入功能固定属性、不计战力
|
| | | continue
|
| | | funcAttrList = funcAttrInfoList[funcIndex]
|
| | | funcInsidePerAttrDict = funcInsidePerAttrList[funcIndex] # 功能点内部百分比加成属性
|
| | | funcCrossPerAttrDict = funcCrossAttrPerInfoDict.get(funcIndex, {}) # 功能点交叉百分比加成属性
|
| | |
| | | CalcLineEffect.ChangePlayerAttrInLineEffectList(curPlayer, funcCrossPerAttrDict)
|
| | | CalcLineEffect.ChangePlayerAttrInLineEffectList(curPlayer, fixPerAttrDict)
|
| | | # 不算战力的
|
| | | if funcIndex in ChConfig.CalcAttrFuncNoFightPowerList or funcIndex in ChConfig.CalcAttrFuncSkillList:
|
| | | if funcIndex in ChConfig.CalcAttrFuncNoFightPowerList:
|
| | | continue
|
| | | mfpAttrList = AddAttrListValue([mfpAttrList, funcAttrList])
|
| | | AddAttrDictValue(mfpAttrExDict, funcInsidePerAttrDict)
|
| | |
| | | if beforePointList[i] != afterPointList[i]:
|
| | | diffPointAttrList.append(attrID)
|
| | | SkillShell.RefreshElementSkillByAttr(curPlayer, diffPointAttrList)
|
| | | if hasChange_Qualitylv:
|
| | | #灵根品级变化处理
|
| | | ChEquip.ChangeEquipfacadeByLingGen(curPlayer)
|
| | |
|
| | | # 更新开服活动灵根数据
|
| | | OpenServerCampaign.UpdOpenServerCampaignLingGenData(curPlayer)
|
| | | |
| | | # 同步前端战力,因为有 SetFightPower 所以累加战力放在这里所有刷新及计算处理完后才处理,才能正常触发set同步前端
|
| | | self.SendModuleFightPowerPack(curPlayer, mfpDict)
|
| | | billFuncCnt = len(PyGameData.g_refreshAttrBillboardFunc) # 只处理固定次数,防止死循环
|
| | |
| | | # 速度特殊处理 计算一次
|
| | | self.__RefreshMoveSpeed(allAttrListBuffs)
|
| | |
|
| | | # GM测试属性特殊逻辑
|
| | | self.__DoRefreshGMAttr()
|
| | | |
| | | # 刷新攻击速度
|
| | | self.__SetAtkInterval()
|
| | | GameWorld.DebugLog("Buff层属性: %s" % allAttrListBuffs)
|
| | | |
| | | # GM测试属性特殊逻辑
|
| | | self.__DoRefreshGMAttr() |
| | | return
|
| | |
|
| | | def __DoRefreshGMAttr(self):
|
| | |
| | | setAttrDict[ChConfig.AttrName_Def] = int(lvIpyData.GetReDef() * attrPer) # 防御
|
| | | setAttrDict[ChConfig.AttrName_Hit] = int(lvIpyData.GetReHit() * attrPer) # 命中
|
| | | setAttrDict[ChConfig.AttrName_DefRate] = int(lvIpyData.GetReMiss() * attrPer) # 闪避
|
| | | setAttrDict[ChConfig.AttrName_AtkSpeed] = int(lvIpyData.GetReAtkSpeed() * attrPer) # 攻击速度
|
| | | setAttrDict[ChConfig.AttrName_SkillAtkRate] = int(lvIpyData.GetReSkillAtkRate() * attrPer) # 技能伤害比例
|
| | | setAttrDict[ChConfig.AttrName_AtkSpeed] = int((lvIpyData.GetReAtkSpeed() + 10000) * attrPer) # 攻击速度, 策划等级表配置的是附加值,所以这里要加
|
| | | setAttrDict[ChConfig.AttrName_SkillAtkRate] = int(max(0, lvIpyData.GetReSkillAtkRate() - 10000) * attrPer) # 技能伤害比例, 策划等级表配置的是最终值,初始值是0,所以这里要减
|
| | | setAttrDict[ChConfig.AttrName_DamagePVP] = int(lvIpyData.GetReDamagePer() * attrPer) # PVP固定伤害
|
| | | setAttrDict[ChConfig.AttrName_DamagePVPReduce] = int(lvIpyData.GetReDamReduce() * attrPer) # PVP固定减伤
|
| | | setAttrDict[ChConfig.AttrName_IgnoreDefRate] = int(lvIpyData.GetReIgnoreDefRate() * attrPer) # 无视防御比例
|
| | |
| | | setAttrDict[ChConfig.AttrName_IceAtk] = int(lvIpyData.GetReIceAtk() * attrPer) # 真实伤害
|
| | | setAttrDict[ChConfig.AttrName_IceDef] = int(lvIpyData.GetReIceDef() * attrPer) # 真实抵御
|
| | | setAttrDict[ChConfig.AttrName_PetAtk] = int(lvIpyData.GetRePetAtk() * attrPer) # 灵宠攻击
|
| | | setAttrDict[ChConfig.AttrName_PetSkillAtkRate] = int(lvIpyData.GetRePetSkillAtkRate() * attrPer) # 灵宠技能
|
| | | setAttrDict[ChConfig.AttrName_PetSkillAtkRate] = int(max(0, lvIpyData.GetRePetSkillAtkRate() - 10000) * attrPer) # 灵宠技能, 策划等级表配置的是最终值,初始值是0,所以这里要减
|
| | | setAttrDict[ChConfig.AttrName_PetDamPer] = int(lvIpyData.GetRePetDamPer() * attrPer) # 灵宠伤害增加
|
| | | setAttrDict[ChConfig.AttrName_FinalHurt] = int(lvIpyData.GetReFinalHurt() * attrPer) # 固定伤害增加
|
| | | setAttrDict[ChConfig.AttrName_FinalHurtReduce] = int(lvIpyData.GetReFinalHurtReduce() * attrPer) # 固定伤害减少
|
| | |
| | | return [attr15%1000, attr15/1000%1000, attr15/1000000]
|
| | | def SetFaceEquipIndex(curPlayer, value): return curPlayer.SetExAttr15(value)
|
| | |
|
| | | # 返回最大的灵根系
|
| | | def GetLingGenMaxIndex(curPlayer):
|
| | | return curPlayer.GetExAttr16()
|
| | |
|
| | | def SetLingGenMaxIndex(curPlayer):
|
| | | indexList = [
|
| | | ShareDefine.Def_Effect_Metal, # 金
|
| | | ShareDefine.Def_Effect_Wood, # ľ
|
| | | ShareDefine.Def_Effect_Water, # ˮ
|
| | | ShareDefine.Def_Effect_Fire, # 火
|
| | | ShareDefine.Def_Effect_Earth, # 土
|
| | | ]
|
| | | |
| | | |
| | | tempList = [curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AddPointValue % attrID) for attrID in indexList]
|
| | | |
| | | curPlayer.SetExAttr16(indexList[tempList.index(max(tempList))])
|
| | |
|
| | | ##获得玩家威望值
|
| | | def GetPrestige(curPlayer): return 0
|
| | | def SetPrestige(curPlayer, value): return
|