From 34fec42a90f2b3f726afa3e104e3e3112d9dc819 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 26 五月 2021 11:41:12 +0800
Subject: [PATCH] 8921 【主干】【BT2】【后端】H.活动-节日活动-垃圾分类(1.删除引导任务;2.环保抽奖改为独立的活动仙匣秘境;3.活动结束销毁剩余垃圾物品、重置祝福值;)
---
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py | 51
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py | 10
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 364 +++---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 535 +++++----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py | 8
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 364 +++---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintMoney.py | 5
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 535 +++++----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGarbageSorting.py | 574 ----------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini | 30
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 59
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestCommon.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 3
PySysDB/PySysDBPY.h | 19
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py | 10
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py | 596 +++++++++++
PySysDB/PySysDBG.h | 17
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 14
19 files changed, 1,735 insertions(+), 1,466 deletions(-)
diff --git a/PySysDB/PySysDBG.h b/PySysDB/PySysDBG.h
index 62192a0..407da7a 100644
--- a/PySysDB/PySysDBG.h
+++ b/PySysDB/PySysDBG.h
@@ -480,6 +480,23 @@
dict NotifyInfoStart; //全服提示信息 - 相对开始时间
dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
list NotifyInfoLoop; //全服提示信息 - 循环广播[间隔分钟, 广播key]
+ BYTE ResetType; //重置类型,0-0点重置;1-5点重置
+};
+
+//仙匣秘境活动时间表
+
+struct tagActXianXiaMJ
+{
+ DWORD _CfgID; //配置ID
+ list PlatformList; //活动平台列表["平台A", "平台A", ...],配[]代表所有
+ list ServerGroupIDList; //服务器ID列表
+ BYTE ActNum; //活动分组编号, 活动类型 * 10 + 不同界面编号
+ char StartDate; //开启日期
+ char EndDate; //结束日期
+ dict NotifyInfoStart; //全服提示信息 - 相对开始时间
+ dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
+ list NotifyInfoLoop; //全服提示信息 - 循环广播[间隔分钟, 广播key]
+ BYTE ResetType; //重置类型,0-0点重置;1-5点重置
};
//骑宠盛宴活动
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index c0be2ce..bd0ab04 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -1439,9 +1439,9 @@
DWORD _CfgID; //配置ID
char StartDate; //开启日期
char EndDate; //结束日期
+ BYTE ResetType; //重置类型,0-0点重置;1-5点重置
WORD LVLimit; //限制等级
BYTE CTGTypeEffValue; //充值有效类型值
- BYTE TemplateID; //模板ID
};
//垃圾分类任务产出表
@@ -1455,9 +1455,22 @@
list ProduceGarbageRateList; //随机产生垃圾概率饼图
};
-//垃圾分类环保奖池表
+//仙匣秘境活动时间表
-struct tagActGarbageAward
+struct tagActXianXiaMJ
+{
+ DWORD _CfgID; //配置ID
+ char StartDate; //开启日期
+ char EndDate; //结束日期
+ BYTE ResetType; //重置类型,0-0点重置;1-5点重置
+ WORD LVLimit; //限制等级
+ list UseMoneyInfo; //消耗货币信息
+ BYTE TemplateID; //模板ID
+};
+
+//仙匣秘境奖池表
+
+struct tagActXianXiaMJAward
{
DWORD _TemplateID; //奖池模板编号
BYTE AwardLibType; //奖励库类型
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 0a29534..f1676de 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -13321,80 +13321,6 @@
#------------------------------------------------------
-# AA 16 垃圾分类活动选择大奖 #tagCMActGarbageChooseSuperItem
-
-class tagCMActGarbageChooseSuperItem(Structure):
- Head = tagHead()
- ActNum = 0 #(BYTE ActNum)//活动编号
- SuperItemCount = 0 #(BYTE SuperItemCount)//选择物品数量
- SuperItemIDList = list() #(vector<DWORD> SuperItemIDList)//选择的大奖库物品ID列表,每次重新选择需要发送全部已选择的大奖物品ID,不能只发单个物品ID;
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x16
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.SuperItemCount):
- value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
- self.SuperItemIDList.append(value)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x16
- self.ActNum = 0
- self.SuperItemCount = 0
- self.SuperItemIDList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- length += 1
- length += 4 * self.SuperItemCount
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.ActNum)
- data = CommFunc.WriteBYTE(data, self.SuperItemCount)
- for i in range(self.SuperItemCount):
- data = CommFunc.WriteDWORD(data, self.SuperItemIDList[i])
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- ActNum:%d,
- SuperItemCount:%d,
- SuperItemIDList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.ActNum,
- self.SuperItemCount,
- "..."
- )
- return DumpString
-
-
-m_NAtagCMActGarbageChooseSuperItem=tagCMActGarbageChooseSuperItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActGarbageChooseSuperItem.Head.Cmd,m_NAtagCMActGarbageChooseSuperItem.Head.SubCmd))] = m_NAtagCMActGarbageChooseSuperItem
-
-
-#------------------------------------------------------
# AA 15 垃圾分类活动收集已完成的任务垃圾 #tagCMActGarbageGetTaskAward
class tagCMActGarbageGetTaskAward(Structure):
@@ -13448,62 +13374,6 @@
m_NAtagCMActGarbageGetTaskAward=tagCMActGarbageGetTaskAward()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActGarbageGetTaskAward.Cmd,m_NAtagCMActGarbageGetTaskAward.SubCmd))] = m_NAtagCMActGarbageGetTaskAward
-
-
-#------------------------------------------------------
-# AA 17 垃圾分类活动抽奖 #tagCMActGarbageLottery
-
-class tagCMActGarbageLottery(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActNum", c_ubyte), #活动编号
- ("PosNum", c_ubyte), #玩家点击的奖励位置编号,从1开始
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x17
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x17
- self.ActNum = 0
- self.PosNum = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMActGarbageLottery)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 17 垃圾分类活动抽奖 //tagCMActGarbageLottery:
- Cmd:%s,
- SubCmd:%s,
- ActNum:%d,
- PosNum:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActNum,
- self.PosNum
- )
- return DumpString
-
-
-m_NAtagCMActGarbageLottery=tagCMActGarbageLottery()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActGarbageLottery.Cmd,m_NAtagCMActGarbageLottery.SubCmd))] = m_NAtagCMActGarbageLottery
#------------------------------------------------------
@@ -13783,6 +13653,188 @@
#------------------------------------------------------
+# AA 18 仙匣秘境活动奖池刷新 #tagCMActXianXiaMJAwardPoolRefresh
+
+class tagCMActXianXiaMJAwardPoolRefresh(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ActNum", c_ubyte), #活动编号
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xAA
+ self.SubCmd = 0x18
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.Cmd = 0xAA
+ self.SubCmd = 0x18
+ self.ActNum = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMActXianXiaMJAwardPoolRefresh)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// AA 18 仙匣秘境活动奖池刷新 //tagCMActXianXiaMJAwardPoolRefresh:
+ Cmd:%s,
+ SubCmd:%s,
+ ActNum:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ActNum
+ )
+ return DumpString
+
+
+m_NAtagCMActXianXiaMJAwardPoolRefresh=tagCMActXianXiaMJAwardPoolRefresh()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActXianXiaMJAwardPoolRefresh.Cmd,m_NAtagCMActXianXiaMJAwardPoolRefresh.SubCmd))] = m_NAtagCMActXianXiaMJAwardPoolRefresh
+
+
+#------------------------------------------------------
+# AA 17 仙匣秘境活动抽奖 #tagCMActXianXiaMJLottery
+
+class tagCMActXianXiaMJLottery(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ActNum", c_ubyte), #活动编号
+ ("PosNum", c_ubyte), #玩家点击的奖励位置编号,从1开始
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xAA
+ self.SubCmd = 0x17
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.Cmd = 0xAA
+ self.SubCmd = 0x17
+ self.ActNum = 0
+ self.PosNum = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMActXianXiaMJLottery)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// AA 17 仙匣秘境活动抽奖 //tagCMActXianXiaMJLottery:
+ Cmd:%s,
+ SubCmd:%s,
+ ActNum:%d,
+ PosNum:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ActNum,
+ self.PosNum
+ )
+ return DumpString
+
+
+m_NAtagCMActXianXiaMJLottery=tagCMActXianXiaMJLottery()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActXianXiaMJLottery.Cmd,m_NAtagCMActXianXiaMJLottery.SubCmd))] = m_NAtagCMActXianXiaMJLottery
+
+
+#------------------------------------------------------
+# AA 16 仙匣秘境活动选择大奖 #tagCMActXianXiaMJSuperItem
+
+class tagCMActXianXiaMJSuperItem(Structure):
+ Head = tagHead()
+ ActNum = 0 #(BYTE ActNum)//活动编号
+ SuperItemCount = 0 #(BYTE SuperItemCount)//选择物品数量
+ SuperItemIDList = list() #(vector<DWORD> SuperItemIDList)//选择的大奖库物品ID列表,每次重新选择需要发送全部已选择的大奖物品ID,不能只发单个物品ID;
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x16
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.SuperItemCount):
+ value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
+ self.SuperItemIDList.append(value)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x16
+ self.ActNum = 0
+ self.SuperItemCount = 0
+ self.SuperItemIDList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 1
+ length += 4 * self.SuperItemCount
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.ActNum)
+ data = CommFunc.WriteBYTE(data, self.SuperItemCount)
+ for i in range(self.SuperItemCount):
+ data = CommFunc.WriteDWORD(data, self.SuperItemIDList[i])
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ ActNum:%d,
+ SuperItemCount:%d,
+ SuperItemIDList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.ActNum,
+ self.SuperItemCount,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagCMActXianXiaMJSuperItem=tagCMActXianXiaMJSuperItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActXianXiaMJSuperItem.Head.Cmd,m_NAtagCMActXianXiaMJSuperItem.Head.SubCmd))] = m_NAtagCMActXianXiaMJSuperItem
+
+
+#------------------------------------------------------
# AA 06 许愿池活动许愿 #tagCMActWishing
class tagCMActWishing(Structure):
@@ -14012,58 +14064,6 @@
m_NAtagCMFlashSaleAppointment=tagCMFlashSaleAppointment()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFlashSaleAppointment.Cmd,m_NAtagCMFlashSaleAppointment.SubCmd))] = m_NAtagCMFlashSaleAppointment
-
-
-#------------------------------------------------------
-# AA 18 垃圾分类活动奖池刷新 #tagCMGarbageAwardPoolRefresh
-
-class tagCMGarbageAwardPoolRefresh(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActNum", c_ubyte), #活动编号
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x18
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x18
- self.ActNum = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMGarbageAwardPoolRefresh)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 18 垃圾分类活动奖池刷新 //tagCMGarbageAwardPoolRefresh:
- Cmd:%s,
- SubCmd:%s,
- ActNum:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActNum
- )
- return DumpString
-
-
-m_NAtagCMGarbageAwardPoolRefresh=tagCMGarbageAwardPoolRefresh()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGarbageAwardPoolRefresh.Cmd,m_NAtagCMGarbageAwardPoolRefresh.SubCmd))] = m_NAtagCMGarbageAwardPoolRefresh
#------------------------------------------------------
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 219c323..ea699ce 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -24638,203 +24638,7 @@
#------------------------------------------------------
-# AA 57 垃圾收集活动玩家信息 #tagMCActGarbagePlayerInfo
-
-class tagMCActGarbageAwardItemResult(Structure):
- _pack_ = 1
- _fields_ = [
- ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库
- ("ItemID", c_int), # 注意: 不同库物品ID可能相同,但个数不同
- ("ItemCount", c_ushort),
- ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中;
- ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0
- ]
-
- def __init__(self):
- self.Clear()
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.ItemLibType = 0
- self.ItemID = 0
- self.ItemCount = 0
- self.PosNum = 0
- self.TotalTimesNow = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCActGarbageAwardItemResult)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 57 垃圾收集活动玩家信息 //tagMCActGarbagePlayerInfo:
- ItemLibType:%d,
- ItemID:%d,
- ItemCount:%d,
- PosNum:%d,
- TotalTimesNow:%d
- '''\
- %(
- self.ItemLibType,
- self.ItemID,
- self.ItemCount,
- self.PosNum,
- self.TotalTimesNow
- )
- return DumpString
-
-
-class tagMCActGarbagePlayerInfo(Structure):
- Head = tagHead()
- ActNum = 0 #(BYTE ActNum)//活动编号
- GuideTaskFinish = 0 #(BYTE GuideTaskFinish)//引导任务是否已完成,有需要NPC对话引导任务时,则需要先完成才显示活动界面
- EnvironmentValue = 0 #(DWORD EnvironmentValue)//当前可用环保值
- EnvironmentValueHis = 0 #(DWORD EnvironmentValueHis)//历史环保值
- AwardItemResult=tagMCActGarbageAwardItemResult() #(tagMCActGarbageAwardItemResult AwardItemResult)//本次抽奖结果物品信息,可能为空
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x57
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.GuideTaskFinish,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.EnvironmentValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.EnvironmentValueHis,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- _pos = self.AwardItemResult.ReadData(_lpData,_pos)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x57
- self.ActNum = 0
- self.GuideTaskFinish = 0
- self.EnvironmentValue = 0
- self.EnvironmentValueHis = 0
- self.AwardItemResult=tagMCActGarbageAwardItemResult()
- self.AwardItemResult.Clear()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- length += 1
- length += 4
- length += 4
- length += self.AwardItemResult.GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.ActNum)
- data = CommFunc.WriteBYTE(data, self.GuideTaskFinish)
- data = CommFunc.WriteDWORD(data, self.EnvironmentValue)
- data = CommFunc.WriteDWORD(data, self.EnvironmentValueHis)
- data = CommFunc.WriteString(data,self.AwardItemResult.GetLength(),self.AwardItemResult.GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- ActNum:%d,
- GuideTaskFinish:%d,
- EnvironmentValue:%d,
- EnvironmentValueHis:%d,
- AwardItemResult:%s
- '''\
- %(
- self.Head.OutputString(),
- self.ActNum,
- self.GuideTaskFinish,
- self.EnvironmentValue,
- self.EnvironmentValueHis,
- self.AwardItemResult.OutputString()
- )
- return DumpString
-
-
-m_NAtagMCActGarbagePlayerInfo=tagMCActGarbagePlayerInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGarbagePlayerInfo.Head.Cmd,m_NAtagMCActGarbagePlayerInfo.Head.SubCmd))] = m_NAtagMCActGarbagePlayerInfo
-
-
-#------------------------------------------------------
# AA 55 垃圾收集活动信息 #tagMCActGarbageSortingInfo
-
-class tagMCActGarbageAwardItem(Structure):
- _pack_ = 1
- _fields_ = [
- ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库
- ("ItemID", c_int), # 注意: 不同库物品ID可能相同,但个数不同
- ("ItemCount", c_ushort),
- ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中;
- ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0
- ("TotalTimesMax", c_ubyte), #最大可产出次数,0不限
- ("LayerLimit", c_ubyte), #大于等于X层后可产出,0不限
- ]
-
- def __init__(self):
- self.Clear()
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.ItemLibType = 0
- self.ItemID = 0
- self.ItemCount = 0
- self.PosNum = 0
- self.TotalTimesNow = 0
- self.TotalTimesMax = 0
- self.LayerLimit = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCActGarbageAwardItem)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 55 垃圾收集活动信息 //tagMCActGarbageSortingInfo:
- ItemLibType:%d,
- ItemID:%d,
- ItemCount:%d,
- PosNum:%d,
- TotalTimesNow:%d,
- TotalTimesMax:%d,
- LayerLimit:%d
- '''\
- %(
- self.ItemLibType,
- self.ItemID,
- self.ItemCount,
- self.PosNum,
- self.TotalTimesNow,
- self.TotalTimesMax,
- self.LayerLimit
- )
- return DumpString
-
class tagMCActGarbageSortingInfo(Structure):
Head = tagHead()
@@ -24842,12 +24646,7 @@
StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
LimitLV = 0 #(WORD LimitLV)// 限制等级
- LayerNum = 0 #(BYTE LayerNum)//当前奖池第几层
- AwardItemCount = 0 #(BYTE AwardItemCount)
- AwardItemList = list() #(vector<tagMCActGarbageAwardItem> AwardItemList)// 奖池物品列表,已生成的,包含已选择的大奖物品
- SuperItemCount = 0 #(BYTE SuperItemCount)
- SuperItemList = list() #(vector<tagMCActGarbageAwardItem> SuperItemList)// 大奖物品待选择库,由玩家从库中选择放入奖池的物品;
- SuperItemCanChooseCount = 0 #(BYTE SuperItemCanChooseCount)// 大奖物品可选择个数
+ ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置
data = None
def __init__(self):
@@ -24863,18 +24662,7 @@
self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
- self.LayerNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.AwardItemCount):
- temAwardItemList = tagMCActGarbageAwardItem()
- _pos = temAwardItemList.ReadData(_lpData, _pos)
- self.AwardItemList.append(temAwardItemList)
- self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.SuperItemCount):
- temSuperItemList = tagMCActGarbageAwardItem()
- _pos = temSuperItemList.ReadData(_lpData, _pos)
- self.SuperItemList.append(temSuperItemList)
- self.SuperItemCanChooseCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
return _pos
def Clear(self):
@@ -24886,12 +24674,7 @@
self.StartDate = ""
self.EndtDate = ""
self.LimitLV = 0
- self.LayerNum = 0
- self.AwardItemCount = 0
- self.AwardItemList = list()
- self.SuperItemCount = 0
- self.SuperItemList = list()
- self.SuperItemCanChooseCount = 0
+ self.ResetType = 0
return
def GetLength(self):
@@ -24901,13 +24684,6 @@
length += 10
length += 10
length += 2
- length += 1
- length += 1
- for i in range(self.AwardItemCount):
- length += self.AwardItemList[i].GetLength()
- length += 1
- for i in range(self.SuperItemCount):
- length += self.SuperItemList[i].GetLength()
length += 1
return length
@@ -24919,14 +24695,7 @@
data = CommFunc.WriteString(data, 10, self.StartDate)
data = CommFunc.WriteString(data, 10, self.EndtDate)
data = CommFunc.WriteWORD(data, self.LimitLV)
- data = CommFunc.WriteBYTE(data, self.LayerNum)
- data = CommFunc.WriteBYTE(data, self.AwardItemCount)
- for i in range(self.AwardItemCount):
- data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
- data = CommFunc.WriteBYTE(data, self.SuperItemCount)
- for i in range(self.SuperItemCount):
- data = CommFunc.WriteString(data, self.SuperItemList[i].GetLength(), self.SuperItemList[i].GetBuffer())
- data = CommFunc.WriteBYTE(data, self.SuperItemCanChooseCount)
+ data = CommFunc.WriteBYTE(data, self.ResetType)
return data
def OutputString(self):
@@ -24936,12 +24705,7 @@
StartDate:%s,
EndtDate:%s,
LimitLV:%d,
- LayerNum:%d,
- AwardItemCount:%d,
- AwardItemList:%s,
- SuperItemCount:%d,
- SuperItemList:%s,
- SuperItemCanChooseCount:%d
+ ResetType:%d
'''\
%(
self.Head.OutputString(),
@@ -24949,12 +24713,7 @@
self.StartDate,
self.EndtDate,
self.LimitLV,
- self.LayerNum,
- self.AwardItemCount,
- "...",
- self.SuperItemCount,
- "...",
- self.SuperItemCanChooseCount
+ self.ResetType
)
return DumpString
@@ -27934,6 +27693,288 @@
#------------------------------------------------------
+# AA 59 仙匣秘境抽奖结果 #tagMCActXianXiaMJAwardItemResult
+
+class tagMCActXianXiaMJAwardItemResult(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ActNum", c_ubyte), # 活动编号
+ ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库
+ ("ItemID", c_int), # 注意: 不同库物品ID可能相同,但个数不同
+ ("ItemCount", c_ushort),
+ ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中;
+ ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xAA
+ self.SubCmd = 0x59
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.Cmd = 0xAA
+ self.SubCmd = 0x59
+ self.ActNum = 0
+ self.ItemLibType = 0
+ self.ItemID = 0
+ self.ItemCount = 0
+ self.PosNum = 0
+ self.TotalTimesNow = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCActXianXiaMJAwardItemResult)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// AA 59 仙匣秘境抽奖结果 //tagMCActXianXiaMJAwardItemResult:
+ Cmd:%s,
+ SubCmd:%s,
+ ActNum:%d,
+ ItemLibType:%d,
+ ItemID:%d,
+ ItemCount:%d,
+ PosNum:%d,
+ TotalTimesNow:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ActNum,
+ self.ItemLibType,
+ self.ItemID,
+ self.ItemCount,
+ self.PosNum,
+ self.TotalTimesNow
+ )
+ return DumpString
+
+
+m_NAtagMCActXianXiaMJAwardItemResult=tagMCActXianXiaMJAwardItemResult()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActXianXiaMJAwardItemResult.Cmd,m_NAtagMCActXianXiaMJAwardItemResult.SubCmd))] = m_NAtagMCActXianXiaMJAwardItemResult
+
+
+#------------------------------------------------------
+# AA 58 仙匣秘境活动信息 #tagMCActXianXiaMJInfo
+
+class tagMCActXianXiaMJAwardItem(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库
+ ("ItemID", c_int), # 注意: 不同库物品ID可能相同,但个数不同
+ ("ItemCount", c_ushort),
+ ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中;
+ ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0
+ ("TotalTimesMax", c_ubyte), #最大可产出次数,0不限
+ ("LayerLimit", c_ubyte), #大于等于X层后可产出,0不限
+ ]
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.ItemLibType = 0
+ self.ItemID = 0
+ self.ItemCount = 0
+ self.PosNum = 0
+ self.TotalTimesNow = 0
+ self.TotalTimesMax = 0
+ self.LayerLimit = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCActXianXiaMJAwardItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// AA 58 仙匣秘境活动信息 //tagMCActXianXiaMJInfo:
+ ItemLibType:%d,
+ ItemID:%d,
+ ItemCount:%d,
+ PosNum:%d,
+ TotalTimesNow:%d,
+ TotalTimesMax:%d,
+ LayerLimit:%d
+ '''\
+ %(
+ self.ItemLibType,
+ self.ItemID,
+ self.ItemCount,
+ self.PosNum,
+ self.TotalTimesNow,
+ self.TotalTimesMax,
+ self.LayerLimit
+ )
+ return DumpString
+
+
+class tagMCActXianXiaMJInfo(Structure):
+ Head = tagHead()
+ ActNum = 0 #(BYTE ActNum)// 活动编号
+ StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
+ EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
+ LimitLV = 0 #(WORD LimitLV)// 限制等级
+ ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置
+ MoneyType = 0 #(BYTE MoneyType)//消耗货币类型
+ MoneyValue = 0 #(WORD MoneyValue)//消耗货币值
+ LayerNum = 0 #(BYTE LayerNum)//当前奖池第几层
+ AwardItemCount = 0 #(BYTE AwardItemCount)
+ AwardItemList = list() #(vector<tagMCActXianXiaMJAwardItem> AwardItemList)// 奖池物品列表,已生成的,包含已选择的大奖物品
+ SuperItemCount = 0 #(BYTE SuperItemCount)
+ SuperItemList = list() #(vector<tagMCActXianXiaMJAwardItem> SuperItemList)// 大奖物品待选择库,由玩家从库中选择放入奖池的物品;
+ SuperItemCanChooseCount = 0 #(BYTE SuperItemCanChooseCount)// 大奖物品可选择个数
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x58
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
+ self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
+ self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.MoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.MoneyValue,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.LayerNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.AwardItemCount):
+ temAwardItemList = tagMCActXianXiaMJAwardItem()
+ _pos = temAwardItemList.ReadData(_lpData, _pos)
+ self.AwardItemList.append(temAwardItemList)
+ self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.SuperItemCount):
+ temSuperItemList = tagMCActXianXiaMJAwardItem()
+ _pos = temSuperItemList.ReadData(_lpData, _pos)
+ self.SuperItemList.append(temSuperItemList)
+ self.SuperItemCanChooseCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x58
+ self.ActNum = 0
+ self.StartDate = ""
+ self.EndtDate = ""
+ self.LimitLV = 0
+ self.ResetType = 0
+ self.MoneyType = 0
+ self.MoneyValue = 0
+ self.LayerNum = 0
+ self.AwardItemCount = 0
+ self.AwardItemList = list()
+ self.SuperItemCount = 0
+ self.SuperItemList = list()
+ self.SuperItemCanChooseCount = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 10
+ length += 10
+ length += 2
+ length += 1
+ length += 1
+ length += 2
+ length += 1
+ length += 1
+ for i in range(self.AwardItemCount):
+ length += self.AwardItemList[i].GetLength()
+ length += 1
+ for i in range(self.SuperItemCount):
+ length += self.SuperItemList[i].GetLength()
+ length += 1
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.ActNum)
+ data = CommFunc.WriteString(data, 10, self.StartDate)
+ data = CommFunc.WriteString(data, 10, self.EndtDate)
+ data = CommFunc.WriteWORD(data, self.LimitLV)
+ data = CommFunc.WriteBYTE(data, self.ResetType)
+ data = CommFunc.WriteBYTE(data, self.MoneyType)
+ data = CommFunc.WriteWORD(data, self.MoneyValue)
+ data = CommFunc.WriteBYTE(data, self.LayerNum)
+ data = CommFunc.WriteBYTE(data, self.AwardItemCount)
+ for i in range(self.AwardItemCount):
+ data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.SuperItemCount)
+ for i in range(self.SuperItemCount):
+ data = CommFunc.WriteString(data, self.SuperItemList[i].GetLength(), self.SuperItemList[i].GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.SuperItemCanChooseCount)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ ActNum:%d,
+ StartDate:%s,
+ EndtDate:%s,
+ LimitLV:%d,
+ ResetType:%d,
+ MoneyType:%d,
+ MoneyValue:%d,
+ LayerNum:%d,
+ AwardItemCount:%d,
+ AwardItemList:%s,
+ SuperItemCount:%d,
+ SuperItemList:%s,
+ SuperItemCanChooseCount:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.ActNum,
+ self.StartDate,
+ self.EndtDate,
+ self.LimitLV,
+ self.ResetType,
+ self.MoneyType,
+ self.MoneyValue,
+ self.LayerNum,
+ self.AwardItemCount,
+ "...",
+ self.SuperItemCount,
+ "...",
+ self.SuperItemCanChooseCount
+ )
+ return DumpString
+
+
+m_NAtagMCActXianXiaMJInfo=tagMCActXianXiaMJInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActXianXiaMJInfo.Head.Cmd,m_NAtagMCActXianXiaMJInfo.Head.SubCmd))] = m_NAtagMCActXianXiaMJInfo
+
+
+#------------------------------------------------------
# AA 15 仙界盛典全民来嗨玩家信息 #tagMCAllPeoplePartyInfo
class tagMCAllPeoplePartyCount(Structure):
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py b/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
index 45ea84a..714c0ed 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
@@ -405,6 +405,20 @@
("dict", "NotifyInfoStart", 0),
("dict", "NotifyInfoEnd", 0),
("list", "NotifyInfoLoop", 0),
+ ("BYTE", "ResetType", 0),
+ ),
+
+ "ActXianXiaMJ":(
+ ("DWORD", "CfgID", 1),
+ ("list", "PlatformList", 0),
+ ("list", "ServerGroupIDList", 0),
+ ("BYTE", "ActNum", 0),
+ ("char", "StartDate", 0),
+ ("char", "EndDate", 0),
+ ("dict", "NotifyInfoStart", 0),
+ ("dict", "NotifyInfoEnd", 0),
+ ("list", "NotifyInfoLoop", 0),
+ ("BYTE", "ResetType", 0),
),
"ActHorsePetFeast":(
@@ -1531,7 +1545,8 @@
self.EndDate = ""
self.NotifyInfoStart = {}
self.NotifyInfoEnd = {}
- self.NotifyInfoLoop = []
+ self.NotifyInfoLoop = []
+ self.ResetType = 0
return
def GetCfgID(self): return self.CfgID # 配置ID
@@ -1542,7 +1557,35 @@
def GetEndDate(self): return self.EndDate # 结束日期
def GetNotifyInfoStart(self): return self.NotifyInfoStart # 全服提示信息 - 相对开始时间
def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
- def GetNotifyInfoLoop(self): return self.NotifyInfoLoop # 全服提示信息 - 循环广播[间隔分钟, 广播key]
+ def GetNotifyInfoLoop(self): return self.NotifyInfoLoop # 全服提示信息 - 循环广播[间隔分钟, 广播key]
+ def GetResetType(self): return self.ResetType # 重置类型,0-0点重置;1-5点重置
+
+# 仙匣秘境活动时间表
+class IPY_ActXianXiaMJ():
+
+ def __init__(self):
+ self.CfgID = 0
+ self.PlatformList = []
+ self.ServerGroupIDList = []
+ self.ActNum = 0
+ self.StartDate = ""
+ self.EndDate = ""
+ self.NotifyInfoStart = {}
+ self.NotifyInfoEnd = {}
+ self.NotifyInfoLoop = []
+ self.ResetType = 0
+ return
+
+ def GetCfgID(self): return self.CfgID # 配置ID
+ def GetPlatformList(self): return self.PlatformList # 活动平台列表["平台A", "平台A", ...],配[]代表所有
+ def GetServerGroupIDList(self): return self.ServerGroupIDList # 服务器ID列表
+ def GetActNum(self): return self.ActNum # 活动分组编号, 活动类型 * 10 + 不同界面编号
+ def GetStartDate(self): return self.StartDate # 开启日期
+ def GetEndDate(self): return self.EndDate # 结束日期
+ def GetNotifyInfoStart(self): return self.NotifyInfoStart # 全服提示信息 - 相对开始时间
+ def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
+ def GetNotifyInfoLoop(self): return self.NotifyInfoLoop # 全服提示信息 - 循环广播[间隔分钟, 广播key]
+ def GetResetType(self): return self.ResetType # 重置类型,0-0点重置;1-5点重置
# 骑宠盛宴活动
class IPY_ActHorsePetFeast():
@@ -2370,6 +2413,8 @@
self.ipyActCollectWordsLen = len(self.ipyActCollectWordsCache)
self.ipyActGarbageSortingCache = self.__LoadFileData("ActGarbageSorting", IPY_ActGarbageSorting)
self.ipyActGarbageSortingLen = len(self.ipyActGarbageSortingCache)
+ self.ipyActXianXiaMJCache = self.__LoadFileData("ActXianXiaMJ", IPY_ActXianXiaMJ)
+ self.ipyActXianXiaMJLen = len(self.ipyActXianXiaMJCache)
self.ipyActHorsePetFeastCache = self.__LoadFileData("ActHorsePetFeast", IPY_ActHorsePetFeast)
self.ipyActHorsePetFeastLen = len(self.ipyActHorsePetFeastCache)
self.ipyActBossRebornCache = self.__LoadFileData("ActBossReborn", IPY_ActBossReborn)
@@ -2672,6 +2717,8 @@
def GetActCollectWordsByIndex(self, index): return self.ipyActCollectWordsCache[index]
def GetActGarbageSortingCount(self): return self.ipyActGarbageSortingLen
def GetActGarbageSortingByIndex(self, index): return self.ipyActGarbageSortingCache[index]
+ def GetActXianXiaMJCount(self): return self.ipyActXianXiaMJLen
+ def GetActXianXiaMJByIndex(self, index): return self.ipyActXianXiaMJCache[index]
def GetActHorsePetFeastCount(self): return self.ipyActHorsePetFeastLen
def GetActHorsePetFeastByIndex(self, index): return self.ipyActHorsePetFeastCache[index]
def GetActBossRebornCount(self): return self.ipyActBossRebornLen
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index 680b7c2..edf8b61 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -237,6 +237,7 @@
OperationActionName_Turntable = "ActTurntable" # 转盘活动
OperationActionName_HorsePetFeast = "ActHorsePetFeast" # 骑宠盛宴活动
OperationActionName_GarbageSorting = "ActGarbageSorting" # 垃圾分类活动
+OperationActionName_XianXiaMJ = "ActXianXiaMJ" # 仙匣秘境活动
#节日活动类型列表 - 该类型无视开服天,日期到了就开启
FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
@@ -255,6 +256,7 @@
OperationActionName_DailyGiftbag, OperationActionName_SingleRecharge,
OperationActionName_CollectWords, OperationActionName_ManyDayRecharge,
OperationActionName_Turntable, OperationActionName_HorsePetFeast, OperationActionName_GarbageSorting,
+ OperationActionName_XianXiaMJ,
] + FeastOperationActionNameList
#需要记录开启活动时的世界等级的运营活动
NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell,
@@ -265,7 +267,7 @@
OperationActionName_DailyGiftbag, OperationActionName_GrowupBuy,
OperationActionName_WeekParty, OperationActionName_Turntable,
OperationActionName_CollectWords, OperationActionName_GarbageSorting,
- OperationActionName_FeastLogin,
+ OperationActionName_FeastLogin, OperationActionName_XianXiaMJ,
OperationActionName_FeastWish, OperationActionName_FeastTravel,
OperationActionName_ManyDayRecharge, OperationActionName_SingleRecharge,
]
@@ -276,6 +278,7 @@
OperationActionName_SpringSale, OperationActionName_FlashSale,
OperationActionName_ManyDayRecharge, OperationActionName_SingleRecharge,
OperationActionName_Turntable, OperationActionName_HorsePetFeast, OperationActionName_GarbageSorting,
+ OperationActionName_XianXiaMJ,
]
#跨服运营活动表名定义
@@ -955,7 +958,8 @@
CDBPlayerRefresh_ExAttr17, # ExAttr17
CDBPlayerRefresh_BossActScore, # boss 活动积分 230
CDBPlayerRefresh_FuncSysPrivilege, # 功能特权令 231
-) = range(146, 232)
+CDBPlayerRefresh_Environment, # 环保值 232
+) = range(146, 233)
TYPE_Price_Gold_Paper_Money = 5 # 金钱类型,(先用礼券,再用金子)
TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
@@ -975,6 +979,7 @@
TYPE_Price_SoulSplinters = 29 # 聚魂碎片
TYPE_Price_SoulCore = 30 # 核心环
TYPE_Price_FuncSysPrivilege = 31 # 功能系统特权令
+TYPE_Price_Environment = 32 # 环保值
#以下是旧的金钱类型
TYPE_Price_Magic_Integral = 101 # 魔方寻宝积分
@@ -999,6 +1004,7 @@
TYPE_Price_Honor:CDBPlayerRefresh_Honor,
TYPE_Price_BossActScore:CDBPlayerRefresh_BossActScore,
TYPE_Price_FuncSysPrivilege:CDBPlayerRefresh_FuncSysPrivilege,
+ TYPE_Price_Environment:CDBPlayerRefresh_Environment,
}
# 高效战斗状态
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
index 67c1ef2..3473081 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -1388,7 +1388,7 @@
Writer = hxp
Releaser = hxp
RegType = 0
-RegisterPackCount = 5
+RegisterPackCount = 2
PacketCMD_1=0xAA
PacketSubCMD_1=0x14
@@ -1398,17 +1398,25 @@
PacketSubCMD_2=0x15
PacketCallFunc_2=OnActGarbageGetTaskAward
+;仙匣秘境活动
+[PlayerActXianXiaMJ]
+ScriptName = Player\PlayerActXianXiaMJ.py
+Writer = hxp
+Releaser = hxp
+RegType = 0
+RegisterPackCount = 3
+
+PacketCMD_1=0xAA
+PacketSubCMD_1=0x16
+PacketCallFunc_1=OnActXianXiaMJSuperItem
+
+PacketCMD_2=0xAA
+PacketSubCMD_2=0x17
+PacketCallFunc_2=OnActXianXiaMJLottery
+
PacketCMD_3=0xAA
-PacketSubCMD_3=0x16
-PacketCallFunc_3=OnActGarbageChooseSuperItem
-
-PacketCMD_4=0xAA
-PacketSubCMD_4=0x17
-PacketCallFunc_4=OnActGarbageLottery
-
-PacketCMD_5=0xAA
-PacketSubCMD_5=0x18
-PacketCallFunc_5=OnActGarbageAwardPoolRefresh
+PacketSubCMD_3=0x18
+PacketCallFunc_3=OnActXianXiaMJAwardPoolRefresh
;集字活动
[PlayerActCollectWords]
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index c651a40..dad59d5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3892,14 +3892,16 @@
#垃圾分类活动
Def_PDict_GarbageSortingID = "ActGSID_%s" # 玩家身上的活动ID,唯一标识,取活动开始日期time值,参数:(活动编号)
Def_PDict_GarbageSortingWorldLV = "ActGSWorldLV_%s" #玩家身上的活动世界等级,参数:(活动编号)
-Def_PDict_GarbageGuideState = "ActGSGuideState_%s" #活动引导任务状态,不影响活动数据,仅前端展示需要用到,参数:(活动编号)
Def_PDict_GarbageTaskValue = "ActGSTaskValue_%s_%s" # 任务总进度值,参数(活动编号, 任务ID)
Def_PDict_GarbageTaskFinishCount = "ActGSTaskFinishCount_%s_%s" # 任务已完成次数,参数(活动编号, 任务ID)
-Def_PDict_GarbageEnvironmentValue = "ActGSEnvValue_%s" # 当前可用环保值,参数(活动编号)
-Def_PDict_GarbageEnvironmentValueHis = "ActGSEnvValueHis_%s" # 历史最高环保值,参数(活动编号)
-Def_PDict_GarbageAwardLayerInfo = "ActGSAwardLayerInfo_%s" # 奖池层级信息: 累计抽奖次数*100+层数,参数:(活动编号)
-Def_PDict_GarbageAwardItemInfo = "ActGSItemInfo_%s_%s_%s" # 奖池物品ID*100+抽中位置编号,参数:(活动编号, 库类型, 物品编号)
-Def_PDict_GarbageAwardItemTimes = "ActGSItemTimes_%s_%s_%s" # 奖池物品累计产出次数,有限制次数的才记录,参数:(活动编号, 库类型, 物品ID)
+Def_PDict_GarbageEnvironmentValue = "ActGSEnvValue_%s" # 活动累计获得环保值,参数(活动编号)
+
+#仙匣秘境活动
+Def_PDict_XianXiaMJID = "ActXXMJID_%s" # 玩家身上的活动ID,唯一标识,取活动开始日期time值,参数:(活动编号)
+Def_PDict_XianXiaMJWorldLV = "ActXXMJWorldLV_%s" #玩家身上的活动世界等级,参数:(活动编号)
+Def_PDict_XianXiaMJAwardLayerInfo = "ActXXMJAwardLayerInfo_%s" # 奖池层级信息: 累计抽奖次数*100+层数,参数:(活动编号)
+Def_PDict_XianXiaMJAwardItemInfo = "ActXXMJItemInfo_%s_%s_%s" # 奖池物品ID*100+抽中位置编号,参数:(活动编号, 库类型, 物品编号)
+Def_PDict_XianXiaMJAwardItemTimes = "ActXXMJItemTimes_%s_%s_%s" # 奖池物品累计产出次数,有限制次数的才记录,参数:(活动编号, 库类型, 物品ID)
#-------------------------------------------------------------------------------
#开服活动,Def_PDictType_OpenServerCampaign
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 0a29534..f1676de 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -13321,80 +13321,6 @@
#------------------------------------------------------
-# AA 16 垃圾分类活动选择大奖 #tagCMActGarbageChooseSuperItem
-
-class tagCMActGarbageChooseSuperItem(Structure):
- Head = tagHead()
- ActNum = 0 #(BYTE ActNum)//活动编号
- SuperItemCount = 0 #(BYTE SuperItemCount)//选择物品数量
- SuperItemIDList = list() #(vector<DWORD> SuperItemIDList)//选择的大奖库物品ID列表,每次重新选择需要发送全部已选择的大奖物品ID,不能只发单个物品ID;
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x16
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.SuperItemCount):
- value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
- self.SuperItemIDList.append(value)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x16
- self.ActNum = 0
- self.SuperItemCount = 0
- self.SuperItemIDList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- length += 1
- length += 4 * self.SuperItemCount
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.ActNum)
- data = CommFunc.WriteBYTE(data, self.SuperItemCount)
- for i in range(self.SuperItemCount):
- data = CommFunc.WriteDWORD(data, self.SuperItemIDList[i])
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- ActNum:%d,
- SuperItemCount:%d,
- SuperItemIDList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.ActNum,
- self.SuperItemCount,
- "..."
- )
- return DumpString
-
-
-m_NAtagCMActGarbageChooseSuperItem=tagCMActGarbageChooseSuperItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActGarbageChooseSuperItem.Head.Cmd,m_NAtagCMActGarbageChooseSuperItem.Head.SubCmd))] = m_NAtagCMActGarbageChooseSuperItem
-
-
-#------------------------------------------------------
# AA 15 垃圾分类活动收集已完成的任务垃圾 #tagCMActGarbageGetTaskAward
class tagCMActGarbageGetTaskAward(Structure):
@@ -13448,62 +13374,6 @@
m_NAtagCMActGarbageGetTaskAward=tagCMActGarbageGetTaskAward()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActGarbageGetTaskAward.Cmd,m_NAtagCMActGarbageGetTaskAward.SubCmd))] = m_NAtagCMActGarbageGetTaskAward
-
-
-#------------------------------------------------------
-# AA 17 垃圾分类活动抽奖 #tagCMActGarbageLottery
-
-class tagCMActGarbageLottery(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActNum", c_ubyte), #活动编号
- ("PosNum", c_ubyte), #玩家点击的奖励位置编号,从1开始
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x17
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x17
- self.ActNum = 0
- self.PosNum = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMActGarbageLottery)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 17 垃圾分类活动抽奖 //tagCMActGarbageLottery:
- Cmd:%s,
- SubCmd:%s,
- ActNum:%d,
- PosNum:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActNum,
- self.PosNum
- )
- return DumpString
-
-
-m_NAtagCMActGarbageLottery=tagCMActGarbageLottery()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActGarbageLottery.Cmd,m_NAtagCMActGarbageLottery.SubCmd))] = m_NAtagCMActGarbageLottery
#------------------------------------------------------
@@ -13783,6 +13653,188 @@
#------------------------------------------------------
+# AA 18 仙匣秘境活动奖池刷新 #tagCMActXianXiaMJAwardPoolRefresh
+
+class tagCMActXianXiaMJAwardPoolRefresh(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ActNum", c_ubyte), #活动编号
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xAA
+ self.SubCmd = 0x18
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.Cmd = 0xAA
+ self.SubCmd = 0x18
+ self.ActNum = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMActXianXiaMJAwardPoolRefresh)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// AA 18 仙匣秘境活动奖池刷新 //tagCMActXianXiaMJAwardPoolRefresh:
+ Cmd:%s,
+ SubCmd:%s,
+ ActNum:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ActNum
+ )
+ return DumpString
+
+
+m_NAtagCMActXianXiaMJAwardPoolRefresh=tagCMActXianXiaMJAwardPoolRefresh()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActXianXiaMJAwardPoolRefresh.Cmd,m_NAtagCMActXianXiaMJAwardPoolRefresh.SubCmd))] = m_NAtagCMActXianXiaMJAwardPoolRefresh
+
+
+#------------------------------------------------------
+# AA 17 仙匣秘境活动抽奖 #tagCMActXianXiaMJLottery
+
+class tagCMActXianXiaMJLottery(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ActNum", c_ubyte), #活动编号
+ ("PosNum", c_ubyte), #玩家点击的奖励位置编号,从1开始
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xAA
+ self.SubCmd = 0x17
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.Cmd = 0xAA
+ self.SubCmd = 0x17
+ self.ActNum = 0
+ self.PosNum = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMActXianXiaMJLottery)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// AA 17 仙匣秘境活动抽奖 //tagCMActXianXiaMJLottery:
+ Cmd:%s,
+ SubCmd:%s,
+ ActNum:%d,
+ PosNum:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ActNum,
+ self.PosNum
+ )
+ return DumpString
+
+
+m_NAtagCMActXianXiaMJLottery=tagCMActXianXiaMJLottery()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActXianXiaMJLottery.Cmd,m_NAtagCMActXianXiaMJLottery.SubCmd))] = m_NAtagCMActXianXiaMJLottery
+
+
+#------------------------------------------------------
+# AA 16 仙匣秘境活动选择大奖 #tagCMActXianXiaMJSuperItem
+
+class tagCMActXianXiaMJSuperItem(Structure):
+ Head = tagHead()
+ ActNum = 0 #(BYTE ActNum)//活动编号
+ SuperItemCount = 0 #(BYTE SuperItemCount)//选择物品数量
+ SuperItemIDList = list() #(vector<DWORD> SuperItemIDList)//选择的大奖库物品ID列表,每次重新选择需要发送全部已选择的大奖物品ID,不能只发单个物品ID;
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x16
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.SuperItemCount):
+ value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
+ self.SuperItemIDList.append(value)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x16
+ self.ActNum = 0
+ self.SuperItemCount = 0
+ self.SuperItemIDList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 1
+ length += 4 * self.SuperItemCount
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.ActNum)
+ data = CommFunc.WriteBYTE(data, self.SuperItemCount)
+ for i in range(self.SuperItemCount):
+ data = CommFunc.WriteDWORD(data, self.SuperItemIDList[i])
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ ActNum:%d,
+ SuperItemCount:%d,
+ SuperItemIDList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.ActNum,
+ self.SuperItemCount,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagCMActXianXiaMJSuperItem=tagCMActXianXiaMJSuperItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActXianXiaMJSuperItem.Head.Cmd,m_NAtagCMActXianXiaMJSuperItem.Head.SubCmd))] = m_NAtagCMActXianXiaMJSuperItem
+
+
+#------------------------------------------------------
# AA 06 许愿池活动许愿 #tagCMActWishing
class tagCMActWishing(Structure):
@@ -14012,58 +14064,6 @@
m_NAtagCMFlashSaleAppointment=tagCMFlashSaleAppointment()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFlashSaleAppointment.Cmd,m_NAtagCMFlashSaleAppointment.SubCmd))] = m_NAtagCMFlashSaleAppointment
-
-
-#------------------------------------------------------
-# AA 18 垃圾分类活动奖池刷新 #tagCMGarbageAwardPoolRefresh
-
-class tagCMGarbageAwardPoolRefresh(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActNum", c_ubyte), #活动编号
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x18
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x18
- self.ActNum = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMGarbageAwardPoolRefresh)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 18 垃圾分类活动奖池刷新 //tagCMGarbageAwardPoolRefresh:
- Cmd:%s,
- SubCmd:%s,
- ActNum:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActNum
- )
- return DumpString
-
-
-m_NAtagCMGarbageAwardPoolRefresh=tagCMGarbageAwardPoolRefresh()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGarbageAwardPoolRefresh.Cmd,m_NAtagCMGarbageAwardPoolRefresh.SubCmd))] = m_NAtagCMGarbageAwardPoolRefresh
#------------------------------------------------------
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 219c323..ea699ce 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -24638,203 +24638,7 @@
#------------------------------------------------------
-# AA 57 垃圾收集活动玩家信息 #tagMCActGarbagePlayerInfo
-
-class tagMCActGarbageAwardItemResult(Structure):
- _pack_ = 1
- _fields_ = [
- ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库
- ("ItemID", c_int), # 注意: 不同库物品ID可能相同,但个数不同
- ("ItemCount", c_ushort),
- ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中;
- ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0
- ]
-
- def __init__(self):
- self.Clear()
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.ItemLibType = 0
- self.ItemID = 0
- self.ItemCount = 0
- self.PosNum = 0
- self.TotalTimesNow = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCActGarbageAwardItemResult)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 57 垃圾收集活动玩家信息 //tagMCActGarbagePlayerInfo:
- ItemLibType:%d,
- ItemID:%d,
- ItemCount:%d,
- PosNum:%d,
- TotalTimesNow:%d
- '''\
- %(
- self.ItemLibType,
- self.ItemID,
- self.ItemCount,
- self.PosNum,
- self.TotalTimesNow
- )
- return DumpString
-
-
-class tagMCActGarbagePlayerInfo(Structure):
- Head = tagHead()
- ActNum = 0 #(BYTE ActNum)//活动编号
- GuideTaskFinish = 0 #(BYTE GuideTaskFinish)//引导任务是否已完成,有需要NPC对话引导任务时,则需要先完成才显示活动界面
- EnvironmentValue = 0 #(DWORD EnvironmentValue)//当前可用环保值
- EnvironmentValueHis = 0 #(DWORD EnvironmentValueHis)//历史环保值
- AwardItemResult=tagMCActGarbageAwardItemResult() #(tagMCActGarbageAwardItemResult AwardItemResult)//本次抽奖结果物品信息,可能为空
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x57
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.GuideTaskFinish,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.EnvironmentValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.EnvironmentValueHis,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- _pos = self.AwardItemResult.ReadData(_lpData,_pos)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x57
- self.ActNum = 0
- self.GuideTaskFinish = 0
- self.EnvironmentValue = 0
- self.EnvironmentValueHis = 0
- self.AwardItemResult=tagMCActGarbageAwardItemResult()
- self.AwardItemResult.Clear()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- length += 1
- length += 4
- length += 4
- length += self.AwardItemResult.GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.ActNum)
- data = CommFunc.WriteBYTE(data, self.GuideTaskFinish)
- data = CommFunc.WriteDWORD(data, self.EnvironmentValue)
- data = CommFunc.WriteDWORD(data, self.EnvironmentValueHis)
- data = CommFunc.WriteString(data,self.AwardItemResult.GetLength(),self.AwardItemResult.GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- ActNum:%d,
- GuideTaskFinish:%d,
- EnvironmentValue:%d,
- EnvironmentValueHis:%d,
- AwardItemResult:%s
- '''\
- %(
- self.Head.OutputString(),
- self.ActNum,
- self.GuideTaskFinish,
- self.EnvironmentValue,
- self.EnvironmentValueHis,
- self.AwardItemResult.OutputString()
- )
- return DumpString
-
-
-m_NAtagMCActGarbagePlayerInfo=tagMCActGarbagePlayerInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGarbagePlayerInfo.Head.Cmd,m_NAtagMCActGarbagePlayerInfo.Head.SubCmd))] = m_NAtagMCActGarbagePlayerInfo
-
-
-#------------------------------------------------------
# AA 55 垃圾收集活动信息 #tagMCActGarbageSortingInfo
-
-class tagMCActGarbageAwardItem(Structure):
- _pack_ = 1
- _fields_ = [
- ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库
- ("ItemID", c_int), # 注意: 不同库物品ID可能相同,但个数不同
- ("ItemCount", c_ushort),
- ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中;
- ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0
- ("TotalTimesMax", c_ubyte), #最大可产出次数,0不限
- ("LayerLimit", c_ubyte), #大于等于X层后可产出,0不限
- ]
-
- def __init__(self):
- self.Clear()
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.ItemLibType = 0
- self.ItemID = 0
- self.ItemCount = 0
- self.PosNum = 0
- self.TotalTimesNow = 0
- self.TotalTimesMax = 0
- self.LayerLimit = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCActGarbageAwardItem)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 55 垃圾收集活动信息 //tagMCActGarbageSortingInfo:
- ItemLibType:%d,
- ItemID:%d,
- ItemCount:%d,
- PosNum:%d,
- TotalTimesNow:%d,
- TotalTimesMax:%d,
- LayerLimit:%d
- '''\
- %(
- self.ItemLibType,
- self.ItemID,
- self.ItemCount,
- self.PosNum,
- self.TotalTimesNow,
- self.TotalTimesMax,
- self.LayerLimit
- )
- return DumpString
-
class tagMCActGarbageSortingInfo(Structure):
Head = tagHead()
@@ -24842,12 +24646,7 @@
StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
LimitLV = 0 #(WORD LimitLV)// 限制等级
- LayerNum = 0 #(BYTE LayerNum)//当前奖池第几层
- AwardItemCount = 0 #(BYTE AwardItemCount)
- AwardItemList = list() #(vector<tagMCActGarbageAwardItem> AwardItemList)// 奖池物品列表,已生成的,包含已选择的大奖物品
- SuperItemCount = 0 #(BYTE SuperItemCount)
- SuperItemList = list() #(vector<tagMCActGarbageAwardItem> SuperItemList)// 大奖物品待选择库,由玩家从库中选择放入奖池的物品;
- SuperItemCanChooseCount = 0 #(BYTE SuperItemCanChooseCount)// 大奖物品可选择个数
+ ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置
data = None
def __init__(self):
@@ -24863,18 +24662,7 @@
self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
- self.LayerNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.AwardItemCount):
- temAwardItemList = tagMCActGarbageAwardItem()
- _pos = temAwardItemList.ReadData(_lpData, _pos)
- self.AwardItemList.append(temAwardItemList)
- self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.SuperItemCount):
- temSuperItemList = tagMCActGarbageAwardItem()
- _pos = temSuperItemList.ReadData(_lpData, _pos)
- self.SuperItemList.append(temSuperItemList)
- self.SuperItemCanChooseCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
return _pos
def Clear(self):
@@ -24886,12 +24674,7 @@
self.StartDate = ""
self.EndtDate = ""
self.LimitLV = 0
- self.LayerNum = 0
- self.AwardItemCount = 0
- self.AwardItemList = list()
- self.SuperItemCount = 0
- self.SuperItemList = list()
- self.SuperItemCanChooseCount = 0
+ self.ResetType = 0
return
def GetLength(self):
@@ -24901,13 +24684,6 @@
length += 10
length += 10
length += 2
- length += 1
- length += 1
- for i in range(self.AwardItemCount):
- length += self.AwardItemList[i].GetLength()
- length += 1
- for i in range(self.SuperItemCount):
- length += self.SuperItemList[i].GetLength()
length += 1
return length
@@ -24919,14 +24695,7 @@
data = CommFunc.WriteString(data, 10, self.StartDate)
data = CommFunc.WriteString(data, 10, self.EndtDate)
data = CommFunc.WriteWORD(data, self.LimitLV)
- data = CommFunc.WriteBYTE(data, self.LayerNum)
- data = CommFunc.WriteBYTE(data, self.AwardItemCount)
- for i in range(self.AwardItemCount):
- data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
- data = CommFunc.WriteBYTE(data, self.SuperItemCount)
- for i in range(self.SuperItemCount):
- data = CommFunc.WriteString(data, self.SuperItemList[i].GetLength(), self.SuperItemList[i].GetBuffer())
- data = CommFunc.WriteBYTE(data, self.SuperItemCanChooseCount)
+ data = CommFunc.WriteBYTE(data, self.ResetType)
return data
def OutputString(self):
@@ -24936,12 +24705,7 @@
StartDate:%s,
EndtDate:%s,
LimitLV:%d,
- LayerNum:%d,
- AwardItemCount:%d,
- AwardItemList:%s,
- SuperItemCount:%d,
- SuperItemList:%s,
- SuperItemCanChooseCount:%d
+ ResetType:%d
'''\
%(
self.Head.OutputString(),
@@ -24949,12 +24713,7 @@
self.StartDate,
self.EndtDate,
self.LimitLV,
- self.LayerNum,
- self.AwardItemCount,
- "...",
- self.SuperItemCount,
- "...",
- self.SuperItemCanChooseCount
+ self.ResetType
)
return DumpString
@@ -27934,6 +27693,288 @@
#------------------------------------------------------
+# AA 59 仙匣秘境抽奖结果 #tagMCActXianXiaMJAwardItemResult
+
+class tagMCActXianXiaMJAwardItemResult(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ActNum", c_ubyte), # 活动编号
+ ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库
+ ("ItemID", c_int), # 注意: 不同库物品ID可能相同,但个数不同
+ ("ItemCount", c_ushort),
+ ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中;
+ ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xAA
+ self.SubCmd = 0x59
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.Cmd = 0xAA
+ self.SubCmd = 0x59
+ self.ActNum = 0
+ self.ItemLibType = 0
+ self.ItemID = 0
+ self.ItemCount = 0
+ self.PosNum = 0
+ self.TotalTimesNow = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCActXianXiaMJAwardItemResult)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// AA 59 仙匣秘境抽奖结果 //tagMCActXianXiaMJAwardItemResult:
+ Cmd:%s,
+ SubCmd:%s,
+ ActNum:%d,
+ ItemLibType:%d,
+ ItemID:%d,
+ ItemCount:%d,
+ PosNum:%d,
+ TotalTimesNow:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ActNum,
+ self.ItemLibType,
+ self.ItemID,
+ self.ItemCount,
+ self.PosNum,
+ self.TotalTimesNow
+ )
+ return DumpString
+
+
+m_NAtagMCActXianXiaMJAwardItemResult=tagMCActXianXiaMJAwardItemResult()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActXianXiaMJAwardItemResult.Cmd,m_NAtagMCActXianXiaMJAwardItemResult.SubCmd))] = m_NAtagMCActXianXiaMJAwardItemResult
+
+
+#------------------------------------------------------
+# AA 58 仙匣秘境活动信息 #tagMCActXianXiaMJInfo
+
+class tagMCActXianXiaMJAwardItem(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库
+ ("ItemID", c_int), # 注意: 不同库物品ID可能相同,但个数不同
+ ("ItemCount", c_ushort),
+ ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中;
+ ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0
+ ("TotalTimesMax", c_ubyte), #最大可产出次数,0不限
+ ("LayerLimit", c_ubyte), #大于等于X层后可产出,0不限
+ ]
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.ItemLibType = 0
+ self.ItemID = 0
+ self.ItemCount = 0
+ self.PosNum = 0
+ self.TotalTimesNow = 0
+ self.TotalTimesMax = 0
+ self.LayerLimit = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCActXianXiaMJAwardItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// AA 58 仙匣秘境活动信息 //tagMCActXianXiaMJInfo:
+ ItemLibType:%d,
+ ItemID:%d,
+ ItemCount:%d,
+ PosNum:%d,
+ TotalTimesNow:%d,
+ TotalTimesMax:%d,
+ LayerLimit:%d
+ '''\
+ %(
+ self.ItemLibType,
+ self.ItemID,
+ self.ItemCount,
+ self.PosNum,
+ self.TotalTimesNow,
+ self.TotalTimesMax,
+ self.LayerLimit
+ )
+ return DumpString
+
+
+class tagMCActXianXiaMJInfo(Structure):
+ Head = tagHead()
+ ActNum = 0 #(BYTE ActNum)// 活动编号
+ StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
+ EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
+ LimitLV = 0 #(WORD LimitLV)// 限制等级
+ ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置
+ MoneyType = 0 #(BYTE MoneyType)//消耗货币类型
+ MoneyValue = 0 #(WORD MoneyValue)//消耗货币值
+ LayerNum = 0 #(BYTE LayerNum)//当前奖池第几层
+ AwardItemCount = 0 #(BYTE AwardItemCount)
+ AwardItemList = list() #(vector<tagMCActXianXiaMJAwardItem> AwardItemList)// 奖池物品列表,已生成的,包含已选择的大奖物品
+ SuperItemCount = 0 #(BYTE SuperItemCount)
+ SuperItemList = list() #(vector<tagMCActXianXiaMJAwardItem> SuperItemList)// 大奖物品待选择库,由玩家从库中选择放入奖池的物品;
+ SuperItemCanChooseCount = 0 #(BYTE SuperItemCanChooseCount)// 大奖物品可选择个数
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x58
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
+ self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
+ self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.MoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.MoneyValue,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.LayerNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.AwardItemCount):
+ temAwardItemList = tagMCActXianXiaMJAwardItem()
+ _pos = temAwardItemList.ReadData(_lpData, _pos)
+ self.AwardItemList.append(temAwardItemList)
+ self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.SuperItemCount):
+ temSuperItemList = tagMCActXianXiaMJAwardItem()
+ _pos = temSuperItemList.ReadData(_lpData, _pos)
+ self.SuperItemList.append(temSuperItemList)
+ self.SuperItemCanChooseCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x58
+ self.ActNum = 0
+ self.StartDate = ""
+ self.EndtDate = ""
+ self.LimitLV = 0
+ self.ResetType = 0
+ self.MoneyType = 0
+ self.MoneyValue = 0
+ self.LayerNum = 0
+ self.AwardItemCount = 0
+ self.AwardItemList = list()
+ self.SuperItemCount = 0
+ self.SuperItemList = list()
+ self.SuperItemCanChooseCount = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 10
+ length += 10
+ length += 2
+ length += 1
+ length += 1
+ length += 2
+ length += 1
+ length += 1
+ for i in range(self.AwardItemCount):
+ length += self.AwardItemList[i].GetLength()
+ length += 1
+ for i in range(self.SuperItemCount):
+ length += self.SuperItemList[i].GetLength()
+ length += 1
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.ActNum)
+ data = CommFunc.WriteString(data, 10, self.StartDate)
+ data = CommFunc.WriteString(data, 10, self.EndtDate)
+ data = CommFunc.WriteWORD(data, self.LimitLV)
+ data = CommFunc.WriteBYTE(data, self.ResetType)
+ data = CommFunc.WriteBYTE(data, self.MoneyType)
+ data = CommFunc.WriteWORD(data, self.MoneyValue)
+ data = CommFunc.WriteBYTE(data, self.LayerNum)
+ data = CommFunc.WriteBYTE(data, self.AwardItemCount)
+ for i in range(self.AwardItemCount):
+ data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.SuperItemCount)
+ for i in range(self.SuperItemCount):
+ data = CommFunc.WriteString(data, self.SuperItemList[i].GetLength(), self.SuperItemList[i].GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.SuperItemCanChooseCount)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ ActNum:%d,
+ StartDate:%s,
+ EndtDate:%s,
+ LimitLV:%d,
+ ResetType:%d,
+ MoneyType:%d,
+ MoneyValue:%d,
+ LayerNum:%d,
+ AwardItemCount:%d,
+ AwardItemList:%s,
+ SuperItemCount:%d,
+ SuperItemList:%s,
+ SuperItemCanChooseCount:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.ActNum,
+ self.StartDate,
+ self.EndtDate,
+ self.LimitLV,
+ self.ResetType,
+ self.MoneyType,
+ self.MoneyValue,
+ self.LayerNum,
+ self.AwardItemCount,
+ "...",
+ self.SuperItemCount,
+ "...",
+ self.SuperItemCanChooseCount
+ )
+ return DumpString
+
+
+m_NAtagMCActXianXiaMJInfo=tagMCActXianXiaMJInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActXianXiaMJInfo.Head.Cmd,m_NAtagMCActXianXiaMJInfo.Head.SubCmd))] = m_NAtagMCActXianXiaMJInfo
+
+
+#------------------------------------------------------
# AA 15 仙界盛典全民来嗨玩家信息 #tagMCAllPeoplePartyInfo
class tagMCAllPeoplePartyCount(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestCommon.py
index 15fa16f..da87f73 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestCommon.py
@@ -35,7 +35,6 @@
import ChPyNetSendPack
import NetPackCommon
import EventShell
-import PlayerActGarbageSorting
#---------------------------------------------------------------------
#所有任务的索引
FindQuestFunc = None
@@ -207,8 +206,6 @@
# 剧情任务完成处理
OnStoryMissionFinish(curPlayer, missionID)
-
- PlayerActGarbageSorting.OnFinishTask(curPlayer, missionID)
EventReport.WriteEvent_mission_log(curPlayer, curQuestData, 1, isFinish, failReason)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintMoney.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintMoney.py
index 6e5be71..4b9b3e5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintMoney.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintMoney.py
@@ -31,7 +31,10 @@
return
GameWorld.DebugAnswer(curPlayer, "--------------------")
- for moneyType, name in SetMoney.moneyNameDict.items():
+ moneyTypeList = SetMoney.moneyNameDict.keys()
+ moneyTypeList.sort()
+ for moneyType in moneyTypeList:
+ name = SetMoney.moneyNameDict[moneyType]
GameWorld.DebugAnswer(curPlayer, "%s%s=%s" % (moneyType, name, PlayerControl.GetMoney(curPlayer, moneyType)))
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py
index 1dfaf04..0eca5f9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py
@@ -28,7 +28,7 @@
moneyNameDict = {
1:"仙玉", 2:"绑玉", 3:"铜钱", 6:"战盟贡献度", 10:"战盟仓库积分", 13:"境界修行点", 14:"符印融合石", 15:"仙盟活跃令",
16:"助战积分", 18:"荣誉", 19:"Boss积分", 23:"符印精华", 24:"符印碎片", 25:"寻宝积分", 26:"集市额度", 27:"丹精", 28:"魂尘",
- 29:"聚魂碎片", 30:"核心环", 31:"功能特权令"
+ 29:"聚魂碎片", 30:"核心环", 31:"功能特权令", 32:"环保值"
}
## GM命令执行入口
@@ -42,6 +42,7 @@
moneyType = List[0]
if moneyType == 0:
moneyList = moneyNameDict.keys()
+ moneyList.sort()
else:
moneyList = [moneyType]
for moneyType in moneyList:
@@ -54,8 +55,9 @@
GameWorld.DebugAnswer(curPlayer, "设置货币: SetMoney 货币类型 数值")
GameWorld.DebugAnswer(curPlayer, "显示货币: SetMoney 货币类型")
helpStr = ""
- for moneyType, name in moneyNameDict.items():
- helpStr += "%s-%s;" % (moneyType, name)
+ moneyTypeList = moneyNameDict.keys()
+ for moneyType in moneyTypeList:
+ helpStr += "%s-%s;" % (moneyType, moneyNameDict[moneyType])
GameWorld.DebugAnswer(curPlayer, helpStr)
return
#钱币类型
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index f566635..ea652aa 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -1147,9 +1147,9 @@
("DWORD", "CfgID", 1),
("char", "StartDate", 0),
("char", "EndDate", 0),
+ ("BYTE", "ResetType", 0),
("WORD", "LVLimit", 0),
("BYTE", "CTGTypeEffValue", 0),
- ("BYTE", "TemplateID", 0),
),
"ActGarbageTask":(
@@ -1160,7 +1160,17 @@
("list", "ProduceGarbageRateList", 0),
),
- "ActGarbageAward":(
+ "ActXianXiaMJ":(
+ ("DWORD", "CfgID", 1),
+ ("char", "StartDate", 0),
+ ("char", "EndDate", 0),
+ ("BYTE", "ResetType", 0),
+ ("WORD", "LVLimit", 0),
+ ("list", "UseMoneyInfo", 0),
+ ("BYTE", "TemplateID", 0),
+ ),
+
+ "ActXianXiaMJAward":(
("DWORD", "TemplateID", 1),
("BYTE", "AwardLibType", 0),
("BYTE", "AwardItemCount", 0),
@@ -4180,17 +4190,17 @@
self.CfgID = 0
self.StartDate = ""
self.EndDate = ""
+ self.ResetType = 0
self.LVLimit = 0
- self.CTGTypeEffValue = 0
- self.TemplateID = 0
+ self.CTGTypeEffValue = 0
return
def GetCfgID(self): return self.CfgID # 配置ID
def GetStartDate(self): return self.StartDate # 开启日期
def GetEndDate(self): return self.EndDate # 结束日期
+ def GetResetType(self): return self.ResetType # 重置类型,0-0点重置;1-5点重置
def GetLVLimit(self): return self.LVLimit # 限制等级
- def GetCTGTypeEffValue(self): return self.CTGTypeEffValue # 充值有效类型值
- def GetTemplateID(self): return self.TemplateID # 模板ID
+ def GetCTGTypeEffValue(self): return self.CTGTypeEffValue # 充值有效类型值
# 垃圾分类任务产出表
class IPY_ActGarbageTask():
@@ -4209,8 +4219,29 @@
def GetAutoProduce(self): return self.AutoProduce # 自动产生垃圾
def GetProduceGarbageRateList(self): return self.ProduceGarbageRateList # 随机产生垃圾概率饼图
-# 垃圾分类环保奖池表
-class IPY_ActGarbageAward():
+# 仙匣秘境活动时间表
+class IPY_ActXianXiaMJ():
+
+ def __init__(self):
+ self.CfgID = 0
+ self.StartDate = ""
+ self.EndDate = ""
+ self.ResetType = 0
+ self.LVLimit = 0
+ self.UseMoneyInfo = []
+ self.TemplateID = 0
+ return
+
+ def GetCfgID(self): return self.CfgID # 配置ID
+ def GetStartDate(self): return self.StartDate # 开启日期
+ def GetEndDate(self): return self.EndDate # 结束日期
+ def GetResetType(self): return self.ResetType # 重置类型,0-0点重置;1-5点重置
+ def GetLVLimit(self): return self.LVLimit # 限制等级
+ def GetUseMoneyInfo(self): return self.UseMoneyInfo # 消耗货币信息
+ def GetTemplateID(self): return self.TemplateID # 模板ID
+
+# 仙匣秘境奖池表
+class IPY_ActXianXiaMJAward():
def __init__(self):
self.TemplateID = 0
@@ -5898,8 +5929,10 @@
self.ipyActGarbageSortingLen = len(self.ipyActGarbageSortingCache)
self.ipyActGarbageTaskCache = self.__LoadFileData("ActGarbageTask", IPY_ActGarbageTask)
self.ipyActGarbageTaskLen = len(self.ipyActGarbageTaskCache)
- self.ipyActGarbageAwardCache = self.__LoadFileData("ActGarbageAward", IPY_ActGarbageAward)
- self.ipyActGarbageAwardLen = len(self.ipyActGarbageAwardCache)
+ self.ipyActXianXiaMJCache = self.__LoadFileData("ActXianXiaMJ", IPY_ActXianXiaMJ)
+ self.ipyActXianXiaMJLen = len(self.ipyActXianXiaMJCache)
+ self.ipyActXianXiaMJAwardCache = self.__LoadFileData("ActXianXiaMJAward", IPY_ActXianXiaMJAward)
+ self.ipyActXianXiaMJAwardLen = len(self.ipyActXianXiaMJAwardCache)
self.ipyActHorsePetFeastCache = self.__LoadFileData("ActHorsePetFeast", IPY_ActHorsePetFeast)
self.ipyActHorsePetFeastLen = len(self.ipyActHorsePetFeastCache)
self.ipyActBossRebornCache = self.__LoadFileData("ActBossReborn", IPY_ActBossReborn)
@@ -6440,8 +6473,10 @@
def GetActGarbageSortingByIndex(self, index): return self.ipyActGarbageSortingCache[index]
def GetActGarbageTaskCount(self): return self.ipyActGarbageTaskLen
def GetActGarbageTaskByIndex(self, index): return self.ipyActGarbageTaskCache[index]
- def GetActGarbageAwardCount(self): return self.ipyActGarbageAwardLen
- def GetActGarbageAwardByIndex(self, index): return self.ipyActGarbageAwardCache[index]
+ def GetActXianXiaMJCount(self): return self.ipyActXianXiaMJLen
+ def GetActXianXiaMJByIndex(self, index): return self.ipyActXianXiaMJCache[index]
+ def GetActXianXiaMJAwardCount(self): return self.ipyActXianXiaMJAwardLen
+ def GetActXianXiaMJAwardByIndex(self, index): return self.ipyActXianXiaMJAwardCache[index]
def GetActHorsePetFeastCount(self): return self.ipyActHorsePetFeastLen
def GetActHorsePetFeastByIndex(self, index): return self.ipyActHorsePetFeastCache[index]
def GetActBossRebornCount(self): return self.ipyActBossRebornLen
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index 89670e8..153db11 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -107,6 +107,7 @@
import PlayerActTotalRecharge
import PlayerActRechargePrize
import PlayerActGarbageSorting
+import PlayerActXianXiaMJ
import PlayerActRechargeRebateGold
import PlayerActManyDayRecharge
import PlayerActSingleRecharge
@@ -723,6 +724,8 @@
PlayerActLogin.OnLogin(curPlayer)
# 垃圾分类活动
PlayerActGarbageSorting.OnPlayerLogin(curPlayer)
+ # 仙匣秘境活动
+ PlayerActXianXiaMJ.OnPlayerLogin(curPlayer)
# 多日连充活动
PlayerActManyDayRecharge.OnPlayerLogin(curPlayer)
# 单笔累充活动
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGarbageSorting.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGarbageSorting.py
index 177a4ce..9fbfda5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGarbageSorting.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGarbageSorting.py
@@ -26,9 +26,6 @@
import ChConfig
import ItemCommon
import PlayerBillboard
-import QuestCommon
-
-Def_SuperLibType = 9 # 大奖库类型固定为9
def OnPlayerLogin(curPlayer):
@@ -39,7 +36,6 @@
# 活动中同步活动信息
if actInfo.get(ShareDefine.ActKey_State):
Sync_GarbageSortingActionInfo(curPlayer, actNum)
- Sync_GarbageSortingPlayerInfo(curPlayer, actNum)
Sync_GarbageTaskInfo(curPlayer, actNum)
return
@@ -74,64 +70,20 @@
GameWorld.DebugLog("垃圾分类重置! actNum=%s,actID=%s,playerActID=%s,state=%s,cfgID=%s"
% (actNum, actID, playerActID, state, cfgID), playerID)
- guideTaskID = IpyGameDataPY.GetFuncCfg("GarbageSorting", 1)
- if guideTaskID:
- if state:
- curMission = QuestCommon.AddNewMission(curPlayer, guideTaskID)
- if curMission:
- QuestCommon.SetPlayerMissionState(curPlayer, curMission, 1)
- else:
- QuestCommon.DeleteMission(curPlayer, guideTaskID)
-
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageSortingID % actNum, actID)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageSortingWorldLV % actNum, actWorldLV)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageGuideState % actNum, 0)
for taskID in ChConfig.GarbageTaskList:
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageTaskValue % (actNum, taskID), 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageTaskFinishCount % (actNum, taskID), 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageEnvironmentValue % actNum, 0)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageEnvironmentValueHis % actNum, 0)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageAwardLayerInfo % actNum, 0)
- ipyData = IpyGameDataPY.GetIpyGameData("ActGarbageSorting", cfgID) if cfgID else None
- templateID = ipyData.GetTemplateID() if ipyData else 0
- awardIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActGarbageAward", templateID) if templateID else []
- if awardIpyDataList:
- for awardIpyData in awardIpyDataList:
- libType = awardIpyData.GetAwardLibType()
- libItemCount = awardIpyData.GetAwardItemCount()
- for num in xrange(libItemCount):
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageAwardItemInfo % (actNum, libType, num), 0)
-
- itemAwardTimesTotalInfo = awardIpyData.GetItemAwardTimesTotalInfo()
- for itemID in itemAwardTimesTotalInfo.keys():
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageAwardItemTimes % (actNum, libType, itemID), 0)
-
- # 活动中,生成新奖池
- if state:
- __RefreshGarbageAwardPool(curPlayer, actInfo, awardIpyDataList)
-
+ # 清除垃圾背包物品、重置环保值
+ ItemControler.ClearPack(curPlayer, ShareDefine.rptGarbage)
+ PlayerControl.SetPlayerCurrency(curPlayer, ShareDefine.TYPE_Price_Environment, 0)
+
Sync_GarbageSortingActionInfo(curPlayer, actNum)
- Sync_GarbageSortingPlayerInfo(curPlayer, actNum)
Sync_GarbageTaskInfo(curPlayer, actNum)
return True
-
-def OnFinishTask(curPlayer, taskID):
- guideTaskID = IpyGameDataPY.GetFuncCfg("GarbageSorting", 1)
- if not guideTaskID:
- return
-
- if taskID != guideTaskID:
- return
-
- for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_GarbageSorting, {}).values():
- if not actInfo.get(ShareDefine.ActKey_State):
- continue
- actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageGuideState % actNum, 1)
- Sync_GarbageSortingPlayerInfo(curPlayer, actNum)
-
- return
def AddActGarbageTaskProgress(curPlayer, taskID, addValue=1, valueInfo=None):
## 增加垃圾收集任务进度
@@ -281,17 +233,13 @@
if not addEnvValueTotal:
return
- curEnvValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageEnvironmentValue % actNum) + addEnvValueTotal
- hisEnvValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageEnvironmentValueHis % actNum) + addEnvValueTotal
+ PlayerControl.GiveMoney(curPlayer, ShareDefine.TYPE_Price_Environment, addEnvValueTotal)
+ actEnvValueTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageEnvironmentValue % actNum) + addEnvValueTotal
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageEnvironmentValue % actNum, actEnvValueTotal)
+ GameWorld.DebugLog(" addEnvValueTotal=%s,actEnvValueTotal=%s,curEnvValue=%s"
+ % (addEnvValueTotal, actEnvValueTotal, PlayerControl.GetMoney(curPlayer, ShareDefine.TYPE_Price_Environment)), playerID)
- GameWorld.DebugLog(" addEnvValueTotal=%s,curEnvValue=%s,hisEnvValue=%s" % (addEnvValueTotal, curEnvValue, hisEnvValue), playerID)
-
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageEnvironmentValue % actNum, curEnvValue)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageEnvironmentValueHis % actNum, hisEnvValue)
-
- PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_Environment, hisEnvValue)
-
- Sync_GarbageSortingPlayerInfo(curPlayer, actNum)
+ PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_Environment, actEnvValueTotal)
return
@@ -308,411 +256,6 @@
actNum = clientData.ActNum
taskID = clientData.GarbageTaskID
__DoCheckFinishGarbageTask(curPlayer, actNum, taskID)
- return
-
-
-#// AA 16 垃圾分类活动选择大奖 #tagCMActGarbageChooseSuperItem
-#
-#struct tagCMActGarbageChooseSuperItem
-#{
-# tagHead Head;
-# BYTE ActNum; //活动编号
-# BYTE SuperItemCount; //选择物品数量
-# DWORD SuperItemIDList[SuperItemCount]; //选择的大奖库物品ID列表,每次重新选择需要发送全部已选择的大奖物品ID,不能只发单个物品ID;
-#};
-def OnActGarbageChooseSuperItem(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- actNum = clientData.ActNum
- superItemIDList = clientData.SuperItemIDList
-
- GameWorld.DebugLog("垃圾分类活动选择大奖: actNum=%s,superItemIDList=%s" % (actNum, superItemIDList))
-
- actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_GarbageSorting, actNum)
- if not actInfo.get(ShareDefine.ActKey_State):
- return
-
- cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
- ipyData = IpyGameDataPY.GetIpyGameData("ActGarbageSorting", cfgID)
- if not ipyData:
- return
-
- templateID = ipyData.GetTemplateID()
- if not templateID:
- return
-
- actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
- awardIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActGarbageAward", templateID)
- if not awardIpyDataList:
- return
-
- superAwardIpyData = None
- for awardIpyData in awardIpyDataList:
- libType = awardIpyData.GetAwardLibType()
- if libType == Def_SuperLibType:
- superAwardIpyData = awardIpyData
- break
-
- if not superAwardIpyData:
- GameWorld.ErrLog("没有配置垃圾分类活动大奖库! cfgID=%s,actNum=%s,templateID=%s" % (cfgID, actNum, templateID))
- return
-
- superLibItemCount = superAwardIpyData.GetAwardItemCount()
- if len(superItemIDList) != superLibItemCount:
- GameWorld.ErrLog("垃圾分类活动选择大奖个数错误! cfgID=%s,actNum=%s,templateID=%s,superLibItemCount=%s,reqSuperItemIDList=%s"
- % (cfgID, actNum, templateID, superLibItemCount, superItemIDList))
- return
-
- posNumItemIDList = [] # 已抽中的大奖物品ID
- libType = superAwardIpyData.GetAwardLibType()
- for num in xrange(superLibItemCount):
- itemInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageAwardItemInfo % (actNum, libType, num))
- if not itemInfoValue:
- break
- itemID, posNum = itemInfoValue / 100, itemInfoValue % 100
- if posNum and itemID not in superItemIDList:
- GameWorld.ErrLog("垃圾分类活动选择大奖ID错误! 已抽中的大奖ID为必选ID! posNum=%s, itemID=%s not in superItemIDList=%s"
- % (posNum, itemID, superItemIDList))
- return
-
- if posNum:
- posNumItemIDList.append(itemID)
-
- GameWorld.DebugLog(" 已抽中的大奖ID! %s" % posNumItemIDList)
-
- layerInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageAwardLayerInfo % actNum)
- layerNum = layerInfoValue % 100
-
- libItemDict = __GetGarbageAwardLibItem(superAwardIpyData.GetLibItemInfo(), actWorldLV)
- layerLimitInfo = superAwardIpyData.GetItemLayerLimitInfo()
- awardTimesTotalInfo = superAwardIpyData.GetItemAwardTimesTotalInfo()
-
- replaceSuperItemIDList = [] # 需要替换的大奖ID列表
-
- for selectItemID in superItemIDList:
- if selectItemID in posNumItemIDList:
- GameWorld.DebugLog(" 已抽中的大奖ID,不验证!selectItemID=%s" % (selectItemID))
- continue
-
- if selectItemID not in libItemDict:
- GameWorld.ErrLog("垃圾分类活动选择大奖ID错误! 大奖ID不存在大奖库中! selectItemID=%s not in libItemDict=%s"
- % (selectItemID, libItemDict))
- return
-
- layerLimit = layerLimitInfo.get(selectItemID, 0)
- if layerLimit > layerNum:
- GameWorld.ErrLog("垃圾分类活动选择大奖ID错误! 大奖ID该层不能选择! selectItemID=%s layerLimit(%s) > layerNum(%s)"
- % (selectItemID, layerLimit, layerNum))
- return
-
- totalTimesLimit = awardTimesTotalInfo.get(selectItemID, 0)
- if totalTimesLimit:
- totalTimesNow = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageAwardItemTimes % (actNum, libType, selectItemID))
- if totalTimesNow >= totalTimesLimit:
- GameWorld.ErrLog("垃圾分类活动选择大奖ID错误! 大奖ID已达到最大奖励次数,不能选择! selectItemID=%s totalTimesNow(%s) >= totalTimesLimit(%s)"
- % (selectItemID, totalTimesNow, totalTimesLimit))
- return
-
- replaceSuperItemIDList.append(selectItemID)
-
- GameWorld.DebugLog(" 验证通过,可替换大奖ID! replaceSuperItemIDList=%s" % replaceSuperItemIDList)
- if not replaceSuperItemIDList:
- return
-
- for num in xrange(superLibItemCount):
- itemInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageAwardItemInfo % (actNum, libType, num))
- itemID, posNum = itemInfoValue / 100, itemInfoValue % 100
- if itemID in posNumItemIDList:
- GameWorld.DebugLog(" 已抽中的大奖ID,不替换!itemID=%s" % (itemID))
- continue
- replaceSuperItemID = replaceSuperItemIDList.pop(0)
- updItemInfoValue = replaceSuperItemID * 100 + posNum
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageAwardItemInfo % (actNum, libType, num), updItemInfoValue)
- GameWorld.DebugLog(" 替换大奖ID选择!num=%s,itemID=%s,posNum=%s,replaceSuperItemID=%s,updItemInfoValue=%s"
- % (num, itemID, posNum, replaceSuperItemID, updItemInfoValue))
-
- if not replaceSuperItemIDList:
- break
-
- Sync_GarbageSortingActionInfo(curPlayer, actNum)
- return
-
-#// AA 18 垃圾分类活动奖池刷新 #tagCMGarbageAwardPoolRefresh
-#
-#struct tagCMGarbageAwardPoolRefresh
-#{
-# tagHead Head;
-# BYTE ActNum; //活动编号
-#};
-def OnActGarbageAwardPoolRefresh(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- actNum = clientData.ActNum
-
- GameWorld.DebugLog("垃圾分类活动奖池刷新: actNum=%s" % (actNum))
-
- actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_GarbageSorting, actNum)
- if not actInfo.get(ShareDefine.ActKey_State):
- return
-
- cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
- ipyData = IpyGameDataPY.GetIpyGameData("ActGarbageSorting", cfgID)
- if not ipyData:
- return
-
- templateID = ipyData.GetTemplateID()
- if not templateID:
- return
-
- awardIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActGarbageAward", templateID)
- if not awardIpyDataList:
- return
-
- if not __RefreshGarbageAwardPool(curPlayer, actInfo, awardIpyDataList):
- return
-
- Sync_GarbageSortingActionInfo(curPlayer, actNum)
- return
-
-def __RefreshGarbageAwardPool(curPlayer, actInfo, awardIpyDataList):
- ## 刷新垃圾收集环保奖池物品
-
- cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
- actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
- actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
-
- layerInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageAwardLayerInfo % actNum)
- layerNum = layerInfoValue % 100
-
- GameWorld.DebugLog("刷新垃圾收集环保奖池物品: cfgID=%s,actNum=%s,actWorldLV=%s,layerNum=%s" % (cfgID, actNum, actWorldLV, layerNum))
-
- if layerNum:
- # 非0层,验证大奖是否已抽完,抽完才可以刷新奖池层
- superLib = False
- for awardIpyData in awardIpyDataList:
- libType = awardIpyData.GetAwardLibType()
- if libType != Def_SuperLibType:
- continue
- superLib = True
- libItemCount = awardIpyData.GetAwardItemCount()
- for num in xrange(libItemCount):
- itemInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageAwardItemInfo % (actNum, libType, num))
- itemID, posNum = itemInfoValue / 100, itemInfoValue % 100
- if itemID and not posNum:
- GameWorld.ErrLog("有大奖未抽中!无法刷新环保奖池! cfgID=%s,actNum=%s,layerNum=%s,num=%s,itemID=%s,posNum=%s"
- % (cfgID, actNum, layerNum, num, itemID, posNum))
- return
- break
- if not superLib:
- GameWorld.ErrLog("奖池配置没有大奖库!无法刷新环保奖池! cfgID=%s,actNum=%s,layerNum=%s,superLib=%s" % (cfgID, actNum, layerNum, superLib))
- return
-
- layerNum += 1 # 可刷新奖池,默认+1层
- GameWorld.DebugLog(" 可刷新奖池!下一层: layerNum=%s" % (layerNum))
-
- refreshLibDict = {}
- for awardIpyData in awardIpyDataList:
- libType = awardIpyData.GetAwardLibType()
- libItemCount = awardIpyData.GetAwardItemCount()
- libItemDict = __GetGarbageAwardLibItem(awardIpyData.GetLibItemInfo(), actWorldLV)
- layerLimitInfo = awardIpyData.GetItemLayerLimitInfo()
- awardTimesTotalInfo = awardIpyData.GetItemAwardTimesTotalInfo()
-
- canRandItemDict = {}
- for itemID, libItemInfo in libItemDict.items():
- _, weight = libItemInfo
-
- layerLimit = layerLimitInfo.get(itemID, 0)
- if layerLimit > layerNum:
- GameWorld.DebugLog(" 该层不能选择该奖品! itemID=%s layerLimit(%s) > layerNum(%s)"
- % (itemID, layerLimit, layerNum))
- continue
-
- totalTimesLimit = awardTimesTotalInfo.get(itemID, 0)
- if totalTimesLimit:
- totalTimesNow = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageAwardItemTimes % (actNum, libType, itemID))
- if totalTimesNow >= totalTimesLimit:
- GameWorld.DebugLog(" 奖品ID已达到最大奖励次数,不能选择! itemID=%s totalTimesNow(%s) >= totalTimesLimit(%s)"
- % (itemID, totalTimesNow, totalTimesLimit))
- continue
-
- canRandItemDict[itemID] = [weight, itemID]
-
- if libItemCount > len(canRandItemDict):
- GameWorld.ErrLog("奖品库配置可选择奖品个数不够!无法刷新环保奖池! cfgID=%s,actNum=%s,libType=%s,layerNum=%s,libItemCount=%s > %s canRandItemDict(%s)"
- % (cfgID, actNum, libType, layerNum, libItemCount, len(canRandItemDict), canRandItemDict))
- return
-
- refreshLibDict[libType] = [libItemCount, canRandItemDict]
-
- for libType, refreshInfo in refreshLibDict.items():
- libItemCount, canRandItemDict = refreshInfo
- GameWorld.DebugLog(" 随机奖池物品: libType=%s,libItemCount=%s,canRandItemDict=%s, %s" % (libType, libItemCount, len(canRandItemDict), canRandItemDict))
-
- if libType == Def_SuperLibType:
- # 大奖直接重置,系统不生成,由玩家手动选择
- for num in xrange(libItemCount):
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageAwardItemInfo % (actNum, libType, num), 0)
- continue
-
- for num in xrange(libItemCount):
- weightList = canRandItemDict.values()
- randItemID = GameWorld.GetResultByWeightList(weightList)
- canRandItemDict.pop(randItemID, None)
-
- posNum = 0
- itemInfoValue = randItemID * 100 + posNum
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageAwardItemInfo % (actNum, libType, num), itemInfoValue)
- GameWorld.DebugLog(" 随机生成奖品! libType=%s,num=%s,randItemID=%s" % (libType, num, randItemID))
-
- playCount = 0 # 每层重置抽奖次数
- layerInfoValue = playCount * 100 + layerNum
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageAwardLayerInfo % actNum, layerInfoValue)
- GameWorld.DebugLog(" 刷新完成! playCount=%s,layerNum=%s,layerInfoValue=%s" % (playCount, layerNum, layerInfoValue))
- return True
-
-#// AA 17 垃圾分类活动抽奖 #tagCMActGarbageLottery
-#
-#struct tagCMActGarbageLottery
-#{
-# tagHead Head;
-# BYTE ActNum; //活动编号
-# BYTE PosNum; //玩家点击的奖励位置编号,从1开始
-#};
-def OnActGarbageLottery(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- actNum = clientData.ActNum
- reqPosNum = clientData.PosNum
-
- GameWorld.DebugLog("垃圾分类活动抽奖: actNum=%s,reqPosNum=%s" % (actNum, reqPosNum))
-
- if reqPosNum <= 0:
- return
-
- actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_GarbageSorting, actNum)
- if not actInfo.get(ShareDefine.ActKey_State):
- return
-
- cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
- ipyData = IpyGameDataPY.GetIpyGameData("ActGarbageSorting", cfgID)
- if not ipyData:
- return
-
- templateID = ipyData.GetTemplateID()
- if not templateID:
- return
-
- actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
- awardIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActGarbageAward", templateID)
- if not awardIpyDataList:
- return
-
- costEnvValue = IpyGameDataPY.GetFuncCfg("GarbageSorting", 3)
- curEnvValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageEnvironmentValue % actNum)
- if curEnvValue < costEnvValue:
- GameWorld.DebugLog(" 环保值不足,无法抽奖! curEnvValue(%s) < costEnvValue(%s)" % (curEnvValue, costEnvValue))
- return
-
- layerInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageAwardLayerInfo % actNum)
- playCount, layerNum = layerInfoValue / 100, layerInfoValue % 100
-
- posNumMax = 0
- randLibItemDict = {}
- for awardIpyData in awardIpyDataList:
- libType = awardIpyData.GetAwardLibType()
- libItemCount = awardIpyData.GetAwardItemCount()
- unlockLimitTimes = awardIpyData.GetUnlockAwardLimitTimes()
- libWeight = awardIpyData.GetAwardLibWeight()
- posNumMax += libItemCount
-
- if libType == Def_SuperLibType:
- for num in xrange(libItemCount):
- itemInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageAwardItemInfo % (actNum, libType, num))
- if not itemInfoValue:
- GameWorld.DebugLog(" 未选择大奖!无法抽奖! libType=%s,num=%s,itemInfoValue=%s" % (libType, num, itemInfoValue))
- return
-
- if unlockLimitTimes and playCount < unlockLimitTimes:
- GameWorld.DebugLog(" 该库当前抽奖次数无法解锁! libType=%s,playCount(%s) < unlockLimitTimes(%s)" % (libType, playCount, unlockLimitTimes))
- continue
-
- awardTimesTotalInfo = awardIpyData.GetItemAwardTimesTotalInfo()
- libItemDict = __GetGarbageAwardLibItem(awardIpyData.GetLibItemInfo(), actWorldLV)
- canRandItemList = []
- for num in xrange(libItemCount):
- itemInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageAwardItemInfo % (actNum, libType, num))
- if not itemInfoValue:
- return
-
- itemID, posNum = itemInfoValue / 100, itemInfoValue % 100
- if itemID not in libItemDict:
- continue
-
- if posNum:
- GameWorld.DebugLog(" 该奖品已被抽中! libType=%s,itemID=%s,posNum=%s" % (libType, itemID, posNum))
- if posNum == reqPosNum:
- GameWorld.ErrLog(" 该位置已经有抽奖结果,无法重复选择抽奖! libType=%s,num=%s,itemInfoValue=%s,posNum=%s"
- % (libType, num, itemInfoValue, posNum))
- return
- continue
-
- itemCount, weight = libItemDict[itemID]
- isAddTimes = (itemID in awardTimesTotalInfo)
- canRandItemList.append([weight, itemID, itemCount, num, isAddTimes])
-
- if canRandItemList:
- randLibItemDict[libType] = [libWeight, libType, canRandItemList]
- GameWorld.DebugLog(" 该库有机会抽到物品: libType=%s,libWeight=%s,canRandItemList=%s" % (libType, libWeight, canRandItemList))
- else:
- GameWorld.DebugLog(" 该库物品已全被抽完: libType=%s,libWeight=%s,canRandItemList=%s" % (libType, libWeight, canRandItemList))
-
- if reqPosNum > posNumMax:
- GameWorld.DebugLog(" 请求位置异常,无法抽奖! reqPosNum(%s) > posNumMax(%s)" % (reqPosNum, posNumMax))
- return
-
- if not randLibItemDict:
- GameWorld.DebugLog(" 没有可抽奖的奖品了,无法抽奖!")
- return
-
- randLibInfo = GameWorld.GetResultByWeightList(randLibItemDict.values())
- if not randLibInfo:
- return
- libType, canRandItemList = randLibInfo
- randItemInfo = GameWorld.GetResultByWeightList(canRandItemList)
- if not randItemInfo:
- return
- itemID, itemCount, num, isAddTimes = randItemInfo
-
- # 扣除抽奖消耗环保值
- updEnvValue = curEnvValue - costEnvValue
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageEnvironmentValue % actNum, updEnvValue)
-
- # 更新已抽中值
- updItemInfoValue = itemID * 100 + reqPosNum
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageAwardItemInfo % (actNum, libType, num), updItemInfoValue)
-
- totalTimesNow = 0
- if isAddTimes:
- totalTimesNow = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageAwardItemTimes % (actNum, libType, itemID)) + 1
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageAwardItemTimes % (actNum, libType, itemID), totalTimesNow)
-
- playCount += 1
- layerInfoValue = playCount * 100 + layerNum
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GarbageAwardLayerInfo % actNum, layerInfoValue)
-
- GameWorld.DebugLog(" 抽中物品: layerNum=%s,libType=%s,itemID=%s,itemCount=%s,num=%s,reqPosNum=%s,updItemInfoValue=%s,totalTimesNow=%s,updEnvValue=%s,playCount=%s(%s)"
- % (layerNum, libType, itemID, itemCount, num, reqPosNum, updItemInfoValue, totalTimesNow, updEnvValue, playCount, layerInfoValue))
-
- # 给物品
- isAuctionItem = 0
- itemList = [[itemID, itemCount, isAuctionItem]]
- ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["ActGarbageLottery", False, {}])
-
- # 广播
- if libType == Def_SuperLibType:
- PlayerControl.WorldNotify(0, "GarbageSorting%s" % actNum, [curPlayer.GetPlayerName(), itemID, itemCount])
-
- # 通知
- awardItemInfo = [libType, itemID, itemCount, reqPosNum, totalTimesNow]
- Sync_GarbageSortingPlayerInfo(curPlayer, actNum, awardItemInfo)
return
def Sync_GarbageTaskInfo(curPlayer, actNum, taskID=0, awardItemList=None):
@@ -739,39 +282,6 @@
NetPackCommon.SendFakePack(curPlayer, clientPack)
return
-def Sync_GarbageSortingPlayerInfo(curPlayer, actNum, awardItemInfo=None):
- ## 通知玩家数据信息
- # @param awardItemInfo: 抽奖物品信息 [libType, itemID, itemCount, posNum, totalTimesNow]
-
- actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_GarbageSorting, actNum)
- if not actInfo.get(ShareDefine.ActKey_State):
- return
-
- cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
- ipyData = IpyGameDataPY.GetIpyGameData("ActGarbageSorting", cfgID)
- if not ipyData:
- return
-
- guideTaskID = IpyGameDataPY.GetFuncCfg("GarbageSorting", 1)
-
- clientPack = ChPyNetSendPack.tagMCActGarbagePlayerInfo()
- clientPack.ActNum = actNum
- clientPack.GuideTaskFinish = 1 if not guideTaskID else curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageGuideState % actNum)
- clientPack.EnvironmentValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageEnvironmentValue % actNum)
- clientPack.EnvironmentValueHis = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageEnvironmentValueHis % actNum)
-
- if awardItemInfo:
- libType, itemID, itemCount, posNum, totalTimesNow = awardItemInfo
- awardItem = ChPyNetSendPack.tagMCActGarbageAwardItemResult()
- awardItem.ItemLibType = libType
- awardItem.ItemID = itemID
- awardItem.ItemCount = itemCount
- awardItem.PosNum = posNum
- awardItem.TotalTimesNow = totalTimesNow
- clientPack.AwardItemResult = awardItem
- NetPackCommon.SendFakePack(curPlayer, clientPack)
- return
-
def Sync_GarbageSortingActionInfo(curPlayer, actNum):
## 通知活动信息
@@ -784,75 +294,13 @@
if not ipyData:
return
- templateID = ipyData.GetTemplateID()
- if not templateID:
- return
-
- actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
-
- layerInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageAwardLayerInfo % actNum)
- layerNum = layerInfoValue % 100
-
clientPack = ChPyNetSendPack.tagMCActGarbageSortingInfo()
clientPack.ActNum = actNum
clientPack.StartDate = GameWorld.GetOperationActionDateStr(ipyData.GetStartDate(), openServerDay)
clientPack.EndtDate = GameWorld.GetOperationActionDateStr(ipyData.GetEndDate(), openServerDay)
clientPack.LimitLV = ipyData.GetLVLimit()
- clientPack.LayerNum = layerNum
- clientPack.AwardItemList = [] # 奖池物品列表
- awardIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActGarbageAward", templateID)
- if awardIpyDataList:
- for awardIpyData in awardIpyDataList:
- libType = awardIpyData.GetAwardLibType()
- libItemCount = awardIpyData.GetAwardItemCount()
- libItemDict = __GetGarbageAwardLibItem(awardIpyData.GetLibItemInfo(), actWorldLV)
- layerLimitInfo = awardIpyData.GetItemLayerLimitInfo()
- awardTimesTotalInfo = awardIpyData.GetItemAwardTimesTotalInfo()
-
- # 奖池物品列表,已生成的,包含已选择的大奖物品
- for num in xrange(libItemCount):
- itemInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageAwardItemInfo % (actNum, libType, num))
- if not itemInfoValue:
- break
- itemID, posNum = itemInfoValue / 100, itemInfoValue % 100
- if itemID not in libItemDict:
- continue
- libItemInfo = libItemDict[itemID]
-
- awardItem = ChPyNetSendPack.tagMCActGarbageAwardItem()
- awardItem.ItemLibType = libType
- awardItem.ItemID = itemID
- awardItem.ItemCount = libItemInfo[0]
- awardItem.PosNum = posNum
- awardItem.TotalTimesMax = awardTimesTotalInfo.get(itemID, 0)
- awardItem.TotalTimesNow = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GarbageAwardItemTimes % (actNum, libType, itemID))
- awardItem.LayerLimit = layerLimitInfo.get(itemID, 0)
- clientPack.AwardItemList.append(awardItem)
-
- # 大奖物品待选择库,全部同步
- if libType == Def_SuperLibType:
- for itemID, libItemInfo in libItemDict.items():
- awardItem = ChPyNetSendPack.tagMCActGarbageAwardItem()
- awardItem.ItemLibType = libType
- awardItem.ItemID = itemID
- awardItem.ItemCount = libItemInfo[0]
- awardItem.TotalTimesMax = awardTimesTotalInfo.get(itemID, 0)
- awardItem.LayerLimit = layerLimitInfo.get(itemID, 0)
- clientPack.SuperItemList.append(awardItem)
- clientPack.SuperItemCount = len(clientPack.SuperItemList)
- clientPack.SuperItemCanChooseCount = libItemCount
-
- clientPack.AwardItemCount = len(clientPack.AwardItemList)
+ clientPack.ResetType = ipyData.GetResetType()
NetPackCommon.SendFakePack(curPlayer, clientPack)
return
-
-def __GetGarbageAwardLibItem(libItemInfo, actWorldLV):
- ## 获取奖励库物品信息字典,支持按世界等级范围配置的格式
- keyList = libItemInfo.keys()
- if not keyList:
- return {}
- if isinstance(keyList[0], tuple) and len(keyList[0]) == 2:
- return GameWorld.GetDictValueByRangeKey(libItemInfo, actWorldLV, {})
- return libItemInfo
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py
new file mode 100644
index 0000000..20b10db
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py
@@ -0,0 +1,596 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#-------------------------------------------------------------------------------
+#
+##@package Player.PlayerActXianXiaMJ
+#
+# @todo:仙匣秘境
+# @author hxp
+# @date 2021-05-26
+# @version 1.0
+#
+# 详细描述: 仙匣秘境
+#
+#-------------------------------------------------------------------------------
+#"""Version = 2021-05-26 11:30"""
+#-------------------------------------------------------------------------------
+
+import PyGameData
+import ShareDefine
+import PlayerControl
+import IpyGameDataPY
+import ItemControler
+import ChPyNetSendPack
+import NetPackCommon
+import GameWorld
+import ChConfig
+
+Def_SuperLibType = 9 # 大奖库类型固定为9
+
+def OnPlayerLogin(curPlayer):
+
+ for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_XianXiaMJ, {}).values():
+ actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
+ isReset = __CheckPlayerXianXiaMJAction(curPlayer, actNum)
+ if not isReset:
+ # 活动中同步活动信息
+ if actInfo.get(ShareDefine.ActKey_State):
+ Sync_XianXiaMJActionInfo(curPlayer, actNum)
+ return
+
+def RefreshXianXiaMJActionInfo(actNum):
+ ## 收到GameServer同步的活动信息,刷新活动信息
+ playerManager = GameWorld.GetPlayerManager()
+ for index in xrange(playerManager.GetPlayerCount()):
+ curPlayer = playerManager.GetPlayerByIndex(index)
+ if curPlayer.GetID() == 0:
+ continue
+ __CheckPlayerXianXiaMJAction(curPlayer, actNum)
+ return
+
+def __CheckPlayerXianXiaMJAction(curPlayer, actNum):
+ ## 检查玩家活动数据信息
+
+ playerID = curPlayer.GetPlayerID()
+ actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_XianXiaMJ, actNum)
+ actID = actInfo.get(ShareDefine.ActKey_ID, 0)
+ state = actInfo.get(ShareDefine.ActKey_State, 0)
+ cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
+
+ playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJID % actNum) # 玩家身上的活动ID
+
+ # 活动ID 相同的话不处理
+ if actID == playerActID:
+ GameWorld.DebugLog("仙匣秘境活动ID不变,不处理!actNum=%s,actID=%s" % (actNum, actID), playerID)
+ return
+
+ actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
+
+ GameWorld.DebugLog("仙匣秘境重置! actNum=%s,actID=%s,playerActID=%s,state=%s,cfgID=%s"
+ % (actNum, actID, playerActID, state, cfgID), playerID)
+
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJID % actNum, actID)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJWorldLV % actNum, actWorldLV)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJAwardLayerInfo % actNum, 0)
+
+ ipyData = IpyGameDataPY.GetIpyGameData("ActXianXiaMJ", cfgID) if cfgID else None
+ templateID = ipyData.GetTemplateID() if ipyData else 0
+ awardIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActXianXiaMJAward", templateID) if templateID else []
+ if awardIpyDataList:
+ for awardIpyData in awardIpyDataList:
+ libType = awardIpyData.GetAwardLibType()
+ libItemCount = awardIpyData.GetAwardItemCount()
+ for num in xrange(libItemCount):
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJAwardItemInfo % (actNum, libType, num), 0)
+
+ itemAwardTimesTotalInfo = awardIpyData.GetItemAwardTimesTotalInfo()
+ for itemID in itemAwardTimesTotalInfo.keys():
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJAwardItemTimes % (actNum, libType, itemID), 0)
+
+ # 活动中,生成新奖池
+ if state:
+ __RefreshXianXiaMJAwardPool(curPlayer, actInfo, awardIpyDataList)
+
+ Sync_XianXiaMJActionInfo(curPlayer, actNum)
+ return True
+
+#// AA 16 仙匣秘境活动选择大奖 #tagCMActXianXiaMJSuperItem
+#
+#struct tagCMActXianXiaMJSuperItem
+#{
+# tagHead Head;
+# BYTE ActNum; //活动编号
+# BYTE SuperItemCount; //选择物品数量
+# DWORD SuperItemIDList[SuperItemCount]; //选择的大奖库物品ID列表,每次重新选择需要发送全部已选择的大奖物品ID,不能只发单个物品ID;
+#};
+def OnActXianXiaMJSuperItem(index, clientData, tick):
+ curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+ actNum = clientData.ActNum
+ superItemIDList = clientData.SuperItemIDList
+
+ GameWorld.DebugLog("仙匣秘境活动选择大奖: actNum=%s,superItemIDList=%s" % (actNum, superItemIDList))
+
+ actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_XianXiaMJ, actNum)
+ if not actInfo.get(ShareDefine.ActKey_State):
+ GameWorld.DebugLog(" 非活动中!")
+ return
+
+ cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
+ ipyData = IpyGameDataPY.GetIpyGameData("ActXianXiaMJ", cfgID)
+ if not ipyData:
+ return
+
+ templateID = ipyData.GetTemplateID()
+ if not templateID:
+ return
+
+ actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
+ awardIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActXianXiaMJAward", templateID)
+ if not awardIpyDataList:
+ return
+
+ superAwardIpyData = None
+ for awardIpyData in awardIpyDataList:
+ libType = awardIpyData.GetAwardLibType()
+ if libType == Def_SuperLibType:
+ superAwardIpyData = awardIpyData
+ break
+
+ if not superAwardIpyData:
+ GameWorld.ErrLog("没有配置仙匣秘境活动大奖库! cfgID=%s,actNum=%s,templateID=%s" % (cfgID, actNum, templateID))
+ return
+
+ superLibItemCount = superAwardIpyData.GetAwardItemCount()
+ if len(superItemIDList) != superLibItemCount:
+ GameWorld.ErrLog("仙匣秘境活动选择大奖个数错误! cfgID=%s,actNum=%s,templateID=%s,superLibItemCount=%s,reqSuperItemIDList=%s"
+ % (cfgID, actNum, templateID, superLibItemCount, superItemIDList))
+ return
+
+ posNumItemIDList = [] # 已抽中的大奖物品ID
+ libType = superAwardIpyData.GetAwardLibType()
+ for num in xrange(superLibItemCount):
+ itemInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardItemInfo % (actNum, libType, num))
+ if not itemInfoValue:
+ break
+ itemID, posNum = itemInfoValue / 100, itemInfoValue % 100
+ if posNum and itemID not in superItemIDList:
+ GameWorld.ErrLog("仙匣秘境活动选择大奖ID错误! 已抽中的大奖ID为必选ID! posNum=%s, itemID=%s not in superItemIDList=%s"
+ % (posNum, itemID, superItemIDList))
+ return
+
+ if posNum:
+ posNumItemIDList.append(itemID)
+
+ GameWorld.DebugLog(" 已抽中的大奖ID! %s" % posNumItemIDList)
+
+ layerInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardLayerInfo % actNum)
+ layerNum = layerInfoValue % 100
+
+ libItemDict = __GetXianXiaMJAwardLibItem(superAwardIpyData.GetLibItemInfo(), actWorldLV)
+ layerLimitInfo = superAwardIpyData.GetItemLayerLimitInfo()
+ awardTimesTotalInfo = superAwardIpyData.GetItemAwardTimesTotalInfo()
+
+ replaceSuperItemIDList = [] # 需要替换的大奖ID列表
+
+ for selectItemID in superItemIDList:
+ if selectItemID in posNumItemIDList:
+ GameWorld.DebugLog(" 已抽中的大奖ID,不验证!selectItemID=%s" % (selectItemID))
+ continue
+
+ if selectItemID not in libItemDict:
+ GameWorld.ErrLog("仙匣秘境活动选择大奖ID错误! 大奖ID不存在大奖库中! selectItemID=%s not in libItemDict=%s"
+ % (selectItemID, libItemDict))
+ return
+
+ layerLimit = layerLimitInfo.get(selectItemID, 0)
+ if layerLimit > layerNum:
+ GameWorld.ErrLog("仙匣秘境活动选择大奖ID错误! 大奖ID该层不能选择! selectItemID=%s layerLimit(%s) > layerNum(%s)"
+ % (selectItemID, layerLimit, layerNum))
+ return
+
+ totalTimesLimit = awardTimesTotalInfo.get(selectItemID, 0)
+ if totalTimesLimit:
+ totalTimesNow = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardItemTimes % (actNum, libType, selectItemID))
+ if totalTimesNow >= totalTimesLimit:
+ GameWorld.ErrLog("仙匣秘境活动选择大奖ID错误! 大奖ID已达到最大奖励次数,不能选择! selectItemID=%s totalTimesNow(%s) >= totalTimesLimit(%s)"
+ % (selectItemID, totalTimesNow, totalTimesLimit))
+ return
+
+ replaceSuperItemIDList.append(selectItemID)
+
+ GameWorld.DebugLog(" 验证通过,可替换大奖ID! replaceSuperItemIDList=%s" % replaceSuperItemIDList)
+ if not replaceSuperItemIDList:
+ return
+
+ for num in xrange(superLibItemCount):
+ itemInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardItemInfo % (actNum, libType, num))
+ itemID, posNum = itemInfoValue / 100, itemInfoValue % 100
+ if itemID in posNumItemIDList:
+ GameWorld.DebugLog(" 已抽中的大奖ID,不替换!itemID=%s" % (itemID))
+ continue
+ replaceSuperItemID = replaceSuperItemIDList.pop(0)
+ updItemInfoValue = replaceSuperItemID * 100 + posNum
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJAwardItemInfo % (actNum, libType, num), updItemInfoValue)
+ GameWorld.DebugLog(" 替换大奖ID选择!num=%s,itemID=%s,posNum=%s,replaceSuperItemID=%s,updItemInfoValue=%s"
+ % (num, itemID, posNum, replaceSuperItemID, updItemInfoValue))
+
+ if not replaceSuperItemIDList:
+ break
+
+ Sync_XianXiaMJActionInfo(curPlayer, actNum)
+ return
+
+#// AA 18 仙匣秘境活动奖池刷新 #tagCMActXianXiaMJAwardPoolRefresh
+#
+#struct tagCMActXianXiaMJAwardPoolRefresh
+#{
+# tagHead Head;
+# BYTE ActNum; //活动编号
+#};
+def OnActXianXiaMJAwardPoolRefresh(index, clientData, tick):
+ curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+ actNum = clientData.ActNum
+
+ GameWorld.DebugLog("仙匣秘境活动奖池刷新: actNum=%s" % (actNum))
+
+ actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_XianXiaMJ, actNum)
+ if not actInfo.get(ShareDefine.ActKey_State):
+ GameWorld.DebugLog(" 非活动中!")
+ return
+
+ cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
+ ipyData = IpyGameDataPY.GetIpyGameData("ActXianXiaMJ", cfgID)
+ if not ipyData:
+ return
+
+ templateID = ipyData.GetTemplateID()
+ if not templateID:
+ return
+
+ awardIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActXianXiaMJAward", templateID)
+ if not awardIpyDataList:
+ return
+
+ if not __RefreshXianXiaMJAwardPool(curPlayer, actInfo, awardIpyDataList):
+ return
+
+ Sync_XianXiaMJActionInfo(curPlayer, actNum)
+ return
+
+def __RefreshXianXiaMJAwardPool(curPlayer, actInfo, awardIpyDataList):
+ ## 刷新奖池物品
+
+ cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
+ actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
+ actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
+
+ layerInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardLayerInfo % actNum)
+ layerNum = layerInfoValue % 100
+
+ GameWorld.DebugLog("刷新仙匣秘境奖池物品: cfgID=%s,actNum=%s,actWorldLV=%s,layerNum=%s" % (cfgID, actNum, actWorldLV, layerNum))
+
+ if layerNum:
+ # 非0层,验证大奖是否已抽完,抽完才可以刷新奖池层
+ superLib = False
+ for awardIpyData in awardIpyDataList:
+ libType = awardIpyData.GetAwardLibType()
+ if libType != Def_SuperLibType:
+ continue
+ superLib = True
+ libItemCount = awardIpyData.GetAwardItemCount()
+ for num in xrange(libItemCount):
+ itemInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardItemInfo % (actNum, libType, num))
+ itemID, posNum = itemInfoValue / 100, itemInfoValue % 100
+ if itemID and not posNum:
+ GameWorld.ErrLog("有大奖未抽中!无法刷新奖池! cfgID=%s,actNum=%s,layerNum=%s,num=%s,itemID=%s,posNum=%s"
+ % (cfgID, actNum, layerNum, num, itemID, posNum))
+ return
+ break
+ if not superLib:
+ GameWorld.ErrLog("奖池配置没有大奖库!无法刷新奖池! cfgID=%s,actNum=%s,layerNum=%s,superLib=%s" % (cfgID, actNum, layerNum, superLib))
+ return
+
+ layerNum += 1 # 可刷新奖池,默认+1层
+ GameWorld.DebugLog(" 可刷新奖池!下一层: layerNum=%s" % (layerNum))
+
+ refreshLibDict = {}
+ for awardIpyData in awardIpyDataList:
+ libType = awardIpyData.GetAwardLibType()
+ libItemCount = awardIpyData.GetAwardItemCount()
+ libItemDict = __GetXianXiaMJAwardLibItem(awardIpyData.GetLibItemInfo(), actWorldLV)
+ layerLimitInfo = awardIpyData.GetItemLayerLimitInfo()
+ awardTimesTotalInfo = awardIpyData.GetItemAwardTimesTotalInfo()
+
+ canRandItemDict = {}
+ for itemID, libItemInfo in libItemDict.items():
+ _, weight = libItemInfo
+
+ layerLimit = layerLimitInfo.get(itemID, 0)
+ if layerLimit > layerNum:
+ GameWorld.DebugLog(" 该层不能选择该奖品! itemID=%s layerLimit(%s) > layerNum(%s)"
+ % (itemID, layerLimit, layerNum))
+ continue
+
+ totalTimesLimit = awardTimesTotalInfo.get(itemID, 0)
+ if totalTimesLimit:
+ totalTimesNow = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardItemTimes % (actNum, libType, itemID))
+ if totalTimesNow >= totalTimesLimit:
+ GameWorld.DebugLog(" 奖品ID已达到最大奖励次数,不能选择! itemID=%s totalTimesNow(%s) >= totalTimesLimit(%s)"
+ % (itemID, totalTimesNow, totalTimesLimit))
+ continue
+
+ canRandItemDict[itemID] = [weight, itemID]
+
+ if libItemCount > len(canRandItemDict):
+ GameWorld.ErrLog("奖品库配置可选择奖品个数不够!无法刷新奖池! cfgID=%s,actNum=%s,libType=%s,layerNum=%s,libItemCount=%s > %s canRandItemDict(%s)"
+ % (cfgID, actNum, libType, layerNum, libItemCount, len(canRandItemDict), canRandItemDict))
+ return
+
+ refreshLibDict[libType] = [libItemCount, canRandItemDict]
+
+ for libType, refreshInfo in refreshLibDict.items():
+ libItemCount, canRandItemDict = refreshInfo
+ GameWorld.DebugLog(" 随机奖池物品: libType=%s,libItemCount=%s,canRandItemDict=%s, %s" % (libType, libItemCount, len(canRandItemDict), canRandItemDict))
+
+ if libType == Def_SuperLibType:
+ # 大奖直接重置,系统不生成,由玩家手动选择
+ for num in xrange(libItemCount):
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJAwardItemInfo % (actNum, libType, num), 0)
+ continue
+
+ for num in xrange(libItemCount):
+ weightList = canRandItemDict.values()
+ randItemID = GameWorld.GetResultByWeightList(weightList)
+ canRandItemDict.pop(randItemID, None)
+
+ posNum = 0
+ itemInfoValue = randItemID * 100 + posNum
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJAwardItemInfo % (actNum, libType, num), itemInfoValue)
+ GameWorld.DebugLog(" 随机生成奖品! libType=%s,num=%s,randItemID=%s" % (libType, num, randItemID))
+
+ playCount = 0 # 每层重置抽奖次数
+ layerInfoValue = playCount * 100 + layerNum
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJAwardLayerInfo % actNum, layerInfoValue)
+ GameWorld.DebugLog(" 刷新完成! playCount=%s,layerNum=%s,layerInfoValue=%s" % (playCount, layerNum, layerInfoValue))
+ return True
+
+#// AA 17 仙匣秘境活动抽奖 #tagCMActXianXiaMJLottery
+#
+#struct tagCMActXianXiaMJLottery
+#{
+# tagHead Head;
+# BYTE ActNum; //活动编号
+# BYTE PosNum; //玩家点击的奖励位置编号,从1开始
+#};
+def OnActXianXiaMJLottery(index, clientData, tick):
+ curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+ actNum = clientData.ActNum
+ reqPosNum = clientData.PosNum
+
+ GameWorld.DebugLog("仙匣秘境活动抽奖: actNum=%s,reqPosNum=%s" % (actNum, reqPosNum))
+
+ if reqPosNum <= 0:
+ return
+
+ actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_XianXiaMJ, actNum)
+ if not actInfo.get(ShareDefine.ActKey_State):
+ GameWorld.DebugLog(" 非活动中!")
+ return
+
+ cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
+ ipyData = IpyGameDataPY.GetIpyGameData("ActXianXiaMJ", cfgID)
+ if not ipyData:
+ return
+
+ templateID = ipyData.GetTemplateID()
+ if not templateID:
+ return
+
+ actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
+ awardIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActXianXiaMJAward", templateID)
+ if not awardIpyDataList:
+ return
+
+ costMoneyType, costMoneyValue = ipyData.GetUseMoneyInfo()
+ if not PlayerControl.HaveMoney(curPlayer, costMoneyType, costMoneyValue):
+ GameWorld.DebugLog(" 货币不足,无法抽奖! costMoneyType=%s,costMoneyValue(%s) > curMoneyValue(%s)"
+ % (costMoneyType, costMoneyValue, PlayerControl.GetMoney(curPlayer, costMoneyType)))
+ return
+
+ layerInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardLayerInfo % actNum)
+ playCount, layerNum = layerInfoValue / 100, layerInfoValue % 100
+
+ posNumMax = 0
+ randLibItemDict = {}
+ for awardIpyData in awardIpyDataList:
+ libType = awardIpyData.GetAwardLibType()
+ libItemCount = awardIpyData.GetAwardItemCount()
+ unlockLimitTimes = awardIpyData.GetUnlockAwardLimitTimes()
+ libWeight = awardIpyData.GetAwardLibWeight()
+ posNumMax += libItemCount
+
+ if libType == Def_SuperLibType:
+ for num in xrange(libItemCount):
+ itemInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardItemInfo % (actNum, libType, num))
+ if not itemInfoValue:
+ GameWorld.DebugLog(" 未选择大奖!无法抽奖! libType=%s,num=%s,itemInfoValue=%s" % (libType, num, itemInfoValue))
+ return
+
+ if unlockLimitTimes and playCount < unlockLimitTimes:
+ GameWorld.DebugLog(" 该库当前抽奖次数无法解锁! libType=%s,playCount(%s) < unlockLimitTimes(%s)" % (libType, playCount, unlockLimitTimes))
+ continue
+
+ awardTimesTotalInfo = awardIpyData.GetItemAwardTimesTotalInfo()
+ libItemDict = __GetXianXiaMJAwardLibItem(awardIpyData.GetLibItemInfo(), actWorldLV)
+ canRandItemList = []
+ for num in xrange(libItemCount):
+ itemInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardItemInfo % (actNum, libType, num))
+ if not itemInfoValue:
+ return
+
+ itemID, posNum = itemInfoValue / 100, itemInfoValue % 100
+ if itemID not in libItemDict:
+ continue
+
+ if posNum:
+ GameWorld.DebugLog(" 该奖品已被抽中! libType=%s,itemID=%s,posNum=%s" % (libType, itemID, posNum))
+ if posNum == reqPosNum:
+ GameWorld.ErrLog(" 该位置已经有抽奖结果,无法重复选择抽奖! libType=%s,num=%s,itemInfoValue=%s,posNum=%s"
+ % (libType, num, itemInfoValue, posNum))
+ return
+ continue
+
+ itemCount, weight = libItemDict[itemID]
+ isAddTimes = (itemID in awardTimesTotalInfo)
+ canRandItemList.append([weight, itemID, itemCount, num, isAddTimes])
+
+ if canRandItemList:
+ randLibItemDict[libType] = [libWeight, libType, canRandItemList]
+ GameWorld.DebugLog(" 该库有机会抽到物品: libType=%s,libWeight=%s,canRandItemList=%s" % (libType, libWeight, canRandItemList))
+ else:
+ GameWorld.DebugLog(" 该库物品已全被抽完: libType=%s,libWeight=%s,canRandItemList=%s" % (libType, libWeight, canRandItemList))
+
+ if reqPosNum > posNumMax:
+ GameWorld.DebugLog(" 请求位置异常,无法抽奖! reqPosNum(%s) > posNumMax(%s)" % (reqPosNum, posNumMax))
+ return
+
+ if not randLibItemDict:
+ GameWorld.DebugLog(" 没有可抽奖的奖品了,无法抽奖!")
+ return
+
+ randLibInfo = GameWorld.GetResultByWeightList(randLibItemDict.values())
+ if not randLibInfo:
+ return
+ libType, canRandItemList = randLibInfo
+ randItemInfo = GameWorld.GetResultByWeightList(canRandItemList)
+ if not randItemInfo:
+ return
+ itemID, itemCount, num, isAddTimes = randItemInfo
+
+ # 扣除抽奖消耗环保值
+ PlayerControl.PayMoney(curPlayer, costMoneyType, costMoneyValue, "ActXianXiaMJ")
+
+ # 更新已抽中值
+ updItemInfoValue = itemID * 100 + reqPosNum
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJAwardItemInfo % (actNum, libType, num), updItemInfoValue)
+
+ totalTimesNow = 0
+ if isAddTimes:
+ totalTimesNow = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardItemTimes % (actNum, libType, itemID)) + 1
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJAwardItemTimes % (actNum, libType, itemID), totalTimesNow)
+
+ playCount += 1
+ layerInfoValue = playCount * 100 + layerNum
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJAwardLayerInfo % actNum, layerInfoValue)
+
+ GameWorld.DebugLog(" 抽中物品: layerNum=%s,libType=%s,itemID=%s,itemCount=%s,num=%s,reqPosNum=%s,updItemInfoValue=%s,totalTimesNow=%s,playCount=%s(%s)"
+ % (layerNum, libType, itemID, itemCount, num, reqPosNum, updItemInfoValue, totalTimesNow, playCount, layerInfoValue))
+
+ # 给物品
+ isAuctionItem = 0
+ itemList = [[itemID, itemCount, isAuctionItem]]
+ ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["tagActXianXiaMJLottery", False, {}])
+
+ # 广播
+ if libType == Def_SuperLibType:
+ PlayerControl.WorldNotify(0, "XianXiaMJ%s" % actNum, [curPlayer.GetPlayerName(), itemID, itemCount])
+
+ # 通知抽奖结果
+ clientPack = ChPyNetSendPack.tagMCActXianXiaMJAwardItemResult()
+ clientPack.ActNum = actNum
+ clientPack.ItemLibType = libType
+ clientPack.ItemID = itemID
+ clientPack.ItemCount = itemCount
+ clientPack.PosNum = reqPosNum
+ clientPack.TotalTimesNow = totalTimesNow
+ NetPackCommon.SendFakePack(curPlayer, clientPack)
+ return
+
+def Sync_XianXiaMJActionInfo(curPlayer, actNum):
+ ## 通知活动信息
+
+ actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_XianXiaMJ, actNum)
+ if not actInfo.get(ShareDefine.ActKey_State):
+ return
+
+ cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
+ ipyData = IpyGameDataPY.GetIpyGameData("ActXianXiaMJ", cfgID)
+ if not ipyData:
+ return
+
+ templateID = ipyData.GetTemplateID()
+ if not templateID:
+ return
+ costMoneyType, costMoneyValue = ipyData.GetUseMoneyInfo()
+
+ actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
+ openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
+
+ layerInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardLayerInfo % actNum)
+ layerNum = layerInfoValue % 100
+
+ clientPack = ChPyNetSendPack.tagMCActXianXiaMJInfo()
+ clientPack.ActNum = actNum
+ clientPack.StartDate = GameWorld.GetOperationActionDateStr(ipyData.GetStartDate(), openServerDay)
+ clientPack.EndtDate = GameWorld.GetOperationActionDateStr(ipyData.GetEndDate(), openServerDay)
+ clientPack.LimitLV = ipyData.GetLVLimit()
+ clientPack.ResetType = ipyData.GetResetType()
+ clientPack.MoneyType = costMoneyType
+ clientPack.MoneyValue = costMoneyValue
+ clientPack.LayerNum = layerNum
+ clientPack.AwardItemList = [] # 奖池物品列表
+ awardIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActXianXiaMJAward", templateID)
+ if awardIpyDataList:
+ for awardIpyData in awardIpyDataList:
+ libType = awardIpyData.GetAwardLibType()
+ libItemCount = awardIpyData.GetAwardItemCount()
+ libItemDict = __GetXianXiaMJAwardLibItem(awardIpyData.GetLibItemInfo(), actWorldLV)
+ layerLimitInfo = awardIpyData.GetItemLayerLimitInfo()
+ awardTimesTotalInfo = awardIpyData.GetItemAwardTimesTotalInfo()
+
+ # 奖池物品列表,已生成的,包含已选择的大奖物品
+ for num in xrange(libItemCount):
+ itemInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardItemInfo % (actNum, libType, num))
+ if not itemInfoValue:
+ break
+ itemID, posNum = itemInfoValue / 100, itemInfoValue % 100
+ if itemID not in libItemDict:
+ continue
+ libItemInfo = libItemDict[itemID]
+
+ awardItem = ChPyNetSendPack.tagMCActXianXiaMJAwardItem()
+ awardItem.ItemLibType = libType
+ awardItem.ItemID = itemID
+ awardItem.ItemCount = libItemInfo[0]
+ awardItem.PosNum = posNum
+ awardItem.TotalTimesMax = awardTimesTotalInfo.get(itemID, 0)
+ awardItem.TotalTimesNow = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardItemTimes % (actNum, libType, itemID))
+ awardItem.LayerLimit = layerLimitInfo.get(itemID, 0)
+ clientPack.AwardItemList.append(awardItem)
+
+ # 大奖物品待选择库,全部同步
+ if libType == Def_SuperLibType:
+ for itemID, libItemInfo in libItemDict.items():
+ awardItem = ChPyNetSendPack.tagMCActXianXiaMJAwardItem()
+ awardItem.ItemLibType = libType
+ awardItem.ItemID = itemID
+ awardItem.ItemCount = libItemInfo[0]
+ awardItem.TotalTimesMax = awardTimesTotalInfo.get(itemID, 0)
+ awardItem.LayerLimit = layerLimitInfo.get(itemID, 0)
+ clientPack.SuperItemList.append(awardItem)
+ clientPack.SuperItemCount = len(clientPack.SuperItemList)
+ clientPack.SuperItemCanChooseCount = libItemCount
+
+ clientPack.AwardItemCount = len(clientPack.AwardItemList)
+ NetPackCommon.SendFakePack(curPlayer, clientPack)
+ return
+
+def __GetXianXiaMJAwardLibItem(libItemInfo, actWorldLV):
+ ## 获取奖励库物品信息字典,支持按世界等级范围配置的格式
+ keyList = libItemInfo.keys()
+ if not keyList:
+ return {}
+ if isinstance(keyList[0], tuple) and len(keyList[0]) == 2:
+ return GameWorld.GetDictValueByRangeKey(libItemInfo, actWorldLV, {})
+ return libItemInfo
+
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
index 159b497..5fdb102 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
@@ -78,6 +78,7 @@
import PlayerActCollectWords
import PlayerActTotalRecharge
import PlayerActGarbageSorting
+import PlayerActXianXiaMJ
import PlayerActRechargeRebateGold
import PlayerActManyDayRecharge
import PlayerActSingleRecharge
@@ -1371,6 +1372,9 @@
elif actionName == ShareDefine.OperationActionName_GarbageSorting:
PlayerActGarbageSorting.RefreshGarbageSortingActionInfo(actNum)
+ elif actionName == ShareDefine.OperationActionName_XianXiaMJ:
+ PlayerActXianXiaMJ.RefreshXianXiaMJActionInfo(actNum)
+
elif actionName == ShareDefine.OperationActionName_ManyDayRecharge:
PlayerActManyDayRecharge.RefreshManyDayRechargeActionInfo(actNum)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 680b7c2..edf8b61 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -237,6 +237,7 @@
OperationActionName_Turntable = "ActTurntable" # 转盘活动
OperationActionName_HorsePetFeast = "ActHorsePetFeast" # 骑宠盛宴活动
OperationActionName_GarbageSorting = "ActGarbageSorting" # 垃圾分类活动
+OperationActionName_XianXiaMJ = "ActXianXiaMJ" # 仙匣秘境活动
#节日活动类型列表 - 该类型无视开服天,日期到了就开启
FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
@@ -255,6 +256,7 @@
OperationActionName_DailyGiftbag, OperationActionName_SingleRecharge,
OperationActionName_CollectWords, OperationActionName_ManyDayRecharge,
OperationActionName_Turntable, OperationActionName_HorsePetFeast, OperationActionName_GarbageSorting,
+ OperationActionName_XianXiaMJ,
] + FeastOperationActionNameList
#需要记录开启活动时的世界等级的运营活动
NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell,
@@ -265,7 +267,7 @@
OperationActionName_DailyGiftbag, OperationActionName_GrowupBuy,
OperationActionName_WeekParty, OperationActionName_Turntable,
OperationActionName_CollectWords, OperationActionName_GarbageSorting,
- OperationActionName_FeastLogin,
+ OperationActionName_FeastLogin, OperationActionName_XianXiaMJ,
OperationActionName_FeastWish, OperationActionName_FeastTravel,
OperationActionName_ManyDayRecharge, OperationActionName_SingleRecharge,
]
@@ -276,6 +278,7 @@
OperationActionName_SpringSale, OperationActionName_FlashSale,
OperationActionName_ManyDayRecharge, OperationActionName_SingleRecharge,
OperationActionName_Turntable, OperationActionName_HorsePetFeast, OperationActionName_GarbageSorting,
+ OperationActionName_XianXiaMJ,
]
#跨服运营活动表名定义
@@ -955,7 +958,8 @@
CDBPlayerRefresh_ExAttr17, # ExAttr17
CDBPlayerRefresh_BossActScore, # boss 活动积分 230
CDBPlayerRefresh_FuncSysPrivilege, # 功能特权令 231
-) = range(146, 232)
+CDBPlayerRefresh_Environment, # 环保值 232
+) = range(146, 233)
TYPE_Price_Gold_Paper_Money = 5 # 金钱类型,(先用礼券,再用金子)
TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
@@ -975,6 +979,7 @@
TYPE_Price_SoulSplinters = 29 # 聚魂碎片
TYPE_Price_SoulCore = 30 # 核心环
TYPE_Price_FuncSysPrivilege = 31 # 功能系统特权令
+TYPE_Price_Environment = 32 # 环保值
#以下是旧的金钱类型
TYPE_Price_Magic_Integral = 101 # 魔方寻宝积分
@@ -999,6 +1004,7 @@
TYPE_Price_Honor:CDBPlayerRefresh_Honor,
TYPE_Price_BossActScore:CDBPlayerRefresh_BossActScore,
TYPE_Price_FuncSysPrivilege:CDBPlayerRefresh_FuncSysPrivilege,
+ TYPE_Price_Environment:CDBPlayerRefresh_Environment,
}
# 高效战斗状态
--
Gitblit v1.8.0