From e988d6e02bd04309a806c0bdee99aad200f64e36 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 31 五月 2019 15:19:30 +0800
Subject: [PATCH] 6975 【2.0】【后端】日常界面调整(升级给活跃点)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py |    7 +++++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py     |   42 +++++++++++++++++++++++++-----------------
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py               |    3 +--
 ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py                                    |    3 +--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py      |    2 +-
 5 files changed, 33 insertions(+), 24 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index 0ed47d8..4566fe8 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -1462,8 +1462,7 @@
 DailyActionID_SkyTower, # 天星塔  23
 DailyActionID_HorsePetBoss, # 骑宠BOSS  24
 DailyActionID_FairyDomain, # 缥缈仙域  25
-DailyActionID_LVUP, # 玩家等级提升  26
-) = range(1, 26 + 1)
+) = range(1, 25 + 1)
 
 
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py
index c3b75c3..366af91 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py
@@ -36,9 +36,12 @@
     if not msgList:
         GameWorld.DebugAnswer(curPlayer, "AddFairyEvent 事件ID")
         return
-    fdEventIDList = msgList
+    maxEventCnt = PlayerFairyDomain.GetMaxEventCnt()  # 最大可出现事件个数
+    if len(msgList) > maxEventCnt:
+        GameWorld.DebugAnswer(curPlayer, "最大事件数量 %s"%maxEventCnt)
+    fdEventIDList = msgList[:maxEventCnt]
     openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
-    maxEventCnt = PlayerFairyDomain.GetMaxEventCnt() #最大可出现事件个数
+
     for i in xrange(maxEventCnt):
         prefdEventID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainEventID % i)
         if prefdEventID:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
index 6c060f5..6361c0c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -236,25 +236,33 @@
     __SetPDictValue(curPlayer, key, addPbCnt)
     
     #
-    multiple = 1
-    if addValue:
-        multiple, extraPointLimit = __GetActionAddPer(curPlayer)
-        curExtraPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint)
-        addExtraPoint = max(0, min(addValue * (multiple - 1), extraPointLimit - curExtraPoint)) if extraPointLimit else addValue * (multiple - 1)
-        __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint, curExtraPoint + addExtraPoint)
-        addValue = addValue + addExtraPoint
-        curTotalPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint)
-        __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint, curTotalPoint + addValue)
-        AddCanCostActivityPoint(curPlayer, addValue)
-        historyPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityHistoryPoint)
-        __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityHistoryPoint, min(ChConfig.Def_UpperLimit_DWord, historyPoint + addValue))
-
-        SyncDailyActivityInfo(curPlayer)
-        EventShell.EventRespons_AddActivityValue(curPlayer)
-        GameWorld.DebugLog("增加活跃度任务次数,activityNum=%s,addPbCnt=%s,addValue=%s, multiple=%s, addExtraPoint=%s,curExtraPoint=%s"  
-                           % (activityNum, addPbCnt, addValue, multiple, addExtraPoint, curExtraPoint), curPlayer.GetPlayerID())
+    DoAddActivity(curPlayer, addValue, True)
     return
 
+def DoAddActivity(curPlayer, addValue, isMultiple=False):
+    if not addValue:
+        return
+    if isMultiple:
+        multiple, extraPointLimit = __GetActionAddPer(curPlayer)
+        curExtraPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint)
+        addExtraPoint = max(0, min(addValue * (multiple - 1),
+                                   extraPointLimit - curExtraPoint)) if extraPointLimit else addValue * (multiple - 1)
+        __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint, curExtraPoint + addExtraPoint)
+        addValue = addValue + addExtraPoint
+    curTotalPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint)
+    __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint, curTotalPoint + addValue)
+    AddCanCostActivityPoint(curPlayer, addValue)
+    historyPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityHistoryPoint)
+    __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityHistoryPoint,
+                    min(ChConfig.Def_UpperLimit_DWord, historyPoint + addValue))
+
+    SyncDailyActivityInfo(curPlayer)
+    EventShell.EventRespons_AddActivityValue(curPlayer)
+    GameWorld.DebugLog(
+        "增加活跃度,addValue=%s, multiple=%s, addExtraPoint=%s,curExtraPoint=%s"
+        % (addValue, multiple, addExtraPoint, curExtraPoint), curPlayer.GetPlayerID())
+
+    return
 
 def __GetActionAddPer(curPlayer):
     multiple, extraPointLimit = 1, 0  #倍数、额外可获得修行点上限
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 1b03e96..5fd7c7e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -4040,7 +4040,7 @@
             if aftLV > befLV:
                 curPlayer.SetLV(aftLV, False) # 这里不再通知GameServer
                 PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_HeroLV, aftLV)
-                PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_LVUP, aftLV - befLV)
+                PlayerActivity.DoAddActivity(curPlayer, (aftLV - befLV)*IpyGameDataPY.GetFuncCfg('ImmortalDomainActivePoint',3))
             if aftFreePoint > befFreePoint:
                 curPlayer.SetFreePoint(aftFreePoint)
                 #NotifyCode(curPlayer, "ObtainAttributeDot", [aftFreePoint - befFreePoint])
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 0ed47d8..4566fe8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -1462,8 +1462,7 @@
 DailyActionID_SkyTower, # 天星塔  23
 DailyActionID_HorsePetBoss, # 骑宠BOSS  24
 DailyActionID_FairyDomain, # 缥缈仙域  25
-DailyActionID_LVUP, # 玩家等级提升  26
-) = range(1, 26 + 1)
+) = range(1, 25 + 1)
 
 
 

--
Gitblit v1.8.0