From 57da8c718c4a2bc0c370c59251a7cfb70b1b2c52 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 27 十一月 2025 18:18:24 +0800
Subject: [PATCH] 92 【主界面】主线任务-服务端(增加任务类型21 - 武将图鉴激活x个)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py | 16 ++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py | 4 ++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Task.py | 1 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 3 ++-
4 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index c380d6b..39a115b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -5118,7 +5118,8 @@
TaskType_ReqOrJoinFamily, # 创建或者申请加入公会 18
TaskType_FBTianzi, # 挑战天子的考验x次 19
TaskType_Rename, # 改名 20
-) = range(1, 1 + 20)
+TaskType_HeroBook, # 武将图鉴激活x个 21
+) = range(1, 1 + 21)
# 任务分组
TaskGroupList = (
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Task.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Task.py
index f9e8542..50e7de0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Task.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Task.py
@@ -62,6 +62,7 @@
curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TaskValue % taskGroup)
GameWorld.DebugAnswer(curPlayer, "设置任务ID:%s 进度:%s/%s" % (taskID, curValue, needValue))
+ PlayerTask.SyncTaskInfo(curPlayer, [taskGroup])
return
def __ShowTask(curPlayer):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py
index 420847f..0b32d31 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py
@@ -1062,6 +1062,20 @@
__doHeroBookAct(curPlayer, heroID)
return
+def GetHeroBookActCnt(curPlayer):
+ ## 获取武将图鉴已激活数量
+ bookCnt = 0
+ ipyDataMgr = IpyGameDataPY.IPY_Data()
+ for index in range(ipyDataMgr.GetHeroCount()):
+ ipyData = ipyDataMgr.GetHeroByIndex(index)
+ heroID = ipyData.GetHeroID()
+ if not ipyData.GetPlayerCanUse():
+ continue
+ if not GetHeroBookInitState(curPlayer, heroID):
+ continue
+ bookCnt += 1
+ return bookCnt
+
def __doHeroBookAct(curPlayer, heroID):
## 图鉴激活
playerID = curPlayer.GetPlayerID()
@@ -1090,6 +1104,8 @@
Sync_HeroInfo(curPlayer, [heroID])
RefreshLordAttr(curPlayer)
+
+ PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_HeroBook)
return
def __doHeroBookStarLVUP(curPlayer, heroID):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
index 2cf1796..ca053c1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
@@ -25,6 +25,7 @@
import IPY_GameWorld
import GameFuncComm
import ShareDefine
+import PlayerHero
import ChConfig
import FBCommon
@@ -183,6 +184,9 @@
elif taskType == ChConfig.TaskType_RealmLV:
taskValue = curPlayer.GetOfficialRank()
+ elif taskType == ChConfig.TaskType_HeroBook:
+ taskValue = PlayerHero.GetHeroBookActCnt(curPlayer)
+
elif taskType == ChConfig.TaskType_EquipColor:
if not conds:
return 0
--
Gitblit v1.8.0