| | |
| | | PlayerControl.NotifyCode(curPlayer, "CreatSuccess")
|
| | | return
|
| | |
|
| | | if CheckIsServerCreateRoleLimit(curPlayer):
|
| | | PlayerControl.NotifyCode(curPlayer, "ServerCreateRoleLimit")
|
| | | return
|
| | | |
| | | # CD保护
|
| | | createSafeTick = 3000
|
| | | accID = curPlayer.GetAccID()
|
| | |
| | | #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 玩家名称
|