| | |
| | | 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 []
|
| | | 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
|
| | |
|
| | | if type_Price == IPY_GameWorld.TYPE_Price_Gold_Paper:
|
| | | type_Price = IPY_GameWorld.TYPE_Price_Gold_Money #新版无绑玉,原先绑玉再仙玉的扣法改成 扣仙玉 2019/6/3
|
| | | #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:
|
| | |
| | |
|
| | | # 消费返利
|
| | | 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:
|
| | | #超过金钱上限
|
| | |
| | | GiveMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney, value)
|
| | | addDataDict["BourseMoney"] = GetMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney)
|
| | |
|
| | | # elif priceType == IPY_GameWorld.TYPE_Price_Gold_Paper:
|
| | | # if curPlayer.GetGoldPaper() + value > ChConfig.Def_PlayerTotalMoney_Gold:
|
| | | # #超过金钱上限
|
| | | # NotifyCode(curPlayer, "MoneyIsFull", [priceType])
|
| | | # return
|
| | | # |
| | | # curPlayer.SetGoldPaper(curPlayer.GetGoldPaper() + value)
|
| | | elif priceType == IPY_GameWorld.TYPE_Price_Gold_Paper:
|
| | | if curPlayer.GetGoldPaper() + value > ChConfig.Def_PlayerTotalMoney_Gold:
|
| | | #超过金钱上限
|
| | | NotifyCode(curPlayer, "MoneyIsFull", [priceType])
|
| | | return
|
| | | |
| | | curPlayer.SetGoldPaper(curPlayer.GetGoldPaper() + value)
|
| | |
|
| | | elif priceType == IPY_GameWorld.TYPE_Price_Silver_Money:
|
| | | # 金钱支持超过20亿, 暂不做上限控制
|
| | |
| | | # 记录玩家升级
|
| | | 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() # 升级加技能
|
| | |
|
| | |
| | |
|
| | | 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):
|
| | |
| | | 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
|
| | |
| | | if beforePointList[i] != afterPointList[i]:
|
| | | diffPointAttrList.append(attrID)
|
| | | SkillShell.RefreshElementSkillByAttr(curPlayer, diffPointAttrList)
|
| | | if hasChange_Qualitylv:
|
| | | #灵根品级变化处理
|
| | | ChEquip.ChangeEquipfacadeByLingGen(curPlayer)
|
| | | |
| | | # 更新开服活动灵根数据
|
| | | OpenServerCampaign.UpdOpenServerCampaignLingGenData(curPlayer)
|
| | |
|
| | |
| | | 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
|