From da8b073520b363154d75ae05c10ef5d0dad61423 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 26 一月 2021 15:36:53 +0800
Subject: [PATCH] 8710 【开发】【主干】【BT2】根据世界等级配置奖励(成长必买世界等级不同奖励配置改为放在充值表);
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 11 +++++++++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 3 +++
PySysDB/PySysDBPY.h | 1 +
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 11 +++++++++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGrowupBuy.py | 26 +++++++++++---------------
5 files changed, 33 insertions(+), 19 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index 583d346..d3f5c7a 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -1244,6 +1244,7 @@
WORD GainGoldPrize; //赠送仙玉数
WORD FirstGoldPrize; //首次充值该档位赠送仙玉
list GainItemList; //获得物品列表[[物品ID,个数,是否绑定], ...]
+ dict ActWorldLVGainItemInfo; //根据活动世界等级获得物品信息,活动专用 {"世界等级":[[物品ID,个数,是否绑定], ...], ...}
char NotifyMark; //广播提示
BYTE PayType; //充值类型
};
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index f873f17..474567b 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -24542,6 +24542,7 @@
EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
GroupCount = 0 #(BYTE GroupCount)// 循环购买礼包组数
GroupList = list() #(vector<tagMCActGrowupBuyGroup> GroupList)//循环购买礼包组列表
+ ActWorldLV = 0 #(WORD ActWorldLV)// 活动世界等级
data = None
def __init__(self):
@@ -24560,6 +24561,7 @@
temGroupList = tagMCActGrowupBuyGroup()
_pos = temGroupList.ReadData(_lpData, _pos)
self.GroupList.append(temGroupList)
+ self.ActWorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
return _pos
def Clear(self):
@@ -24571,6 +24573,7 @@
self.EndtDate = ""
self.GroupCount = 0
self.GroupList = list()
+ self.ActWorldLV = 0
return
def GetLength(self):
@@ -24581,6 +24584,7 @@
length += 1
for i in range(self.GroupCount):
length += self.GroupList[i].GetLength()
+ length += 2
return length
@@ -24592,6 +24596,7 @@
data = CommFunc.WriteBYTE(data, self.GroupCount)
for i in range(self.GroupCount):
data = CommFunc.WriteString(data, self.GroupList[i].GetLength(), self.GroupList[i].GetBuffer())
+ data = CommFunc.WriteWORD(data, self.ActWorldLV)
return data
def OutputString(self):
@@ -24600,14 +24605,16 @@
StartDate:%s,
EndtDate:%s,
GroupCount:%d,
- GroupList:%s
+ GroupList:%s,
+ ActWorldLV:%d
'''\
%(
self.Head.OutputString(),
self.StartDate,
self.EndtDate,
self.GroupCount,
- "..."
+ "...",
+ self.ActWorldLV
)
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 f873f17..474567b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -24542,6 +24542,7 @@
EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
GroupCount = 0 #(BYTE GroupCount)// 循环购买礼包组数
GroupList = list() #(vector<tagMCActGrowupBuyGroup> GroupList)//循环购买礼包组列表
+ ActWorldLV = 0 #(WORD ActWorldLV)// 活动世界等级
data = None
def __init__(self):
@@ -24560,6 +24561,7 @@
temGroupList = tagMCActGrowupBuyGroup()
_pos = temGroupList.ReadData(_lpData, _pos)
self.GroupList.append(temGroupList)
+ self.ActWorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
return _pos
def Clear(self):
@@ -24571,6 +24573,7 @@
self.EndtDate = ""
self.GroupCount = 0
self.GroupList = list()
+ self.ActWorldLV = 0
return
def GetLength(self):
@@ -24581,6 +24584,7 @@
length += 1
for i in range(self.GroupCount):
length += self.GroupList[i].GetLength()
+ length += 2
return length
@@ -24592,6 +24596,7 @@
data = CommFunc.WriteBYTE(data, self.GroupCount)
for i in range(self.GroupCount):
data = CommFunc.WriteString(data, self.GroupList[i].GetLength(), self.GroupList[i].GetBuffer())
+ data = CommFunc.WriteWORD(data, self.ActWorldLV)
return data
def OutputString(self):
@@ -24600,14 +24605,16 @@
StartDate:%s,
EndtDate:%s,
GroupCount:%d,
- GroupList:%s
+ GroupList:%s,
+ ActWorldLV:%d
'''\
%(
self.Head.OutputString(),
self.StartDate,
self.EndtDate,
self.GroupCount,
- "..."
+ "...",
+ self.ActWorldLV
)
return DumpString
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 25eaf1c..13e85bd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -1000,6 +1000,7 @@
("WORD", "GainGoldPrize", 0),
("WORD", "FirstGoldPrize", 0),
("list", "GainItemList", 0),
+ ("dict", "ActWorldLVGainItemInfo", 0),
("char", "NotifyMark", 0),
("BYTE", "PayType", 0),
),
@@ -3703,6 +3704,7 @@
self.GainGoldPrize = 0
self.FirstGoldPrize = 0
self.GainItemList = []
+ self.ActWorldLVGainItemInfo = {}
self.NotifyMark = ""
self.PayType = 0
return
@@ -3715,6 +3717,7 @@
def GetGainGoldPrize(self): return self.GainGoldPrize # 赠送仙玉数
def GetFirstGoldPrize(self): return self.FirstGoldPrize # 首次充值该档位赠送仙玉
def GetGainItemList(self): return self.GainItemList # 获得物品列表[[物品ID,个数,是否绑定], ...]
+ def GetActWorldLVGainItemInfo(self): return self.ActWorldLVGainItemInfo # 根据活动世界等级获得物品信息,活动专用 {"世界等级":[[物品ID,个数,是否绑定], ...], ...}
def GetNotifyMark(self): return self.NotifyMark # 广播提示
def GetPayType(self): return self.PayType # 充值类型
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGrowupBuy.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGrowupBuy.py
index 764d452..0b10484 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGrowupBuy.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGrowupBuy.py
@@ -79,7 +79,7 @@
ipyData = IpyGameDataPY.GetIpyGameData("ActGrowupBuy", cfgID)
if not ipyData:
return
- ctgIDGroupList = __GetCTGIDGroupList(ipyData.GetCTGIDGroupList(), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
+ ctgIDGroupList = ipyData.GetCTGIDGroupList()
buyState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GrowupBuyState)
GameWorld.DebugLog("更新成长必买今日可购买礼包索引! buyState=%s,ctgIDGroupList=%s" % (buyState, ctgIDGroupList))
@@ -108,11 +108,6 @@
Sync_GrowupActionInfo(curPlayer)
return
-def __GetCTGIDGroupList(cfgGroupList, worldLV):
- if isinstance(cfgGroupList, dict):
- return GameWorld.GetDictValueByRangeKey(cfgGroupList, worldLV, [])
- return cfgGroupList
-
def CheckGrowupBuyState(curPlayer, ctgID):
## 检查是否可购买成长必买礼包ID
# @return: 是否可买, 不可买原因说明
@@ -125,7 +120,7 @@
ipyData = IpyGameDataPY.GetIpyGameData("ActGrowupBuy", cfgID)
if not ipyData:
return False, "not grow up buy action ipyData cfgID(%s)!" % cfgID
- ctgIDGroupList = __GetCTGIDGroupList(ipyData.GetCTGIDGroupList(), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
+ ctgIDGroupList = ipyData.GetCTGIDGroupList()
buyState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GrowupBuyState)
curCTGIDList = []
playerBuyIndex = -1
@@ -156,23 +151,24 @@
ipyData = IpyGameDataPY.GetIpyGameData("ActGrowupBuy", cfgID)
if not ipyData:
return
- ctgIDGroupList = __GetCTGIDGroupList(ipyData.GetCTGIDGroupList(), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
+ ctgIDGroupList = ipyData.GetCTGIDGroupList()
if not ctgIDGroupList:
return
buyState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GrowupBuyState)
openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
- actInfo = ChPyNetSendPack.tagMCActGrowupBuyInfo()
- actInfo.StartDate = GameWorld.GetOperationActionDateStr(ipyData.GetStartDate(), openServerDay)
- actInfo.EndtDate = GameWorld.GetOperationActionDateStr(ipyData.GetEndDate(), openServerDay)
- actInfo.GroupList = []
+ actPack = ChPyNetSendPack.tagMCActGrowupBuyInfo()
+ actPack.StartDate = GameWorld.GetOperationActionDateStr(ipyData.GetStartDate(), openServerDay)
+ actPack.EndtDate = GameWorld.GetOperationActionDateStr(ipyData.GetEndDate(), openServerDay)
+ actPack.GroupList = []
for i, ctgIDList in enumerate(ctgIDGroupList):
groupInfo = ChPyNetSendPack.tagMCActGrowupBuyGroup()
groupInfo.BuyCTGIDList = ctgIDList
groupInfo.BuyCount = len(groupInfo.BuyCTGIDList)
groupInfo.PlayerBuyIndex = GameWorld.GetDataByDigitPlace(buyState, i)
- actInfo.GroupList.append(groupInfo)
- actInfo.GroupCount = len(actInfo.GroupList)
- NetPackCommon.SendFakePack(curPlayer, actInfo)
+ actPack.GroupList.append(groupInfo)
+ actPack.GroupCount = len(actPack.GroupList)
+ actPack.ActWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
+ NetPackCommon.SendFakePack(curPlayer, actPack)
return
--
Gitblit v1.8.0