hxp
2024-12-10 cc3b988b52ba3f473862d289ec58e7873e35d713
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -4215,7 +4215,7 @@
        #curTotalExp = GetPlayerTotalExp(curPlayer)
        curTotalExp = curPlayer.GetExpPoint() * ChConfig.Def_PerPointValue + curPlayer.GetTotalExp()
        maxLV = IpyGameDataPY.GetFuncCfg("PlayerMaxLV", 1)
        maxLV = GetPlayerMaxLV(curPlayer)
        maxLVExpStore = IpyGameDataPY.GetFuncCfg("MaxLVExpStore", 1)
        
        curLV = curPlayer.GetLV()            
@@ -4225,10 +4225,10 @@
#            GameWorld.DebugLog("经验已满!需先转生!curLV=%s,reinLV=%s" % (curLV, nextReinLV), curPlayer.GetPlayerID())
#            return 0
        # 检查最大等级
        if curLV >= maxLV and curTotalExp >= maxLVExpStore:
        # 检查最大等级,maxLVExpStore -1时不限累计经验上限
        if curLV >= maxLV and curTotalExp >= maxLVExpStore and maxLVExpStore != -1:
            self.__NotifyExpFull(curPlayer, "GeRen_admin_825676")
            #GameWorld.DebugLog("经验已满!已满级!curLV=%s" % (curLV), curPlayer.GetPlayerID())
            GameWorld.DebugLog("经验已满!已满级!curLV=%s,maxLV=%s,curTotalExp=%s >= maxLVExpStore=%s" % (curLV, maxLV, curTotalExp, maxLVExpStore), curPlayer.GetPlayerID())
            return 0, expViewType
        
        # 杀怪
@@ -4276,7 +4276,7 @@
        
        # 不可再升级时,增加后的经验不可超过最大可存储经验
        #if curLV >= nextReinLV or curLV >= maxLV:
        if curLV >= maxLV:
        if curLV >= maxLV and maxLVExpStore > 0:
            addExp = min(addExp, max(0, maxLVExpStore - curTotalExp))
        if addExp <= 0:
@@ -4377,7 +4377,7 @@
        needSyncTalentPoint = False
        playerNeedDoLVUp = False
        curLV = curPlayer.GetLV()
        maxLV = IpyGameDataPY.GetFuncCfg("PlayerMaxLV", 1)
        maxLV = GetPlayerMaxLV(curPlayer)
        
        curPlayer.BeginRefreshState()
        #befXP = curPlayer.GetXP()
@@ -6874,6 +6874,16 @@
        return 0
    return lvIpyData.GetExpPoint() * ChConfig.Def_PerPointValue + lvIpyData.GetExp()
def GetPlayerMaxLV(curPlayer):
    ## 获取玩家实际可升的最大等级
    maxLV = IpyGameDataPY.GetFuncCfg("PlayerMaxLV", 1)
    curRealmLV = curPlayer.GetOfficialRank()
    realmIpyData = PlayerPrestigeSys.GetRealmIpyData(curRealmLV)
    if not realmIpyData:
        return 0
    playerMaxLV = min(maxLV, realmIpyData.GetLVMax())
    return playerMaxLV
## 获得玩家实际等级
#  @param curPlayer 玩家
#  @return 玩家实际等级