hxp
2019-11-11 faa3ba8a847f33ec0844f6b0b0b2937847a6435c
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py
@@ -683,16 +683,24 @@
        return
    
    #脱机效率榜 一分钟经验
    minuteExp = CalcTJGExp(curPlayer, 60, npcData)
    exp_rate = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_TotalExpRate)
    addExp = int(minuteExp * exp_rate / float(ChConfig.Def_MaxRateValue))
    GameWorld.DebugLog('    脱机效率榜  minuteExp=%s,exp_rate=%s,addExp=%s'%(minuteExp, exp_rate, addExp))
    PlayerBillboard.UpdateTJGBillboard(curPlayer, addExp)
    #minuteExp = CalcTJGExp(curPlayer, 60, npcData)
    #exp_rate = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_TotalExpRate)
    #addExp = int(minuteExp * exp_rate / float(ChConfig.Def_MaxRateValue))
    #GameWorld.DebugLog('    脱机效率榜  minuteExp=%s,exp_rate=%s,addExp=%s'%(minuteExp, exp_rate, addExp))
    #PlayerBillboard.UpdateTJGBillboard(curPlayer, addExp)
    #脱机榜改为平均效率
    exp1 = curPlayer.NomalDictGetProperty(ChConfig.Def_PDictType_TJGNotify_Exp1, 0, ChConfig.Def_PDictType_TJGNotify)
    exp2 = curPlayer.NomalDictGetProperty(ChConfig.Def_PDictType_TJGNotify_Exp2, 0, ChConfig.Def_PDictType_TJGNotify)
    totalExp = exp2 * ChConfig.Def_PerPointValue + exp1
    aveMinuteExp = int(totalExp * 1.0 / max(1, times / 60)) # 平均每分钟经验
    GameWorld.DebugLog('    脱机效率榜  aveMinuteExp=%s, totalExp=%s,times=%s' % (aveMinuteExp, totalExp, times))
    PlayerBillboard.UpdateTJGBillboard(curPlayer, aveMinuteExp)
    
    sendPack = ChPyNetSendPack.tagMCTJGInfo()
    sendPack.Clear()
    sendPack.Exp1 = curPlayer.NomalDictGetProperty(ChConfig.Def_PDictType_TJGNotify_Exp1, 0, ChConfig.Def_PDictType_TJGNotify)
    sendPack.Exp2 = curPlayer.NomalDictGetProperty(ChConfig.Def_PDictType_TJGNotify_Exp2, 0, ChConfig.Def_PDictType_TJGNotify)
    sendPack.Exp1 = exp1
    sendPack.Exp2 = exp2
    sendPack.Times = times
    sendPack.PurpleEquip = curPlayer.NomalDictGetProperty(ChConfig.Def_PDictType_TJGNotify_Purple, 0, ChConfig.Def_PDictType_TJGNotify)
    sendPack.OrangeEquip = curPlayer.NomalDictGetProperty(ChConfig.Def_PDictType_TJGNotify_Orange, 0, ChConfig.Def_PDictType_TJGNotify)