From d6ca382aeaa393f34fe15b64349dc8ddb90e9438 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 05 二月 2021 19:22:16 +0800
Subject: [PATCH] 8813 【主干】【后端】七日巡礼:任务调整(任务隔天可触发;增加事件传功、升星、强化);
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py | 2 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py | 2 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py | 70 ++++++++++++++++++----------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py | 2 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 5 ++
5 files changed, 47 insertions(+), 34 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 96da909..31dadec 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -5479,7 +5479,10 @@
Def_WPAct_Pray, #祈愿 27
Def_WPAct_FamilyBoss, #仙盟Boss 28
Def_WPAct_FairyDomain, #缥缈仙域 29
-) = range(1, 29+1)
+Def_WPAct_Plus, #强化 30
+Def_WPAct_Star, #升星 31
+Def_WPAct_FamilyChuanGong, #传功 32
+) = range(1, 32+1)
#登录奖励活动定义
LoginAwardActIDList = (
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
index 672fbf9..b4b1147 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
@@ -35,6 +35,7 @@
import EventShell
import ChPyNetSendPack
import NetPackCommon
+import PlayerWeekParty
#-------------------------------------------------------------------------------------------
#===============================================================================
@@ -153,6 +154,7 @@
ChEquip.NotifyEquipPartPlusLV(curPlayer, packType, index)
PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_EquipPlus)
PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_EquipPlus, 1)
+ PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Plus, 1)
return
def __EquipMayaPlusChange(curPlayer, packType, curEquip, index, updPlusLV):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py
index d664808..24ea1be 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py
@@ -23,6 +23,7 @@
import IPY_GameWorld
import DataRecordPack
import PlayerAuctionHouse
+import PlayerWeekParty
import IpyGameDataPY
import PlayerSuccess
import GameWorld
@@ -200,6 +201,7 @@
msgParamList = [curPlayer.GetPlayerName(), itemID, userData, guid, updPartStar]
PlayerControl.WorldNotify(0, "StarLevelUp", msgParamList)
+ PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Star, 1)
return
def __CheckCostInfo(curPlayer, classLV, equipPlace, curPartStar, costEquipIndexList, costEquipIDList, itemPack, isAutoBuy):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py
index 32c453f..4850e89 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py
@@ -35,6 +35,7 @@
import Item_AddLV
import PlayerTalk
import PlayerActivity
+import PlayerWeekParty
#---战盟副本---
FBPlayerDict_TagPlayerID = 'XMYH_TagPlayerID%s' # 邀请传功目标玩家ID
@@ -464,6 +465,7 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyPartySitState, 1)
PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_FamilyChuanGong)
+ PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_FamilyChuanGong, 1)
DoFBHelp(curPlayer, 0)
#帮助传功奖励
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py
index 5d56d19..e776975 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py
@@ -163,42 +163,46 @@
dayIndex = actWeekPartyInfo.get(ShareDefine.ActKey_DayIndex, 0)
if dayIndex >= len(templateIDList):
return
-
- dayTidList = templateIDList[dayIndex]
- findTidList = []
- for tid in dayTidList:
- if tid / 100 == actionID:
- findTidList.append(tid)
- if not findTidList:
- return
- for findTid in findTidList:
- ipyData = IpyGameDataPY.GetIpyGameData('WeekParty', findTid)
- if not ipyData:
+ if actionID in [ChConfig.Def_WPAct_Login]:
+ addDayIndexList = [dayIndex]
+ else:
+ addDayIndexList = range(dayIndex + 1)
+ for dayIndex in addDayIndexList:
+ dayTidList = templateIDList[dayIndex]
+ findTidList = []
+ for tid in dayTidList:
+ if tid / 100 == actionID:
+ findTidList.append(tid)
+ if not findTidList:
continue
- totalTimes = ipyData.GetTotalTimes()
- curTimes = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyCurTimes % (dayIndex, findTid), 0, ChConfig.Def_PDictType_WeekParty)
- if isAdd:
- curAddCnt = addCnt if totalTimes == 0 else min(totalTimes - curTimes, addCnt)
- if curAddCnt <= 0:
+ for findTid in findTidList:
+ ipyData = IpyGameDataPY.GetIpyGameData('WeekParty', findTid)
+ if not ipyData:
continue
- updTimes = curTimes + curAddCnt
- else:
- if not isCompatible and addCnt != totalTimes:
+ totalTimes = ipyData.GetTotalTimes()
+ curTimes = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyCurTimes % (dayIndex, findTid), 0, ChConfig.Def_PDictType_WeekParty)
+ if isAdd:
+ curAddCnt = addCnt if totalTimes == 0 else min(totalTimes - curTimes, addCnt)
+ if curAddCnt <= 0:
+ continue
+ updTimes = curTimes + curAddCnt
+ else:
+ if not isCompatible and addCnt != totalTimes:
+ continue
+ updTimes = min(addCnt, totalTimes)
+ realAddCnt = updTimes - curTimes
+ if realAddCnt <= 0:
continue
- updTimes = min(addCnt, totalTimes)
- realAddCnt = updTimes - curTimes
- if realAddCnt <= 0:
- continue
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyCurTimes % (dayIndex, findTid), updTimes, ChConfig.Def_PDictType_WeekParty)
- #加积分
- singleTimes = ipyData.GetSingleTimes()
- addPoint = (curTimes % singleTimes + realAddCnt) / singleTimes * ipyData.GetPoint()
- curPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyPoint % dayIndex, 0, ChConfig.Def_PDictType_WeekParty)
- updPoint = curPoint + addPoint
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyPoint % dayIndex, updPoint, ChConfig.Def_PDictType_WeekParty)
- GameWorld.DebugLog(' 增加周狂欢相关活动完成次数 dayIndex=%s, findTid=%s, realAddCnt=%s,addPoint=%s' % (dayIndex, findTid, realAddCnt, addPoint))
- if isSync:
- SyncWeekPartyPlayerInfo(curPlayer, dayIndex, findTid)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyCurTimes % (dayIndex, findTid), updTimes, ChConfig.Def_PDictType_WeekParty)
+ #加积分
+ singleTimes = ipyData.GetSingleTimes()
+ addPoint = (curTimes % singleTimes + realAddCnt) / singleTimes * ipyData.GetPoint()
+ curPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyPoint % dayIndex, 0, ChConfig.Def_PDictType_WeekParty)
+ updPoint = curPoint + addPoint
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyPoint % dayIndex, updPoint, ChConfig.Def_PDictType_WeekParty)
+ GameWorld.DebugLog(' 增加周狂欢相关活动完成次数 dayIndex=%s, findTid=%s, curTimes=%s, updTimes=%s, realAddCnt=%s,addPoint=%s' % (dayIndex, findTid, curTimes, updTimes, realAddCnt, addPoint))
+ if isSync:
+ SyncWeekPartyPlayerInfo(curPlayer, dayIndex, findTid)
return True
def CheckWeekPartyActionCnt(curPlayer, isSync):
--
Gitblit v1.8.0