From 4ad6cadee50d0267dec17876e4b8bce9bebe0bb6 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 28 四月 2021 18:48:24 +0800
Subject: [PATCH] 8912 【主干】【BT2】【后端】跨服PVP逻辑优化(1.X局内无法再次匹配同一玩家 2.优化超时匹配逻辑 3.优化匹配段位差 4.增加连输X局必连续匹配Y局机器人);
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearInvest.py | 37 ++++++++++++++++++++++---------------
1 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearInvest.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearInvest.py
index 3747330..7621542 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearInvest.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearInvest.py
@@ -20,6 +20,7 @@
import PlayerControl
import GameWorld
#---------------------------------------------------------------------
+
#逻辑实现
## GM命令执行入口
# @param curPlayer 当前玩家
@@ -27,22 +28,28 @@
# @return None
# @remarks 函数详细说明.
def OnExec(curPlayer, msgList):
- GameWorld.DebugAnswer(curPlayer, "ClearInvest 投资类型(不写则全部重置)")
- investTypeList = [msgList[0]] if msgList else ChConfig.GoldInvestTypeList
- for itype in investTypeList:
- valueKey = ChConfig.Def_PDict_GoldInvest_Time % itype
- PlayerControl.NomalDictSetProperty(curPlayer, valueKey, 0, ChConfig.Def_PDictType_GoldInvest)
-
- valueKey = ChConfig.Def_PDict_GoldInvest_Gold % itype
- PlayerControl.NomalDictSetProperty(curPlayer, valueKey, 0, ChConfig.Def_PDictType_GoldInvest)
-
- valueKey = ChConfig.Def_PDict_GoldInvest_AwardData % itype
- PlayerControl.NomalDictSetProperty(curPlayer, valueKey, 0, ChConfig.Def_PDictType_GoldInvest)
- for i in range(1, 32):
- valueKey = ChConfig.Def_PDict_GoldInvest_GotRewardValue % (itype, i)
- PlayerControl.NomalDictSetProperty(curPlayer, valueKey, 0, ChConfig.Def_PDictType_GoldInvest)
- PlayerGoldInvest.Sync_GoldInvestInfo(curPlayer, itype, isForce=True)
+ if not msgList:
+ GameWorld.DebugAnswer(curPlayer, "重置所有投资: ClearInvest 0")
+ GameWorld.DebugAnswer(curPlayer, "重置指定投资: ClearInvest 类型")
+ GameWorld.DebugAnswer(curPlayer, "类型:7-永久卡;8-周卡;9-登录卡;10-等级卡;11-boss卡;")
+ return
+
+ investType = msgList[0]
+ if not investType:
+ investTypeList = ChConfig.InvestTypeList
+ elif investType not in ChConfig.InvestTypeList:
+ GameWorld.DebugAnswer(curPlayer, "不存在该投资类型!")
+ return
+ else:
+ investTypeList = [investType]
+
+ for itype in investTypeList:
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestTime % itype, 0)
+ for keyNum in range(ChConfig.Def_PDict_InvestKeyCount):
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestReward % (itype, keyNum), 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestProgress % (itype, keyNum), 0)
+ PlayerGoldInvest.Sync_InvestInfo(curPlayer, itype)
return
--
Gitblit v1.8.0