From f020649c241123c91520a7416be43f5ebfa6d6f9 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 11 十二月 2024 15:01:39 +0800
Subject: [PATCH] 10297 【越南】【英语】【砍树】【tqxbqy】轮回殿-服务端(轮回殿活动时间表增加配置轮回类型对应的CTGID跟商店类型)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py | 2 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLunhuidian.py | 18 +++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 28 +++++++++++++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 6 ++
PySysDB/PySysDBPY.h | 2 +
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 28 +++++++++++++-
6 files changed, 79 insertions(+), 5 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index e5728ef..664a536 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -2727,6 +2727,8 @@
WORD LVLimit; //限制等级
BYTE ResetType; //重置类型,0-0点重置;1-5点重置
dict RoundSetInfo; //开放轮回设定
+ dict RoundCTGIDInfo; //轮回类型对应充值ID列表
+ dict RoundShopTypeInfo; //轮回类型对应商店类型
};
//轮回殿活动奖励表
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index d937fc0..c02243e 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -38691,6 +38691,9 @@
RoundMax = 0 #(BYTE RoundMax)// 最大可循环轮次
AwardCount = 0 #(BYTE AwardCount)
AwardList = list() #(vector<tagMCActLunhuidianAward> AwardList)// 每轮奖励列表
+ CTGIDCount = 0 #(BYTE CTGIDCount)
+ CTGIDList = list() #(vector<WORD> CTGIDList)// CTGID列表
+ ShopType = 0 #(WORD ShopType)// 开放商店类型,可能为0不开放
data = None
def __init__(self):
@@ -38708,6 +38711,11 @@
temAwardList = tagMCActLunhuidianAward()
_pos = temAwardList.ReadData(_lpData, _pos)
self.AwardList.append(temAwardList)
+ self.CTGIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.CTGIDCount):
+ value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+ self.CTGIDList.append(value)
+ self.ShopType,_pos = CommFunc.ReadWORD(_lpData, _pos)
return _pos
def Clear(self):
@@ -38717,6 +38725,9 @@
self.RoundMax = 0
self.AwardCount = 0
self.AwardList = list()
+ self.CTGIDCount = 0
+ self.CTGIDList = list()
+ self.ShopType = 0
return
def GetLength(self):
@@ -38728,6 +38739,9 @@
length += 1
for i in range(self.AwardCount):
length += self.AwardList[i].GetLength()
+ length += 1
+ length += 2 * self.CTGIDCount
+ length += 2
return length
@@ -38740,6 +38754,10 @@
data = CommFunc.WriteBYTE(data, self.AwardCount)
for i in range(self.AwardCount):
data = CommFunc.WriteString(data, self.AwardList[i].GetLength(), self.AwardList[i].GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.CTGIDCount)
+ for i in range(self.CTGIDCount):
+ data = CommFunc.WriteWORD(data, self.CTGIDList[i])
+ data = CommFunc.WriteWORD(data, self.ShopType)
return data
def OutputString(self):
@@ -38749,7 +38767,10 @@
AwardTypeValue:%d,
RoundMax:%d,
AwardCount:%d,
- AwardList:%s
+ AwardList:%s,
+ CTGIDCount:%d,
+ CTGIDList:%s,
+ ShopType:%d
'''\
%(
self.RoundType,
@@ -38757,7 +38778,10 @@
self.AwardTypeValue,
self.RoundMax,
self.AwardCount,
- "..."
+ "...",
+ self.CTGIDCount,
+ "...",
+ self.ShopType
)
return DumpString
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index d937fc0..c02243e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -38691,6 +38691,9 @@
RoundMax = 0 #(BYTE RoundMax)// 最大可循环轮次
AwardCount = 0 #(BYTE AwardCount)
AwardList = list() #(vector<tagMCActLunhuidianAward> AwardList)// 每轮奖励列表
+ CTGIDCount = 0 #(BYTE CTGIDCount)
+ CTGIDList = list() #(vector<WORD> CTGIDList)// CTGID列表
+ ShopType = 0 #(WORD ShopType)// 开放商店类型,可能为0不开放
data = None
def __init__(self):
@@ -38708,6 +38711,11 @@
temAwardList = tagMCActLunhuidianAward()
_pos = temAwardList.ReadData(_lpData, _pos)
self.AwardList.append(temAwardList)
+ self.CTGIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.CTGIDCount):
+ value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+ self.CTGIDList.append(value)
+ self.ShopType,_pos = CommFunc.ReadWORD(_lpData, _pos)
return _pos
def Clear(self):
@@ -38717,6 +38725,9 @@
self.RoundMax = 0
self.AwardCount = 0
self.AwardList = list()
+ self.CTGIDCount = 0
+ self.CTGIDList = list()
+ self.ShopType = 0
return
def GetLength(self):
@@ -38728,6 +38739,9 @@
length += 1
for i in range(self.AwardCount):
length += self.AwardList[i].GetLength()
+ length += 1
+ length += 2 * self.CTGIDCount
+ length += 2
return length
@@ -38740,6 +38754,10 @@
data = CommFunc.WriteBYTE(data, self.AwardCount)
for i in range(self.AwardCount):
data = CommFunc.WriteString(data, self.AwardList[i].GetLength(), self.AwardList[i].GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.CTGIDCount)
+ for i in range(self.CTGIDCount):
+ data = CommFunc.WriteWORD(data, self.CTGIDList[i])
+ data = CommFunc.WriteWORD(data, self.ShopType)
return data
def OutputString(self):
@@ -38749,7 +38767,10 @@
AwardTypeValue:%d,
RoundMax:%d,
AwardCount:%d,
- AwardList:%s
+ AwardList:%s,
+ CTGIDCount:%d,
+ CTGIDList:%s,
+ ShopType:%d
'''\
%(
self.RoundType,
@@ -38757,7 +38778,10 @@
self.AwardTypeValue,
self.RoundMax,
self.AwardCount,
- "..."
+ "...",
+ self.CTGIDCount,
+ "...",
+ self.ShopType
)
return DumpString
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
index 2395347..d75d1e4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
@@ -291,6 +291,8 @@
def ResetShopItemBuyCountByShopType(curPlayer, shopTypeList):
##根据商店类型重置商店限购物品次数
+ if not shopTypeList:
+ return
syncIndexList = []
ipyDataMgr = IpyGameDataPY.IPY_Data()
for i in xrange(ipyDataMgr.GetStoreCount()):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 200889e..2f27209 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -2136,6 +2136,8 @@
("WORD", "LVLimit", 0),
("BYTE", "ResetType", 0),
("dict", "RoundSetInfo", 0),
+ ("dict", "RoundCTGIDInfo", 0),
+ ("dict", "RoundShopTypeInfo", 0),
),
"ActLunhuidianAward":(
@@ -5741,7 +5743,9 @@
def GetEndDate(self): return self.attrTuple[2] # 结束日期 char
def GetLVLimit(self): return self.attrTuple[3] # 限制等级 WORD
def GetResetType(self): return self.attrTuple[4] # 重置类型,0-0点重置;1-5点重置 BYTE
- def GetRoundSetInfo(self): return self.attrTuple[5] # 开放轮回设定 dict
+ def GetRoundSetInfo(self): return self.attrTuple[5] # 开放轮回设定 dict
+ def GetRoundCTGIDInfo(self): return self.attrTuple[6] # 轮回类型对应充值ID列表 dict
+ def GetRoundShopTypeInfo(self): return self.attrTuple[7] # 轮回类型对应商店类型 dict
# 轮回殿活动奖励表
class IPY_ActLunhuidianAward():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLunhuidian.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLunhuidian.py
index 91d5b4a..bff9a97 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLunhuidian.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLunhuidian.py
@@ -20,8 +20,10 @@
import PlayerControl
import IpyGameDataPY
import ChPyNetSendPack
+import FunctionNPCCommon
import NetPackCommon
import ItemControler
+import PlayerCoin
import GameWorld
import ChConfig
@@ -88,11 +90,22 @@
ipyData = IpyGameDataPY.GetIpyGameData("ActLunhuidian", cfgID)
if ipyData:
roundSetDict = ipyData.GetRoundSetInfo()
+ ctgIDDict = ipyData.GetRoundCTGIDInfo()
+ shopTypeDict = ipyData.GetRoundShopTypeInfo()
+ resetCTGIDList, resetShopTypeList = [], []
for roundType in roundSetDict.keys():
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActLunhuidianValue % (actNum, roundType), 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActLunhuidianRound % (actNum, roundType), 1) # 从第1轮开始
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActLunhuidianAward % (actNum, roundType), 0)
Sync_ActLunhuidianPlayerInfo(curPlayer, actNum, roundType)
+ resetCTGIDList += ctgIDDict.get(roundType, [])
+ shopType = shopTypeDict.get(roundType, 0)
+ if shopType and shopType not in resetShopTypeList:
+ resetShopTypeList.append(shopType)
+
+ PlayerCoin.DoResetCTGCountByIDList(curPlayer, "ActLunhuidian", resetCTGIDList)
+ FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, resetShopTypeList)
+
return True
def GetRoundSetValue(roundSet, setIndex): return roundSet[setIndex] if len(roundSet) > setIndex else 0
@@ -238,6 +251,8 @@
clientPack.LimitLV = ipyData.GetLVLimit()
roundSetDict = ipyData.GetRoundSetInfo()
+ ctgIDDict = ipyData.GetRoundCTGIDInfo()
+ shopTypeDict = ipyData.GetRoundShopTypeInfo()
for roundType, roundSet in roundSetDict.items():
roundInfo = ChPyNetSendPack.tagMCActLunhuidianRound()
roundInfo.RoundType = roundType
@@ -262,6 +277,9 @@
roundInfo.AwardList.append(award)
roundInfo.AwardCount = len(roundInfo.AwardList)
+ roundInfo.CTGIDList = ctgIDDict.get(roundType, [])
+ roundInfo.CTGIDCount = len(roundInfo.CTGIDList)
+ roundInfo.ShopType = shopTypeDict.get(roundType, 0)
clientPack.RoundList.append(roundInfo)
clientPack.RoundCount = len(clientPack.RoundList)
--
Gitblit v1.8.0