From 1956f1507b2ea484795937551633ceea2f1fc0f4 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 29 五月 2019 17:33:14 +0800
Subject: [PATCH] 6501 新增活跃度任务接口

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py |   23 ++++++++++++++++++++++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py      |    2 +-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py           |    5 +++++
 3 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
index c91cae0..223b063 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
@@ -1971,6 +1971,11 @@
     RunQuestEvent(curPlayer, "activityaward", awardIndex, Def_RunQuestType_Normal)
     return
 
+def EventRespons_AddActivityValue(curPlayer):
+    # 增加活跃度
+    RunQuestEvent(curPlayer, "addactivity", "addactivity", Def_RunQuestType_Normal)
+    return
+
 def EventRespons_HorsePetBoss(curPlayer):
     #参加骑宠BOSS
     RunQuestEvent(curPlayer, "horsepetboss", 'horsepetboss', Def_RunQuestType_Normal)
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 dad99c3..adbd15b 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
@@ -7329,4 +7329,25 @@
 def ConditionType_Godweaponlv(curPlayer, curMission, curActionNode):
     lv = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
     weapontype = GameWorld.ToIntDef(curActionNode.GetAttribute("weapontype"), 0)
-    return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GodWeaponLV % weapontype) >= lv
\ No newline at end of file
+    return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GodWeaponLV % weapontype) >= lv
+
+##设置今日活跃度
+# @param curPlayer 玩家实例
+# @param curMission 任务实例
+# @param curActionNode节点信息
+# @return 返回值无意义
+# @remarks <Set_Dayactivity key=""/>
+def DoType_Set_Dayactivity(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_Activity_TotalPoint, 0))
+    return
+
+##今日活跃度判断
+# @param None
+# @return None <Check_Dayactivity value="活跃度"/>
+def ConditionType_Check_Dayactivity(curPlayer, curMission, curActionNode):
+    value = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
+    return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Activity_TotalPoint, 0) >= value
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 4342383..9423362 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -247,7 +247,7 @@
         __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint, curTotalPoint + addValue)
         AddCanCostActivityPoint(curPlayer, 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())
     return

--
Gitblit v1.8.0