From aeaea61638d86f166c24a8826df4b6be83ade16b Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 24 二月 2025 17:18:49 +0800 Subject: [PATCH] 10407 【越南】【英语】【BT】【GM】【砍树】周末BUG汇总(模块战力支持超20亿;开服活动榜同步修改支持超20亿;) --- ServerPython/CoreServerGroup/GameServer/Script/Player/CreateRole.py | 51 +++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 39 insertions(+), 12 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/CreateRole.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/CreateRole.py index 1b5d3a6..1464b90 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() @@ -112,9 +116,9 @@ sendPack_Sex = 1 #sendPack.GetSex() sendPack_Hair = 10001 #sendPack.GetHair() sendPack_HairColor = 1 #sendPack.GetHairColor() - sendPack_Face = 10005 #sendPack.GetFace() - sendPack_FacePic = 0 # 固定为0,需与客户端配置一致 - serverID = 1 #sendPack.GetFacePic() # 脸谱作为serverID用 + sendPack_Face = sendPack.GetFace() + sendPack_FacePic = sendPack.GetFacePic() + serverID = 1 sendPack_PlayerType = 1 #sendPack.GetPlayerType() sendPack_Job = sendPack.GetJob() @@ -147,6 +151,7 @@ openJob = IpyGameDataPY.GetFuncEvalCfg("OpenJob", 1) if sendPack_Job not in openJob: #curPlayer.Kick(IPY_GameServer.disCreateRoleJobError) + GameWorld.ErrLog("创角异常职业! sendPack_Job=%s" % sendPack_Job, curPlayerID) PlayerControl.NotifyCode(curPlayer, "CreatUnusual") return @@ -158,14 +163,21 @@ # return #----------------------脸型校验 - #=========================================================================== - # if sendPack_Face not in ChConfig.Def_RoleFace[sendPack_Job][sendPack_Sex - 1]: - # #脸型错误 - # GameWorld.Log("Face = %d Error!,踢玩家下线"%(sendPack_Face) , curPlayerID) - # curPlayer.Kick(IPY_GameServer.disCreateRoleFaceError) - # return - #=========================================================================== - + if sendPack_Face: + faceIpyData = IpyGameDataPY.GetIpyGameData("PlayerFace", sendPack_Face) + if not faceIpyData or not faceIpyData.GetUnlockDefault(): + #curPlayer.Kick(IPY_GameServer.disCreateRoleFaceError) + GameWorld.ErrLog("创角异常头像! sendPack_Face=%s" % sendPack_Face, curPlayerID) + PlayerControl.NotifyCode(curPlayer, "CreatUnusual") + return + if sendPack_FacePic: + facePicIpyData = IpyGameDataPY.GetIpyGameData("PlayerFacePic", sendPack_FacePic) + if not facePicIpyData or not facePicIpyData.GetUnlockDefault(): + #curPlayer.Kick(IPY_GameServer.disCreateRoleFaceError) + GameWorld.ErrLog("创角异常头像框! sendPack_FacePic=%s" % sendPack_FacePic, curPlayerID) + PlayerControl.NotifyCode(curPlayer, "CreatUnusual") + return + #---------------------五行检查 #=========================================================================== # if sendPack_PlayerType not in range(1 , 5 + 1): @@ -236,13 +248,28 @@ IPY_GameServer.TYPE_Price_Gold_Paper, #默认使用金票 (金子/金票) IPY_GameServer.TYPE_Price_Silver_Money, #默认使用银子 (银子/银票) 80, #默认自动回血设定 inputHPRestoreSetting - 80 #默认自动回魔设定 inputMPRestoreSetting + 80, #默认自动回魔设定 inputMPRestoreSetting + 0, #roleType + 0 #modelMark ) # 创角流向 #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 + ## 检查玩家名字是否合法(这里的PlayerName为过滤完空格的名字) # @param curPlayer 当前玩家 # @param playerName 玩家名称 -- Gitblit v1.8.0