From 3bc2e9aae7e595d5be896a9db4c909b76fa6f5be Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 11 七月 2025 14:16:29 +0800
Subject: [PATCH] 0312 物品叠加数量支持配置DWORD
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Hero.py | 37 ++++++++++++++++++++-----------------
1 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Hero.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Hero.py
index cb4faeb..302bd9d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Hero.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Hero.py
@@ -18,6 +18,7 @@
import PlayerHero
import ShareDefine
import IpyGameDataPY
+import PlayerControl
import GameWorld
import ChConfig
@@ -34,7 +35,7 @@
GameWorld.DebugAnswer(curPlayer, "武将升星: Hero s 背包位置 升x星")
GameWorld.DebugAnswer(curPlayer, "武将突破: Hero b 背包位置 设置等级")
GameWorld.DebugAnswer(curPlayer, "武将觉醒: Hero a 背包位置 设置等级")
- GameWorld.DebugAnswer(curPlayer, "武将图鉴: Hero t 武将ID 是否激活")
+ GameWorld.DebugAnswer(curPlayer, "武将图鉴: Hero t 武将ID 图鉴星级 图鉴突破等级")
GameWorld.DebugAnswer(curPlayer, "重置图鉴: Hero t 0")
GameWorld.DebugAnswer(curPlayer, "武将皮肤: Hero sk 武将ID 皮肤索引 是否解锁")
GameWorld.DebugAnswer(curPlayer, "清空武将: ClearPack 35")
@@ -46,7 +47,6 @@
# 图鉴
if value == "t":
- isAct = 0
if not value2:
heroIDList = []
ipyDataMgr = IpyGameDataPY.IPY_Data()
@@ -54,25 +54,28 @@
ipyData = ipyDataMgr.GetHeroByIndex(index)
heroIDList.append(ipyData.GetHeroID())
else:
- isAct = msgList[2] if len(msgList) > 2 else 0
heroIDList = [value2]
-
- syncHeroIDList = []
- for heroID in heroIDList:
- heroIpyData = IpyGameDataPY.GetIpyGameData("Hero", heroID)
- if not heroIpyData:
- continue
- heroIndex = heroIpyData.GetHeroIndex()
- if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_HeroActState, heroIndex) == isAct:
- continue
- GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_HeroActState, heroIndex, isAct)
- syncHeroIDList.append(heroID)
- PlayerHero.Sync_HeroInfo(curPlayer, syncHeroIDList)
- if not value2:
+ if value2 == 0:
+ syncHeroIDList = []
+ for heroID in heroIDList:
+ if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HeroBook % heroID):
+ continue
+ syncHeroIDList.append(heroID)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HeroBook % heroID, 0)
GameWorld.DebugAnswer(curPlayer, "重置图鉴OK!")
else:
- GameWorld.DebugAnswer(curPlayer, "设置武将(%s),激活(%s)" % (value2, isAct))
+ heroID = value2
+ syncHeroIDList = [heroID]
+ bookStarLV = msgList[2] if len(msgList) > 2 else 0
+ bookBreakLV = msgList[3] if len(msgList) > 3 else 0
+ if (bookStarLV or bookStarLV) and not PlayerHero.GetHeroBookInitState(curPlayer, heroID):
+ PlayerHero.SetHeroBookInitState(curPlayer, heroID, 1)
+ PlayerHero.SetHeroBookStarLV(curPlayer, heroID, bookStarLV)
+ PlayerHero.SetHeroBookBreakLV(curPlayer, heroID, bookBreakLV)
+ GameWorld.DebugAnswer(curPlayer, "设置武将(%s)图鉴星级(%s),突破(%s)" % (heroID, bookStarLV, bookBreakLV))
+
+ PlayerHero.Sync_HeroInfo(curPlayer, syncHeroIDList)
return
# 皮肤
--
Gitblit v1.8.0