From faa3ba8a847f33ec0844f6b0b0b2937847a6435c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 11 十一月 2019 16:32:10 +0800
Subject: [PATCH] 1111 脱机榜改为平均每分钟获得经验
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py
index 6947e77..2af8646 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py
+++ b/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)
--
Gitblit v1.8.0