From 14ec5b7075fc87facf9b54ddf8e9320b6811099e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 18 七月 2019 17:53:58 +0800
Subject: [PATCH] 4546 【主干】灵宠获得活跃突破3000后再次获得会变重置成3000点(增加加活跃值GM命令 AddActivity)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py   |    1 +
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddActivity.py |   36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddActivity.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddActivity.py
new file mode 100644
index 0000000..a95d716
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddActivity.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#-------------------------------------------------------------------------------
+#
+##@package GM.Commands.AddActivity
+#
+# @todo:增加活跃度
+# @author hxp
+# @date 2019-07-18
+# @version 1.0
+#
+# 详细描述: 增加活跃度
+#
+#-------------------------------------------------------------------------------
+#"""Version = 2019-07-18 18:00"""
+#-------------------------------------------------------------------------------
+
+import GameWorld
+import PlayerActivity
+
+#逻辑实现
+## GM命令执行入口
+#  @param curPlayer 当前玩家
+#  @param msgList 参数列表 [npcID]
+#  @return None
+#  @remarks 函数详细说明.
+def OnExec(curPlayer, msgList):
+    
+    if not msgList:
+        GameWorld.DebugAnswer(curPlayer, "AddActivity 增加活跃度 是否可溢出")
+        return
+    addValue = msgList[0]
+    isLVUp = msgList[1] if len(msgList) > 1 else 0
+    PlayerActivity.DoAddActivity(curPlayer, addValue, isLVUp=isLVUp)
+    return
+
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 643f751..abd8c8b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -313,6 +313,7 @@
     else:
         maxPoint = IpyGameDataPY.GetFuncCfg('ImmortalDomainActivePoint', 1)
         if maxPoint and curPoint >= maxPoint:
+            GameWorld.DebugLog("可消耗的活跃点超出上限,不增加! curPoint=%s,maxPoint=%s" % (curPoint, maxPoint))
             return
         updPoint = curPoint + addValue
     __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint, updPoint)

--
Gitblit v1.8.0