From 64a00ad79dbdf44eebca167038a0a278a75a6667 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 27 五月 2019 19:18:06 +0800
Subject: [PATCH] 6844 【2.0】【后端】缥缈仙域优化

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

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 8148b50..4342383 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -245,8 +245,7 @@
         addValue = addValue + addExtraPoint
         curTotalPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint)
         __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint, curTotalPoint + addValue)
-        #realmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint)
-        #__SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint, realmPoint+addValue)
+        AddCanCostActivityPoint(curPlayer, addValue)
         SyncDailyActivityInfo(curPlayer)
         
         GameWorld.DebugLog("增加活跃度任务次数,activityNum=%s,addPbCnt=%s,addValue=%s, multiple=%s, addExtraPoint=%s,curExtraPoint=%s"  
@@ -268,6 +267,21 @@
         return multiple, extraPointLimit
     return actRealmPointIpyData.GetMultiple(), actRealmPointIpyData.GetPointLimit()
 
+def AddCanCostActivityPoint(curPlayer, addValue):
+    # 增加可消耗的活跃点
+    curPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint)
+    __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint, min(IpyGameDataPY.GetFuncCfg('ImmortalDomainActivePoint'), curPoint + addValue))
+    return
+
+def CostActivityPoint(curPlayer, costPoint):
+    # 消耗活跃点
+    curPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint)
+    if curPoint < costPoint:
+        return
+    __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint,
+                    curPoint - costPoint)
+    SyncDailyActivityInfo(curPlayer)
+    return True
 
 ## 同步活跃度信息
 #  @param curPlayer
@@ -279,7 +293,7 @@
     sendPack.CurValue = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint)
     sendPack.StageIndex = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_AwardStage)
     sendPack.AwardRecord = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityAwardRecord)
-    sendPack.RealmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint)
+    sendPack.RealmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint)
     sendPack.ExtraPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint)
     NetPackCommon.SendFakePack(curPlayer, sendPack)
     return

--
Gitblit v1.8.0