| | |
| | | GameWorld.DebugLog("GM处理等级开启功能: openFuncID=%s,openFuncIDList=%s,needLV=%s" % (openFuncID, openFuncIDList, needLV), curPlayer.GetPlayerID())
|
| | |
|
| | | # 优先处理升级
|
| | | if needLV:
|
| | | if needLV > 1:
|
| | | preLV = needLV - 1
|
| | | curPlayer.SetLV(preLV)
|
| | | PlayerControl.SetPlayerTotalExp(curPlayer, PlayerControl.GetTotalExpByPlayerLv(preLV))
|
| | | PlayerControl.PlayerControl(curPlayer).PlayerLvUp()
|
| | |
|
| | | |
| | | # 获取等级需要的境界
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | for index in range(ipyDataMgr.GetRealmCount()):
|
| | | realmIpyData = ipyDataMgr.GetRealmByIndex(index)
|
| | | if realmIpyData.GetLv() > needRealmLV:
|
| | | needRealmLV = realmIpyData.GetLv()
|
| | | if realmIpyData.GetLVMax() >= needLV:
|
| | | break
|
| | | |
| | | GameWorld.DebugLog("GM处理境界开启功能: needRealmLV=%s" % needRealmLV, curPlayer.GetPlayerID())
|
| | | if needRealmLV:
|
| | | curPlayer.SetOfficialRank(max(1, needRealmLV - 1))
|
| | | curPlayer.SetOfficialRank(max(ChConfig.Def_InitOfficialRank, needRealmLV - 1))
|
| | | PlayerPrestigeSys.DoRealmLVUpLogic(curPlayer)
|
| | |
|
| | | for limitMissionID in needMissionIDList:
|
| | | if not curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_MissionFinish % limitMissionID):
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_MissionFinish % limitMissionID, 1)
|
| | | |
| | | GameWorld.DebugLog("GM处理任务开启功能: needMissionIDList=%s" % needMissionIDList, curPlayer.GetPlayerID())
|
| | | #最后强制触发一次
|
| | | #if needMissionIDList:
|
| | | GameFuncComm.DoFuncOpenLogic(curPlayer, needMissionIDList)
|
| | | GameFuncComm.DoFuncOpenLogic(curPlayer)
|
| | | return
|
| | |
|
| | | def __GetOpenFuncLimit(curPlayer, openFuncIDList):
|
| | | maxLV = PlayerControl.GetPlayerMaxLV(curPlayer)
|
| | | maxLV = PlayerControl.GetOpenMaxLV()
|
| | | needLV = 0
|
| | | needRealmLV = 0
|
| | | needMissionIDList = []
|
| | |
| | | ## GM关闭功能
|
| | | if not closeFuncID:
|
| | | curPlayer.SetLV(1)
|
| | | curPlayer.SetOfficialRank(1)
|
| | | curPlayer.SetOfficialRank(ChConfig.Def_InitOfficialRank)
|
| | |
|
| | | for keyNum in xrange(8):
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_GameFuncFirstTouch % keyNum, 0)
|
| | |
| | |
|
| | | limitRealmLV = ipyData.GetLimiRealmLV()
|
| | | if limitRealmLV and curPlayer.GetOfficialRank() >= limitRealmLV:
|
| | | curPlayer.SetOfficialRank(max(1, limitRealmLV - 1))
|
| | | curPlayer.SetOfficialRank(max(ChConfig.Def_InitOfficialRank, limitRealmLV - 1))
|
| | |
|
| | | limitMissionID = ipyData.GetLimitMissionID()
|
| | | if limitMissionID:
|