4546 【主干】灵宠获得活跃突破3000后再次获得会变重置成3000点(增加加活跃值GM命令 AddActivity)
New file |
| | |
| | | #!/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
|
| | |
|
| | |
| | | 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)
|