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