From e268dd1de7fdda3ccbe24880ebd6d60be2debb47 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 12 七月 2024 19:03:00 +0800
Subject: [PATCH] 10202 【越南】【香港】【主干】【砍树】聚魂(增加聚魂战令6; 增加战令GM命令: Zhanling)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py | 6 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherTheSoul.py | 12 ++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Zhanling.py | 72 ++++++++++++++++++++++++++++++++++++
3 files changed, 89 insertions(+), 1 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Zhanling.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Zhanling.py
new file mode 100644
index 0000000..617c3c7
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Zhanling.py
@@ -0,0 +1,72 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#-------------------------------------------------------------------------------
+#
+##@package GM.Commands.Zhanling
+#
+# @todo:战令
+# @author hxp
+# @date 2024-07-12
+# @version 1.0
+#
+# 详细描述: 战令
+#
+#-------------------------------------------------------------------------------
+#"""Version = 2024-07-12 19:00"""
+#-------------------------------------------------------------------------------
+
+import ChConfig
+import PlayerControl
+import PlayerZhanling
+import GameWorld
+
+#---------------------------------------------------------------------
+#逻辑实现
+
+## GM命令执行入口
+# @param curPlayer 当前玩家
+# @param msgList 参数列表
+# @return None
+# @remarks 函数详细说明.
+def OnExec(curPlayer, msgList):
+
+ if not msgList:
+ GameWorld.DebugAnswer(curPlayer, "重置奖励: Zhanling 0 类型")
+ GameWorld.DebugAnswer(curPlayer, "设置战令: Zhanling 类型 是否激活普通 高级")
+ return
+
+ value = msgList[0]
+ if value == 0:
+ zhanlingType = msgList[1] if len(msgList) > 1 else 1
+ for keyNum in range(10):
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingReward % (zhanlingType, keyNum), 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingRewardH % (zhanlingType, keyNum), 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingRewardFree % (zhanlingType, keyNum), 0)
+
+ PlayerZhanling.SyncZhanlingInfo(curPlayer, zhanlingType)
+ GameWorld.DebugAnswer(curPlayer, "重置战令(%s)奖励!" % (zhanlingType))
+
+ else:
+ zhanlingType = value
+ activiteC = msgList[1] if len(msgList) > 1 else 0
+ activiteH = msgList[2] if len(msgList) > 2 else 0
+ state = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhanlingState)
+ if activiteC:
+ updState = state|pow(2, zhanlingType)
+ else:
+ updState = state&(pow(2, 31 + 1) - 1 - pow(2, zhanlingType))
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingState, updState)
+
+ state = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhanlingStateH)
+ if activiteH:
+ updState = state|pow(2, zhanlingType)
+ else:
+ updState = state&(pow(2, 31 + 1) - 1 - pow(2, zhanlingType))
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingStateH, updState)
+
+ PlayerZhanling.SyncZhanlingInfo(curPlayer, zhanlingType)
+ GameWorld.DebugAnswer(curPlayer, "设置战令类型:%s 普通:%s 高级:%s" % (zhanlingType, activiteC, activiteH))
+
+ return
+
+
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherTheSoul.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherTheSoul.py
index fe0f05a..4411e59 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherTheSoul.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherTheSoul.py
@@ -169,6 +169,18 @@
RefreshGatherTheSoulAttr(curPlayer, True)
return
+def GetGatherTheSoulTotalLV(curPlayer):
+ totalSoulLV = 0
+ ipyDataMgr = IpyGameDataPY.IPY_Data()
+ for index in range(ipyDataMgr.GetGatherTheSoulCount()):
+ ipyData = ipyDataMgr.GetGatherTheSoulByIndex(index)
+ soulID = ipyData.GetSoulID()
+ soulLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GatherTheSoulLV % soulID)
+ if not soulLV:
+ continue
+ totalSoulLV += soulLV
+ return totalSoulLV
+
def GetHoleSoulColorCount(curPlayer, soulColor, isDownward):
## 获取镶嵌聚魂品质个数
colorCount = 0
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py
index 3662208..bf33463 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py
@@ -20,6 +20,7 @@
import IpyGameDataPY
import PlayerControl
import ChPyNetSendPack
+import PlayerGatherTheSoul
import ItemControler
import IPY_GameWorld
import PlayerGubao
@@ -33,7 +34,8 @@
ZhanlingType_SkyTower,
ZhanlingType_GubaoStar,
ZhanlingType_Login,
-) = range(1, 1 + 5)
+ZhanlingType_GatherTheSoulLV,
+) = range(1, 1 + 6)
def OnPlayerLogin(curPlayer):
for zhanlingType in ZhanlingTypeList:
@@ -103,6 +105,8 @@
if not firstLoginTime:
return
curValue = GameWorld.GetDiff_Day(int(time.time()), firstLoginTime) + 1
+ elif zhanlingType == ZhanlingType_GatherTheSoulLV:
+ curValue = PlayerGatherTheSoul.GetGatherTheSoulTotalLV(curPlayer)
else:
return
--
Gitblit v1.8.0