From ba67d86ccc7dde96a4fe2bb2ae3abfbd0aacc561 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 03 十一月 2025 12:00:10 +0800
Subject: [PATCH] 237 【福利内容】每日任务/每周任务/章节奖励-服务端(增加每日任务类型 6 ~ 10)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py | 4 ++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Zhanchui.py | 1 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py | 3 ++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 4 +++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 7 ++++++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py | 6 ++++--
6 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 596984a..38e0459 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -5234,7 +5234,12 @@
DailyTask_HeroCall, # 武将招募 3
DailyTask_Arena, # 演武场 4
DailyTask_GoldRush, # 淘金 5
-) = range(1, 1 + 5)
+DailyTask_CutTree, # 消耗X个战锤 6
+DailyTask_HeroLVUP, # 武将升级x次 7
+DailyTask_HeroStarUP, # 武将升星x次 8
+DailyTask_GetMoney, # 获得货币x个 9
+DailyTask_FBFinish, # 完成副本x次 10
+) = range(1, 1 + 10)
# 任务类型定义
TaskTypeList = (
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
index 4834940..7c37ebe 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -18,6 +18,7 @@
import ItemCommon
import NPCCommon
import ReadChConfig
+import PlayerActivity
import ChPyNetSendPack
import NetPackCommon
import IpyGameDataPY
@@ -1531,7 +1532,7 @@
def AddEnterFBCount(curPlayer, fbID, addCount=1, lineBit=-1, isFree=False):
## 增加玩家进入副本次数
## @param isFree: 是否免费进入的,免费的不增加实际进入次数,但需要触发进入次数额外处理,如活跃、成就等
- #addCountEx = addCount
+ addCountEx = addCount
addCount = 0 if isFree else addCount
fbID = GetRecordMapID(fbID)
enterCntKey = ChConfig.Def_Player_Dict_FbEnterCnt % fbID
@@ -1543,12 +1544,13 @@
PlayerControl.NomalDictSetProperty(curPlayer, enterCntKey, updValue)
else:
maxCnt = GetEnterFBMaxCnt(curPlayer, fbID)
- if enterCnt >= maxCnt:
+ if not isFree and enterCnt >= maxCnt:
return False
updCnt = min(maxCnt, enterCnt + addCount)
addCount = updCnt-enterCnt
PlayerControl.NomalDictSetProperty(curPlayer, enterCntKey, updCnt)
+ PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_FBFinish, addCountEx, [fbID])
updValue = updCnt
GameWorld.DebugLog(" AddEnterFBCount fbID=%s, addCount=%s, lineBit=%s, enterCnt=%s,updValue=%s"
% (fbID, addCount, lineBit, enterCnt, updValue), curPlayer.GetPlayerID())
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Zhanchui.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Zhanchui.py
index 426a4bf..8d6271e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Zhanchui.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Zhanchui.py
@@ -46,6 +46,7 @@
itemList = FBCommon.GetPassAwardList(mapID, funcLineID)
GameWorld.DebugLog("过关奖励: mapID=%s,funcLineID=%s,itemList=%s" % (mapID, funcLineID, itemList))
# 首通不扣次数
+ FBCommon.AddEnterFBCount(curPlayer, mapID, isFree=True)
FBCommon.SetFBPass(curPlayer, mapID, funcLineID)
ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["Zhanchui", False, {}], isNotifyAward=False)
overMsg.update({FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(itemList)})
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
index f9ea573..18a3e8b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -78,7 +78,8 @@
taskConds = ipyData.GetTaskConds()
if conds or taskConds:
# 可按任务类型扩展不同的条件验证方式
- if taskConds != conds:
+ if taskConds != tuple(conds):
+ #GameWorld.DebugLog("条件不同taskConds=%s,conds=%s" % (taskConds, conds))
continue
needValue = ipyData.GetNeedValue()
maxValue = max(maxValue, needValue)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 8202e9c..398b274 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -53,6 +53,7 @@
import PlayerGoldInvest
import CrossRealmPlayer
import CrossPlayerData
+import PlayerActivity
import ChNetSendPack
import PlayerState
import PlayerOnline
@@ -2801,7 +2802,7 @@
PlayerLLMJ.AddUseZhanchui(curPlayer, price)
PlayerPrestigeSys.AddRealmTaskValue(curPlayer, PlayerPrestigeSys.RealmTaskType_UseXiantao, price)
PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_CutTree, price)
-
+ PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_CutTree, price)
unitPrice = price if quantity == 1 else int(math.ceil(price * 1.0 / quantity)) # 单价
#reason_name = "Unknown" if not costType else costType
@@ -3059,6 +3060,7 @@
# 除钻石及绑钻外,未指定操作类型的不记录
PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_GetMoney, value, [priceType])
+ PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_GetMoney, value, [priceType])
if priceType == ShareDefine.TYPE_Price_FamilyCoin:
PlayerFamily.AddFamilyContrib(curPlayer, value) # 公会币同步增加公会贡献
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 935a97b..d429bc5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py
@@ -21,6 +21,7 @@
import IPY_GameWorld
import ItemControler
import ChPyNetSendPack
+import PlayerActivity
import NetPackCommon
import PlayerControl
import PlayerOnline
@@ -350,6 +351,8 @@
heroItem.SetUserAttr(ShareDefine.Def_IudetHeroLV, updHeroLV)
PlayerOnline.GetOnlinePlayer(curPlayer).OnHeroItemUpate([itemIndex])
+
+ PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_HeroLVUP, 1)
return
def GetHeroLVMax(heroItem):
@@ -468,6 +471,7 @@
item.SetUserAttr(ShareDefine.Def_IudetHeroStar, updStar)
if addStar > 0:
__DoHeroStarTalentUp(item, addStar)
+ PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_HeroStarUP, addStar)
if isSync:
heroItem.Sync_Item()
--
Gitblit v1.8.0