From 21af42b4f4faaba0d2ccc6ee731c1deec4f514ab Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 27 一月 2022 11:10:38 +0800 Subject: [PATCH] 5349 【主干】【gt_1.103.1】【yn_1.0.1】【bt3_1.102.1】【bt4】【bt5】【bt5_1.101.1】【bt6】开服活动合服后上线的无法结算奖励bug --- ServerPython/CoreServerGroup/GameServer/Script/Player/CreateRole.py | 56 ++++++++++++++++++-------------------------------------- 1 files changed, 18 insertions(+), 38 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/CreateRole.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/CreateRole.py index 79e2717..2692310 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/CreateRole.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/CreateRole.py @@ -83,6 +83,10 @@ PlayerControl.NotifyCode(curPlayer, "CreatSuccess") return + if CheckIsServerCreateRoleLimit(curPlayer): + PlayerControl.NotifyCode(curPlayer, "ServerCreateRoleLimit") + return + # CD保护 createSafeTick = 3000 accID = curPlayer.GetAccID() @@ -188,7 +192,7 @@ #GameWorld.DebugLog("SendToDBPlayerCreate dataMapID=%s,lineID=%s,posX=%s,posY=%s,mapID=%s,copyMapID=%s" # % (dataMapID, lineID, posX, posY, mapID, copyMapID)) #根据职业获得默认的属性, #STR//力量 ,PNE//智力,PHY//敏捷,CON//体力 - baseSTR, basePNE, basePHY, baseCON = __GetPlayerBasePoint(sendPack_Job) + baseSTR, basePNE, basePHY, baseCON = 0, 0, 0, 0 curPlayer.SendToDBPlayerCreate( curPlayerID, #PlayerID, @@ -242,44 +246,20 @@ # 创角流向 #DataRecordPack.DR_CreateRole(curPlayer.GetAccID(), sendPack_Name, sendPack_Job) return +#--------------------------------------------------------------------- +def CheckIsServerCreateRoleLimit(curPlayer): + ## 服务器是否创角限制 + groupID = GameWorld.GetServerGroupID() + ipyDataMgr = IpyGameDataPY.IPY_Data() + for i in xrange(ipyDataMgr.GetCreateRoleLimitServerCount()): + ipyData = ipyDataMgr.GetCreateRoleLimitServerByIndex(i) + if groupID in ipyData.GetLimitServerGroupIDList(): + return True + for idA, idB in ipyData.GetLimitServerGroupIDRangeList(): + if idA <= groupID <= idB: + return True + return False -#--------------------------------------------------------------------- -## 获取玩家基础属性点 -# @param sendPack_Job 职业类型 -# @return baseSTR, basePNE, basePHY, baseCON -# @remarks 函数详细说明. -def __GetPlayerBasePoint(sendPack_Job): - baseSTR, basePNE, basePHY, baseCON = (0, 0, 0, 0) - #{ 职业 : { key : value } } - - jobDict = IpyGameDataPY.GetFuncEvalCfg("CreatRolePoint%s" % sendPack_Job, 1) - - if not jobDict: - GameWorld.ErrLog('CreatRoleErr RoleBasePoint, job = %s' % (sendPack_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('CreatRoleErr RoleBasePoint, key = %s' % (key)) - - return baseSTR, basePNE, basePHY, baseCON -#--------------------------------------------------------------------- ## 检查玩家名字是否合法(这里的PlayerName为过滤完空格的名字) # @param curPlayer 当前玩家 # @param playerName 玩家名称 -- Gitblit v1.8.0