hch
2019-04-19 f37fe3b1d7b81b2dcdaeeb81971a6cbdf0b9372d
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py
@@ -45,7 +45,8 @@
def OnLogin(curPlayer):        
    SyncRealmFBState(curPlayer)
    UpdateRealmExp(curPlayer)
    UpdateRealmExp(curPlayer, False)
    NotifyRealmExpInfo(curPlayer)
    return
@@ -142,6 +143,21 @@
    DoRealmLVUpLogic(curPlayer)
    return
# 提升1级境界加点
def __DoRealmLVUpAddPoint(curPlayer):
    if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_AddPoint):
        # 未开启前不可加点,因为DoAddPointOpen会一次性补齐,避免意外情况多加了点数
        return
    curFreePoint = curPlayer.GetFreePoint()
    addPoint = IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 3)
    if addPoint != 0:
        setFreePoint = curFreePoint + addPoint
        DataRecordPack.DR_Freepoint(curPlayer, "RealmLVUp", addPoint)
        curPlayer.SetFreePoint(setFreePoint)
    return
def DoRealmLVUpLogic(curPlayer, needSys=True):
    curRealmLV = curPlayer.GetOfficialRank()
@@ -152,21 +168,25 @@
        return
    
    curPlayer.SetOfficialRank(nextRealmLv)
    # 提升1级境界加点
    __DoRealmLVUpAddPoint(curPlayer)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmFBIsOpen, 0)
    if needSys:
        addBuffID = nextRealmIpyData.GetBuffID()
        if addBuffID:
            PlayerControl.WorldNotify(0, 'BigRealmUpSuccess', [curPlayer.GetName(), nextRealmLv, IpyGameDataPY.GetFuncCfg('RadioExpRealm')])
            PlayerControl.WorldNotify(0, 'BigRealmUpSuccess', [curPlayer.GetName(), curPlayer.GetID(), nextRealmLv, IpyGameDataPY.GetFuncCfg('RadioExpRealm')])
            msgStr = str(addBuffID)
            GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'RealmUpAddBuff', msgStr, len(msgStr))
        else:
            PlayerControl.WorldNotify(0, 'RealmUpSuccess', [curPlayer.GetName(), nextRealmLv])
            PlayerControl.WorldNotify(0, 'RealmUpSuccess', [curPlayer.GetName(), curPlayer.GetID(), nextRealmLv])
            
    RefreshOfficialAttr(curPlayer)
    GameFuncComm.DoFuncOpenLogic(curPlayer)
    SyncRealmFBState(curPlayer)
    #更新修为速率
    UpdateRealmExp(curPlayer)
    UpdateRealmExp(curPlayer, False)
    NotifyRealmExpInfo(curPlayer)
    #境界提升成就
    PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_RealmlvUp, nextRealmLv)
    #更新排行榜
@@ -239,7 +259,7 @@
    ipyData = GetRealmIpyData(curPlayer.GetOfficialRank())
    if not ipyData:
        return curTotalExp
    addExp = passSeconds / 5 * ipyData.GetExpRate()
    addExp = passSeconds / IpyGameDataPY.GetFuncCfg('RealmExpTime') * ipyData.GetExpRate()
    if addExp <= 0:
        return curTotalExp
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmExpBeginTime, curTime)