4546 【主干】灵宠获得活跃突破3000后再次获得会变重置成3000点(增加加活跃值GM命令 AddActivity)
1个文件已修改
1个文件已添加
37 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddActivity.py 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddActivity.py
New file
@@ -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
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)