From 3430c7509dc69005f7532cbd20cb6617aa6a9bf3 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 31 五月 2019 10:13:13 +0800
Subject: [PATCH] 6501 活跃任务接口

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py |   22 ++++++++++++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py      |    3 +++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py                   |    1 +
 3 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 577cfcf..00ea4c5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3793,6 +3793,7 @@
 Def_PDict_Activity_FinishCnt = "Activity_FinishCnt_%s"  # 活跃度类型对应完成次数
 Def_PDict_Activity_TotalPoint = "Activity_TotalPoint"  # 当前总活跃值(不可消耗)
 Def_PDict_ActivityCanCostTotalPoint = "ActivityCanCostTotalPoint"  # 当前总活跃值(可消耗)
+Def_PDict_ActivityHistoryPoint = "ActivityHistoryPoint"  # 累积获得活跃值
 Def_PDict_ActivityAwardRecord = "ActivityAwardRecord"  # 活跃度奖励领取记录,按二进制位标识
 Def_PDict_Activity_AwardStage = "Activity_AwardStage"  # 当前活跃奖励阶段
 Def_PDict_Activity_RealmPoint = "Activity_RealmPoint"  # 当前可领修行点
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
index adbd15b..967c13b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -7351,3 +7351,25 @@
 def ConditionType_Check_Dayactivity(curPlayer, curMission, curActionNode):
     value = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
     return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Activity_TotalPoint, 0) >= value
+
+
+##设置历史活跃度
+# @param curPlayer 玩家实例
+# @param curMission 任务实例
+# @param curActionNode节点信息
+# @return 返回值无意义
+# @remarks <Set_Historyactivity key=""/>
+def DoType_Set_Historyactivity(curPlayer, curMission, curActionNode):
+    key = curActionNode.GetAttribute("key")
+    questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
+    if questID != 0:
+        curMission = curPlayer.FindMission(questID)
+    curMission.SetProperty(key, curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityHistoryPoint, 0))
+    return
+
+##历史活跃度判断
+# @param None
+# @return None <Check_Historyactivity value="活跃度"/>
+def ConditionType_Check_Historyactivity(curPlayer, curMission, curActionNode):
+    value = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
+    return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityHistoryPoint, 0) >= value
\ No newline at end of file
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 9423362..6c060f5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -246,6 +246,9 @@
         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"  

--
Gitblit v1.8.0