From c15c8f7eab589727de0195c40862e9afe08e890b Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 20 三月 2019 18:23:37 +0800
Subject: [PATCH] 6373 【后端】【2.0】删除无用功能代码、封包、配置(页游特惠活动相关)
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py | 72 -
ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py | 34
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 384 ------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 1143 -------------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py | 44
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 384 ------
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 1023 -----------------
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py | 23
ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 9
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py | 7
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py | 75 -
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 1
ServerPython/CoreServerGroup/GameServer/PyNetPack.ini | 13
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py | 75 -
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py | 20
ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py | 1
/dev/null | 98 -
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py | 1
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/ClearOpenServerDay.py | 4
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py | 11
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini | 40
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py | 20
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py | 10
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 24
26 files changed, 5 insertions(+), 3,519 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/PyNetPack.ini b/ServerPython/CoreServerGroup/GameServer/PyNetPack.ini
index aaf50ba..3606b16 100644
--- a/ServerPython/CoreServerGroup/GameServer/PyNetPack.ini
+++ b/ServerPython/CoreServerGroup/GameServer/PyNetPack.ini
@@ -99,19 +99,6 @@
PacketSubCMD_1=0x09
PacketCallFunc_1=OnFamilyStoreDel
-;特惠活动
-[GameWorldActionTeHui]
-ScriptName = GameWorldLogic\GameWorldActionTeHui.py
-Writer = hxp
-Releaser = hxp
-RegType = 0
-RegisterPackCount = 1
-
-PacketCMD_1=0xAD
-PacketSubCMD_1=0x01
-PacketCallFunc_1=ClientRequestTeHuiActivity
-
-
;邮件(补偿)
[Compensation]
ScriptName = Player\PlayerCompensation
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py b/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
index aca4e02..8c470d9 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
@@ -588,11 +588,6 @@
ShareDefine.Def_BT_ZhuXianTower : 100, #诛仙塔榜
ShareDefine.Def_BT_HighLadder : 1000, #玩家天梯竞技场排行
ShareDefine.Def_BT_HighLadder_Yester : 1000, #玩家天梯竞技场昨日排行
- ShareDefine.Def_BT_RechargeTeHuiLast : 20, #充值特惠活动排行榜-上一期记录
- ShareDefine.Def_BT_RechargeTeHui : 20, #充值特惠活动排行榜-当前期记录
-
- ShareDefine.Def_BT_CostTeHui : 10, #消费特惠排行榜
- ShareDefine.Def_BT_CostTeHuiLast : 10, #消费特惠排行榜上一期
}
#排行榜保存类型(和BillboardType匹配), 默认保存, 如果不保存,可配置进去
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 4adb114..9c57157 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -1785,58 +1785,6 @@
#------------------------------------------------------
-# AD 01 查询特惠活动信息 #tagCGQueryTeHuiActivetyInfo
-
-class tagCGQueryTeHuiActivetyInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActivityType", c_ubyte), # 活动类型
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAD
- self.SubCmd = 0x01
- 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 = 0xAD
- self.SubCmd = 0x01
- self.ActivityType = 0
- return
-
- def GetLength(self):
- return sizeof(tagCGQueryTeHuiActivetyInfo)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AD 01 查询特惠活动信息 //tagCGQueryTeHuiActivetyInfo:
- Cmd:%s,
- SubCmd:%s,
- ActivityType:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActivityType
- )
- return DumpString
-
-
-m_NAtagCGQueryTeHuiActivetyInfo=tagCGQueryTeHuiActivetyInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryTeHuiActivetyInfo.Cmd,m_NAtagCGQueryTeHuiActivetyInfo.SubCmd))] = m_NAtagCGQueryTeHuiActivetyInfo
-
-
-#------------------------------------------------------
# AE 07 运镖时间倒计时结束 #tagCGTruckTimeEnd
class tagCGTruckTimeEnd(Structure):
@@ -3999,66 +3947,6 @@
#------------------------------------------------------
-# A2 08 购买自定义商店物品 #tagCMBuyShopItem
-
-class tagCMBuyShopItem(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ShopID", c_int),
- ("ItemShopIndex", c_ushort),
- ("BuyCount", c_ushort), #购买数量
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA2
- self.SubCmd = 0x08
- 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 = 0xA2
- self.SubCmd = 0x08
- self.ShopID = 0
- self.ItemShopIndex = 0
- self.BuyCount = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMBuyShopItem)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A2 08 购买自定义商店物品 //tagCMBuyShopItem:
- Cmd:%s,
- SubCmd:%s,
- ShopID:%d,
- ItemShopIndex:%d,
- BuyCount:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ShopID,
- self.ItemShopIndex,
- self.BuyCount
- )
- return DumpString
-
-
-m_NAtagCMBuyShopItem=tagCMBuyShopItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuyShopItem.Cmd,m_NAtagCMBuyShopItem.SubCmd))] = m_NAtagCMBuyShopItem
-
-
-#------------------------------------------------------
# A2 10 清除副本CD#tagCMClearFBCD
class tagCMClearFBCD(Structure):
@@ -5041,58 +4929,6 @@
#------------------------------------------------------
-# A2 07 请求自定义商店物品信息 #tagCMQueryShopItem
-
-class tagCMQueryShopItem(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ShopID", c_int),
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA2
- self.SubCmd = 0x07
- 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 = 0xA2
- self.SubCmd = 0x07
- self.ShopID = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMQueryShopItem)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A2 07 请求自定义商店物品信息 //tagCMQueryShopItem:
- Cmd:%s,
- SubCmd:%s,
- ShopID:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ShopID
- )
- return DumpString
-
-
-m_NAtagCMQueryShopItem=tagCMQueryShopItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryShopItem.Cmd,m_NAtagCMQueryShopItem.SubCmd))] = m_NAtagCMQueryShopItem
-
-
-#------------------------------------------------------
# A2 06 快速完成任务#tagCMQuickFinishMission
class tagCMQuickFinishMission(Structure):
@@ -5194,58 +5030,6 @@
m_NAtagCMRefreshMysticalShop=tagCMRefreshMysticalShop()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRefreshMysticalShop.Cmd,m_NAtagCMRefreshMysticalShop.SubCmd))] = m_NAtagCMRefreshMysticalShop
-
-
-#------------------------------------------------------
-# A2 14 刷新定时神秘商店物品#tagCMRefreshShopItem
-
-class tagCMRefreshShopItem(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ShopID", c_int),
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA2
- self.SubCmd = 0x14
- 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 = 0xA2
- self.SubCmd = 0x14
- self.ShopID = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMRefreshShopItem)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A2 14 刷新定时神秘商店物品//tagCMRefreshShopItem:
- Cmd:%s,
- SubCmd:%s,
- ShopID:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ShopID
- )
- return DumpString
-
-
-m_NAtagCMRefreshShopItem=tagCMRefreshShopItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRefreshShopItem.Cmd,m_NAtagCMRefreshShopItem.SubCmd))] = m_NAtagCMRefreshShopItem
#------------------------------------------------------
@@ -12828,174 +12612,6 @@
m_NAtagCMFlashSaleAppointment=tagCMFlashSaleAppointment()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFlashSaleAppointment.Cmd,m_NAtagCMFlashSaleAppointment.SubCmd))] = m_NAtagCMFlashSaleAppointment
-
-
-#------------------------------------------------------
-# AA 02 领取升阶功能特惠奖励 #tagCMGetClassUPDayAward
-
-class tagCMGetClassUPDayAward(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("DayType", c_ubyte), # 升阶日类型
- ("ClassLV", c_ubyte), # 阶级
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x02
- 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 = 0x02
- self.DayType = 0
- self.ClassLV = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMGetClassUPDayAward)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 02 领取升阶功能特惠奖励 //tagCMGetClassUPDayAward:
- Cmd:%s,
- SubCmd:%s,
- DayType:%d,
- ClassLV:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.DayType,
- self.ClassLV
- )
- return DumpString
-
-
-m_NAtagCMGetClassUPDayAward=tagCMGetClassUPDayAward()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetClassUPDayAward.Cmd,m_NAtagCMGetClassUPDayAward.SubCmd))] = m_NAtagCMGetClassUPDayAward
-
-
-#------------------------------------------------------
-# AA 04 领取消费奖励 #tagCMGetCostAward
-
-class tagCMGetCostAward(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActionID", c_int), # 活动ID
- ("Index", c_ubyte), # 索引
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x04
- 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 = 0x04
- self.ActionID = 0
- self.Index = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMGetCostAward)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 04 领取消费奖励 //tagCMGetCostAward:
- Cmd:%s,
- SubCmd:%s,
- ActionID:%d,
- Index:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActionID,
- self.Index
- )
- return DumpString
-
-
-m_NAtagCMGetCostAward=tagCMGetCostAward()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetCostAward.Cmd,m_NAtagCMGetCostAward.SubCmd))] = m_NAtagCMGetCostAward
-
-
-#------------------------------------------------------
-# AA 03 领取充值特惠奖励 #tagCMGetRechargeTeHuiAward
-
-class tagCMGetRechargeTeHuiAward(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActionID", c_int), # 活动ID
- ("Index", c_ubyte), # 规则索引
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x03
- 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 = 0x03
- self.ActionID = 0
- self.Index = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMGetRechargeTeHuiAward)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 03 领取充值特惠奖励 //tagCMGetRechargeTeHuiAward:
- Cmd:%s,
- SubCmd:%s,
- ActionID:%d,
- Index:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActionID,
- self.Index
- )
- return DumpString
-
-
-m_NAtagCMGetRechargeTeHuiAward=tagCMGetRechargeTeHuiAward()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetRechargeTeHuiAward.Cmd,m_NAtagCMGetRechargeTeHuiAward.SubCmd))] = m_NAtagCMGetRechargeTeHuiAward
#------------------------------------------------------
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 826a739..c5c6797 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -4188,124 +4188,6 @@
#------------------------------------------------------
-# A9 07 定时商店刷新倒计时 #tagGCShopRefreshTimeList
-
-class tagGCShopRefreshTime(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ShopID", c_int), # 商店ID
- ("RemainSecond", c_int), # 多少秒后刷新
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA9
- self.SubCmd = 0x07
- 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 = 0xA9
- self.SubCmd = 0x07
- self.ShopID = 0
- self.RemainSecond = 0
- return
-
- def GetLength(self):
- return sizeof(tagGCShopRefreshTime)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A9 07 定时商店刷新倒计时 //tagGCShopRefreshTimeList:
- Cmd:%s,
- SubCmd:%s,
- ShopID:%d,
- RemainSecond:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ShopID,
- self.RemainSecond
- )
- return DumpString
-
-
-class tagGCShopRefreshTimeList(Structure):
- Head = tagHead()
- ShopCnt = 0 #(BYTE ShopCnt)//商店信息个数
- ShopTimeInfoList = list() #(vector<tagGCShopRefreshTime> ShopTimeInfoList)//商店信息列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA9
- self.Head.SubCmd = 0x07
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.ShopCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.ShopCnt):
- temShopTimeInfoList = tagGCShopRefreshTime()
- _pos = temShopTimeInfoList.ReadData(_lpData, _pos)
- self.ShopTimeInfoList.append(temShopTimeInfoList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA9
- self.Head.SubCmd = 0x07
- self.ShopCnt = 0
- self.ShopTimeInfoList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.ShopCnt):
- length += self.ShopTimeInfoList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.ShopCnt)
- for i in range(self.ShopCnt):
- data = CommFunc.WriteString(data, self.ShopTimeInfoList[i].GetLength(), self.ShopTimeInfoList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- ShopCnt:%d,
- ShopTimeInfoList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.ShopCnt,
- "..."
- )
- return DumpString
-
-
-m_NAtagGCShopRefreshTimeList=tagGCShopRefreshTimeList()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCShopRefreshTimeList.Head.Cmd,m_NAtagGCShopRefreshTimeList.Head.SubCmd))] = m_NAtagGCShopRefreshTimeList
-
-
-#------------------------------------------------------
# A9 06 商城全服购买次数通知 #tagGCStoreServerBuyCntInfo
class tagGCStoreServerBuyCnt(Structure):
@@ -5725,132 +5607,6 @@
m_NAtagGCXMZZFightInfo=tagGCXMZZFightInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCXMZZFightInfo.Head.Cmd,m_NAtagGCXMZZFightInfo.Head.SubCmd))] = m_NAtagGCXMZZFightInfo
-
-
-#------------------------------------------------------
-# AD 01 特惠活动信息 #tagGCTeHuiActivityInfoList
-
-class tagGCTeHuiActivityInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActivityType", c_ubyte), # 活动类型
- ("ActivityValue", c_int), # 活动值
- ("StartDate", c_int), # 开始时间time
- ("EndDate", c_int), # 结束时间time
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAD
- self.SubCmd = 0x01
- 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 = 0xAD
- self.SubCmd = 0x01
- self.ActivityType = 0
- self.ActivityValue = 0
- self.StartDate = 0
- self.EndDate = 0
- return
-
- def GetLength(self):
- return sizeof(tagGCTeHuiActivityInfo)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AD 01 特惠活动信息 //tagGCTeHuiActivityInfoList:
- Cmd:%s,
- SubCmd:%s,
- ActivityType:%d,
- ActivityValue:%d,
- StartDate:%d,
- EndDate:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActivityType,
- self.ActivityValue,
- self.StartDate,
- self.EndDate
- )
- return DumpString
-
-
-class tagGCTeHuiActivityInfoList(Structure):
- Head = tagHead()
- ActivityCount = 0 #(BYTE ActivityCount)//活动信息个数
- ActivityInfoList = list() #(vector<tagGCTeHuiActivityInfo> ActivityInfoList)//活动信息列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xAD
- self.Head.SubCmd = 0x01
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.ActivityCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.ActivityCount):
- temActivityInfoList = tagGCTeHuiActivityInfo()
- _pos = temActivityInfoList.ReadData(_lpData, _pos)
- self.ActivityInfoList.append(temActivityInfoList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xAD
- self.Head.SubCmd = 0x01
- self.ActivityCount = 0
- self.ActivityInfoList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.ActivityCount):
- length += self.ActivityInfoList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.ActivityCount)
- for i in range(self.ActivityCount):
- data = CommFunc.WriteString(data, self.ActivityInfoList[i].GetLength(), self.ActivityInfoList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- ActivityCount:%d,
- ActivityInfoList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.ActivityCount,
- "..."
- )
- return DumpString
-
-
-m_NAtagGCTeHuiActivityInfoList=tagGCTeHuiActivityInfoList()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCTeHuiActivityInfoList.Head.Cmd,m_NAtagGCTeHuiActivityInfoList.Head.SubCmd))] = m_NAtagGCTeHuiActivityInfoList
#------------------------------------------------------
@@ -21269,126 +21025,6 @@
#------------------------------------------------------
-# A8 04 通知商店限购物品已购买次数信息 # tagMCShopItemBuyCntInfoList
-
-class tagMCShopItemBuyCntInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("ShopID", c_int),
- ("ItemShopIndex", c_ushort),
- ("ItemID", c_int),
- ("BuyCnt", c_int), # 个人已购买数
- ("ServerBuyCnt", c_int), # 全服已购买数
- ]
-
- 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.ShopID = 0
- self.ItemShopIndex = 0
- self.ItemID = 0
- self.BuyCnt = 0
- self.ServerBuyCnt = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCShopItemBuyCntInfo)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A8 04 通知商店限购物品已购买次数信息 // tagMCShopItemBuyCntInfoList:
- ShopID:%d,
- ItemShopIndex:%d,
- ItemID:%d,
- BuyCnt:%d,
- ServerBuyCnt:%d
- '''\
- %(
- self.ShopID,
- self.ItemShopIndex,
- self.ItemID,
- self.BuyCnt,
- self.ServerBuyCnt
- )
- return DumpString
-
-
-class tagMCShopItemBuyCntInfoList(Structure):
- Head = tagHead()
- Count = 0 #(BYTE Count)//通知个数
- BuyCntList = list() #(vector<tagMCShopItemBuyCntInfo> BuyCntList)
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA8
- self.Head.SubCmd = 0x04
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.Count):
- temBuyCntList = tagMCShopItemBuyCntInfo()
- _pos = temBuyCntList.ReadData(_lpData, _pos)
- self.BuyCntList.append(temBuyCntList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA8
- self.Head.SubCmd = 0x04
- self.Count = 0
- self.BuyCntList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.Count):
- length += self.BuyCntList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.Count)
- for i in range(self.Count):
- data = CommFunc.WriteString(data, self.BuyCntList[i].GetLength(), self.BuyCntList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- Count:%d,
- BuyCntList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.Count,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCShopItemBuyCntInfoList=tagMCShopItemBuyCntInfoList()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopItemBuyCntInfoList.Head.Cmd,m_NAtagMCShopItemBuyCntInfoList.Head.SubCmd))] = m_NAtagMCShopItemBuyCntInfoList
-
-
-#------------------------------------------------------
# A8 02 通知NPC商店物品今日已购买次数 #tagMCShopItemDayBuyCntInfo
class tagMCShopItemDayBuyCnt(Structure):
@@ -21498,239 +21134,6 @@
m_NAtagMCShopItemDayBuyCntInfo=tagMCShopItemDayBuyCntInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopItemDayBuyCntInfo.Head.Cmd,m_NAtagMCShopItemDayBuyCntInfo.Head.SubCmd))] = m_NAtagMCShopItemDayBuyCntInfo
-
-
-#------------------------------------------------------
-# A8 03 通知自定义商店物品信息 #tagMCShopItemInfoList
-
-class tagMCShopItemInfo(Structure):
- ShopID = 0 #(DWORD ShopID)
- ItemShopIndex = 0 #(WORD ItemShopIndex)
- DataSize = 0 #(DWORD DataSize)
- ItemList = "" #(String ItemList)//物品列表[[物品ID,数量,是否绑定,是否定制]]
- PriceType = 0 #(BYTE PriceType)
- Price = 0 #(DWORD Price)
- OriginalPrice = 0 #(DWORD OriginalPrice)// 原价
- PlayerLVLimit = 0 #(WORD PlayerLVLimit)// 购买等级限制
- FamilyLVLimit = 0 #(BYTE FamilyLVLimit)// 购买战盟等级限制
- MaxBuyCnt = 0 #(DWORD MaxBuyCnt)// 个人限购数
- ServerMaxBuyCnt = 0 #(DWORD ServerMaxBuyCnt)// 全服限购数
- data = None
-
- def __init__(self):
- self.Clear()
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- self.ShopID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.ItemShopIndex,_pos = CommFunc.ReadWORD(_lpData, _pos)
- self.DataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.ItemList,_pos = CommFunc.ReadString(_lpData, _pos,self.DataSize)
- self.PriceType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.Price,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.OriginalPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.PlayerLVLimit,_pos = CommFunc.ReadWORD(_lpData, _pos)
- self.FamilyLVLimit,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.MaxBuyCnt,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.ServerMaxBuyCnt,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- return _pos
-
- def Clear(self):
- self.ShopID = 0
- self.ItemShopIndex = 0
- self.DataSize = 0
- self.ItemList = ""
- self.PriceType = 0
- self.Price = 0
- self.OriginalPrice = 0
- self.PlayerLVLimit = 0
- self.FamilyLVLimit = 0
- self.MaxBuyCnt = 0
- self.ServerMaxBuyCnt = 0
- return
-
- def GetLength(self):
- length = 0
- length += 4
- length += 2
- length += 4
- length += len(self.ItemList)
- length += 1
- length += 4
- length += 4
- length += 2
- length += 1
- length += 4
- length += 4
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteDWORD(data, self.ShopID)
- data = CommFunc.WriteWORD(data, self.ItemShopIndex)
- data = CommFunc.WriteDWORD(data, self.DataSize)
- data = CommFunc.WriteString(data, self.DataSize, self.ItemList)
- data = CommFunc.WriteBYTE(data, self.PriceType)
- data = CommFunc.WriteDWORD(data, self.Price)
- data = CommFunc.WriteDWORD(data, self.OriginalPrice)
- data = CommFunc.WriteWORD(data, self.PlayerLVLimit)
- data = CommFunc.WriteBYTE(data, self.FamilyLVLimit)
- data = CommFunc.WriteDWORD(data, self.MaxBuyCnt)
- data = CommFunc.WriteDWORD(data, self.ServerMaxBuyCnt)
- return data
-
- def OutputString(self):
- DumpString = '''
- ShopID:%d,
- ItemShopIndex:%d,
- DataSize:%d,
- ItemList:%s,
- PriceType:%d,
- Price:%d,
- OriginalPrice:%d,
- PlayerLVLimit:%d,
- FamilyLVLimit:%d,
- MaxBuyCnt:%d,
- ServerMaxBuyCnt:%d
- '''\
- %(
- self.ShopID,
- self.ItemShopIndex,
- self.DataSize,
- self.ItemList,
- self.PriceType,
- self.Price,
- self.OriginalPrice,
- self.PlayerLVLimit,
- self.FamilyLVLimit,
- self.MaxBuyCnt,
- self.ServerMaxBuyCnt
- )
- return DumpString
-
-
-class tagMCShopItemInfoList(Structure):
- Head = tagHead()
- Count = 0 #(BYTE Count)//通知个数
- ShopItemList = list() #(vector<tagMCShopItemInfo> ShopItemList)
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA8
- self.Head.SubCmd = 0x03
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.Count):
- temShopItemList = tagMCShopItemInfo()
- _pos = temShopItemList.ReadData(_lpData, _pos)
- self.ShopItemList.append(temShopItemList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA8
- self.Head.SubCmd = 0x03
- self.Count = 0
- self.ShopItemList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.Count):
- length += self.ShopItemList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.Count)
- for i in range(self.Count):
- data = CommFunc.WriteString(data, self.ShopItemList[i].GetLength(), self.ShopItemList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- Count:%d,
- ShopItemList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.Count,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCShopItemInfoList=tagMCShopItemInfoList()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopItemInfoList.Head.Cmd,m_NAtagMCShopItemInfoList.Head.SubCmd))] = m_NAtagMCShopItemInfoList
-
-
-#------------------------------------------------------
-# A8 05 通知神秘商店刷新次数 #tagMCShopRefreshCnt
-
-class tagMCShopRefreshCnt(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ShopID", c_int), #商店ID
- ("RefreshCnt", c_ushort), #已手动刷新次数
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA8
- self.SubCmd = 0x05
- 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 = 0xA8
- self.SubCmd = 0x05
- self.ShopID = 0
- self.RefreshCnt = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCShopRefreshCnt)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A8 05 通知神秘商店刷新次数 //tagMCShopRefreshCnt:
- Cmd:%s,
- SubCmd:%s,
- ShopID:%d,
- RefreshCnt:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ShopID,
- self.RefreshCnt
- )
- return DumpString
-
-
-m_NAtagMCShopRefreshCnt=tagMCShopRefreshCnt()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopRefreshCnt.Cmd,m_NAtagMCShopRefreshCnt.SubCmd))] = m_NAtagMCShopRefreshCnt
#------------------------------------------------------
@@ -23178,240 +22581,6 @@
m_NAtagMCAllPeoplePartyInfo=tagMCAllPeoplePartyInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCAllPeoplePartyInfo.Head.Cmd,m_NAtagMCAllPeoplePartyInfo.Head.SubCmd))] = m_NAtagMCAllPeoplePartyInfo
-
-
-#------------------------------------------------------
-# AA 03 升阶功能特惠奖励记录 #tagMCClassUPDayAwardRecordList
-
-class tagMCClassUPDayAwardRecord(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("DayType", c_ubyte), # 奖励日类型
- ("Record", c_int), # 奖励记录
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x03
- 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 = 0x03
- self.DayType = 0
- self.Record = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCClassUPDayAwardRecord)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 03 升阶功能特惠奖励记录 //tagMCClassUPDayAwardRecordList:
- Cmd:%s,
- SubCmd:%s,
- DayType:%d,
- Record:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.DayType,
- self.Record
- )
- return DumpString
-
-
-class tagMCClassUPDayAwardRecordList(Structure):
- Head = tagHead()
- RecordCount = 0 #(BYTE RecordCount)//记录个数
- RecordInfoList = list() #(vector<tagMCClassUPDayAwardRecord> RecordInfoList)//记录列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x03
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.RecordCount):
- temRecordInfoList = tagMCClassUPDayAwardRecord()
- _pos = temRecordInfoList.ReadData(_lpData, _pos)
- self.RecordInfoList.append(temRecordInfoList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x03
- self.RecordCount = 0
- self.RecordInfoList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.RecordCount):
- length += self.RecordInfoList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.RecordCount)
- for i in range(self.RecordCount):
- data = CommFunc.WriteString(data, self.RecordInfoList[i].GetLength(), self.RecordInfoList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- RecordCount:%d,
- RecordInfoList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.RecordCount,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCClassUPDayAwardRecordList=tagMCClassUPDayAwardRecordList()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCClassUPDayAwardRecordList.Head.Cmd,m_NAtagMCClassUPDayAwardRecordList.Head.SubCmd))] = m_NAtagMCClassUPDayAwardRecordList
-
-
-#------------------------------------------------------
-# AA 06 消费奖励信息 #tagMCCostProfitInfo
-
-class tagMCCostProfitInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActionID", c_int), # 活动ID
- ("TotalCost", c_int), # 总消费
- ("AwardState", c_int), # 奖励领取状态
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x06
- 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 = 0x06
- self.ActionID = 0
- self.TotalCost = 0
- self.AwardState = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCCostProfitInfo)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 06 消费奖励信息 //tagMCCostProfitInfo:
- Cmd:%s,
- SubCmd:%s,
- ActionID:%d,
- TotalCost:%d,
- AwardState:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActionID,
- self.TotalCost,
- self.AwardState
- )
- return DumpString
-
-
-m_NAtagMCCostProfitInfo=tagMCCostProfitInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCostProfitInfo.Cmd,m_NAtagMCCostProfitInfo.SubCmd))] = m_NAtagMCCostProfitInfo
-
-
-#------------------------------------------------------
-# AA 07 消费排行特惠信息 #tagMCCostRankTeHuiInfo
-
-class tagMCCostRankTeHuiInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActionID", c_int), # 活动ID
- ("TotalCost", c_int), # 总累计消费钻石
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x07
- 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 = 0x07
- self.ActionID = 0
- self.TotalCost = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCCostRankTeHuiInfo)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 07 消费排行特惠信息 //tagMCCostRankTeHuiInfo:
- Cmd:%s,
- SubCmd:%s,
- ActionID:%d,
- TotalCost:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActionID,
- self.TotalCost
- )
- return DumpString
-
-
-m_NAtagMCCostRankTeHuiInfo=tagMCCostRankTeHuiInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCostRankTeHuiInfo.Cmd,m_NAtagMCCostRankTeHuiInfo.SubCmd))] = m_NAtagMCCostRankTeHuiInfo
#------------------------------------------------------
@@ -25610,198 +24779,6 @@
m_NAtagMCNewXJSDRecharge=tagMCNewXJSDRecharge()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNewXJSDRecharge.Cmd,m_NAtagMCNewXJSDRecharge.SubCmd))] = m_NAtagMCNewXJSDRecharge
-
-
-#------------------------------------------------------
-# AA 05 充值排行特惠信息 #tagMCRechargeRankTeHuiInfo
-
-class tagMCRechargeRankTeHuiInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActionID", c_int), # 活动ID
- ("TotalGold", c_int), # 总累计充值元宝
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x05
- 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 = 0x05
- self.ActionID = 0
- self.TotalGold = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCRechargeRankTeHuiInfo)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 05 充值排行特惠信息 //tagMCRechargeRankTeHuiInfo:
- Cmd:%s,
- SubCmd:%s,
- ActionID:%d,
- TotalGold:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActionID,
- self.TotalGold
- )
- return DumpString
-
-
-m_NAtagMCRechargeRankTeHuiInfo=tagMCRechargeRankTeHuiInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRechargeRankTeHuiInfo.Cmd,m_NAtagMCRechargeRankTeHuiInfo.SubCmd))] = m_NAtagMCRechargeRankTeHuiInfo
-
-
-#------------------------------------------------------
-# AA 04 充值特惠信息 #tagMCRechargeTeHuiInfoList
-
-class tagMCRechargeTeHuiInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("GotCnt", c_ubyte), # 已领取次数
- ("CanGetCnt", c_ubyte), # 当前可领取次数
- ("CurTotalGold", c_int), # 当前规则累计充值元宝-仅针对累充规则
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x04
- 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 = 0x04
- self.GotCnt = 0
- self.CanGetCnt = 0
- self.CurTotalGold = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCRechargeTeHuiInfo)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 04 充值特惠信息 //tagMCRechargeTeHuiInfoList:
- Cmd:%s,
- SubCmd:%s,
- GotCnt:%d,
- CanGetCnt:%d,
- CurTotalGold:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.GotCnt,
- self.CanGetCnt,
- self.CurTotalGold
- )
- return DumpString
-
-
-class tagMCRechargeTeHuiInfoList(Structure):
- Head = tagHead()
- ActionID = 0 #(DWORD ActionID)// 活动ID
- TotalGold = 0 #(DWORD TotalGold)// 总累计充值元宝
- InfoCnt = 0 #(BYTE InfoCnt)// 信息个数
- InfoList = list() #(vector<tagMCRechargeTeHuiInfo> InfoList)// 信息列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x04
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.ActionID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.TotalGold,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.InfoCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.InfoCnt):
- temInfoList = tagMCRechargeTeHuiInfo()
- _pos = temInfoList.ReadData(_lpData, _pos)
- self.InfoList.append(temInfoList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x04
- self.ActionID = 0
- self.TotalGold = 0
- self.InfoCnt = 0
- self.InfoList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 4
- length += 4
- length += 1
- for i in range(self.InfoCnt):
- length += self.InfoList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteDWORD(data, self.ActionID)
- data = CommFunc.WriteDWORD(data, self.TotalGold)
- data = CommFunc.WriteBYTE(data, self.InfoCnt)
- for i in range(self.InfoCnt):
- data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- ActionID:%d,
- TotalGold:%d,
- InfoCnt:%d,
- InfoList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.ActionID,
- self.TotalGold,
- self.InfoCnt,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCRechargeTeHuiInfoList=tagMCRechargeTeHuiInfoList()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRechargeTeHuiInfoList.Head.Cmd,m_NAtagMCRechargeTeHuiInfoList.Head.SubCmd))] = m_NAtagMCRechargeTeHuiInfoList
#------------------------------------------------------
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py b/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py
index 42ad582..4ad857f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py
@@ -561,37 +561,3 @@
SendEventPack("CompensationEntire", dataDict)
return
-## 发送充值排行榜特惠活动奖励邮件记录流向
-# @param curPlayerID: 玩家ID
-# @param GUID:
-# @param actionID: 活动ID
-# @param actionValue: 活动编号
-# @param order: 奖励排名
-# @param rewardItemList: 奖励物品列表
-# @return None
-def DR_SendRechareRankTeHuiRewardMail(curPlayerID, GUID, actionID, actionValue, order, rewardItemList):
-
- dataDict = {'PlayerID':curPlayerID, 'GUID':GUID, 'ActionID':actionID, 'ActionValue':actionValue,
- 'Order':order, 'ItemList':rewardItemList}
-
- #发送封包
- SendEventPack("SendRechareRankTeHuiRewardMail", dataDict)
- return
-
-## 发送消费排行榜特惠活动奖励邮件记录流向
-# @param curPlayerID: 玩家ID
-# @param GUID:
-# @param actionID: 活动ID
-# @param actionValue: 活动编号
-# @param order: 奖励排名
-# @param rewardItemList: 奖励物品列表
-# @return None
-def DR_SendCostRankTeHuiRewardMail(curPlayerID, GUID, actionID, actionValue, order, rewardItemList):
-
- dataDict = {'PlayerID':curPlayerID, 'GUID':GUID, 'ActionID':actionID, 'ActionValue':actionValue,
- 'Order':order, 'ItemList':rewardItemList}
-
- #发送封包
- SendEventPack("SendCostRankTeHuiRewardMail", dataDict)
- return
-
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/ClearOpenServerDay.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/ClearOpenServerDay.py
index c950223..56b3847 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/ClearOpenServerDay.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/ClearOpenServerDay.py
@@ -28,7 +28,6 @@
import ShareDefine
import PlayerBillboard
import PlayerUniversalGameRec
-import GameWorldActionTeHui
import GameWorldProcess
import GameWorldBoss
import GMCommon
@@ -74,9 +73,6 @@
# GameWorld.GetHightLadderMgr().ClearAllPlayer()
# HighLadder.Sync_HightLadderCanFightPlayer(curPlayer, curPlayer.GetPlayerID())
# curPlayer.Sync_HightLadderTopPlayer(3)
-
- # 清除特惠活动数据
- GameWorldActionTeHui.OnGMClearTeHui()
# 清除Rec
delRecTypeList = []
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionTeHui.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionTeHui.py
deleted file mode 100644
index 1655d3b..0000000
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionTeHui.py
+++ /dev/null
@@ -1,373 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-#
-##@package GameWorldActionTeHui
-#
-# @todo:特惠活动
-# @author hxp
-# @date 2014-06-21
-# @version 1.7
-#
-# @change: "2014-09-28 17:30" hxp 增加充值排行活动处理
-# @change: "2014-10-11 12:30" hxp 修复充值排行奖励只能给前两名的bug
-# @change: "2014-12-06 16:30" hxp 增加合服折扣店支持,增加GM重置特惠活动数据(方便测试)
-# @change: "2014-12-11 22:00" hxp 修改同步地图折扣状态逻辑(取不到值时才取通用记录中的值)
-# @change: "2015-08-21 14:30" hxp 增加记录上一期充值特惠排行榜榜单信息
-# @change: "2017-03-24 15:00" hxp 启动时初始化活动数据状态值
-# @change: "2017-06-14 11:00" hxp 还原特惠消费返利榜
-#
-# 详细描述: 特惠活动
-#
-#---------------------------------------------------------------------
-"""Version = 2017-06-14 11:00"""
-
-import GameWorld
-import ShareDefine
-import ChPyNetSendPack
-import NetPackCommon
-import GameWorldShopItem
-import PlayerDBGSEvent
-import PlayerCompensation
-import PlayerBillboard
-import DataRecordPack
-import ReadChConfig
-import ChConfig
-
-## GM重置特惠数据,方便测试
-# @param None
-# @return None
-def OnGMClearTeHui():
- # 清除充值特惠排行榜
- PlayerBillboard.ClearBillboardByIndex(ShareDefine.Def_BT_RechargeTeHui)
- PlayerBillboard.ClearBillboardByIndex(ShareDefine.Def_BT_RechargeTeHuiLast)
- # 清除消费特惠排行榜
- PlayerBillboard.ClearBillboardByIndex(ShareDefine.Def_BT_CostTeHui)
- PlayerBillboard.ClearBillboardByIndex(ShareDefine.Def_BT_CostTeHuiLast)
-
- gameWorld = GameWorld.GetGameWorld()
- for dictName in ShareDefine.TeHuiTypeKeyDict.values():
-
- beginTime, endTime = 0, 0
- signID = 0
- #潜规则:在ChConfig活动相关设置中,提取了字典名
- gameWorld.SetDict(dictName, signID)
- gameWorld.SetDict(ShareDefine.Def_Notify_WorldKey_DayAction_BeginTime % dictName, beginTime)
- gameWorld.SetDict(ShareDefine.Def_Notify_WorldKey_DayAction_EndTime % dictName, endTime)
- # 标记活动唯一id
- actionIDKey = ShareDefine.Def_Notify_WorldKey_DayAction_ID % dictName
- gameWorld.SetDict(actionIDKey, beginTime)
-
- #通知Mapserver,设置字典
- GameWorld.SendMapServerMsgEx(actionIDKey, beginTime)
- GameWorld.SendMapServerMsgEx(dictName, signID)
- PlayerDBGSEvent.SetDBGSTrig_ByKey(actionIDKey, beginTime)
- PlayerDBGSEvent.SetDBGSTrig_ByKey(dictName, signID)
- PlayerDBGSEvent.SetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_DayAction_BeginTime % dictName, beginTime)
- PlayerDBGSEvent.SetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_DayAction_EndTime % dictName, endTime)
-
- PlayerDBGSEvent.DelDBGSTrig_ByKey(PlayerDBGSEvent.Def_TeHuiRepeatOrderKey)
- PlayerDBGSEvent.DelDBGSTrig_ByKey(PlayerDBGSEvent.Def_TeHuiRepeatNumKey)
- return
-
-def OnGameServerInitOK():
- # 读取数据库中的值初始化到内存中
- GameWorld.Log("初始化特惠活动值...")
- gameWorld = GameWorld.GetGameWorld()
- for dictName in ShareDefine.TeHuiTypeKeyDict.values():
- actionIDKey = ShareDefine.Def_Notify_WorldKey_DayAction_ID % dictName
- beginTimeKey = ShareDefine.Def_Notify_WorldKey_DayAction_BeginTime % dictName
- endTimeKey = ShareDefine.Def_Notify_WorldKey_DayAction_EndTime % dictName
-
- actionValue = PlayerDBGSEvent.GetDBGSTrig_ByKey(dictName)
- actionID = PlayerDBGSEvent.GetDBGSTrig_ByKey(actionIDKey)
- beginTime = PlayerDBGSEvent.GetDBGSTrig_ByKey(beginTimeKey)
- endTIme = PlayerDBGSEvent.GetDBGSTrig_ByKey(endTimeKey)
-
- gameWorld.SetDict(dictName, actionValue)
- gameWorld.SetDict(actionIDKey, actionID)
- gameWorld.SetDict(beginTimeKey, beginTime)
- gameWorld.SetDict(endTimeKey, endTIme)
- GameWorld.Log(" dictName=%s,actionValue=%s,actionID=%s,beginTime=%s,endTIme=%s"
- % (dictName, actionValue, actionID, beginTime, endTIme))
- return
-
-def OnMapServerInitOK():
- SendTeHuiActionInfo()
- return
-
-## 发送MapServer特惠活动信息
-# @param None
-# @return None
-def SendTeHuiActionInfo():
- gameWorld = GameWorld.GetGameWorld()
- for actionKey in ShareDefine.TeHuiTypeKeyDict.values():
- actionIDKey = ShareDefine.Def_Notify_WorldKey_DayAction_ID % actionKey
-
- actionID = gameWorld.GetDictByKey(actionIDKey)
- actionValue = gameWorld.GetDictByKey(actionKey)
-
- # 如果没有值,则取记录中的值
- if actionID <= 0:
- actionID = PlayerDBGSEvent.GetDBGSTrig_ByKey(actionIDKey)
- actionValue = PlayerDBGSEvent.GetDBGSTrig_ByKey(actionKey)
-
- GameWorld.SendMapServerMsgEx(actionIDKey, actionID)
- GameWorld.SendMapServerMsgEx(actionKey, actionValue)
- return
-
-
-## 特惠活动变更处理
-# @param dictName 活动key
-# @param value 值
-# @return None
-def OnTeHuiActionChange(dictName, value):
- gameWorld = GameWorld.GetGameWorld()
- actionIDKey = ShareDefine.Def_Notify_WorldKey_DayAction_ID % dictName
- startTimeKey = ShareDefine.Def_Notify_WorldKey_DayAction_BeginTime % dictName
- endTimeKey = ShareDefine.Def_Notify_WorldKey_DayAction_EndTime % dictName
- curActionID = gameWorld.GetDictByKey(actionIDKey)
- dbActionID = PlayerDBGSEvent.GetDBGSTrig_ByKey(actionIDKey)
- dbStartTime = PlayerDBGSEvent.GetDBGSTrig_ByKey(startTimeKey)
- dbEndTime = PlayerDBGSEvent.GetDBGSTrig_ByKey(endTimeKey)
- dbActionValue = PlayerDBGSEvent.GetDBGSTrig_ByKey(dictName)
-
- # 如果不是同一活动ID,则更新保存
- GameWorld.Log("OnTeHuiActionChange dictName=%s,value=%s,dbActionValue=%s,curActionID=%s,dbActionID=%s"
- % (dictName, value, dbActionValue, curActionID, dbActionID))
- if curActionID != dbActionID:
- PlayerDBGSEvent.SetDBGSTrig_ByKey(actionIDKey, curActionID)
- curStartTime = gameWorld.GetDictByKey(startTimeKey)
- curEndTime = gameWorld.GetDictByKey(endTimeKey)
- PlayerDBGSEvent.SetDBGSTrig_ByKey(startTimeKey, curStartTime)
- PlayerDBGSEvent.SetDBGSTrig_ByKey(endTimeKey, curEndTime)
- PlayerDBGSEvent.SetDBGSTrig_ByKey(dictName, value)
- GameWorld.Log(" 活动ID不一样,更新DBGSTrig...curActionID=%s,sTime=%s,eTime=%s,value=%s"
- % (curActionID, curStartTime, curEndTime, value))
-
- # 如果是折扣店,则需要重置全服限购数据
- if dictName in [ShareDefine.Def_Notify_WorldKey_DayAction_DiscountShop,
- ShareDefine.Def_Notify_WorldKey_DayAction_MixDiscountShop]:
- GameWorldShopItem.DoShopItemClearBuyCnt(value)
- GameWorld.Log(" 折扣店新活动ID开启,重置全服限购次数!shopID=%s" % value)
-
- # 充值排行特惠
- elif dictName == ShareDefine.Def_Notify_WorldKey_DayAction_RechargeRank:
- # 拷贝这一期的最终结果备档
- PlayerBillboard.CopyBillboard(ShareDefine.Def_BT_RechargeTeHuiLast, ShareDefine.Def_BT_RechargeTeHui)
- DataRecordPack.DR_BillboardDataByDay(ShareDefine.Def_BT_RechargeTeHui)
- GameWorld.Log(" 充值排行特惠 拷贝历史活动数据备档。。.")
- # 发送奖励邮件
- __DoSendRechargeRankTeHuiRewardMail(dbActionID, dbActionValue, dbStartTime, dbEndTime)
- GameWorld.Log(" 充值排行特惠 发送奖励邮件。。.")
- # 如果开启新的一期,则重置新一期排行榜
- if value > 0:
- PlayerBillboard.ClearBillboardByIndex(ShareDefine.Def_BT_RechargeTeHui)
- GameWorld.Log(" 充值排行特惠 重置新一期排行榜。。.")
-
- # 消费特惠排行榜
- elif dictName == ShareDefine.Def_Notify_WorldKey_DayAction_CostRank:
- # 拷贝这一期的最终结果备档
- PlayerBillboard.CopyBillboard(ShareDefine.Def_BT_CostTeHuiLast, ShareDefine.Def_BT_CostTeHui)
- DataRecordPack.DR_BillboardDataByDay(ShareDefine.Def_BT_CostTeHui)
- __DoSendCostRankTeHuiRewardMail(dbActionID, dbActionValue, dbStartTime, dbEndTime)
- if value > 0:
- PlayerBillboard.ClearBillboardByIndex(ShareDefine.Def_BT_CostTeHui)
-
- Sync_TeHuiActivityToClient(None, 0)
- return
-
-## 执行发送消费特惠排行榜邮件
-# @param None
-# @return None
-def __DoSendCostRankTeHuiRewardMail(dbActionID, dbActionValue, dbStartTime, dbEndTime):
- GameWorld.Log("执行发送消费特惠排行榜邮件...dbActionID=%s,dbActionValue=%s,dbStartTime=%s,dbEndTime=%s"
- % (dbActionID, dbActionValue, dbStartTime, dbEndTime))
- # 发送奖励邮件
- billboard = GameWorld.GetBillboard().FindBillboard(ShareDefine.Def_BT_CostTeHui)
- if not billboard:
- GameWorld.ErrLog(" 找不到消费特惠排行榜!!!")
- return
-
- costRankInfoDict = ReadChConfig.GetEvalChConfig("TeHuiAction_CostRank")
-
- if dbActionValue not in costRankInfoDict:
- GameWorld.ErrLog(" 活动编号不在排行奖励配置里,编号=%s" % (dbActionValue))
- return
-
- costRankInfoList = costRankInfoDict[dbActionValue]
-
- if len(costRankInfoList) < 5:
- GameWorld.ErrLog(" 排行奖励配置信息错误!!!")
- return
-
- startTimeStr = GameWorld.ChangeTimeNumToStr(dbStartTime)
- endTimeStr = GameWorld.ChangeTimeNumToStr(dbEndTime)
- rewardMailInfoList = costRankInfoList[1:]
- mailTitle, contentTemple, getDays, rewardDict = rewardMailInfoList
- mailLimitTime = str(GameWorld.GetDatetimeByDiffDays(getDays))
- mailLimitTime = mailLimitTime.split(".")[0]
-
- billboardCnt = billboard.GetCount()
- #maxOrder = max(rewardDict)
- for index in range(0, billboardCnt):
- #if index < 0 or index >= billboardCnt:
- # continue
-
- objBillboard = billboard.At(index)
- playerID = objBillboard.GetID()
- curJob = objBillboard.GetType2()
- curJobType = ChConfig.JOB_TYPE_DICT.get(curJob) # 获取职业大类
- jobRewardDict = __GetAwardByJob(curJobType, rewardDict)
-
- if not jobRewardDict:
- GameWorld.ErrLog("消费排行特惠 发送奖励,找不到职业对应奖励配置, jobType=%s" % curJobType)
- continue
-
- order = index + 1
-
- rewardItemList = GameWorld.GetDictValueByRangeKey(jobRewardDict, order)
- if not rewardItemList:
- GameWorld.ErrLog("消费排行特惠 发送奖励,order=%s not in jobRewardDict=%s" % (order, str(jobRewardDict)))
- continue
-
- mailContent = contentTemple % (startTimeStr, endTimeStr, order)
- GUID = PlayerCompensation.SendPersonalItemMail(mailTitle, mailContent, mailLimitTime, [playerID], rewardItemList)
- DataRecordPack.DR_SendCostRankTeHuiRewardMail(playerID, GUID, dbActionID, dbActionValue, order, rewardItemList)
-
- return
-
-## 执行发送充值排行奖励邮件
-# @param None
-# @return None
-def __DoSendRechargeRankTeHuiRewardMail(dbActionID, dbActionValue, dbStartTime, dbEndTime):
- GameWorld.Log("执行发送充值排行奖励邮件...dbActionID=%s,dbActionValue=%s,dbStartTime=%s,dbEndTime=%s"
- % (dbActionID, dbActionValue, dbStartTime, dbEndTime))
- # 发送奖励邮件
- billboard = GameWorld.GetBillboard().FindBillboard(ShareDefine.Def_BT_RechargeTeHui)
- if not billboard:
- GameWorld.ErrLog(" 找不到充值排行榜!!!")
- return
-
- RechargeRankInfoDict = ReadChConfig.GetEvalChConfig("TeHuiAction_RechargeRank")
-
- if dbActionValue not in RechargeRankInfoDict:
- GameWorld.ErrLog(" 活动编号不在排行奖励配置里,编号=%s" % (dbActionValue))
- return
-
- rechargeRankInfoList = RechargeRankInfoDict[dbActionValue]
-
- if len(rechargeRankInfoList) < 5:
- GameWorld.ErrLog(" 排行奖励配置信息错误!!!")
- return
-
- startTimeStr = GameWorld.ChangeTimeNumToStr(dbStartTime)
- endTimeStr = GameWorld.ChangeTimeNumToStr(dbEndTime)
- rewardMailInfoList = rechargeRankInfoList[1:]
- mailTitle, contentTemple, getDays, rewardDict = rewardMailInfoList
- mailLimitTime = str(GameWorld.GetDatetimeByDiffDays(getDays))
- mailLimitTime = mailLimitTime.split(".")[0]
-
- billboardCnt = billboard.GetCount()
- #maxOrder = max(rewardDict)
- for index in range(0, billboardCnt):
- #if index < 0 or index >= billboardCnt:
- # continue
-
- objBillboard = billboard.At(index)
- playerID = objBillboard.GetID()
- curJob = objBillboard.GetType2()
- curJobType = ChConfig.JOB_TYPE_DICT.get(curJob) # 获取职业大类
- jobRewardDict = __GetAwardByJob(curJobType, rewardDict)
-
- if not jobRewardDict:
- GameWorld.ErrLog("充值排行特惠 发送奖励,找不到职业对应奖励配置, jobType=%s" % curJobType)
- continue
-
- order = index + 1
-
- rewardItemList = GameWorld.GetDictValueByRangeKey(jobRewardDict, order)
- if not rewardItemList:
- GameWorld.ErrLog("充值排行特惠 发送奖励,order=%s not in jobRewardDict=%s" % (order, str(jobRewardDict)))
- continue
-
- mailContent = contentTemple % (startTimeStr, endTimeStr, order)
- GUID = PlayerCompensation.SendPersonalItemMail(mailTitle, mailContent, mailLimitTime,
- [playerID], rewardItemList)
- DataRecordPack.DR_SendRechareRankTeHuiRewardMail(playerID, GUID, dbActionID,
- dbActionValue, order, rewardItemList)
-
- return
-
-## 根据职业获取奖励
-# @param curPlayer:玩家实例
-# @param qqRewardDict:奖励物品配置字典
-# @return None
-def __GetAwardByJob(jobtype, rewardDict):
- if jobtype in rewardDict:
- return rewardDict[jobtype]
- infoKey = () # 默认key
- for jobkey in rewardDict.keys():
- # 如果玩家职业在配置的key里,则取指定的key信息
- if isinstance(jobkey, tuple) and jobtype in jobkey:
- infoKey = jobkey
- break
- return rewardDict.get(infoKey)
-
-## 查询特惠活动信息
-# @param index 玩家实例
-# @param clientData 封包结构体
-# @param tick 时间戳
-# @return None
-def ClientRequestTeHuiActivity(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- activityType = clientData.ActivityType
- GameWorld.DebugLog("ClientRequestTeHuiActivity activityType=%s" % activityType)
- Sync_TeHuiActivityToClient(curPlayer, activityType)
- return
-
-
-## 同步特惠活动信息
-# @param curPlayer
-# @param tick 时间戳
-# @return None
-def Sync_TeHuiActivityToClient(curPlayer, activityType):
- gameWorld = GameWorld.GetGameWorld()
-
- tehuiPack = ChPyNetSendPack.tagGCTeHuiActivityInfoList()
- tehuiPack.Clear()
- tehuiPack.ActivityInfoList = []
-
- for teHuiType, dictKey in ShareDefine.TeHuiTypeKeyDict.items():
-
- if activityType not in [0, teHuiType]:
- continue
-
- tehuiInfo = ChPyNetSendPack.tagGCTeHuiActivityInfo()
- tehuiInfo.Clear()
- tehuiInfo.ActivityType = teHuiType
- tehuiInfo.ActivityValue = gameWorld.GetDictByKey(dictKey)
- startTime = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_DayAction_BeginTime % dictKey)
- tehuiInfo.StartDate = startTime
- endTime = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_DayAction_EndTime % dictKey)
- tehuiInfo.EndDate = endTime
- tehuiPack.ActivityInfoList.append(tehuiInfo)
-
- tehuiPack.ActivityCount = len(tehuiPack.ActivityInfoList)
-
- # 通知客户端同步时间
- if not curPlayer:
- # 全服广播在线玩家
- playerManager = GameWorld.GetPlayerManager()
- for i in range(0, playerManager.GetPlayerCount()):
- curPlayer = playerManager.GetPlayerByIndex(i)
- if curPlayer == None or not curPlayer.GetInitOK():
- continue
-
- NetPackCommon.SendFakePack(curPlayer, tehuiPack)
- else:
- NetPackCommon.SendFakePack(curPlayer, tehuiPack)
- return
-
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
index eef5bf5..811d666 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
@@ -85,10 +85,8 @@
import PlayerGeTui
#import PlayerManorWar
import GameWorldBoss
-#import GameWorldActionTeHui
#import HighLadder
import PlayerCompensation
-#import GameWorldShopItem
import ReadChConfig
import EventReport
#import ReloadModule
@@ -405,8 +403,6 @@
Dispose_DataBase_GMShell(tick)
##处理重开服务器后, 活动继续开启逻辑根据天数
#GameWorldActionControl.Dispose_Action_GoOn_ByDay(tick)
- #定时神秘商店刷新
- #GameWorldShopItem.Dispose_ShopItemRefresh(tick)
#定时向RouteServer发送消息
Dispose_SendMsg_RouteServer(tick)
@@ -1245,7 +1241,6 @@
CrossRealmPK.OnGameServerInitOK()
#世界boss被杀次数重置
#GameWorldBoss.CheckResetBossKilledCntOnServerInit()
- #GameWorldActionTeHui.OnGameServerInitOK() # 特惠活动初始化
__Func_HighPrecisionProcess(tick) # 主动触发一次高精度的调用,确保服务器启动后一些功能活动等的数据会被加载
@@ -1412,12 +1407,6 @@
GameWorldFamilyWar.OnMapServerInitOK()
# 领地争夺战
#PlayerManorWar.OnMapServerInitOK()
-
- # 特惠活动
- #GameWorldActionTeHui.OnMapServerInitOK()
-
- # 商店信息
- #GameWorldShopItem.OnMapServerInitOK()
# 跨服服务器状态
isCrossServerOpen = GameWorld.GetGameWorld().GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossServerOpen)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldShopItem.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldShopItem.py
deleted file mode 100644
index 463e176..0000000
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldShopItem.py
+++ /dev/null
@@ -1,333 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-#
-##@package GameWorldShopItem
-#
-# @todo:自定义商店
-# @author hxp
-# @date 2014-06-21
-# @version 1.3
-#
-# @change: "2015-02-04 14:30" hxp 神秘商店
-# @change: "2015-02-09 18:00" ljd 修改登陆未完成时收不到倒计时刷新包问题
-# @change: "2015-04-28 17:00" hxp 定时刷新商店开启时通知离开时间
-#
-# 详细描述: 自定义商店
-#
-#---------------------------------------------------------------------
-"""Version = 2015-04-28 17:00"""
-
-import GameWorld
-import ChPyNetSendPack
-import NetPackCommon
-import ReadChConfig
-import ShareDefine
-import ChConfig
-
-import time
-
-## 充值商店全服限购数据
-# @param shopID 商店id
-# @return
-def DoShopItemClearBuyCnt(shopID):
-
- recTypeListData = __GetShopItemRecData()
-
- # 遍历清空全服限购次数
- for index in range(recTypeListData.Count()):
- recData = recTypeListData.At(index)
- curShopID = recData.GetValue1()
- if curShopID == shopID:
- recData.SetValue3(0)
-
- resultName = "%s" % [ShareDefine.Def_ShopItem_ClearBuyCnt, shopID]
-
- # 通知全服玩家
- playerManager = GameWorld.GetPlayerManager()
- for i in range(0, playerManager.GetPlayerCount()):
- curPlayer = playerManager.GetPlayerByIndex(i)
- if curPlayer == None or not curPlayer.GetInitOK():
- continue
-
- curPlayer.MapServer_QueryPlayerResult(0, 0, "ShopItem", resultName, len(resultName))
-
- return
-
-
-## 自定义商店物品查询结果
-# @param curPlayer 玩家实例
-# @param msgList 信息列表
-# @return [queryType, 扩展数据]
-def DoShopItemQueryResult(curPlayer, msgList):
- queryType = msgList[0]
- result = []
-
- # 同步购买次数[queryType, shopID, serverBuyLimitIndexList]
- if queryType == ShareDefine.Def_ShopItem_QueryServerBuyCnt:
- shopID = msgList[1]
- limitIndexList = msgList[2]
- buyCntDict = __GetShopItemServerBuyCntDict(shopID, limitIndexList)
- result = [queryType, shopID, buyCntDict]
-
- # 购买物品[queryType, shopID, itemShopIndex, buyCount, serverMaxBuyCnt]
- elif queryType == ShareDefine.Def_ShopItem_BuyItem:
- shopID = msgList[1]
- itemShopIndex = msgList[2]
- buyCount = msgList[3]
- serverMaxBuyCnt = msgList[4]
- buyCntDict = __GetShopItemServerBuyCntDict(shopID, [itemShopIndex])
- serverBuyCnt = buyCntDict.get(itemShopIndex, 0)
- # 已购买的 + 要购买的 不超过,则允许购买
- canBuy = 0 if (serverBuyCnt + buyCount) > serverMaxBuyCnt else 1
- GameWorld.DebugLog("购买全服限购物品:全服已购买=%s,欲购买=%s,最大购买=%s,canBuy=%s"
- % (serverBuyCnt, buyCount, serverMaxBuyCnt, canBuy))
- if canBuy:
- serverBuyCnt = __AddShopItemServerBuyCnt(shopID, itemShopIndex, buyCount)
-
- # 通知全服在线玩家该物品限购次数变更
- syncInfo = "%s" % [ShareDefine.Def_ShopItem_SyncServerBuyCnt, shopID,
- itemShopIndex, serverBuyCnt]
- playerManager = GameWorld.GetPlayerManager()
- for i in range(0, playerManager.GetPlayerCount()):
- player = playerManager.GetPlayerByIndex(i)
- # 自己由MapServer购买后同步
- # 因为有可能改物品也有个人限购,需MapServer处理完后再同步
- if player == None or not player.GetInitOK():
- continue
-
- if player.GetPlayerID() == curPlayer.GetPlayerID():
- #GameWorld.DebugLog(" 自己先不同步")
- continue
-
- player.MapServer_QueryPlayerResult(0, 0, "ShopItem", syncInfo, len(syncInfo))
-
- result = [queryType, shopID, itemShopIndex, buyCount, canBuy, serverBuyCnt]
-
-
- return result
-
-
-## 增加限购物品购买次数
-# @param shopID 商店id
-# @param itemShopIndex 物品索引
-# @param addBuyCount 增加次数
-# @return 更新后的已购买次数
-def __AddShopItemServerBuyCnt(shopID, itemShopIndex, addBuyCount):
- recTypeListData = __GetShopItemRecData()
-
- shopItemRec = None
- for index in range(recTypeListData.Count()):
- recData = recTypeListData.At(index)
- curShopID = recData.GetValue1()
- curItemShopIndex = recData.GetValue2()
- if curShopID == shopID and curItemShopIndex == itemShopIndex:
- shopItemRec = recData
-
- if shopItemRec == None:
- #还未记录,则添加一个记录对象
- shopItemRec = recTypeListData.AddRec()
- shopItemRec.SetValue1(shopID)
- shopItemRec.SetValue2(itemShopIndex)
- shopItemRec.SetValue3(0)
-
- buyCnt = shopItemRec.GetValue3()
- buyCnt += addBuyCount
- shopItemRec.SetValue3(buyCnt)
- return buyCnt
-
-
-## 获取商店全服限购物品对应已购买个数
-# @param shopID
-# @param indexList
-# @return {index:buyCnt, ...}
-def __GetShopItemServerBuyCntDict(shopID, indexList):
- findCnt = 0
- buyCntDict = {}
- recTypeListData = __GetShopItemRecData()
-
- for index in range(recTypeListData.Count()):
- recData = recTypeListData.At(index)
- curShopID = recData.GetValue1()
- itemShopIndex = recData.GetValue2()
- buyCnt = recData.GetValue3()
- if curShopID == shopID and itemShopIndex in indexList:
- buyCntDict[itemShopIndex] = buyCnt
- findCnt += 1
- if findCnt >= len(indexList):
- break
-
- return buyCntDict
-
-
-## 获取商店Rec数据
-# @param None
-# @return recTypeListData
-def __GetShopItemRecData():
- recType = ShareDefine.Def_UniversalGameRecType_ShopItem
- universalRecMgr = GameWorld.GetUniversalRecMgr()
- recTypeListData = universalRecMgr.GetTypeList(recType)
- return recTypeListData
-
-## 地图启动通知
-# @param None
-# @return
-def OnMapServerInitOK():
-
- TimeShopRefreshDict = ReadChConfig.GetEvalChConfig("TimeShopRefresh")
-
- gameWorld = GameWorld.GetGameWorld()
-
- for shopID in TimeShopRefreshDict.keys():
-
- isOpen = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_ShopState % shopID)
-
- if not isOpen:
- continue
-
- lastRefreshTime = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_TimeShopRefreshTime % shopID)
-
- GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_ShopState % shopID, isOpen)
- GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_TimeShopRefreshTime % shopID, lastRefreshTime)
-
- return
-
-## 玩家登录
-# @param curPlayer
-# @return
-def OnPlayerLogin(curPlayer):
- Sync_TimeShopRefreshTime(curPlayer)
- return
-
-## 商店状态变更处理
-# @param curPlayer
-# @param isOpen
-# @return
-def OnShopStateChange(dictName, isOpen):
- shopID = dictName[len(ShareDefine.Def_Notify_WorldKey_ShopState) - 2:]
- try:
- shopID = int(shopID)
- except BaseException:
- GameWorld.ErrLog("商店ID配置key错误, key=%s" % dictName)
- return
-
- TimeShopRefreshDict = ReadChConfig.GetEvalChConfig("TimeShopRefresh")
-
- if shopID in TimeShopRefreshDict:
- __DoTimeShopStateChange(shopID, isOpen)
-
- return
-
-## 执行商店状态变更处理
-# @param shopID
-# @param isOpen
-# @return
-def __DoTimeShopStateChange(shopID, isOpen):
-
- if not isOpen:
- return
-
- curTime = int(time.time())
-
- gameWorld = GameWorld.GetGameWorld()
- gameWorld.SetDict(ShareDefine.Def_Notify_WorldKey_TimeShopRefreshTime % shopID, curTime)
- GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_TimeShopRefreshTime % shopID, curTime)
- Sync_TimeShopRefreshTime()
- return
-
-
-## 定时商店物品刷新
-# @param tick
-# @return
-def Dispose_ShopItemRefresh(tick):
-
- if not GameWorld.SetWorldDictKey(ChConfig.TYPE_TimeShopProcessTick, tick):
- return
-
- TimeShopRefreshDict = ReadChConfig.GetEvalChConfig("TimeShopRefresh")
-
- isNeedSyncTime = False
- curTime = int(time.time())
- gameWorld = GameWorld.GetGameWorld()
-
- for shopID, refreshInterval in TimeShopRefreshDict.items():
-
- isOpen = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_ShopState % shopID)
-
- if not isOpen:
- continue
-
- lastRefreshTime = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_TimeShopRefreshTime % shopID)
-
- if not lastRefreshTime:
- continue
-
- pastTime = max(0, curTime - lastRefreshTime)
-
- if pastTime >= refreshInterval:
- gameWorld.SetDict(ShareDefine.Def_Notify_WorldKey_TimeShopRefreshTime % shopID, curTime)
- GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_TimeShopRefreshTime % shopID, curTime)
- isNeedSyncTime = True
-
- if isNeedSyncTime:
- Sync_TimeShopRefreshTime()
-
- return
-
-
-## 同步定时商店刷新倒计时
-# @param curPlayer
-# @return
-def Sync_TimeShopRefreshTime(curPlayer=None):
-
- refreshTimeListPack = ChPyNetSendPack.tagGCShopRefreshTimeList()
-
- refreshTimeListPack.Clear()
- refreshTimeListPack.ShopTimeInfoList = []
-
- TimeShopRefreshDict = ReadChConfig.GetEvalChConfig("TimeShopRefresh")
- gameWorld = GameWorld.GetGameWorld()
- curTime = int(time.time())
-
- for shopID, refreshInterval in TimeShopRefreshDict.items():
-
- isOpen = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_ShopState % shopID)
-
- if not isOpen:
- continue
-
- lastRefreshTime = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_TimeShopRefreshTime % shopID)
-
- if not lastRefreshTime:
- continue
-
- passTime = max(0, curTime - lastRefreshTime)
-
- refreshShopTime = ChPyNetSendPack.tagGCShopRefreshTime()
- refreshShopTime.Clear()
- refreshShopTime.ShopID = shopID
- refreshShopTime.RemainSecond = max(0, refreshInterval - passTime)
-
- refreshTimeListPack.ShopTimeInfoList.append(refreshShopTime)
-
- refreshTimeListPack.ShopCnt = len(refreshTimeListPack.ShopTimeInfoList)
-
- if refreshTimeListPack.ShopCnt <= 0:
- return
-
- # 通知客户端同步时间
- if not curPlayer:
- # 全服广播在线玩家
- playerManager = GameWorld.GetPlayerManager()
- for i in range(0, playerManager.GetPlayerCount()):
- curPlayer = playerManager.GetPlayerByIndex(i)
- if curPlayer == None or curPlayer.GetPlayerID() <= 0:
- continue
-
- NetPackCommon.SendFakePack(curPlayer, refreshTimeListPack)
- else:
- NetPackCommon.SendFakePack(curPlayer, refreshTimeListPack)
- return
-
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
index 20e7b8a..652d1db 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
@@ -41,7 +41,6 @@
import PlayerBourse
import PlayerZhuXianBoss
import PlayerXMZZ
-import GameWorldShopItem
import PlayerTruck
import HighLadder
import EventReport
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
index 731ff4f..4758ca5 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
@@ -652,78 +652,6 @@
def ViewBillboardRangeByObjID(index, clientData, tick):
return
-## 更新充值特惠排行榜
-# @param cmdList
-# @return None
-def MapServer_UpdateRechargeRankBillboard(cmdList):
- playerID, playerName, playerOpInfo, playerJob, playerLV, familyName, actionID, actionNum, updateGold = cmdList
- # 排行榜上榜限制
- RechargeRankInfoDict = ReadChConfig.GetEvalChConfig("TeHuiAction_RechargeRank")
- gameWorld = GameWorld.GetGameWorld()
- actionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_RechargeRank
- curActionNum = gameWorld.GetDictByKey(actionNumKey)
- curActionID = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_DayAction_ID % actionNumKey)
- GameWorld.DebugLog("MapServer_UpdateRechargeRankBillboard...")
- GameWorld.DebugLog(" actionID=%s,actionNum=%s,updateGold=%s,curActionID=%s,curActionNum=%s,"
- % (actionID, actionNum, updateGold, curActionID, curActionNum), playerID)
-
- # 非当前活动,不更新
- if actionNum not in RechargeRankInfoDict or actionNum != curActionNum or actionID != curActionID:
- GameWorld.DebugLog(" 非当前充值特惠排行榜活动,不更新...", playerID)
- return
-
- rechargeRankInfoList = RechargeRankInfoDict[actionNum]
- if len(rechargeRankInfoList) <= 0:
- return
-
- limitGold = rechargeRankInfoList[0] # 限制上榜充值数
- if updateGold < limitGold:
- GameWorld.DebugLog(" 未达到最低上榜充值数=%s,不更新..." % limitGold, playerID)
- return
-
- #排行榜
- cmpValue = updateGold
- isOk = UpdatePlayerBillboard(playerID, playerName, familyName, ShareDefine.Def_BT_RechargeTeHui,
- playerJob, playerLV, updateGold, cmpValue)
- GameWorld.DebugLog(" 更新充值特惠排行榜 isOk=%s" % isOk, playerID)
- return
-
-## 更新消费特惠排行榜
-# @param cmdList
-# @return None
-def MapServer_UpdateCostRankBillboard(cmdList):
- playerID, playerName, playerOpInfo, playerJob, playerLV, familyName, actionID, actionNum, updateGold = cmdList
- # 排行榜上榜限制
- costRankInfoDict = ReadChConfig.GetEvalChConfig("TeHuiAction_CostRank")
- gameWorld = GameWorld.GetGameWorld()
- actionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_CostRank
- curActionNum = gameWorld.GetDictByKey(actionNumKey)
- curActionID = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_DayAction_ID % actionNumKey)
- GameWorld.DebugLog("MapServer_UpdateCostRankBillboard...")
- GameWorld.DebugLog(" actionID=%s,actionNum=%s,updateGold=%s,curActionID=%s,curActionNum=%s,"
- % (actionID, actionNum, updateGold, curActionID, curActionNum), playerID)
-
- # 非当前活动,不更新
- if actionNum not in costRankInfoDict or actionNum != curActionNum or actionID != curActionID:
- GameWorld.DebugLog(" 非当前消费特惠排行榜活动,不更新...", playerID)
- return
-
- costRankInfoList = costRankInfoDict[actionNum]
- if len(costRankInfoList) <= 0:
- return
-
- limitGold = costRankInfoList[0] # 限制上榜消费数
- if updateGold < limitGold:
- GameWorld.DebugLog(" 未达到最低上榜消费数=%s,不更新..." % limitGold, playerID)
- return
-
- #排行榜
- cmpValue = updateGold
- isOk = UpdatePlayerBillboard(playerID, playerName, familyName, ShareDefine.Def_BT_CostTeHui,
- playerJob, playerLV, 0, cmpValue)
- GameWorld.DebugLog(" 更新消费特惠排行榜 isOk=%s" % isOk, playerID)
- return
-
## 排行榜更新是否受等级限制
def IsBillboardLVLimit(playerLV, billboardType):
# 等级判断已由地图处理掉,这里不再做判断
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py
index a5e0e3d..e622936 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py
@@ -123,9 +123,6 @@
# 本服红包产出数
Def_RedPacketOutput = "RedPacketOutput"
-Def_TeHuiRepeatOrderKey = "DA_DayRepeatOrder" # 特惠循环顺序key
-Def_TeHuiRepeatNumKey = "DA_DayRepeatNum" # 今日特惠循环编号
-
Def_BossRefreshTime = 'BossRefreshTime_%s' # boss刷新时间, 参数为NPCID
#世界等级计算额外时间参数
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py
index 71cff36..bbb2ea5 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py
@@ -387,7 +387,6 @@
GameWorld.DebugLog(' 玩家战盟名变更处理, newFamilyName=%s' % familyName, playerID)
#不处理排行榜
needChangeFamilyBillboardList = [
- #ShareDefine.Def_BT_RechargeTeHui, # 充值特惠活动排行榜-当前期记录
]
billboardMgr = GameWorld.GetBillboard()
for billboardIndex in needChangeFamilyBillboardList:
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py
index f4b7f99..e5e9e64 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py
@@ -44,7 +44,6 @@
import GameWorldOpenServerCampaign
import ShareDefine
import GameDataRecord
-import GameWorldShopItem
import PlayerCompensation
import PlayerFB
import UpdatePlayerName
@@ -531,14 +530,6 @@
PlayerFamily.MapServer_PyAddFamilyInfoValue(curPlayer, eval(resultName))
return
- if callName == 'UpdRechargeRankBillboard': #地图服务器更新玩家通知特惠累计充值排行榜
- PlayerBillboard.MapServer_UpdateRechargeRankBillboard(eval(resultName))
- return
-
- if callName == 'UpdCostRankBillboard': #地图服务器更新玩家通知特惠累计消费排行榜
- PlayerBillboard.MapServer_UpdateCostRankBillboard(eval(resultName))
- return
-
if callName == 'UpdateTotalRechargeBillboard': #地图服务器更新玩家充值总数排行榜
PlayerBillboard.MapServer_UpdateTotalRechargeBillboard(eval(resultName))
return
@@ -718,12 +709,6 @@
# 全局击杀数统计
if callName =="GlobalKillCount":
GameWorldProcess.UpdGlobalKillCount(eval(resultName))
- return
-
- # 自定义商店全服限购次数清空
- if callName =="ShopItemClearBuyCnt":
- shopID = eval(resultName)[0]
- GameWorldShopItem.DoShopItemClearBuyCnt(shopID)
return
# 新手指导员天数
@@ -935,11 +920,6 @@
# if not curPlayer:
# return
# resultName = '%s' % PlayerFamilyStore.DoMapServerFamilyStore(curPlayer, eval(resultName), tick)
-
- # 自定义商店物品
- if callName == "ShopItem":
- curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID)
- resultName = '%s' % GameWorldShopItem.DoShopItemQueryResult(curPlayer, eval(resultName))
# 玩家天梯奖励
if callName == "HighLadderReward":
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index 64ae39c..7e0f897 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -195,19 +195,6 @@
Def_Notify_WorldKey_ManorWarLastFamilyID = 'ManorWarLastFamilyID_%s' # 领地争夺上次占领的战盟id,%s地图id
Def_Notify_WorldKey_ManorWarServerDay = 'ManorWarServerDay' # 领地战活动时的开服天数
-Def_Notify_WorldKey_DayAction_ID = "%s_ID" # 按天开启的活动唯一id,参数为活动标识key
-Def_Notify_WorldKey_DayAction_BeginTime = "%s_BT" # 按天开启的活动开始时间,参数为活动标识key
-Def_Notify_WorldKey_DayAction_EndTime = "%s_ET" # 按天开启的活动结束时间,参数为活动标识key
-Def_Notify_WorldKey_DayAction_ClassUPNum = "DA_ClassUPNum" # 按天开启的活动标识key - 升阶特惠活动编号
-Def_Notify_WorldKey_DayAction_Recharge = "DA_Recharge" # 按天开启的活动标识key - 充值特惠
-Def_Notify_WorldKey_DayAction_DiscountShop = "DA_DiscountShop" # 按天开启的活动标识key - 折扣店
-Def_Notify_WorldKey_DayAction_RechargeRank = "DA_RechargeRank" # 按天开启的活动标识key - 充值排行榜特惠
-Def_Notify_WorldKey_DayAction_MixDiscountShop = "DA_MixDiscountShop" # 按天开启的活动标识key - 合服折扣店
-Def_Notify_WorldKey_DayAction_CostProfit = "DA_CostProfit" # 按天开启的活动标识key - 消费返利
-Def_Notify_WorldKey_DayAction_CostRank = "DA_CostRank" # 按天开启的活动标识key - 消费特惠排行榜
-
-Def_Notify_WorldKey_ShopState = 'ShopState_%s' # 自定义商店开启状态, 参数为ShopID
-Def_Notify_WorldKey_TimeShopRefreshTime = 'TimeShopRefreshTime_%s' # 定时商店上次全服刷新时间
Def_Notify_WorldKey_ActionBuffState = 'ActionBuffState_%s' # 活动玩家buff状态, 1-可加,0-不可添加; 参数为buffID
Def_Notify_WorldKey_LoginAwardStartDate = 'LoginAwardStartDate_%s' # 登录领取奖励开始时间,参数为活动类型
@@ -647,14 +634,9 @@
Def_BT_HighLadder, #天梯竞技场排行
Def_BT_HighLadder_Yester, #天梯竞技场昨日排行
- Def_BT_RechargeTeHuiLast, #充值特惠活动排行榜-上一期记录
- Def_BT_RechargeTeHui, #充值特惠活动排行榜-当前期记录
-
- Def_BT_CostTeHui, #消费特惠排行榜
- Def_BT_CostTeHuiLast, #消费特惠排行榜上一期
Def_BT_Max, #排行榜最大类型
-) = range(0, 30 + 2)
+) = range(0, 26 + 2)
#职业对应战力排行榜类型
JobFightPowerBillboardDict = {
@@ -1061,7 +1043,7 @@
Def_UniversalGameRecType_32,
Def_UniversalGameRecType_ManorWarInfo, # 领地争夺战占领结果33
Def_UniversalGameRecType_34,
- Def_UniversalGameRecType_ShopItem, # 自定义商店全服限购数据35
+ Def_UniversalGameRecType_35,
Def_UniversalGameRecType_36,
Def_UniversalGameRecType_37,
Def_UniversalGameRecType_38,
@@ -1500,59 +1482,6 @@
Difficulty_Elite, # 精英
Difficulty_Hero, # 英雄
) = range(3)
-
-# 称号类型定义,需与\PySysDB\tagDienstgrad.txt表中的类型Type一致,从1开始
-(
-Def_DienstgradType_Flower, # 鲜花称号
-) = range(1, 2)
-
-# 特惠活动类型
-TeHuiActivityList = (
-TeHuiActivity_Recharge, # 0充值特惠
-TeHuiActivity_ClassUP, # 功能升阶特惠
-TeHuiActivity_DiscountShop, # 折扣店特惠
-TeHuiActivity_RechargeRank, # 充值排行特惠/合服每日充值排行榜
-TeHuiActivity_MixDiscountShop, # 合服折扣店特惠
-TeHuiActivity_CostProfit, # 5消费返利
-TeHuiActivity_CostRank, # 消费排行榜
-) = range(1, 7 + 1)
-
-
-# 特惠活动类型对应的Key
-TeHuiTypeKeyDict = {
-TeHuiActivity_Recharge:Def_Notify_WorldKey_DayAction_Recharge,
-TeHuiActivity_ClassUP:Def_Notify_WorldKey_DayAction_ClassUPNum,
-TeHuiActivity_DiscountShop:Def_Notify_WorldKey_DayAction_DiscountShop,
-TeHuiActivity_RechargeRank:Def_Notify_WorldKey_DayAction_RechargeRank,
-TeHuiActivity_MixDiscountShop:Def_Notify_WorldKey_DayAction_MixDiscountShop,
-TeHuiActivity_CostProfit:Def_Notify_WorldKey_DayAction_CostProfit,
-TeHuiActivity_CostRank:Def_Notify_WorldKey_DayAction_CostRank,
-}
-
-# 功能升阶日类型
-ClassUPDayList = (
-ClassUPDay_Horse, # 坐骑
-ClassUPDay_Wing, # 翅膀
-ClassUPDay_Office # 官爵
-) = range(1, 3 + 1)
-
-# 总动员类型
-Def_ZDY_List = (
-Def_ZDY_Horse, # 坐骑
-Def_ZDY_Wing, # 翅膀
-Def_ZDY_Office, # 官爵
-Def_ZDY_Pet, # 宠物
-Def_ZDY_FightPower, # 战力
-) = range(1, 5 + 1)
-
-# 自定义商店查询定义
-(
-Def_ShopItem_QueryServerBuyCnt, # 查询全部全服限购数据
-Def_ShopItem_BuyItem, # 购买物品
-Def_ShopItem_ClearBuyCnt, # 重置全服限购数据
-Def_ShopItem_SyncServerBuyCnt, # 同步单品全服限购数据
-) = range(4)
-
# 每日活动编号定义
DailyActionIDList = (
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
index 858b3a6..9d60321 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -612,46 +612,6 @@
PacketSubCMD_1=0x22
PacketCallFunc_1=UpdatePlayerName
-;特惠活动
-[PlayerTeHui]
-ScriptName = Player\PlayerTeHui.py
-Writer = hxp
-Releaser = hxp
-RegType = 0
-RegisterPackCount = 3
-
-PacketCMD_1=0xAA
-PacketSubCMD_1=0x02
-PacketCallFunc_1=ClientGetClassUPDayAward
-
-PacketCMD_2=0xAA
-PacketSubCMD_2=0x03
-PacketCallFunc_2=ClientGetRechargeTeHuiAward
-
-PacketCMD_3=0xAA
-PacketSubCMD_3=0x04
-PacketCallFunc_3=OnGetCostProfitAward
-
-;自定义商店物品
-[ShopItemManage]
-ScriptName = Event\EventSrc\ShopItemManage.py
-Writer = hxp
-Releaser = hxp
-RegType = 0
-RegisterPackCount = 3
-
-PacketCMD_1=0xA2
-PacketSubCMD_1=0x07
-PacketCallFunc_1=QueryShopItem
-
-PacketCMD_2=0xA2
-PacketSubCMD_2=0x08
-PacketCallFunc_2=BuyShopItem
-
-PacketCMD_3=0xA2
-PacketSubCMD_3=0x14
-PacketCallFunc_3=RefreshShopItem
-
;天梯竞技场
[HighLadder]
ScriptName = Player\HighLadderTube
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 4a1e0f4..64116bb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3268,7 +3268,7 @@
Def_PDictType_Wing, # 翅膀
Def_PDictType_FB, # 副本相关
Def_PDictType_FightPower, # 战斗力15
-Def_PDictType_TeHuiAction, # 特惠活动
+Def_PDictType_16,
Def_PDictType_Activity, # 活跃度
Def_PDictType_GoldInvest, # 投资理财
Def_PDictType_19,
@@ -3484,10 +3484,6 @@
Def_PDict_MysticalShopGoods = "MysticalShopGoods_%s" # 神秘商店商品ID,索引
Def_PDict_MysticalShopRefreshCnt = "MysticalShopRefreshCnt" # 神秘商店已手动刷新次数
Def_PDict_MysticalShopLVRefreshCnt = "MysticalShopLVRefreshCnt" # 神秘商店等级段刷新次数
-Def_PDict_ShopItemBuyCnt = "ShopItemBuyCnt_%s_%s" # 自定义商品已购买次数,(shopID, itemIndex)
-Def_PDict_ShopItemOpenState = "ShopItemOpenState_%s_%s" # 自定义神秘商店物品开启状态,(shopID, keyNum)
-Def_PDict_TimeShopRefreshCnt = "TimeShopRefreshCnt_%s" # 自定义神秘商店已手动刷新次数,(shopID)
-Def_PDict_TimeShopLastGlobalRefreshTime = "TimeShopLastGlobalRTime_%s" # 玩家上次刷新神秘商店是的全服标记,(shopID)
Def_PDict_HighLadderFightCnt = "HighLadderFightCnt" #天梯每日挑战次数记录
Def_PDict_HighLadderAddCnt = "HighLadderAddCnt" #天梯已购买次数
Def_PDict_HighLadder_Currency = "HighLadderCurrency" #天梯积分
@@ -3797,24 +3793,6 @@
Def_PDict_FightPower_Horse = "FightPower_Horse" # 坐骑战斗力
Def_PDict_FightPower_List = [Def_PDict_FightPower_Total, Def_PDict_FightPower_Horse]
-
-
-# 特惠活动 Def_PDictType_TeHuiAction
-Def_PDict_TeHui_ActionID = "%s_ID" # 玩家身上的特惠活动id,参数为GameServer同步的活动标识
-Def_PDict_TeHui_ClassUPAwardRecord = "TH_ClassUPAwardRecord_%s" # 升阶特惠奖励记录,参数(升阶特惠类型)
-Def_PDict_TeHui_RechargeGotCnt = "TH_RechargeGotCnt_%s" # 充值特惠奖励已领取次数,参数(规则索引,从0开始)
-Def_PDict_TeHui_RechargeCanGetCnt = "TH_RechargeCanGetCnt_%s" # 充值特惠奖励可领取次数,参数同上
-Def_PDict_TeHui_RechargeCurTotalGold = "TH_RechargeCurTotalGold_%s" # 充值特惠奖励累计充值钻石,参数同上
-Def_PDict_TeHui_RechargeTotalGold = "TH_RechargeTotalGold_%s" # 充值特惠奖励总累计充值钻石,有参数,但是没给参数值,有一定几率更新不了key值,改为没参数的
-Def_PDict_TeHui_RechargeTotalGoldEx = "TH_RechargeTotalGold" # 充值特惠奖励总累计充值钻石
-Def_PDict_TeHui_LastRechargeNum = "TH_LastRechargeNum" # 上次充值特惠活动标识, 用于补发上次未领取的奖励
-Def_PDict_TeHui_RechargeRankTotalGold = "TH_RechargeRankTGold_%s" # 充值排行特惠奖励总累计充值钻石,有参数,但是没给参数值,有一定几率更新不了key值,改为没参数的
-Def_PDict_TeHui_RechargeRankTotalGoldEx = "TH_RechargeRankTGold" # 充值排行特惠奖励总累计充值钻石
-Def_PDict_TeHui_CostTotalGold = "TH_CostTotalGold" # 消费返利总累计消费钻石
-Def_PDict_TeHui_CostAwardState = "TH_CostAwardState" # 消费奖励领取状态
-Def_PDict_TeHui_LastCostIndex = "TH_LastCostIndex" # 上次消费返利活动标识, 用于补发上次未领取的奖励
-Def_PDict_TeHui_CostRankTotalGold = "TH_CostRankTGold_%s" # 消费排行特惠奖励总累计充值钻石,有参数,但是没给参数值,有一定几率更新不了key值,改为没参数的
-Def_PDict_TeHui_CostRankTotalGoldEx = "TH_CostRankTGold" # 消费排行特惠奖励总累计充值钻石
# 每日活跃度 Def_PDictType_Activity
Def_PDict_Activity_FinishCnt = "Activity_FinishCnt_%s" # 活跃度类型对应完成次数
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 4adb114..9c57157 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -1785,58 +1785,6 @@
#------------------------------------------------------
-# AD 01 查询特惠活动信息 #tagCGQueryTeHuiActivetyInfo
-
-class tagCGQueryTeHuiActivetyInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActivityType", c_ubyte), # 活动类型
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAD
- self.SubCmd = 0x01
- 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 = 0xAD
- self.SubCmd = 0x01
- self.ActivityType = 0
- return
-
- def GetLength(self):
- return sizeof(tagCGQueryTeHuiActivetyInfo)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AD 01 查询特惠活动信息 //tagCGQueryTeHuiActivetyInfo:
- Cmd:%s,
- SubCmd:%s,
- ActivityType:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActivityType
- )
- return DumpString
-
-
-m_NAtagCGQueryTeHuiActivetyInfo=tagCGQueryTeHuiActivetyInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryTeHuiActivetyInfo.Cmd,m_NAtagCGQueryTeHuiActivetyInfo.SubCmd))] = m_NAtagCGQueryTeHuiActivetyInfo
-
-
-#------------------------------------------------------
# AE 07 运镖时间倒计时结束 #tagCGTruckTimeEnd
class tagCGTruckTimeEnd(Structure):
@@ -3999,66 +3947,6 @@
#------------------------------------------------------
-# A2 08 购买自定义商店物品 #tagCMBuyShopItem
-
-class tagCMBuyShopItem(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ShopID", c_int),
- ("ItemShopIndex", c_ushort),
- ("BuyCount", c_ushort), #购买数量
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA2
- self.SubCmd = 0x08
- 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 = 0xA2
- self.SubCmd = 0x08
- self.ShopID = 0
- self.ItemShopIndex = 0
- self.BuyCount = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMBuyShopItem)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A2 08 购买自定义商店物品 //tagCMBuyShopItem:
- Cmd:%s,
- SubCmd:%s,
- ShopID:%d,
- ItemShopIndex:%d,
- BuyCount:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ShopID,
- self.ItemShopIndex,
- self.BuyCount
- )
- return DumpString
-
-
-m_NAtagCMBuyShopItem=tagCMBuyShopItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuyShopItem.Cmd,m_NAtagCMBuyShopItem.SubCmd))] = m_NAtagCMBuyShopItem
-
-
-#------------------------------------------------------
# A2 10 清除副本CD#tagCMClearFBCD
class tagCMClearFBCD(Structure):
@@ -5041,58 +4929,6 @@
#------------------------------------------------------
-# A2 07 请求自定义商店物品信息 #tagCMQueryShopItem
-
-class tagCMQueryShopItem(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ShopID", c_int),
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA2
- self.SubCmd = 0x07
- 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 = 0xA2
- self.SubCmd = 0x07
- self.ShopID = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMQueryShopItem)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A2 07 请求自定义商店物品信息 //tagCMQueryShopItem:
- Cmd:%s,
- SubCmd:%s,
- ShopID:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ShopID
- )
- return DumpString
-
-
-m_NAtagCMQueryShopItem=tagCMQueryShopItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryShopItem.Cmd,m_NAtagCMQueryShopItem.SubCmd))] = m_NAtagCMQueryShopItem
-
-
-#------------------------------------------------------
# A2 06 快速完成任务#tagCMQuickFinishMission
class tagCMQuickFinishMission(Structure):
@@ -5194,58 +5030,6 @@
m_NAtagCMRefreshMysticalShop=tagCMRefreshMysticalShop()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRefreshMysticalShop.Cmd,m_NAtagCMRefreshMysticalShop.SubCmd))] = m_NAtagCMRefreshMysticalShop
-
-
-#------------------------------------------------------
-# A2 14 刷新定时神秘商店物品#tagCMRefreshShopItem
-
-class tagCMRefreshShopItem(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ShopID", c_int),
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA2
- self.SubCmd = 0x14
- 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 = 0xA2
- self.SubCmd = 0x14
- self.ShopID = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMRefreshShopItem)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A2 14 刷新定时神秘商店物品//tagCMRefreshShopItem:
- Cmd:%s,
- SubCmd:%s,
- ShopID:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ShopID
- )
- return DumpString
-
-
-m_NAtagCMRefreshShopItem=tagCMRefreshShopItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRefreshShopItem.Cmd,m_NAtagCMRefreshShopItem.SubCmd))] = m_NAtagCMRefreshShopItem
#------------------------------------------------------
@@ -12828,174 +12612,6 @@
m_NAtagCMFlashSaleAppointment=tagCMFlashSaleAppointment()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFlashSaleAppointment.Cmd,m_NAtagCMFlashSaleAppointment.SubCmd))] = m_NAtagCMFlashSaleAppointment
-
-
-#------------------------------------------------------
-# AA 02 领取升阶功能特惠奖励 #tagCMGetClassUPDayAward
-
-class tagCMGetClassUPDayAward(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("DayType", c_ubyte), # 升阶日类型
- ("ClassLV", c_ubyte), # 阶级
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x02
- 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 = 0x02
- self.DayType = 0
- self.ClassLV = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMGetClassUPDayAward)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 02 领取升阶功能特惠奖励 //tagCMGetClassUPDayAward:
- Cmd:%s,
- SubCmd:%s,
- DayType:%d,
- ClassLV:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.DayType,
- self.ClassLV
- )
- return DumpString
-
-
-m_NAtagCMGetClassUPDayAward=tagCMGetClassUPDayAward()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetClassUPDayAward.Cmd,m_NAtagCMGetClassUPDayAward.SubCmd))] = m_NAtagCMGetClassUPDayAward
-
-
-#------------------------------------------------------
-# AA 04 领取消费奖励 #tagCMGetCostAward
-
-class tagCMGetCostAward(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActionID", c_int), # 活动ID
- ("Index", c_ubyte), # 索引
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x04
- 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 = 0x04
- self.ActionID = 0
- self.Index = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMGetCostAward)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 04 领取消费奖励 //tagCMGetCostAward:
- Cmd:%s,
- SubCmd:%s,
- ActionID:%d,
- Index:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActionID,
- self.Index
- )
- return DumpString
-
-
-m_NAtagCMGetCostAward=tagCMGetCostAward()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetCostAward.Cmd,m_NAtagCMGetCostAward.SubCmd))] = m_NAtagCMGetCostAward
-
-
-#------------------------------------------------------
-# AA 03 领取充值特惠奖励 #tagCMGetRechargeTeHuiAward
-
-class tagCMGetRechargeTeHuiAward(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActionID", c_int), # 活动ID
- ("Index", c_ubyte), # 规则索引
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x03
- 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 = 0x03
- self.ActionID = 0
- self.Index = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMGetRechargeTeHuiAward)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 03 领取充值特惠奖励 //tagCMGetRechargeTeHuiAward:
- Cmd:%s,
- SubCmd:%s,
- ActionID:%d,
- Index:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActionID,
- self.Index
- )
- return DumpString
-
-
-m_NAtagCMGetRechargeTeHuiAward=tagCMGetRechargeTeHuiAward()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetRechargeTeHuiAward.Cmd,m_NAtagCMGetRechargeTeHuiAward.SubCmd))] = m_NAtagCMGetRechargeTeHuiAward
#------------------------------------------------------
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 1bae020..c5c6797 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -4188,124 +4188,6 @@
#------------------------------------------------------
-# A9 07 定时商店刷新倒计时 #tagGCShopRefreshTimeList
-
-class tagGCShopRefreshTime(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ShopID", c_int), # 商店ID
- ("RemainSecond", c_int), # 多少秒后刷新
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA9
- self.SubCmd = 0x07
- 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 = 0xA9
- self.SubCmd = 0x07
- self.ShopID = 0
- self.RemainSecond = 0
- return
-
- def GetLength(self):
- return sizeof(tagGCShopRefreshTime)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A9 07 定时商店刷新倒计时 //tagGCShopRefreshTimeList:
- Cmd:%s,
- SubCmd:%s,
- ShopID:%d,
- RemainSecond:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ShopID,
- self.RemainSecond
- )
- return DumpString
-
-
-class tagGCShopRefreshTimeList(Structure):
- Head = tagHead()
- ShopCnt = 0 #(BYTE ShopCnt)//商店信息个数
- ShopTimeInfoList = list() #(vector<tagGCShopRefreshTime> ShopTimeInfoList)//商店信息列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA9
- self.Head.SubCmd = 0x07
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.ShopCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.ShopCnt):
- temShopTimeInfoList = tagGCShopRefreshTime()
- _pos = temShopTimeInfoList.ReadData(_lpData, _pos)
- self.ShopTimeInfoList.append(temShopTimeInfoList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA9
- self.Head.SubCmd = 0x07
- self.ShopCnt = 0
- self.ShopTimeInfoList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.ShopCnt):
- length += self.ShopTimeInfoList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.ShopCnt)
- for i in range(self.ShopCnt):
- data = CommFunc.WriteString(data, self.ShopTimeInfoList[i].GetLength(), self.ShopTimeInfoList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- ShopCnt:%d,
- ShopTimeInfoList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.ShopCnt,
- "..."
- )
- return DumpString
-
-
-m_NAtagGCShopRefreshTimeList=tagGCShopRefreshTimeList()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCShopRefreshTimeList.Head.Cmd,m_NAtagGCShopRefreshTimeList.Head.SubCmd))] = m_NAtagGCShopRefreshTimeList
-
-
-#------------------------------------------------------
# A9 06 商城全服购买次数通知 #tagGCStoreServerBuyCntInfo
class tagGCStoreServerBuyCnt(Structure):
@@ -5725,132 +5607,6 @@
m_NAtagGCXMZZFightInfo=tagGCXMZZFightInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCXMZZFightInfo.Head.Cmd,m_NAtagGCXMZZFightInfo.Head.SubCmd))] = m_NAtagGCXMZZFightInfo
-
-
-#------------------------------------------------------
-# AD 01 特惠活动信息 #tagGCTeHuiActivityInfoList
-
-class tagGCTeHuiActivityInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActivityType", c_ubyte), # 活动类型
- ("ActivityValue", c_int), # 活动值
- ("StartDate", c_int), # 开始时间time
- ("EndDate", c_int), # 结束时间time
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAD
- self.SubCmd = 0x01
- 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 = 0xAD
- self.SubCmd = 0x01
- self.ActivityType = 0
- self.ActivityValue = 0
- self.StartDate = 0
- self.EndDate = 0
- return
-
- def GetLength(self):
- return sizeof(tagGCTeHuiActivityInfo)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AD 01 特惠活动信息 //tagGCTeHuiActivityInfoList:
- Cmd:%s,
- SubCmd:%s,
- ActivityType:%d,
- ActivityValue:%d,
- StartDate:%d,
- EndDate:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActivityType,
- self.ActivityValue,
- self.StartDate,
- self.EndDate
- )
- return DumpString
-
-
-class tagGCTeHuiActivityInfoList(Structure):
- Head = tagHead()
- ActivityCount = 0 #(BYTE ActivityCount)//活动信息个数
- ActivityInfoList = list() #(vector<tagGCTeHuiActivityInfo> ActivityInfoList)//活动信息列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xAD
- self.Head.SubCmd = 0x01
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.ActivityCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.ActivityCount):
- temActivityInfoList = tagGCTeHuiActivityInfo()
- _pos = temActivityInfoList.ReadData(_lpData, _pos)
- self.ActivityInfoList.append(temActivityInfoList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xAD
- self.Head.SubCmd = 0x01
- self.ActivityCount = 0
- self.ActivityInfoList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.ActivityCount):
- length += self.ActivityInfoList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.ActivityCount)
- for i in range(self.ActivityCount):
- data = CommFunc.WriteString(data, self.ActivityInfoList[i].GetLength(), self.ActivityInfoList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- ActivityCount:%d,
- ActivityInfoList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.ActivityCount,
- "..."
- )
- return DumpString
-
-
-m_NAtagGCTeHuiActivityInfoList=tagGCTeHuiActivityInfoList()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCTeHuiActivityInfoList.Head.Cmd,m_NAtagGCTeHuiActivityInfoList.Head.SubCmd))] = m_NAtagGCTeHuiActivityInfoList
#------------------------------------------------------
@@ -15717,126 +15473,6 @@
#------------------------------------------------------
-# A3 53 法宝特权数据 #tagMCMWPrivilegeDataInfo
-
-class tagMCMWPrivilegeData(Structure):
- _pack_ = 1
- _fields_ = [
- ("PriID", c_int), # 特权ID
- ("State", c_ubyte), #激活状态
- ("CurValue", c_int), #当前总进度
- ("GotValue", c_int), #已领取进度
- ("ItemAwardState", c_ubyte), #物品奖励是否已领取
- ]
-
- 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.PriID = 0
- self.State = 0
- self.CurValue = 0
- self.GotValue = 0
- self.ItemAwardState = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCMWPrivilegeData)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A3 53 法宝特权数据 //tagMCMWPrivilegeDataInfo:
- PriID:%d,
- State:%d,
- CurValue:%d,
- GotValue:%d,
- ItemAwardState:%d
- '''\
- %(
- self.PriID,
- self.State,
- self.CurValue,
- self.GotValue,
- self.ItemAwardState
- )
- return DumpString
-
-
-class tagMCMWPrivilegeDataInfo(Structure):
- Head = tagHead()
- Count = 0 #(BYTE Count)// 信息个数
- InfoList = list() #(vector<tagMCMWPrivilegeData> InfoList)// 信息列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA3
- self.Head.SubCmd = 0x53
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.Count):
- temInfoList = tagMCMWPrivilegeData()
- _pos = temInfoList.ReadData(_lpData, _pos)
- self.InfoList.append(temInfoList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA3
- self.Head.SubCmd = 0x53
- self.Count = 0
- self.InfoList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.Count):
- length += self.InfoList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.Count)
- for i in range(self.Count):
- data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- Count:%d,
- InfoList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.Count,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCMWPrivilegeDataInfo=tagMCMWPrivilegeDataInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMWPrivilegeDataInfo.Head.Cmd,m_NAtagMCMWPrivilegeDataInfo.Head.SubCmd))] = m_NAtagMCMWPrivilegeDataInfo
-
-
-#------------------------------------------------------
# A3 26 NPCID已采集次数信息 #tagMCNPCIDCollectionCntInfo
class tagMCNPCIDCollectionCnt(Structure):
@@ -21389,126 +21025,6 @@
#------------------------------------------------------
-# A8 04 通知商店限购物品已购买次数信息 # tagMCShopItemBuyCntInfoList
-
-class tagMCShopItemBuyCntInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("ShopID", c_int),
- ("ItemShopIndex", c_ushort),
- ("ItemID", c_int),
- ("BuyCnt", c_int), # 个人已购买数
- ("ServerBuyCnt", c_int), # 全服已购买数
- ]
-
- 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.ShopID = 0
- self.ItemShopIndex = 0
- self.ItemID = 0
- self.BuyCnt = 0
- self.ServerBuyCnt = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCShopItemBuyCntInfo)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A8 04 通知商店限购物品已购买次数信息 // tagMCShopItemBuyCntInfoList:
- ShopID:%d,
- ItemShopIndex:%d,
- ItemID:%d,
- BuyCnt:%d,
- ServerBuyCnt:%d
- '''\
- %(
- self.ShopID,
- self.ItemShopIndex,
- self.ItemID,
- self.BuyCnt,
- self.ServerBuyCnt
- )
- return DumpString
-
-
-class tagMCShopItemBuyCntInfoList(Structure):
- Head = tagHead()
- Count = 0 #(BYTE Count)//通知个数
- BuyCntList = list() #(vector<tagMCShopItemBuyCntInfo> BuyCntList)
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA8
- self.Head.SubCmd = 0x04
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.Count):
- temBuyCntList = tagMCShopItemBuyCntInfo()
- _pos = temBuyCntList.ReadData(_lpData, _pos)
- self.BuyCntList.append(temBuyCntList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA8
- self.Head.SubCmd = 0x04
- self.Count = 0
- self.BuyCntList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.Count):
- length += self.BuyCntList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.Count)
- for i in range(self.Count):
- data = CommFunc.WriteString(data, self.BuyCntList[i].GetLength(), self.BuyCntList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- Count:%d,
- BuyCntList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.Count,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCShopItemBuyCntInfoList=tagMCShopItemBuyCntInfoList()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopItemBuyCntInfoList.Head.Cmd,m_NAtagMCShopItemBuyCntInfoList.Head.SubCmd))] = m_NAtagMCShopItemBuyCntInfoList
-
-
-#------------------------------------------------------
# A8 02 通知NPC商店物品今日已购买次数 #tagMCShopItemDayBuyCntInfo
class tagMCShopItemDayBuyCnt(Structure):
@@ -21618,239 +21134,6 @@
m_NAtagMCShopItemDayBuyCntInfo=tagMCShopItemDayBuyCntInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopItemDayBuyCntInfo.Head.Cmd,m_NAtagMCShopItemDayBuyCntInfo.Head.SubCmd))] = m_NAtagMCShopItemDayBuyCntInfo
-
-
-#------------------------------------------------------
-# A8 03 通知自定义商店物品信息 #tagMCShopItemInfoList
-
-class tagMCShopItemInfo(Structure):
- ShopID = 0 #(DWORD ShopID)
- ItemShopIndex = 0 #(WORD ItemShopIndex)
- DataSize = 0 #(DWORD DataSize)
- ItemList = "" #(String ItemList)//物品列表[[物品ID,数量,是否绑定,是否定制]]
- PriceType = 0 #(BYTE PriceType)
- Price = 0 #(DWORD Price)
- OriginalPrice = 0 #(DWORD OriginalPrice)// 原价
- PlayerLVLimit = 0 #(WORD PlayerLVLimit)// 购买等级限制
- FamilyLVLimit = 0 #(BYTE FamilyLVLimit)// 购买战盟等级限制
- MaxBuyCnt = 0 #(DWORD MaxBuyCnt)// 个人限购数
- ServerMaxBuyCnt = 0 #(DWORD ServerMaxBuyCnt)// 全服限购数
- data = None
-
- def __init__(self):
- self.Clear()
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- self.ShopID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.ItemShopIndex,_pos = CommFunc.ReadWORD(_lpData, _pos)
- self.DataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.ItemList,_pos = CommFunc.ReadString(_lpData, _pos,self.DataSize)
- self.PriceType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.Price,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.OriginalPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.PlayerLVLimit,_pos = CommFunc.ReadWORD(_lpData, _pos)
- self.FamilyLVLimit,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.MaxBuyCnt,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.ServerMaxBuyCnt,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- return _pos
-
- def Clear(self):
- self.ShopID = 0
- self.ItemShopIndex = 0
- self.DataSize = 0
- self.ItemList = ""
- self.PriceType = 0
- self.Price = 0
- self.OriginalPrice = 0
- self.PlayerLVLimit = 0
- self.FamilyLVLimit = 0
- self.MaxBuyCnt = 0
- self.ServerMaxBuyCnt = 0
- return
-
- def GetLength(self):
- length = 0
- length += 4
- length += 2
- length += 4
- length += len(self.ItemList)
- length += 1
- length += 4
- length += 4
- length += 2
- length += 1
- length += 4
- length += 4
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteDWORD(data, self.ShopID)
- data = CommFunc.WriteWORD(data, self.ItemShopIndex)
- data = CommFunc.WriteDWORD(data, self.DataSize)
- data = CommFunc.WriteString(data, self.DataSize, self.ItemList)
- data = CommFunc.WriteBYTE(data, self.PriceType)
- data = CommFunc.WriteDWORD(data, self.Price)
- data = CommFunc.WriteDWORD(data, self.OriginalPrice)
- data = CommFunc.WriteWORD(data, self.PlayerLVLimit)
- data = CommFunc.WriteBYTE(data, self.FamilyLVLimit)
- data = CommFunc.WriteDWORD(data, self.MaxBuyCnt)
- data = CommFunc.WriteDWORD(data, self.ServerMaxBuyCnt)
- return data
-
- def OutputString(self):
- DumpString = '''
- ShopID:%d,
- ItemShopIndex:%d,
- DataSize:%d,
- ItemList:%s,
- PriceType:%d,
- Price:%d,
- OriginalPrice:%d,
- PlayerLVLimit:%d,
- FamilyLVLimit:%d,
- MaxBuyCnt:%d,
- ServerMaxBuyCnt:%d
- '''\
- %(
- self.ShopID,
- self.ItemShopIndex,
- self.DataSize,
- self.ItemList,
- self.PriceType,
- self.Price,
- self.OriginalPrice,
- self.PlayerLVLimit,
- self.FamilyLVLimit,
- self.MaxBuyCnt,
- self.ServerMaxBuyCnt
- )
- return DumpString
-
-
-class tagMCShopItemInfoList(Structure):
- Head = tagHead()
- Count = 0 #(BYTE Count)//通知个数
- ShopItemList = list() #(vector<tagMCShopItemInfo> ShopItemList)
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA8
- self.Head.SubCmd = 0x03
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.Count):
- temShopItemList = tagMCShopItemInfo()
- _pos = temShopItemList.ReadData(_lpData, _pos)
- self.ShopItemList.append(temShopItemList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA8
- self.Head.SubCmd = 0x03
- self.Count = 0
- self.ShopItemList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.Count):
- length += self.ShopItemList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.Count)
- for i in range(self.Count):
- data = CommFunc.WriteString(data, self.ShopItemList[i].GetLength(), self.ShopItemList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- Count:%d,
- ShopItemList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.Count,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCShopItemInfoList=tagMCShopItemInfoList()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopItemInfoList.Head.Cmd,m_NAtagMCShopItemInfoList.Head.SubCmd))] = m_NAtagMCShopItemInfoList
-
-
-#------------------------------------------------------
-# A8 05 通知神秘商店刷新次数 #tagMCShopRefreshCnt
-
-class tagMCShopRefreshCnt(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ShopID", c_int), #商店ID
- ("RefreshCnt", c_ushort), #已手动刷新次数
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA8
- self.SubCmd = 0x05
- 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 = 0xA8
- self.SubCmd = 0x05
- self.ShopID = 0
- self.RefreshCnt = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCShopRefreshCnt)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A8 05 通知神秘商店刷新次数 //tagMCShopRefreshCnt:
- Cmd:%s,
- SubCmd:%s,
- ShopID:%d,
- RefreshCnt:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ShopID,
- self.RefreshCnt
- )
- return DumpString
-
-
-m_NAtagMCShopRefreshCnt=tagMCShopRefreshCnt()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopRefreshCnt.Cmd,m_NAtagMCShopRefreshCnt.SubCmd))] = m_NAtagMCShopRefreshCnt
#------------------------------------------------------
@@ -23298,240 +22581,6 @@
m_NAtagMCAllPeoplePartyInfo=tagMCAllPeoplePartyInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCAllPeoplePartyInfo.Head.Cmd,m_NAtagMCAllPeoplePartyInfo.Head.SubCmd))] = m_NAtagMCAllPeoplePartyInfo
-
-
-#------------------------------------------------------
-# AA 03 升阶功能特惠奖励记录 #tagMCClassUPDayAwardRecordList
-
-class tagMCClassUPDayAwardRecord(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("DayType", c_ubyte), # 奖励日类型
- ("Record", c_int), # 奖励记录
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x03
- 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 = 0x03
- self.DayType = 0
- self.Record = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCClassUPDayAwardRecord)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 03 升阶功能特惠奖励记录 //tagMCClassUPDayAwardRecordList:
- Cmd:%s,
- SubCmd:%s,
- DayType:%d,
- Record:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.DayType,
- self.Record
- )
- return DumpString
-
-
-class tagMCClassUPDayAwardRecordList(Structure):
- Head = tagHead()
- RecordCount = 0 #(BYTE RecordCount)//记录个数
- RecordInfoList = list() #(vector<tagMCClassUPDayAwardRecord> RecordInfoList)//记录列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x03
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.RecordCount):
- temRecordInfoList = tagMCClassUPDayAwardRecord()
- _pos = temRecordInfoList.ReadData(_lpData, _pos)
- self.RecordInfoList.append(temRecordInfoList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x03
- self.RecordCount = 0
- self.RecordInfoList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.RecordCount):
- length += self.RecordInfoList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.RecordCount)
- for i in range(self.RecordCount):
- data = CommFunc.WriteString(data, self.RecordInfoList[i].GetLength(), self.RecordInfoList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- RecordCount:%d,
- RecordInfoList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.RecordCount,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCClassUPDayAwardRecordList=tagMCClassUPDayAwardRecordList()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCClassUPDayAwardRecordList.Head.Cmd,m_NAtagMCClassUPDayAwardRecordList.Head.SubCmd))] = m_NAtagMCClassUPDayAwardRecordList
-
-
-#------------------------------------------------------
-# AA 06 消费奖励信息 #tagMCCostProfitInfo
-
-class tagMCCostProfitInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActionID", c_int), # 活动ID
- ("TotalCost", c_int), # 总消费
- ("AwardState", c_int), # 奖励领取状态
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x06
- 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 = 0x06
- self.ActionID = 0
- self.TotalCost = 0
- self.AwardState = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCCostProfitInfo)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 06 消费奖励信息 //tagMCCostProfitInfo:
- Cmd:%s,
- SubCmd:%s,
- ActionID:%d,
- TotalCost:%d,
- AwardState:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActionID,
- self.TotalCost,
- self.AwardState
- )
- return DumpString
-
-
-m_NAtagMCCostProfitInfo=tagMCCostProfitInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCostProfitInfo.Cmd,m_NAtagMCCostProfitInfo.SubCmd))] = m_NAtagMCCostProfitInfo
-
-
-#------------------------------------------------------
-# AA 07 消费排行特惠信息 #tagMCCostRankTeHuiInfo
-
-class tagMCCostRankTeHuiInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActionID", c_int), # 活动ID
- ("TotalCost", c_int), # 总累计消费钻石
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x07
- 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 = 0x07
- self.ActionID = 0
- self.TotalCost = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCCostRankTeHuiInfo)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 07 消费排行特惠信息 //tagMCCostRankTeHuiInfo:
- Cmd:%s,
- SubCmd:%s,
- ActionID:%d,
- TotalCost:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActionID,
- self.TotalCost
- )
- return DumpString
-
-
-m_NAtagMCCostRankTeHuiInfo=tagMCCostRankTeHuiInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCostRankTeHuiInfo.Cmd,m_NAtagMCCostRankTeHuiInfo.SubCmd))] = m_NAtagMCCostRankTeHuiInfo
#------------------------------------------------------
@@ -25730,198 +24779,6 @@
m_NAtagMCNewXJSDRecharge=tagMCNewXJSDRecharge()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNewXJSDRecharge.Cmd,m_NAtagMCNewXJSDRecharge.SubCmd))] = m_NAtagMCNewXJSDRecharge
-
-
-#------------------------------------------------------
-# AA 05 充值排行特惠信息 #tagMCRechargeRankTeHuiInfo
-
-class tagMCRechargeRankTeHuiInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActionID", c_int), # 活动ID
- ("TotalGold", c_int), # 总累计充值元宝
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x05
- 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 = 0x05
- self.ActionID = 0
- self.TotalGold = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCRechargeRankTeHuiInfo)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 05 充值排行特惠信息 //tagMCRechargeRankTeHuiInfo:
- Cmd:%s,
- SubCmd:%s,
- ActionID:%d,
- TotalGold:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActionID,
- self.TotalGold
- )
- return DumpString
-
-
-m_NAtagMCRechargeRankTeHuiInfo=tagMCRechargeRankTeHuiInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRechargeRankTeHuiInfo.Cmd,m_NAtagMCRechargeRankTeHuiInfo.SubCmd))] = m_NAtagMCRechargeRankTeHuiInfo
-
-
-#------------------------------------------------------
-# AA 04 充值特惠信息 #tagMCRechargeTeHuiInfoList
-
-class tagMCRechargeTeHuiInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("GotCnt", c_ubyte), # 已领取次数
- ("CanGetCnt", c_ubyte), # 当前可领取次数
- ("CurTotalGold", c_int), # 当前规则累计充值元宝-仅针对累充规则
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x04
- 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 = 0x04
- self.GotCnt = 0
- self.CanGetCnt = 0
- self.CurTotalGold = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCRechargeTeHuiInfo)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 04 充值特惠信息 //tagMCRechargeTeHuiInfoList:
- Cmd:%s,
- SubCmd:%s,
- GotCnt:%d,
- CanGetCnt:%d,
- CurTotalGold:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.GotCnt,
- self.CanGetCnt,
- self.CurTotalGold
- )
- return DumpString
-
-
-class tagMCRechargeTeHuiInfoList(Structure):
- Head = tagHead()
- ActionID = 0 #(DWORD ActionID)// 活动ID
- TotalGold = 0 #(DWORD TotalGold)// 总累计充值元宝
- InfoCnt = 0 #(BYTE InfoCnt)// 信息个数
- InfoList = list() #(vector<tagMCRechargeTeHuiInfo> InfoList)// 信息列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x04
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.ActionID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.TotalGold,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.InfoCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.InfoCnt):
- temInfoList = tagMCRechargeTeHuiInfo()
- _pos = temInfoList.ReadData(_lpData, _pos)
- self.InfoList.append(temInfoList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x04
- self.ActionID = 0
- self.TotalGold = 0
- self.InfoCnt = 0
- self.InfoList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 4
- length += 4
- length += 1
- for i in range(self.InfoCnt):
- length += self.InfoList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteDWORD(data, self.ActionID)
- data = CommFunc.WriteDWORD(data, self.TotalGold)
- data = CommFunc.WriteBYTE(data, self.InfoCnt)
- for i in range(self.InfoCnt):
- data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- ActionID:%d,
- TotalGold:%d,
- InfoCnt:%d,
- InfoList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.ActionID,
- self.TotalGold,
- self.InfoCnt,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCRechargeTeHuiInfoList=tagMCRechargeTeHuiInfoList()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRechargeTeHuiInfoList.Head.Cmd,m_NAtagMCRechargeTeHuiInfoList.Head.SubCmd))] = m_NAtagMCRechargeTeHuiInfoList
#------------------------------------------------------
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
index 3097e88..1d0a975 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
@@ -1414,26 +1414,6 @@
SendEventPack("CollectNPCOK", dataDict, curPlayer)
return
-## 玩家领取充值特惠活动奖励
-# @param curPlayer: 玩家实例
-# @param actionID: 活动id
-# @param actionNum: 活动编号
-# @param itemID: 物品id
-# @param itemCnt: 物品数量
-# @param isPutIn: 是否放入
-# @param prizeIndex: 奖励中的第x种奖励
-# @return
-def DR_PlayerTeHuiRechargePrize(curPlayer, actionID, actionNum, itemID, itemCnt, isPutIn, prizeIndex):
- #MySql不识别 True False,改成1和0
- isPutIn = 1 if isPutIn else 0
-
- dataDict = {'PlayerID':curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(),
- 'AccID':curPlayer.GetAccID(), 'ActionID':actionID, 'ActionNum':actionNum,
- 'IsPutIn':isPutIn, "ItemID":itemID, "ItemCount":itemCnt, 'PrizeIndex':prizeIndex}
-
- SendEventPack("TeHuiRechargePrize", dataDict, curPlayer)
- return
-
## 领取投资回报
# @param curPlayer: 玩家实例
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
index 2e4a833..9155840 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
@@ -1720,13 +1720,6 @@
RunQuestEvent(curPlayer, "on_goldinvest", "on_goldinvest", Def_RunQuestType_Normal)
RunQuestEvent(curPlayer, "on_goldinvest", investType, Def_RunQuestType_Normal)
return
-
-def EventRespons_OnBuyTeHuiItem(curPlayer, shopID, itemShopIndex):
- # 购买特惠商店物品
- RunQuestEvent(curPlayer, "on_buy_tehuiitem", "on_buy_tehuiitem", Def_RunQuestType_Normal)
- RunQuestEvent(curPlayer, "on_buy_tehuiitem", shopID, Def_RunQuestType_Normal)
- RunQuestEvent(curPlayer, "on_buy_tehuiitem", "%s_%s" % (shopID, itemShopIndex), Def_RunQuestType_Normal)
- return
def EventRespons_OnActivatePet(curPlayer, petID):
# 激活宠物
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
index 3efd560..a06f659 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -53,7 +53,6 @@
#import PlayerCostVIP
import GameFuncComm
import IpyGameDataPY
-import ShopItemManage
import PlayerPet
import PlayerArrestTask
import PlayerMagicWeapon
@@ -2592,28 +2591,6 @@
return False
return petPack.GetCount() > 0
return PlayerPet.GetPetDataItemByNPCID(curPlayer, checkPetID) != None
-
-def ConditionType_Is_Buy_Tehuiitem(curPlayer, curMission, curConditionNode):
- # 判断是否购买过特惠商店物品
- # <Is_Buy_Tehuiitem shopID="1007" itemShopIndex="0,1,2"/> shopID暂定需指定商店ID, itemShopIndex可指定多个索引, 中间英文逗号隔开
- shopID = GameWorld.ToIntDef(curConditionNode.GetAttribute("shopID"), 0)
- if not shopID:
- return False
- indexList = []
- indexInfo = curConditionNode.GetAttribute("itemShopIndex")
- if indexInfo != '':
- indexList = eval('[' + indexInfo + ']')
- if not indexList:
- shopItemList = ShopItemManage.GetShopItemList(shopID)
- indexList = range(len(shopItemList))
- if not indexList:
- GameWorld.DebugLog("需指定判断的特惠商店物品索引编号!indexInfo=%s" % indexInfo)
- return False
- for i in indexList:
- buyCnt = ShopItemManage.__GetPlayerShopItemBuyCnt(curPlayer, shopID, i)
- if buyCnt > 0:
- return True
- return False
##竞技场是否达到多少名
# @param curPlayer 玩家实例
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/ShopItemManage.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/ShopItemManage.py
deleted file mode 100644
index 1db37dc..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/ShopItemManage.py
+++ /dev/null
@@ -1,852 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-#
-##@package Event.EventSrc.ShopItemManage
-#
-# @todo:自定义商店
-# @author hxp
-# @date 2014-06-21
-# @version 2.4
-#
-# @change: "2014-08-27 11:30" hxp 增加折扣店购买物品全服广播
-# @change: "2014-11-26 15:30" hxp 增加限时购买状态判断
-# @change: "2014-11-27 20:30" hxp 增加购买物品全服广播
-# @change: "2014-12-02 11:30" hxp 合服折扣店活动支持
-# @change: "2014-12-08 17:00" hxp 增加钻石消费流向
-# @change: "2014-12-12 17:00" hxp 购买折扣店物品广播修改,可根据商店ID配置不同的广播信息
-# @change: "2015-02-04 17:00" hxp 定时神秘商店; 购买物品广播修改
-# @change: "2015-02-10 22:30" hxp 增加钻石消耗类型事件汇报
-# @change: "2016-01-26 15:00" hxp PY表支持重读
-# @change: "2016-07-20 14:30" hxp 货币支付流向整合
-# @change: "2016-09-19 10:30" hxp 重置商店信息全服玩家人数获取方式修改
-# @change: "2016-10-02 10:30" xdh 商店单个商品索引支持多个物品
-# @change: "2016-11-04 21:00" hxp 增加多个物品包商品名记录;修复商品名无记录问题
-# 详细描述: 自定义商店
-#---------------------------------------------------------------------
-#"""Version = 2017-05-12 18:00"""
-#---------------------------------------------------------------------
-
-import PyMapTable
-import GameWorld
-import ChPyNetSendPack
-import NetPackCommon
-import ChConfig
-import PlayerControl
-import ItemCommon
-import IPY_GameWorld
-import ItemControler
-import DataRecordPack
-import ShareDefine
-import ReadChConfig
-import PlayerTeHui
-import PlayerActivity
-import EventShell
-
-import math
-
-PerDictKeyMaxCnt = 30
-g_shopDetailInfoDict = {}
-
-# 神秘商店配置定义
-(
-Def_TimeShop_RefreshCnt, # 刷新个数
-Def_TimeShop_RateList, # 索引饼图概率列表
-Def_TimeShop_ExclusionList, # 互斥索引列表
-Def_TimeShop_CostFormat, # 消耗公式
-Def_TimeShop_MustItemCnt, # 刷新次数对应必出物品信息
-Def_TimeShop_Max,
-) = range(6)
-
-
-## 获取商店物品个数
-# @param shopID:商店ID
-# @return
-def GetShopItemCnt(shopID):
- shopDetailInfo = __GetShopDetailInfo(shopID)
- return shopDetailInfo[0]
-
-## 获取商店个人限购物品index列表
-# @param shopID:商店ID
-# @return
-def GetPlayerBuyCntLimitIndexList(shopID):
- shopDetailInfo = __GetShopDetailInfo(shopID)
- return shopDetailInfo[1]
-
-## 获取商店全服限购物品index列表
-# @param shopID:商店ID
-# @return
-def GetServerBuyCntLimitIndexList(shopID):
- shopDetailInfo = __GetShopDetailInfo(shopID)
- return shopDetailInfo[2]
-
-## 获取商店物品相关自定义明细信息
-# @param shopID:商店ID
-# @return
-def __GetShopDetailInfo(shopID):
- if shopID not in g_shopDetailInfoDict:
- GetShopItemList(shopID)
-
- if shopID not in g_shopDetailInfoDict:
- return [0, [], []]
-
- return g_shopDetailInfoDict[shopID]
-
-## 更新商店物品相关自定义明细信息
-# @param shopID:商店ID
-# @return
-def __UpdateShopDetailInfo(shopID, shopItemList):
- global g_shopDetailInfoDict
-
- if shopID not in g_shopDetailInfoDict:
- playerBuyCntLimitIndexList = []
- serverBuyCntLimitIndexList = []
- for itemInfoDict in shopItemList:
- itemShopIndex = int(itemInfoDict["ItemShopIndex"])
- maxBuyCnt = int(itemInfoDict["MaxBuyCnt"])
- serverMaxBuyCnt = int(itemInfoDict["ServerMaxBuyCnt"])
- if maxBuyCnt > 0:
- playerBuyCntLimitIndexList.append(itemShopIndex)
- if serverMaxBuyCnt > 0:
- serverBuyCntLimitIndexList.append(itemShopIndex)
-
- shopDetail = [len(shopItemList), playerBuyCntLimitIndexList, serverBuyCntLimitIndexList]
- GameWorld.DebugLog("更新商店明细统计: shopID=%s,shopDetail=%s" % (shopID, str(shopDetail)))
- g_shopDetailInfoDict[shopID] = shopDetail
-
- return g_shopDetailInfoDict[shopID]
-
-## 获取商店物品列表
-# @param shopID:商店ID
-# @return [{},{},...]
-def GetShopItemList(shopID):
- if shopID <= 0:
- return []
-
- shopItemTable = PyMapTable.GetPyMapTable("ShopItem")
- itemDataList = shopItemTable.GetRecord("ShopID", str(shopID))
- if not itemDataList:
- GameWorld.ErrLog("找不到商店物品ShopItem.txt not itemData shopID=%s" % shopID)
-
- __UpdateShopDetailInfo(shopID, itemDataList)
- return itemDataList
-
-## 获取指定商店物品信息
-# @param shopID:商店ID
-# @param itemShopIndex:物品索引
-# @return {}
-def GetShopItemInfoDict(shopID, itemShopIndex):
- itemInfoDict = {}
- shopItemTable = PyMapTable.GetPyMapTable("ShopItem")
- itemDataList = shopItemTable.GetRecordByDic({"ShopID":str(shopID), "ItemShopIndex":str(itemShopIndex)})
- if not itemDataList:
- GameWorld.ErrLog("找不到商店物品ShopItem.txt,shopID=%s,itemShopIndex=%s" % (shopID, itemShopIndex))
- return itemInfoDict
-
- if len(itemDataList) != 1:
- GameWorld.ErrLog("商店物品重复ShopItem.txt,shopID=%s,itemShopIndex=%s,数据条数=%s"
- % (shopID, itemShopIndex, len(itemDataList)))
- return itemInfoDict
-
- itemInfoDict = itemDataList[0]
- return itemInfoDict
-
-## 获取个人限购物品已购买次数
-# @param curPlayer
-# @param shopID:商店ID
-# @param itemShopIndex:物品索引
-# @return
-def __GetPlayerShopItemBuyCnt(curPlayer, shopID, itemIndex):
- key = ChConfig.Def_PDict_ShopItemBuyCnt % (shopID, itemIndex)
- return curPlayer.NomalDictGetProperty(key, 0)
-
-## 设置个人限购物品已购买次数
-# @param curPlayer
-# @param shopID:商店ID
-# @param itemShopIndex:物品索引
-# @param cnt:
-# @return
-def __SetPlayerShopItemBuyCnt(curPlayer, shopID, itemIndex, cnt):
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ShopItemBuyCnt % (shopID, itemIndex), cnt)
- return
-
-
-## 清除个人限购物品购买次数
-# @param curPlayer
-# @param shopID:商店ID
-# @return
-def ClearPlayerShopItemBuyCnt(curPlayer, shopID):
- playerBuyCntLimit = GetPlayerBuyCntLimitIndexList(shopID)
- # 这里只做清空个人限购数据,不做通知,只在玩家请求商店物品数据时同步
- for index in playerBuyCntLimit:
- curBuyCnt = __GetPlayerShopItemBuyCnt(curPlayer, shopID, index)
- if curBuyCnt != 0:
- __SetPlayerShopItemBuyCnt(curPlayer, shopID, index, 0)
-
- return
-
-
-## 清除商店限购物品购买次数(包含全服限购)
-# @param shopID:商店ID
-# @return
-def ClearShopItemBuyCnt(shopID):
- # 通知GameServer清除shopID全服限购数据
- msgList = [shopID]
- GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'ShopItemClearBuyCnt', \
- '%s' % (msgList), len(str(msgList)))
- return
-
-# A2 07 请求自定义商店物品信息 #tagCMQueryShopItem
-## 客服端领取充值特惠奖励
-# @param index:玩家索引
-# @param clientPack:封包结构体
-# @param tick:时间戳
-# @return None
-def QueryShopItem(index, clientPack, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- shopID = clientPack.ShopID
- shopItemList = GetShopItemList(shopID)
-
- if not shopItemList:
- return
-
- Send_ShopItem(curPlayer, shopItemList)
- Sync_ShopItemBuyCntInfo(curPlayer, shopID)
- return
-
-
-## 发送商店物品
-# @param curPlayer:
-# @param itemList: 信息列表
-# @return
-def Send_ShopItem(curPlayer, itemList):
- shopPack = ChPyNetSendPack.tagMCShopItemInfoList()
- shopPack.Clear()
- shopPack.ShopItemList = []
-
- TimeShopRefreshItem = ReadChConfig.GetEvalChConfig("TimeShopRefreshItem")
-
- for itemInfoDict in itemList:
- itemInfo = ChPyNetSendPack.tagMCShopItemInfo()
- itemInfo.ShopID = int(itemInfoDict["ShopID"])
- itemInfo.ItemShopIndex = int(itemInfoDict["ItemShopIndex"])
-
- # 如果是定时随机刷新的商店,只同步玩家当前可见的
- if itemInfo.ShopID in TimeShopRefreshItem and \
- not __GetShopItemState(curPlayer, itemInfo.ShopID, itemInfo.ItemShopIndex):
- continue
- itemInfoList = __GetShopItemList(itemInfoDict)
- itemInfo.ItemList = str(itemInfoList)
- itemInfo.DataSize = len(itemInfo.ItemList)
- itemInfo.PriceType = int(itemInfoDict["PriceType"])
- itemInfo.Price = int(itemInfoDict["Price"])
- itemInfo.OriginalPrice = int(itemInfoDict["OriginalPrice"])
- itemInfo.PlayerLVLimit = int(itemInfoDict["PlayerLVLimit"])
- itemInfo.FamilyLVLimit = int(itemInfoDict["FamilyLVLimit"])
- itemInfo.MaxBuyCnt = int(itemInfoDict["MaxBuyCnt"])
- itemInfo.ServerMaxBuyCnt = int(itemInfoDict["ServerMaxBuyCnt"])
- shopPack.ShopItemList.append(itemInfo)
-
- shopPack.Count = len(shopPack.ShopItemList)
- NetPackCommon.SendFakePack(curPlayer, shopPack)
- return
-
-
-## 发送商店限购次数信息
-# @param curPlayer:
-# @param shopID: 商店id
-# @return
-def Sync_ShopItemBuyCntInfo(curPlayer, shopID):
- serverBuyLimitIndexList = GetServerBuyCntLimitIndexList(shopID)
- if not serverBuyLimitIndexList:
- playerBuyCntLimit = GetPlayerBuyCntLimitIndexList(shopID)
- if playerBuyCntLimit:
- Send_ShopItemAllBuyCntInfo(curPlayer, shopID)
- return
-
- # 请求GameServer推送全服限购个数明细后再同步给玩家[shopID, serverBuyLimitIndexList]
- cmdStr = '%s' % ([ShareDefine.Def_ShopItem_QueryServerBuyCnt, shopID, serverBuyLimitIndexList])
- GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(curPlayer.GetID(), 0, 0,
- "ShopItem", cmdStr, len(cmdStr))
- return
-
-
-## 发送商店所有物品限购次数信息
-# @param curPlayer:
-# @param shopID: 商店id
-# @param serverBuyCntDict: 全服限购信息{index:cnt,...},一般由GameServer同步过来
-# @return
-def Send_ShopItemAllBuyCntInfo(curPlayer, shopID, serverBuyCntDict={}):
-
- sendIndexList = GetPlayerBuyCntLimitIndexList(shopID)
- serverLimitIndexList = GetServerBuyCntLimitIndexList(shopID)
-
- for index in serverLimitIndexList:
-
- if index in sendIndexList:
- continue
-
- sendIndexList.append(index)
-
- if not sendIndexList:
- return
-
- Send_ShopItemBuyCntInfo(curPlayer, shopID, sendIndexList, serverBuyCntDict)
- return
-
-
-## 同步限购物品已购买次数
-# @param curPlayer:
-# @param shopID:
-# @param sendIndexList:
-# @param serverBuyCntDict:
-# @return
-def Send_ShopItemBuyCntInfo(curPlayer, shopID, sendIndexList, serverBuyCntDict):
- buyCntPack = ChPyNetSendPack.tagMCShopItemBuyCntInfoList()
- buyCntPack.Clear()
- buyCntPack.BuyCntList = []
-
- TimeShopRefreshItem = ReadChConfig.GetEvalChConfig("TimeShopRefreshItem")
-
- for itemIndex in sendIndexList:
-
- buyCntInfo = ChPyNetSendPack.tagMCShopItemBuyCntInfo()
- buyCntInfo.ShopID = shopID
- buyCntInfo.ItemShopIndex = itemIndex
-
- # 如果是定时随机刷新的商店,只同步玩家当前可见的
- if buyCntInfo.ShopID in TimeShopRefreshItem and \
- not __GetShopItemState(curPlayer, buyCntInfo.ShopID, buyCntInfo.ItemShopIndex):
- continue
-
- buyCntInfo.ItemID = 0 # 不发送ItemID,封包就先不改了
- buyCntInfo.BuyCnt = __GetPlayerShopItemBuyCnt(curPlayer, shopID, itemIndex)
- buyCntInfo.ServerBuyCnt = serverBuyCntDict.get(itemIndex, 0)
- buyCntPack.BuyCntList.append(buyCntInfo)
-
- buyCntPack.Count = len(buyCntPack.BuyCntList)
- NetPackCommon.SendFakePack(curPlayer, buyCntPack)
- return
-
-
-# A2 08 购买自定义商店物品 #tagCMBuyShopItem
-## 客服端领取充值特惠奖励
-# @param index:玩家索引
-# @param clientPack:封包结构体
-# @param tick:时间戳
-# @return None
-def BuyShopItem(index, clientPack, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- shopID = clientPack.ShopID
- itemShopIndex = clientPack.ItemShopIndex
- buyCount = clientPack.BuyCount
- GameWorld.DebugLog("购买商店物品ShopItem.txt,shopID=%s,itemShopIndex=%s,buyCount=%s"
- % (shopID, itemShopIndex, buyCount), curPlayer.GetPlayerID())
-
- discountShopIDDict = ReadChConfig.GetEvalChConfig("TeHuiAction_DiscountShopID")
-
- if shopID in discountShopIDDict:
- curActionShopIDList = PlayerTeHui.GetCurActionShowIDList()
- if shopID not in curActionShopIDList:
- GameWorld.Log(" 不是活动中的特惠折扣店ID,无法购买!curActionShopIDList=%s"
- % str(curActionShopIDList))
- return
-
- itemInfoDict = GetShopItemInfoDict(shopID, itemShopIndex)
- if not itemInfoDict:
- return
-
- priceType = int(itemInfoDict["PriceType"])
- price = int(itemInfoDict["Price"])
- playerLVLimit = int(itemInfoDict["PlayerLVLimit"])
- familyLVLimit = int(itemInfoDict["FamilyLVLimit"])
- maxBuyCnt = int(itemInfoDict["MaxBuyCnt"])
- serverMaxBuyCnt = int(itemInfoDict["ServerMaxBuyCnt"])
- isLimitTime = int(itemInfoDict["IsLimitTime"])
- # 如果是限时购买的,则需要判断商店开启状态
- if isLimitTime:
- gameWorld = GameWorld.GetGameWorld()
- shopStateKey = ShareDefine.Def_Notify_WorldKey_ShopState % shopID
- isShopOpen = gameWorld.GetGameWorldDictByKey(shopStateKey)
- if not isShopOpen:
- GameWorld.Log(" 该商店没有开放购买!shopID=%s" % shopID)
- return
-
- TimeShopRefreshItem = ReadChConfig.GetEvalChConfig("TimeShopRefreshItem")
-
- # 神秘刷新商店,检查玩家是否刷出该物品
- if shopID in TimeShopRefreshItem and not __GetShopItemState(curPlayer, shopID, itemShopIndex):
- GameWorld.Log(" 神秘商店,玩家未刷出该物品!不可购买!shopID=%s,itemShopIndex=%s"
- % (shopID, itemShopIndex), curPlayer.GetPlayerID())
- return
-
-
- totalPrice = buyCount * price
- if not PlayerControl.HaveMoney(curPlayer, priceType, totalPrice):
- GameWorld.DebugLog(" 货币不足,无法购买!priceType=%s,price=%s,totalPrice=%s"
- % (priceType, price, totalPrice))
- return
-
- if curPlayer.GetLV() < playerLVLimit:
- GameWorld.DebugLog(" 玩家等级不足,无法购买!getPlayerLV=%s,playerLVLimit=%s"
- % (curPlayer.GetLV(), playerLVLimit))
- return
-
- playerFamilyLV = curPlayer.GetFamilyLV()
- if playerFamilyLV < familyLVLimit:
- GameWorld.DebugLog(" 战盟等级不足,无法购买!playerFamilyLV=%s, familyLVLimit=%s"
- % (playerFamilyLV, familyLVLimit))
- return
-
- playerCanBuyCnt = -1 # 默认不限制购买次数
- if maxBuyCnt > 0:
- playerBuyCnt = __GetPlayerShopItemBuyCnt(curPlayer, shopID, itemShopIndex)
- playerCanBuyCnt = max(0, maxBuyCnt - playerBuyCnt) # 个人限购还可购买的个数
- if playerCanBuyCnt <= 0 or playerCanBuyCnt < buyCount:
- GameWorld.DebugLog(" 个人限购次数不足,无法购买!已购买次数=%s,欲购买=%s,最大次数=%s"
- % (playerBuyCnt, buyCount, maxBuyCnt))
- return
-
-
- # 如果有全服限购,则通过GameServer判断返回是否可购买再处理
- if serverMaxBuyCnt > 0:
- cmdStr = '%s' % ([ShareDefine.Def_ShopItem_BuyItem, shopID, itemShopIndex, buyCount, serverMaxBuyCnt])
- GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(curPlayer.GetID(), 0, 0,
- "ShopItem", cmdStr, len(cmdStr))
- return
-
- DoBuyShopItem(curPlayer, itemInfoDict, buyCount)
- return
-
-## 执行购买物品
-# @param curPlayer:玩家
-# @param itemInfoDict:商店信息字典
-# @param buyCount:购买个数
-# @param serverBuyCnt:全服限购已购买个数,不为-1时代表GameServer已成功处理完毕,并同步最新全服限购次数回来
-# @return None
-# @remarks 本函数执行前提为所有条件都已判断过
-def DoBuyShopItem(curPlayer, itemInfoDict, buyCount, serverBuyCnt=-1):
-# shopID = int(itemInfoDict["ShopID"])
-# itemShopIndex = int(itemInfoDict["ItemShopIndex"])
-# priceType = int(itemInfoDict["PriceType"])
-# price = int(itemInfoDict["Price"])
-# maxBuyCnt = int(itemInfoDict["MaxBuyCnt"])
-# serverMaxBuyCnt = int(itemInfoDict["ServerMaxBuyCnt"])
-#
-# itemInfoList = __GetShopItemList(itemInfoDict)
-# if not itemInfoList:
-# GameWorld.ErrLog("DoBuyCustomShopItem shopID=%s,itemShopIndex=%s is not data!" % (shopID, itemShopIndex), curPlayer.GetPlayerID())
-# return
-#
-# itemID = itemInfoList[0][0]
-# isAppoint = itemInfoList[0][3]
-# if isAppoint:
-# itemID = ItemControler.GetAppointItemRealID(itemID)
-#
-# curItem = GameWorld.GetGameData().GetItemByTypeID(itemID)
-# if not curItem:
-# GameWorld.ErrLog("DoBuyCustomShopItem itemID=%s is not data!" % itemID, curPlayer.GetPlayerID())
-# return
-# if curItem.GetType() == ChConfig.Def_ItemType_Rune:
-# packType = ShareDefine.rptRune
-# else:
-# packType = IPY_GameWorld.rptItem
-#
-#
-# emptySpace = ItemCommon.GetItemPackSpace(curPlayer, packType, len(itemInfoList))
-# if len(itemInfoList) > emptySpace:
-# GameWorld.DebugLog(" 背包没有空位,无法购买!packType=%s"%packType)
-# return
-#
-# itemName = "" # 超过1个物品时取物品组合包名
-# if len(itemInfoList) > 1:
-# itemName = itemInfoDict["ItemPackName"]
-#
-# if not itemName:
-#
-# itemName = curItem.GetName()
-#
-# # 扣钱
-# totalPrice = buyCount * price
-# infoDict = {'shopID':shopID,'itemShopIndex':itemShopIndex,'buyCount':buyCount, ChConfig.Def_Cost_Reason_SonKey:itemName}
-# if not PlayerControl.PayMoney(curPlayer, priceType, totalPrice, ChConfig.Def_Cost_BuyCustomShopItem, infoDict, buyCount):
-# return
-# #活跃度(特殊商店花钻石购买东西算活跃)
-## if priceType == IPY_GameWorld.TYPE_Price_Gold_Money and shopID in [1010]:
-## PlayerActivity.AddActivityFinishCnt(curPlayer, ShareDefine.ActivityNum_SuperMarketGold)
-#
-# # 代表GameServer已成功处理完毕,并同步最新全服限购次数回来
-# if serverBuyCnt != -1:
-# if maxBuyCnt > 0: # 全服限购,同时也是个人限购
-# playerBuyCnt = __GetPlayerShopItemBuyCnt(curPlayer, shopID, itemShopIndex)
-# __SetPlayerShopItemBuyCnt(curPlayer, shopID, itemShopIndex, playerBuyCnt + buyCount)
-#
-# Send_ShopItemBuyCntInfo(curPlayer, shopID, [itemShopIndex], {itemShopIndex:serverBuyCnt})
-#
-# # 增加个人购买次数
-# elif maxBuyCnt > 0:
-# playerBuyCnt = __GetPlayerShopItemBuyCnt(curPlayer, shopID, itemShopIndex)
-# __SetPlayerShopItemBuyCnt(curPlayer, shopID, itemShopIndex, playerBuyCnt + buyCount)
-#
-# # 非全服限购,且个人限购才需要同步购买次数
-# # 全服限购变更由GameServer全服广播同步
-# if serverMaxBuyCnt <= 0:
-# Send_ShopItemBuyCntInfo(curPlayer, shopID, [itemShopIndex], {})
-#
-# TimeShopRefreshItem = ReadChConfig.GetEvalChConfig("TimeShopRefreshItem") # 神秘商店
-#
-# # 特惠折扣店购买广播
-# discountShopIDDict = ReadChConfig.GetEvalChConfig("TeHuiAction_DiscountShopID")
-#
-# eventDataEx = {"shopID":shopID, "itemShopIndex":itemShopIndex}
-# # 给物品
-# for itemID, itemCount, isBind, isAppoint in itemInfoList:
-# totalCnt = itemCount * buyCount
-#
-# if isAppoint == 0:
-# realItemID = itemID
-# ItemControler.GivePlayerItem(curPlayer, itemID, totalCnt, 0, [IPY_GameWorld.rptItem, IPY_GameWorld.rptAnyWhere], event=["BuyShopItem", True, eventDataEx])
-# else:
-# realItemID = ItemControler.GetAppointItemRealID(itemID)
-# for i in range(buyCount):
-# ItemControler.GivePlayerAppointItem(curPlayer, itemID, False, event=["BuyShopItem", True, eventDataEx])
-#
-# if shopID in discountShopIDDict:
-# notifyMark = discountShopIDDict[shopID]
-# if notifyMark:
-# PlayerControl.WorldNotify(0, notifyMark, [curPlayer.GetPlayerName(), realItemID, realItemID])
-# else:
-# __BuyItemNotify(curPlayer, shopID, realItemID)
-#
-# EventShell.EventRespons_OnBuyTeHuiItem(curPlayer, shopID, itemShopIndex)
-#
-# #购买物品广播(根据物品商店索引广播)
-# __BuyItemIndexNotify(curPlayer, shopID, itemShopIndex)
- return
-
-
-## 购买物品广播(根据物品商店索引广播)
-# @param curPlayer:玩家
-# @return None
-def __BuyItemIndexNotify(curPlayer, shopID, itemShopIndex):
- playerName = curPlayer.GetPlayerName()
- BuyItemIndexNotifyDict = eval(ReadChConfig.GetChConfig('BuyItemIndexNotify'))
- if shopID not in BuyItemIndexNotifyDict:
- return
- notifyItemDict = BuyItemIndexNotifyDict[shopID]
-
- if -1 in notifyItemDict:
- notifyMark, paramList = notifyItemDict[-1]
- elif itemShopIndex in notifyItemDict:
- notifyMark, paramList = notifyItemDict[itemShopIndex]
- else:
- return
-
- PlayerControl.WorldNotify(0, notifyMark, paramList)
- return
-
-## 获取物品信息列表
-def __GetShopItemList(itemInfoDict):
- itemInfoList = []
- for i in range(1, 11): #暂支持10个物品
- itemID = itemInfoDict.get("ItemID%d" % i)
- if not itemID or itemID == '-' or itemID == '0':
- break
- itemID = int(itemID)
- itemCount = int(itemInfoDict["ItemCount%d" % i])
- isBind = int(itemInfoDict["IsBind%d" % i])
- isAppoint = int(itemInfoDict["IsAppoint%d" % i])
-
- itemInfoList.append([itemID, itemCount, isBind, isAppoint])
- return itemInfoList
-
-
-## 购买物品广播
-# @param curPlayer:玩家
-# @return None
-def __BuyItemNotify(curPlayer, shopID, itemID):
- playerName = curPlayer.GetPlayerName()
-
- BuyItemNotifyDict = eval(ReadChConfig.GetChConfig('BuyItemNotify'))
- if shopID not in BuyItemNotifyDict:
- return
-
- notifyItemDict = BuyItemNotifyDict[shopID]
-
- if 0 in notifyItemDict:
- notifyMark, paramList = notifyItemDict[0]
- elif itemID in notifyItemDict:
- notifyMark, paramList = notifyItemDict[itemID]
- else:
- return
-
- PlayerControl.WorldNotify(0, notifyMark, paramList)
- return
-
-
-## 玩家登录
-# @param curPlayer:玩家
-# @return None
-def DoOnLogin(curPlayer):
- TimeShopRefreshItem = ReadChConfig.GetEvalChConfig("TimeShopRefreshItem")
-
- gameWorld = GameWorld.GetGameWorld()
- for shopID in TimeShopRefreshItem.keys():
-
- shopStateKey = ShareDefine.Def_Notify_WorldKey_ShopState % shopID
- shopState = gameWorld.GetGameWorldDictByKey(shopStateKey)
-
- curWorldRefreshTimeKey = ShareDefine.Def_Notify_WorldKey_TimeShopRefreshTime % shopID
- curWorldRefreshTime = gameWorld.GetGameWorldDictByKey(curWorldRefreshTimeKey)
-
- if not shopState or not curWorldRefreshTime:
- GameWorld.DebugLog("神秘商店(%s)非开启状态!shopState=%s,curWorldRefreshTime=%s"
- % (shopID, shopState, curWorldRefreshTime))
- continue
-
-
- playerRefreshTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TimeShopLastGlobalRefreshTime % shopID)
-
- if curWorldRefreshTime == playerRefreshTime:
- Sync_ShopRefreshCnt(curPlayer, shopID)
- GameWorld.DebugLog("神秘商店(%s)curWorldRefreshTime=%s与玩家相同!" % (shopID, curWorldRefreshTime))
- continue
-
- GameWorld.DebugLog("登录刷新神秘商店(%s)playerRefreshTime=%s,curWorldRefreshTime=%s"
- % (shopID, playerRefreshTime, curWorldRefreshTime), curPlayer.GetPlayerID())
-
- __RefreshShopItemBySys(curPlayer, shopID, TimeShopRefreshItem, curWorldRefreshTime)
-
- return
-
-
-## 全服刷新神秘商店物品
-# @param curPlayer:玩家
-# @return None
-def OnTimeShopRefresh(key, value, tick):
- shopID = key[len(ShareDefine.Def_Notify_WorldKey_TimeShopRefreshTime) - 2:]
- try:
- shopID = int(shopID)
- except BaseException:
- GameWorld.ErrLog("定时刷新商店key错误, key=%s" % key)
- return
-
- gameWorld = GameWorld.GetGameWorld()
- lastRefreshTimeKey = ShareDefine.Def_Notify_WorldKey_TimeShopRefreshTime % shopID
- lastRefreshTime = gameWorld.GetGameWorldDictByKey(lastRefreshTimeKey)
- if lastRefreshTime == value:
- GameWorld.DebugLog("定时商店与上次刷新时间相同,不处理!shopID=%s,lastRefreshTime=%s"
- % (shopID, lastRefreshTime))
- return
-
- TimeShopRefreshItem = ReadChConfig.GetEvalChConfig("TimeShopRefreshItem")
-
- if shopID not in TimeShopRefreshItem:
- GameWorld.ErrLog("非定时神秘商店,不能刷新!shopID=%s" % shopID)
- return
-
- shopStateKey = ShareDefine.Def_Notify_WorldKey_ShopState % shopID
- shopState = gameWorld.GetGameWorldDictByKey(shopStateKey)
-
- if not shopState:
- GameWorld.ErrLog("商店关闭状态,不处理商店物品刷新!key=%s,value=%s" % (key, value))
- return
-
- # 全服刷新该商店物品
- GameWorld.DebugLog("全服刷新神秘商店(%s)" % shopID)
- playerManager = GameWorld.GetPlayerManager()
- for index in range(0, playerManager.GetPlayerCount()):
- curPlayer = playerManager.GetPlayerByIndex(index)
- if curPlayer.GetID() == 0:
- continue
-
- __RefreshShopItemBySys(curPlayer, shopID, TimeShopRefreshItem, value)
-
- return
-
-## 系统刷新神秘商店物品
-# @param curPlayer:玩家
-# @return None
-def __RefreshShopItemBySys(curPlayer, shopID, TimeShopRefreshItem, sysValue):
-
- isOK = __DoRefreshTimeShopItem(curPlayer, shopID, TimeShopRefreshItem)
-
- if isOK:
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TimeShopRefreshCnt % shopID, 0)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TimeShopLastGlobalRefreshTime % shopID, sysValue)
- Sync_ShopRefreshCnt(curPlayer, shopID)
-
- return
-
-
-#// A2 14 刷新定时神秘商店物品#tagCMRefreshShopItem
-#
-#struct tagCMRefreshShopItem
-#{
-# tagHead Head;
-# DWORD ShopID;
-#};
-## 刷新定时神秘商店物品
-# @param index:玩家索引
-# @param clientPack:封包结构体
-# @param tick:时间戳
-# @return None
-def RefreshShopItem(index, clientPack, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- shopID = clientPack.ShopID
-
- TimeShopRefreshItem = ReadChConfig.GetEvalChConfig("TimeShopRefreshItem")
-
- if shopID not in TimeShopRefreshItem:
- GameWorld.ErrLog("非定时神秘商店,不能刷新!shopID=%s" % shopID, curPlayer.GetPlayerID())
- return
-
- gameWorld = GameWorld.GetGameWorld()
- shopStateKey = ShareDefine.Def_Notify_WorldKey_ShopState % shopID
- shopState = gameWorld.GetGameWorldDictByKey(shopStateKey)
-
- if not shopState:
- GameWorld.ErrLog("商店关闭状态,不能刷新!shopID=%s" % (shopID), curPlayer.GetPlayerID())
- return
-
- GameWorld.DebugLog("手动刷新神秘商店(%s)" % shopID, curPlayer.GetPlayerID())
- __DoRefreshTimeShopItem(curPlayer, shopID, TimeShopRefreshItem, True)
- return
-
-## 执行刷新神秘商店物品
-# @param curPlayer:玩家
-# @return None
-def __DoRefreshTimeShopItem(curPlayer, shopID, TimeShopRefreshItem, isUseGold=False):
-
-
- shopItemList = GetShopItemList(shopID)
- if not shopItemList:
- return
-
- refreshInfo = TimeShopRefreshItem[shopID]
-
- if len(refreshInfo) != Def_TimeShop_Max:
- return
-
- itemCnt = len(shopItemList)
-
- # 重置个人限购
- ClearPlayerShopItemBuyCnt(curPlayer, shopID)
-
- # 重置商店物品开启状态
- maxKeyNum = int(math.ceil(itemCnt * 1.0 / PerDictKeyMaxCnt))
- for kNum in range(maxKeyNum):
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ShopItemOpenState % (shopID, kNum), 0)
-
- needCnt = refreshInfo[Def_TimeShop_RefreshCnt] # 刷新个数
- rateList = refreshInfo[Def_TimeShop_RateList] # 索引饼图概率列表
- exclusionList = refreshInfo[Def_TimeShop_ExclusionList] # 互斥索引列表
- costFormat = refreshInfo[Def_TimeShop_CostFormat] # 消耗公式
- mustItemCntDict = refreshInfo[Def_TimeShop_MustItemCnt] # 刷新次数对应必出物品信息
-
- randIndexList = []
-
- refreshCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TimeShopRefreshCnt % shopID)
- if isUseGold:
- needGold = eval(costFormat)
- infoDict = {"RefreshCnt":refreshCnt, "ShopID":shopID, ChConfig.Def_Cost_Reason_SonKey:shopID}
- if not PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, needGold,
- ChConfig.Def_Cost_RefreshTimeShop, infoDict):
- return
-
- refreshCnt += 1
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TimeShopRefreshCnt % shopID, refreshCnt)
- if refreshCnt in mustItemCntDict:
- mustIndex = mustItemCntDict[refreshCnt]
- randIndexList.append(mustIndex)
- GameWorld.DebugLog("添加必出索引:refreshCnt=%s,mustIndex=%s" % (refreshCnt, mustIndex),
- curPlayer.GetPlayerID())
- __SetShopItemOpenState(curPlayer, shopID, mustIndex)
-
- Sync_ShopRefreshCnt(curPlayer, shopID)
-
- maxProcessCnt = needCnt * 100 # 防止随不出物品死循环
- while maxProcessCnt > 0 and len(randIndexList) < needCnt:
- maxProcessCnt -= 1
-
- curIndex = GameWorld.GetResultByRandomList(rateList, 0)
-
- # 已经存在的
- if curIndex in randIndexList:
- #GameWorld.DebugLog("已经随机出来过了! curIndex=%s,randIndexList=%s"
- # % (curIndex, str(randIndexList)), curPlayer.GetPlayerID())
- continue
-
- # 互斥检查
- isInExclusionList = False
- for exclusionIndexList in exclusionList:
- if curIndex not in exclusionIndexList:
- continue
-
- for exIndex in exclusionIndexList:
- if exIndex in randIndexList:
- isInExclusionList = True
- break
-
- if isInExclusionList:
- break
-
- if isInExclusionList:
- #GameWorld.DebugLog("在已经随机出来的互斥列表里 curIndex=%s,exclusionIndexList=%s,randIndexList=%s"
- # % (curIndex, str(exclusionIndexList), str(randIndexList)), curPlayer.GetPlayerID())
- continue
-
- randIndexList.append(curIndex)
- __SetShopItemOpenState(curPlayer, shopID, curIndex)
-
- Send_ShopItem(curPlayer, shopItemList)
- Sync_ShopItemBuyCntInfo(curPlayer, shopID)
-
- GameWorld.DebugLog("刷新神秘商店(%s)%s,isUseGold=%s" % (shopID, str(randIndexList), isUseGold),
- curPlayer.GetPlayerID())
- return True
-
-
-## 获取商店id对应物品索引开放状态
-# @param curPlayer
-# @param shopID
-# @param itemIndex
-# @return 是否开放购买
-def __GetShopItemState(curPlayer, shopID, itemIndex):
- keyNum = itemIndex / PerDictKeyMaxCnt
- keyName = ChConfig.Def_PDict_ShopItemOpenState % (shopID, keyNum)
- shopItemState = curPlayer.NomalDictGetProperty(keyName)
- curStateIndex = itemIndex % PerDictKeyMaxCnt
- isOpen = shopItemState & pow(2, curStateIndex)
- return isOpen
-
-
-## 设置商店id对应物品索引开放状态
-# @param curPlayer
-# @param shopID
-# @param itemIndex
-# @return
-def __SetShopItemOpenState(curPlayer, shopID, itemIndex):
- keyNum = itemIndex / PerDictKeyMaxCnt
- keyName = ChConfig.Def_PDict_ShopItemOpenState % (shopID, keyNum)
- shopItemState = curPlayer.NomalDictGetProperty(keyName)
- curStateIndex = itemIndex % PerDictKeyMaxCnt
- updState = shopItemState | pow(2, curStateIndex)
- PlayerControl.NomalDictSetProperty(curPlayer, keyName, updState)
- #GameWorld.DebugLog("更新商店物品开放状态shopID=%s,index=%s,key=%s,shopItemState=%s,curIndex=%s,updState=%s" \
- # % (shopID, itemIndex, keyName, shopItemState, curStateIndex, updState), curPlayer.GetPlayerID())
- return updState
-
-## 同步神秘商店已手动刷新次数
-# @param curPlayer:玩家
-# @return None
-def Sync_ShopRefreshCnt(curPlayer, shopID):
- refreshCntPack = ChPyNetSendPack.tagMCShopRefreshCnt()
- refreshCntPack.Clear()
- refreshCntPack.ShopID = shopID
- refreshCntPack.RefreshCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TimeShopRefreshCnt % shopID)
- NetPackCommon.SendFakePack(curPlayer, refreshCntPack)
- return
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearTeHui.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearTeHui.py
deleted file mode 100644
index ee3ae8a..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearTeHui.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-#
-##@package GM.Commands.ClearTeHui
-#
-# @todo:重置特惠活动
-# @author hxp
-# @date 2014-06-21
-# @version 1.3
-#
-# @change: "2014-09-28 17:30" hxp 增加重置充值排行累计充值记录
-# @change: "2015-04-15 15:30" ljd 增加消费返利
-# @change: "2016-10-22 20:30" hxp 支持重置当前所有活动中的商店购买次数
-#
-# 详细描述: 重置特惠活动
-#
-#---------------------------------------------------------------------
-#"""Version = 2016-10-22 20:30"""
-#---------------------------------------------------------------------
-
-import ShopItemManage
-import ReadChConfig
-import PlayerTeHui
-import GameWorld
-import ShareDefine
-
-#---------------------------------------------------------------------
-#全局变量
-#---------------------------------------------------------------------
-
-#---------------------------------------------------------------------
-#逻辑实现
-## GM命令执行入口
-# @param curPlayer 当前玩家
-# @param msgList 参数列表 [npcID]
-# @return None
-# @remarks 函数详细说明.
-def OnExec(curPlayer, msgList):
-
- PlayerTeHui.ResetClassUPAwardRecord(curPlayer)
- PlayerTeHui.ResetRechargeData(curPlayer)
- PlayerTeHui.ResetRechargeRankData(curPlayer)
- PlayerTeHui.ResetCostProfitInfo(curPlayer)
- PlayerTeHui.ResetCostRankData(curPlayer)
-
- curActionShopID = PlayerTeHui.GetCurActionShopID()
- if curActionShopID > 0:
- ShopItemManage.ClearShopItemBuyCnt(curActionShopID)
- GameWorld.DebugAnswer(curPlayer, "重置商店%s购买次数!" % curActionShopID)
-
- # 其他商店重置次数
- itemID = 0
- itemShopIndex = 0
- playerName = curPlayer.GetPlayerName()
-
- BuyItemNotifyDict = eval(ReadChConfig.GetChConfig('BuyItemNotify'))
- BuyItemIndexNotifyDict = eval(ReadChConfig.GetChConfig('BuyItemIndexNotify'))
- shopIDList = BuyItemNotifyDict.keys() + BuyItemIndexNotifyDict.keys()
- gameWorld = GameWorld.GetGameWorld()
- for shopID in shopIDList:
- if not gameWorld.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ShopState % shopID):
- continue
- ShopItemManage.ClearPlayerShopItemBuyCnt(curPlayer, shopID)
- ShopItemManage.Send_ShopItemAllBuyCntInfo(curPlayer, shopID, {})
- GameWorld.DebugAnswer(curPlayer, "重置商店%s购买次数!" % shopID)
-
- return
-
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 0efb60b..0398233 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -636,12 +636,6 @@
GameLogic_GodArea.GodAreaOnLogin(curPlayer)
# # 采集NPC次数通知
NPCCommon.SyncCollNPCTime(curPlayer)
-#
-# # 特惠活动
-# PlayerTeHui.PlayerLogin_TeHui(curPlayer)
-#
-# # 自定义商店
-# ShopItemManage.DoOnLogin(curPlayer)
#
# # 每日活跃度
PlayerActivity.OnLogin(curPlayer)
@@ -1589,9 +1583,6 @@
#防止玩家读取地图时未触发OnDay,读取地图后再次验证(2009.9.11)
PlayerEventCounter.UpdatePlayerLoginTime(curPlayer)
-
- #特惠活动事件
- #PlayerTeHui.PlayerLoadMapOK(curPlayer)
#设置阵营
if curPlayer.GetFaction() != ChConfig.CampType_Neutral \
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
index b5e2280..2564940 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
@@ -231,50 +231,6 @@
GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "UpdateBillboardPlayerTruck",
'%s' % (cmdList), len(str(cmdList)))
return
-
-## 更新充值排行特惠排行榜
-# @param playerID: 玩家ID
-# @return:
-def UpdateRechargeRankBillboard(curPlayer, actionID, actionNum, updateGold):
-# if GameWorld.IsGM(curPlayer):
-# #GM不上榜
-# return
-
- #排行榜需要数据[玩家ID, 玩家名字, 玩家职业, 击杀数]
- playerID = curPlayer.GetID()
- playerName = curPlayer.GetName()
- playerOpInfo = curPlayer.GetOperateInfo()
- playerJob = curPlayer.GetJob()
- playerLV = curPlayer.GetLV()
- familyName = curPlayer.GetFamilyName()
- GameWorld.DebugLog("更新特惠充值排行榜: actionID=%s,actionNum=%s,updateGold=%s"
- % (actionID, actionNum, updateGold), curPlayer.GetPlayerID())
- sendMsg = '%s' % ([playerID, playerName, playerOpInfo, playerJob, playerLV, familyName, actionID, actionNum, updateGold])
- GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'UpdRechargeRankBillboard', \
- sendMsg, len(sendMsg))
- return
-
-## 更新消费排行特惠排行榜
-# @param playerID: 玩家ID
-# @return:
-def UpdateCostRankBillboard(curPlayer, actionID, actionNum, updateGold):
-# if GameWorld.IsGM(curPlayer):
-# #GM不上榜
-# return
-
- #排行榜需要数据[玩家ID, 玩家名字, 玩家职业, 击杀数]
- playerID = curPlayer.GetID()
- playerName = curPlayer.GetName()
- playerOpInfo = curPlayer.GetOperateInfo()
- playerJob = curPlayer.GetJob()
- playerLV = curPlayer.GetLV()
- familyName = curPlayer.GetFamilyName()
- GameWorld.DebugLog("更新特惠消费排行榜: actionID=%s,actionNum=%s,updateGold=%s"
- % (actionID, actionNum, updateGold), curPlayer.GetPlayerID())
- sendMsg = '%s' % ([playerID, playerName, playerOpInfo, playerJob, playerLV, familyName, actionID, actionNum, updateGold])
- GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'UpdCostRankBillboard', \
- sendMsg, len(sendMsg))
- return
##更新玩家充值排行榜
# @param curPlayer 玩家实例
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index d1fbf60..ba63cc3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -63,7 +63,6 @@
import PassiveBuffEffMng
import PlayerGameEvent
import EventReport
-import PlayerTeHui
import PlayerGatherSoul
import PlayerSuccess
import PlayerPet
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 ca530bd..f1e68e5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
@@ -53,14 +53,12 @@
import FunctionNPCCommon
import PlayerGoldGift
import PlayerActivity
-import PlayerTeHui
import PlayerBindJadeWheel
import PlayerAction
import FBCommon
import PlayerSuccess
import PlayerFreeGoods
import PlayerMagicWeapon
-import ShopItemManage
import ChItem
import PlayerGoldInvest
import PlayerNewGuyCard
@@ -1361,10 +1359,6 @@
#领地争夺战
#elif key == ShareDefine.Def_Notify_WorldKey_ManorWar:
# GameLogic_ManorWar.OnManorWarStateChange(value, tick)
-
- #定时商店刷新
- elif key.startswith(ShareDefine.Def_Notify_WorldKey_TimeShopRefreshTime[:-2]):
- ShopItemManage.OnTimeShopRefresh(key, value, tick)
# 跨服PK
elif key == ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID:
@@ -1430,10 +1424,6 @@
# 王者仙盟
elif key == ShareDefine.Def_Notify_WorldKey_ChampionFamilyID:
GameLogic_FamilyWar.OnChampionFamilyIDChange()
-
- # 特惠活动
- elif key in ShareDefine.TeHuiTypeKeyDict.values():
- PlayerTeHui.ChangeTeHuiActionState(key)
# 活动buff状态变更
elif key.startswith(ShareDefine.Def_Notify_WorldKey_ActionBuffState[:-2]):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeHui.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeHui.py
deleted file mode 100644
index 4053e20..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeHui.py
+++ /dev/null
@@ -1,943 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-#
-##@package Player.PlayerTeHui
-#
-# @todo:特惠活动
-# @author hxp
-# @date 2014-06-21
-# @version 2.2
-#
-# @change: "2014-08-27 14:30" hxp 增加领奖全服广播
-# @change: "2014-09-28 17:30" hxp 增加充值排行特惠活动
-# @change: "2014-12-02 11:30" hxp 合服折扣店
-# @change: "2014-12-26 00:05" Alee 验证功能阶级
-# @change: "2015-01-23 14:30" hxp 充值特惠活动变更时增加邮件补发上次未领取的充值奖励
-# @change: "2015-01-29 22:30" hxp 特惠充值日志
-# @change: "2015-02-11 16:30" hxp 增加切地图成功后检查特惠活动相关
-# @change: "2015-04-16 19:10" ljd 增加消费返利、增加不计消费返利商店NPCID列表
-# @change: "2016-07-20 14:30" hxp 消费点消费记录逻辑调整
-# @change: "2016-10-14 14:30" xdh 累充活动系统提示开出配置
-# @change: "2017-06-14 11:00" hxp 还原特惠消费返利榜
-# @change: "2017-07-07 11:30" hxp 修复充值排行、充值返利、消费排行更新活动钻石key值时没有给参数可能存在值不更新的bug
-# 详细描述: 特惠活动
-#---------------------------------------------------------------------
-#"""Version = 2017-07-07 11:30"""
-#---------------------------------------------------------------------
-import ShareDefine
-import GameWorld
-import ChConfig
-import ReadChConfig
-import ItemCommon
-import IPY_GameWorld
-import PlayerControl
-import ItemControler
-import ChPyNetSendPack
-import NetPackCommon
-import DataRecordPack
-import ShopItemManage
-import PlayerBillboard
-
-(
-Recharge_Type_Single, # 充值特惠规则类型 - 单笔充值
-Recharge_Type_Total, # 充值特惠规则类型 - 累计充值
-) = range(2)
-
-(
-Recharge_Type, # 充值特惠规则类型
-Recharge_NeedGold, # 所需钻石数
-Recharge_MaxCnt, # 最大奖励次数
-Recharge_AwardItemInfo, # 奖励信息
-) = range(4)
-
-# 消费奖励配置 TeHuiAction_CostProfitAward
-(
-CostProfit_GoldNum, # 钻石数
-CostProfit_NeedSpace, # 需要的背包格子数
-CostProfit_ItemList, # 奖励物品信息列表
-) = range(3)
-
-## 获取玩家特惠活动字典值
-# @param curPlayer:
-# @return: None
-def __GetPlayerTeHuiDictValue(curPlayer, key, defaultValue=0):
- return curPlayer.NomalDictGetProperty(key, defaultValue, ChConfig.Def_PDictType_TeHuiAction)
-
-
-## 设置玩家特惠活动字典值
-# @param curPlayer:
-# @return: None
-def __SetPlayerTeHuiDictValue(curPlayer, key, value):
- PlayerControl.NomalDictSetProperty(curPlayer, key, value, ChConfig.Def_PDictType_TeHuiAction)
- return
-
-## 获取当前活动折扣店ID列表
-# @param None:
-# @return: None
-def GetCurActionShowIDList():
- return [GetCurActionShopID(), GetCurMixActionShopID()]
-
-## 获取当前活动折扣店ID
-# @param None:
-# @return: None
-def GetCurActionShopID():
- gameWorld = GameWorld.GetGameWorld()
- shopIDKey = ShareDefine.Def_Notify_WorldKey_DayAction_DiscountShop
- shopID = gameWorld.GetGameWorldDictByKey(shopIDKey)
- return shopID
-
-## 获取当前合服活动折扣店ID
-# @param None:
-# @return: None
-def GetCurMixActionShopID():
- gameWorld = GameWorld.GetGameWorld()
- mixShopIDKey = ShareDefine.Def_Notify_WorldKey_DayAction_MixDiscountShop
- mixShopID = gameWorld.GetGameWorldDictByKey(mixShopIDKey)
- return mixShopID
-
-## 特惠活动改变时(登陆 和 key改变时)
-# @param curPlayer: 主角
-# @return: None
-def ChangeTeHuiActionState(key):
- #__CheckResetAllPlayerData(key)
- return
-
-
-## 玩家登录时
-# @param curPlayer:玩家
-# @return None
-def PlayerLogin_TeHui(curPlayer):
- #===========================================================================
- # for teHuiKey in ShareDefine.TeHuiTypeKeyDict.values():
- # __CheckResetPlayerData(curPlayer, teHuiKey)
- #
- # # 老号记录本次充值特惠活动编号, 必须放在检查活动数据之后处理
- # gameWorld = GameWorld.GetGameWorld()
- # rechargeActionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_Recharge
- # actionNum = gameWorld.GetGameWorldDictByKey(rechargeActionNumKey)
- # rechargeActionDict = ReadChConfig.GetEvalChConfig("TeHuiAction_Recharge")
- # if actionNum in rechargeActionDict:
- # lastRechargeNum = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_LastRechargeNum)
- # __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_LastRechargeNum, actionNum)
- # GameWorld.DebugLog("登录记录本次充值特惠活动编号lastRechargeNum=%s,actionNum=%s" % (lastRechargeNum, actionNum))
- #
- # Sync_ClassUPDayAwardRecord(curPlayer)
- # #Sync_RechargeTeHuiInfo(curPlayer)
- # Sync_RechargeRankTeHuiInfo(curPlayer)
- # Sync_CostRankTeHuiInfo(curPlayer)
- # Sync_CostProfitInfo(curPlayer)
- # SyncPlayerCostRank(curPlayer)
- #===========================================================================
- return
-
-
-## 消费排行榜特惠活动
-# @param None
-# @return None
-def SyncPlayerCostRank(curPlayer):
- gameWorld = GameWorld.GetGameWorld()
- actionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_CostRank
- actionNum = gameWorld.GetGameWorldDictByKey(actionNumKey)
- if not actionNum:
- return
-
- # 更新总累计消费数
- totalGold = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TeHui_CostRankTotalGold, 0, ChConfig.Def_PDictType_TeHuiAction)
- totalGold = max(curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TeHui_CostRankTotalGoldEx, 0,
- ChConfig.Def_PDictType_TeHuiAction), totalGold)
- GameWorld.Log("同步消费排行特惠活动!actionNum=%s,totalGold=%s" % (actionNum, totalGold), curPlayer.GetPlayerID())
-
- # 更新排行榜
- actionID = gameWorld.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DayAction_ID % actionNumKey)
- PlayerBillboard.UpdateCostRankBillboard(curPlayer, actionID, actionNum, totalGold)
- return
-
-## 切地图成功时
-# @param curPlayer:玩家
-# @return None
-def PlayerLoadMapOK(curPlayer):
- #===========================================================================
- # GameWorld.DebugLog("玩家切地图成功,检查特惠活动!", curPlayer.GetPlayerID())
- # for teHuiKey in ShareDefine.TeHuiTypeKeyDict.values():
- # __CheckResetPlayerData(curPlayer, teHuiKey)
- #===========================================================================
- return
-
-
-## 清除所有玩家信息(key 改变时调用)
-# @param curPlayer: 玩家
-# @return: None
-def __CheckResetAllPlayerData(key):
- for i in range(0, GameWorld.GetPlayerManager().GetPlayerCount()):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(i)
-
- if curPlayer == None or not curPlayer.GetPlayerID():
- continue
-
- #清除玩家信息
- __CheckResetPlayerData(curPlayer, key)
-
- return
-
-## 清除玩家信息
-# @param curPlayer: 玩家
-# @param key: 特惠活动key,默认全部检查,一般登录时全部检查
-# @return: None
-def __CheckResetPlayerData(curPlayer, key):
- playerID = curPlayer.GetPlayerID()
- gameWorld = GameWorld.GetGameWorld()
- actionIDKey = ShareDefine.Def_Notify_WorldKey_DayAction_ID % key
- # 当前活动的id(活动设置时的时间用于标识活动唯一)
- actionID = gameWorld.GetGameWorldDictByKey(actionIDKey)
-
- # 玩家身上数据的活动id
- playerActionIDKey = ChConfig.Def_PDict_TeHui_ActionID % key
- playerActionID = __GetPlayerTeHuiDictValue(curPlayer, playerActionIDKey)
- if playerActionID == actionID:
- GameWorld.DebugLog("特惠活动id相同,不处理key=%s,actionID=%s" % (key, actionID), playerID)
- return
- GameWorld.DebugLog("特惠活动数据重置key=%s,actionID=%s" % (key, actionID), playerID)
- __SetPlayerTeHuiDictValue(curPlayer, playerActionIDKey, actionID)
-
- if key == ShareDefine.Def_Notify_WorldKey_DayAction_Recharge:
- ResetRechargeData(curPlayer)
- elif key == ShareDefine.Def_Notify_WorldKey_DayAction_ClassUPNum:
- ResetClassUPAwardRecord(curPlayer)
- elif key == ShareDefine.Def_Notify_WorldKey_DayAction_DiscountShop:
- # 登录的时候会触发清空时机
- shopID = GetCurActionShopID()
- ShopItemManage.ClearPlayerShopItemBuyCnt(curPlayer, shopID)
- elif key == ShareDefine.Def_Notify_WorldKey_DayAction_MixDiscountShop:
- mixShopID = GetCurMixActionShopID()
- ShopItemManage.ClearPlayerShopItemBuyCnt(curPlayer, mixShopID)
- elif key == ShareDefine.Def_Notify_WorldKey_DayAction_RechargeRank:
- ResetRechargeRankData(curPlayer)
- elif key == ShareDefine.Def_Notify_WorldKey_DayAction_CostProfit:
- ResetCostProfitInfo(curPlayer)
- elif key == ShareDefine.Def_Notify_WorldKey_DayAction_CostRank:
- ResetCostRankData(curPlayer)
-
- return
-
-## 重置消费排行特惠数据
-# @param curPlayer:
-# @return: None
-def ResetCostRankData(curPlayer):
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostRankTotalGold, 0)
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostRankTotalGoldEx, 0)
- Sync_CostRankTeHuiInfo(curPlayer)
- return
-
-## 重置充值排行特惠数据
-# @param curPlayer:
-# @return: None
-def ResetRechargeRankData(curPlayer):
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeRankTotalGold, 0)
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeRankTotalGoldEx, 0)
- Sync_RechargeRankTeHuiInfo(curPlayer)
- return
-
-## 重置充值特惠数据
-# @param curPlayer:
-# @return: None
-def ResetRechargeData(curPlayer):
- gameWorld = GameWorld.GetGameWorld()
- rechargeActionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_Recharge
- actionNum = gameWorld.GetGameWorldDictByKey(rechargeActionNumKey)
- rechargeActionDict = ReadChConfig.GetEvalChConfig("TeHuiAction_Recharge")
- if actionNum not in rechargeActionDict:
- return
-
- # 补发上次未领取的奖励
- __SendRechargeAwardMail(curPlayer, rechargeActionDict)
-
- # 更新新的活动编号, 重置数据
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_LastRechargeNum, actionNum)
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeTotalGold, 0)
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeTotalGoldEx, 0)
-
- ruleList = rechargeActionDict[actionNum]
- for index in range(len(ruleList)):
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeGotCnt % index, 0)
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeCanGetCnt % index, 0)
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeCurTotalGold % index, 0)
-
- Sync_RechargeTeHuiInfo(curPlayer)
- return
-
-## 邮件补发上一次充值特惠未领取奖励
-# @param curPlayer:
-# @return: None
-def __SendRechargeAwardMail(curPlayer, rechargeActionDict):
- try:
- lastRechargeNum = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_LastRechargeNum)
- if lastRechargeNum not in rechargeActionDict:
- GameWorld.DebugLog("__SendRechargeAwardMail lastRechargeNum=%s not in actionDict!" % lastRechargeNum)
- return
-
- # 邮件补发未领取的奖励
- rechargeMail = ReadChConfig.GetEvalChConfig("TeHuiAction_RechargeMail")
- lastRuleList = rechargeActionDict[lastRechargeNum]
- job = curPlayer.GetJob()
- for lastIndex, ruleInfo in enumerate(lastRuleList):
- canGetCntKey = ChConfig.Def_PDict_TeHui_RechargeCanGetCnt % lastIndex
- lastCanGetCnt = __GetPlayerTeHuiDictValue(curPlayer, canGetCntKey)
- GameWorld.DebugLog("充值特惠邮件补发奖励: lastRechargeNum=%s,index=%s,lastCanGetCnt=%s"
- % (lastRechargeNum, lastIndex, lastCanGetCnt))
- if lastCanGetCnt <= 0:
- continue
-
- mailTitle = rechargeMail[0]
- getDays = rechargeMail[1]
- mailContent = ""
-
- ruleType = ruleInfo[Recharge_Type]
- needGold = ruleInfo[Recharge_NeedGold]
- awardItemInfo = ruleInfo[Recharge_AwardItemInfo]
- itemList = awardItemInfo[1]
-
- mailItemList = []
- for itemInfo in itemList:
- if isinstance(itemInfo, dict):
- if job not in itemInfo:
- GameWorld.ErrLog('TeHuiAction_Recharge.txt 未配置该职业奖励 job=%s'%job)
- continue
- itemID, itemCnt, isBind = itemInfo[job]
- else:
- itemID, itemCnt, isBind = itemInfo
- mailItemList.append((itemID, itemCnt * lastCanGetCnt, isBind))
-
- GameWorld.DebugLog(" ruleType=%s,needGold=%s,itemList=%s,mailItemList=%s"
- % (ruleType, needGold, str(itemList), str(mailItemList)))
-
- if ruleType == Recharge_Type_Single:
- mailContent = rechargeMail[2] % (needGold, lastCanGetCnt)
- elif ruleType == Recharge_Type_Total:
- mailContent = rechargeMail[3] % (needGold, lastCanGetCnt)
-
- isSend = PlayerControl.SendMail(mailTitle, mailContent, getDays, [curPlayer.GetPlayerID()], mailItemList)
- if isSend:
- GameWorld.Log("邮件补发上次充值特惠奖励:lastRechargeNum=%s,index=%s,canGetCnt=%s,mailItemList=%s"
- % (lastRechargeNum, lastIndex, lastCanGetCnt, str(mailItemList)), curPlayer.GetPlayerID())
-
- except BaseException, e:
- GameWorld.ErrLog("邮件补发上次充值特惠奖励出错!%s" % e, curPlayer.GetPlayerID())
-
- return
-
-
-## 重置升阶特惠奖励记录数据
-# @param curPlayer:
-# @return: None
-def ResetClassUPAwardRecord(curPlayer):
- for dayType in ShareDefine.ClassUPDayList:
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_ClassUPAwardRecord % dayType, 0)
-
- Sync_ClassUPDayAwardRecord(curPlayer)
- return
-
-
-## 玩家充值
-# @param curPlayer: 玩家
-# @param addGold: 充值元宝数
-# @return: None
-def PlayerGoldCharge_TeHuiAction(curPlayer, addGold):
- GameWorld.Log("特惠活动充值: addGold=%s" % addGold, curPlayer.GetPlayerID())
- # 充值排行榜特惠
- __PlayerRechargeRankAction(curPlayer, addGold)
-
- # 充值特惠
- gameWorld = GameWorld.GetGameWorld()
- rechargeActionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_Recharge
- actionNum = gameWorld.GetGameWorldDictByKey(rechargeActionNumKey)
- rechargeActionDict = ReadChConfig.GetEvalChConfig("TeHuiAction_Recharge")
- if actionNum not in rechargeActionDict:
- GameWorld.Log("充值特惠活动!无该活动编号! actionNum=%s" % (actionNum), curPlayer.GetPlayerID())
- return
-
- # 更新总累计充值数
- totalGold = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeTotalGold)
- totalGold = max(__GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeTotalGoldEx), totalGold)
- updateGold = totalGold + addGold
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeTotalGoldEx, updateGold)
- GameWorld.Log("充值特惠活动!actionNum=%s,totalGold=%s,addGold=%s,updateGold=%s"
- % (actionNum, totalGold, addGold, updateGold), curPlayer.GetPlayerID())
-
- ruleList = rechargeActionDict[actionNum]
- for index, ruleInfo in enumerate(ruleList):
- ruleType = ruleInfo[Recharge_Type]
- needGold = ruleInfo[Recharge_NeedGold]
- maxCnt = ruleInfo[Recharge_MaxCnt]
-
- # 更新当前规则累充数
- curTotalGoldKey = ChConfig.Def_PDict_TeHui_RechargeCurTotalGold % index
- curTotalGold = __GetPlayerTeHuiDictValue(curPlayer, curTotalGoldKey)
- curTotalGold += addGold
- __SetPlayerTeHuiDictValue(curPlayer, curTotalGoldKey, curTotalGold)
-
- canCntKey = ChConfig.Def_PDict_TeHui_RechargeCanGetCnt % index
- curCanCnt = __GetPlayerTeHuiDictValue(curPlayer, canCntKey)
- curGotCnt = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeGotCnt % index)
-
- # 达到最大次数,不再处理次数
- if curGotCnt + curCanCnt >= maxCnt:
- continue
-
- if ruleType == Recharge_Type_Single:
- if addGold < needGold:
- continue
-
- # 满足单笔充值,可领取次数+1
- __SetPlayerTeHuiDictValue(curPlayer, canCntKey, curCanCnt + 1)
-
- elif ruleType == Recharge_Type_Total:
- # 累充后实际可领奖次数(可领取总次数 - 已领取次数)
- canMaxCnt = min(maxCnt, curTotalGold / needGold) # 当前累充实际最大可领奖次数
- canCnt = max(0, canMaxCnt - curGotCnt)
- if canCnt != curCanCnt:
- __SetPlayerTeHuiDictValue(curPlayer, canCntKey, canCnt)
-
- # 同步客户端
- Sync_RechargeTeHuiInfo(curPlayer)
- return
-
-## 充值排行榜特惠活动
-# @param None
-# @return None
-def __PlayerRechargeRankAction(curPlayer, addGold):
- gameWorld = GameWorld.GetGameWorld()
- actionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_RechargeRank
- actionNum = gameWorld.GetGameWorldDictByKey(actionNumKey)
- if not actionNum:
- GameWorld.Log("当前没有充值排行特惠活动,不需要更新排行榜!actionNum=%s" % actionNum, curPlayer.GetPlayerID())
- return
-
- # 更新总累计充值数
- totalGold = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeRankTotalGold)
- totalGold = max(__GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeRankTotalGoldEx), totalGold)
- updateGold = totalGold + addGold
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeRankTotalGoldEx, updateGold)
- GameWorld.Log("充值排行特惠活动!actionNum=%s,totalGold=%s,addGold=%s,updateGold=%s"
- % (actionNum, totalGold, addGold, updateGold), curPlayer.GetPlayerID())
-
- # 更新排行榜
- actionID = gameWorld.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DayAction_ID % actionNumKey)
- PlayerBillboard.UpdateRechargeRankBillboard(curPlayer, actionID, actionNum, updateGold)
-
- # 同步客户端累计充值数
- Sync_RechargeRankTeHuiInfo(curPlayer)
- return
-
-## 消费排行榜特惠活动
-# @param None
-# @return None
-def __PlayerCostRankAction(curPlayer, addGold):
- gameWorld = GameWorld.GetGameWorld()
- actionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_CostRank
- actionNum = gameWorld.GetGameWorldDictByKey(actionNumKey)
- if not actionNum:
- GameWorld.Log("当前没有消费排行特惠活动,不需要更新排行榜!actionNum=%s" % actionNum, curPlayer.GetPlayerID())
- return
-
- # 更新总累计消费数
- totalGold = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostRankTotalGold)
- totalGold = max(__GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostRankTotalGoldEx), totalGold)
- updateGold = totalGold + addGold
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostRankTotalGoldEx, updateGold)
- GameWorld.Log("消费排行特惠活动!actionNum=%s,totalGold=%s,addGold=%s,updateGold=%s"
- % (actionNum, totalGold, addGold, updateGold), curPlayer.GetPlayerID())
-
- # 更新排行榜
- actionID = gameWorld.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DayAction_ID % actionNumKey)
- PlayerBillboard.UpdateCostRankBillboard(curPlayer, actionID, actionNum, updateGold)
-
- # 同步客户端累计消费数
- Sync_CostRankTeHuiInfo(curPlayer)
- return
-
-## 验证当前阶级
-# @param classlv
-# @return bool
-def CheckClassLV(curPlayer, dayType, classLV):
-
-# if dayType == ShareDefine.ClassUPDay_Horse:
-# if classLV <= curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Horser_ClassLV,
-# 0, ChConfig.Def_PDictType_Horse):
-# return True
-
- if dayType == ShareDefine.ClassUPDay_Office: # 官爵
- if classLV <= curPlayer.GetOfficialRank():
- return True
-
- return False
-
-
-# AA 02 领取升阶功能特惠奖励 #tagCMGetClassUPDayAward
-## 客服端领取升阶日特惠奖励
-# @param index:玩家索引
-# @param clientPack:封包结构体
-# @param tick:时间戳
-# @return None
-def ClientGetClassUPDayAward(index, clientPack, tick):
- return
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- dayType = clientPack.DayType
- classLV = clientPack.ClassLV
-
- GameWorld.DebugLog("领取升阶特惠奖励 dayType=%s,classLV=%s" % (dayType, classLV), curPlayer.GetPlayerID())
-
- if dayType not in ShareDefine.ClassUPDayList:
- GameWorld.ErrLog(" 特惠活动类型=%s 非法!" % (dayType))
- return
-
- #验证当前阶级
- if not CheckClassLV(curPlayer, dayType, classLV):
- return
-
- classUPTeHuiDict = ReadChConfig.GetEvalChConfig("TeHuiAction_ClassUP")
-
- gameWorld = GameWorld.GetGameWorld()
- # 当前升阶特惠活动编号
- classUPActionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_ClassUPNum
- actionNum = gameWorld.GetGameWorldDictByKey(classUPActionNumKey)
- if actionNum not in classUPTeHuiDict:
- GameWorld.ErrLog(" 特惠活动编号=%s not in TeHuiAction_ClassUP.txt" % actionNum)
- return
-
- curDayTypeList = classUPTeHuiDict[actionNum] # 当前活动中的升阶日特惠
-
- # 是否是当前活动中的升阶日
- if dayType not in curDayTypeList:
- GameWorld.ErrLog(" 特惠活动类型=%s 非当前活动中的升阶特惠日!curDayTypeList=%s"
- % (dayType, str(curDayTypeList)))
- return
-
- awardRecordKey = ChConfig.Def_PDict_TeHui_ClassUPAwardRecord % dayType
- # 是否已领奖
- awardRecord = __GetPlayerTeHuiDictValue(curPlayer, awardRecordKey)
- if awardRecord & pow(2, classLV):
- GameWorld.Log(" 特惠活动类型=%s,classLV=%s 已领过奖励!不能重复领取!"
- % (dayType, classLV))
- return
-
- awardDict = ReadChConfig.GetEvalChConfig("TeHuiAction_ClassUPAward")
- if dayType not in awardDict.keys():
- GameWorld.ErrLog(" 特惠活动类型=%s 未配置奖励信息!请检查 TeHuiAction_ClassUPAward.txt" % (dayType))
- return
-
- awardClassInfoDict = awardDict[dayType]
- if classLV not in awardClassInfoDict.keys():
- GameWorld.ErrLog(" 特惠活动类型=%s,classLV=%s 未配置奖励信息!请检查TeHuiAction_ClassUPAward.txt"
- % (dayType, classLV))
- return
-
- awardInfo = awardClassInfoDict[classLV]
-
- # 检查背包
- packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem)
- needSpace = awardInfo[0]
- if needSpace > packSpace:
- PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
- return
-
- itemList = awardInfo[1]
-
- # 更新领奖记录
- awardRecord = awardRecord|(1<<classLV)
- __SetPlayerTeHuiDictValue(curPlayer, awardRecordKey, awardRecord)
-
- # 给物品
- for itemID, itemCnt, isBind in itemList:
- isPutIn = ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
- if isPutIn:
- PlayerControl.NotifyCode(curPlayer, "ObtainRes01", [itemID, itemCnt])
-
- # 领奖广播
- msgParamList = [dayType, curPlayer.GetPlayerName(), dayType, classLV, dayType]
- PlayerControl.WorldNotify(0, "GeRen_liubo_734488", msgParamList)
-
- # 通知领奖记录
- Sync_ClassUPDayAwardRecord(curPlayer, dayType)
- return
-
-# AA 03 领取充值特惠奖励 #tagCMGetRechargeTeHuiAward
-## 客服端领取充值特惠奖励
-# @param index:玩家索引
-# @param clientPack:封包结构体
-# @param tick:时间戳
-# @return None
-def ClientGetRechargeTeHuiAward(index, clientPack, tick):
- return
- gameWorld = GameWorld.GetGameWorld()
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- actionID = clientPack.ActionID
- index = clientPack.Index
-
- curActionID = gameWorld.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DayAction_ID
- % ShareDefine.Def_Notify_WorldKey_DayAction_Recharge)
-
- GameWorld.DebugLog("领取充值特惠奖励 actionID=%s,index=%s" % (actionID, index), curPlayer.GetPlayerID())
- if actionID != curActionID:
- GameWorld.ErrLog(" 活动id错误!actionID=%s != 当前活动id=%s" % (actionID, curActionID))
- return
-
- rechargeDict = ReadChConfig.GetEvalChConfig("TeHuiAction_Recharge")
-
- # 当前升阶特惠活动编号
- actionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_Recharge
- actionNum = gameWorld.GetGameWorldDictByKey(actionNumKey)
- if actionNum not in rechargeDict:
- GameWorld.ErrLog(" 活动编号=%s not in TeHuiAction_Recharge.txt" % actionNum)
- return
-
- ruleList = rechargeDict[actionNum] # 当前活动规则列表
- if index >= len(ruleList):
- GameWorld.ErrLog(" 领取索引=%s >=规则列表条数len=%s" % (index, len(ruleList)))
- return
-
- ruleInfo = ruleList[index]
- GameWorld.DebugLog(" ruleInfo=%s" % str(ruleInfo))
-
- gotCnt = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeGotCnt % index)
- canGetCnt = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeCanGetCnt % index)
- maxCnt = ruleInfo[Recharge_MaxCnt]
- GameWorld.DebugLog(" gotCnt=%s,canGetCnt=%s,maxCnt=%s" % (gotCnt, canGetCnt, maxCnt))
- if gotCnt >= maxCnt:
- GameWorld.ErrLog(" 已达到最大领奖次数!")
- return
-
- if canGetCnt <= 0:
- GameWorld.ErrLog(" 没有可领取次数!")
- return
-
- awardInfo = ruleInfo[Recharge_AwardItemInfo]
-
- # 检查背包
- packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem)
- needSpace = awardInfo[0]
- if needSpace > packSpace:
- PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
- return
-
- itemList = awardInfo[1]
-
- # 领取次数+1,可领奖次数-1
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeGotCnt % index, gotCnt + 1)
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeCanGetCnt % index, canGetCnt - 1)
-
- # 给物品
- job = curPlayer.GetJob()
- for itemInfo in itemList:
- if isinstance(itemInfo, dict):
- if job not in itemInfo:
- GameWorld.ErrLog('TeHuiAction_Recharge.txt 未配置该职业奖励 job=%s'%job)
- continue
- itemID, itemCnt, isBind = itemInfo[job]
- else:
- itemID, itemCnt, isBind = itemInfo
- isPutIn = ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
- if isPutIn:
- PlayerControl.NotifyCode(curPlayer, "ObtainRes01", [itemID, itemCnt])
-
- DataRecordPack.DR_PlayerTeHuiRechargePrize(curPlayer, actionID, actionNum,
- itemID, itemCnt, isPutIn, index)
-
- # 领奖广播
- RechargeNotifyDict = ReadChConfig.GetEvalChConfig("TeHuiAction_RechargeNotify")
- notifyMark = RechargeNotifyDict.get(actionNum, '')
- if notifyMark:
- PlayerControl.WorldNotify(0, notifyMark, [curPlayer.GetPlayerName(),
- ruleInfo[Recharge_NeedGold]])
-
- # 同步记录
- Sync_RechargeTeHuiInfo(curPlayer)
- return
-
-
-## 通知升阶特惠奖励记录信息
-# @param awardType 默认0为全部同步
-# @return None
-def Sync_ClassUPDayAwardRecord(curPlayer, awardType=0):
-
- awardRecordPack = ChPyNetSendPack.tagMCClassUPDayAwardRecordList()
- awardRecordPack.Clear()
- awardRecordPack.RecordInfoList = []
-
- for dayType in ShareDefine.ClassUPDayList:
-
- if awardType not in [0, dayType]:
- continue
-
- recordObj = ChPyNetSendPack.tagMCClassUPDayAwardRecord()
- recordObj.Clear()
- recordObj.DayType = dayType
- awardRecordKey = ChConfig.Def_PDict_TeHui_ClassUPAwardRecord % dayType
- recordObj.Record = __GetPlayerTeHuiDictValue(curPlayer, awardRecordKey)
- awardRecordPack.RecordInfoList.append(recordObj)
-
- awardRecordPack.RecordCount = len(awardRecordPack.RecordInfoList)
- NetPackCommon.SendFakePack(curPlayer, awardRecordPack)
- return
-
-
-## 通知充值特惠信息
-# @param None
-# @return None
-def Sync_RechargeTeHuiInfo(curPlayer):
- gameWorld = GameWorld.GetGameWorld()
- rechargeActionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_Recharge
- actionNum = gameWorld.GetGameWorldDictByKey(rechargeActionNumKey)
- rechargeActionDict = ReadChConfig.GetEvalChConfig("TeHuiAction_Recharge")
- if actionNum not in rechargeActionDict:
- return
-
- # 当前活动的id(活动设置时的时间用于标识活动唯一)
- actionID = gameWorld.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DayAction_ID
- % ShareDefine.Def_Notify_WorldKey_DayAction_Recharge)
-
- rechargePack = ChPyNetSendPack.tagMCRechargeTeHuiInfoList()
- rechargePack.Clear()
- rechargePack.ActionID = actionID
- rechargePack.TotalGold = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeTotalGold)
- rechargePack.TotalGold = max(__GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeTotalGoldEx),
- rechargePack.TotalGold)
- rechargePack.InfoList = []
-
- ruleList = rechargeActionDict[actionNum]
- for index in range(len(ruleList)):
- rechargeInfo = ChPyNetSendPack.tagMCRechargeTeHuiInfo()
- rechargeInfo.Clear()
- rechargeInfo.CurTotalGold = __GetPlayerTeHuiDictValue(curPlayer,
- ChConfig.Def_PDict_TeHui_RechargeCurTotalGold % index)
- rechargeInfo.CanGetCnt = __GetPlayerTeHuiDictValue(curPlayer,
- ChConfig.Def_PDict_TeHui_RechargeCanGetCnt % index)
- rechargeInfo.GotCnt = __GetPlayerTeHuiDictValue(curPlayer,
- ChConfig.Def_PDict_TeHui_RechargeGotCnt % index)
-
- rechargePack.InfoList.append(rechargeInfo)
-
- rechargePack.InfoCnt = len(rechargePack.InfoList)
-
- NetPackCommon.SendFakePack(curPlayer, rechargePack)
- return
-
-
-## 通知充值排行特惠信息
-# @param None
-# @return None
-def Sync_RechargeRankTeHuiInfo(curPlayer):
- gameWorld = GameWorld.GetGameWorld()
- actionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_RechargeRank
- actionNum = gameWorld.GetGameWorldDictByKey(actionNumKey)
- if not actionNum:
- return
-
- # 当前活动的id(活动设置时的时间用于标识活动唯一)
- actionID = gameWorld.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DayAction_ID % actionNumKey)
-
- rechargePack = ChPyNetSendPack.tagMCRechargeRankTeHuiInfo()
- rechargePack.Clear()
- rechargePack.ActionID = actionID
- totalGold = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeRankTotalGold)
- totalGold = max(__GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_RechargeRankTotalGoldEx), totalGold)
- rechargePack.TotalGold = totalGold
- NetPackCommon.SendFakePack(curPlayer, rechargePack)
- return
-
-
-## 通知消费排行特惠信息
-# @param None
-# @return None
-def Sync_CostRankTeHuiInfo(curPlayer):
- gameWorld = GameWorld.GetGameWorld()
- actionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_CostRank
- actionNum = gameWorld.GetGameWorldDictByKey(actionNumKey)
- if not actionNum:
- return
-
- # 当前活动的id(活动设置时的时间用于标识活动唯一)
- actionID = gameWorld.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DayAction_ID % actionNumKey)
-
- sendPack = ChPyNetSendPack.tagMCCostRankTeHuiInfo()
- sendPack.Clear()
- sendPack.ActionID = actionID
- sendPack.TotalCost = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostRankTotalGold)
- sendPack.TotalCost = max(__GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostRankTotalGoldEx),
- sendPack.TotalCost)
- NetPackCommon.SendFakePack(curPlayer, sendPack)
- return
-
-
-## AA 04 领取消费奖励
-# @param index
-# @param clientData <ActionID-活动ID Index-奖励索引>
-# @param tick
-# @return None
-def OnGetCostProfitAward(index, clientData, tick):
- return
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-
- GameWorld.DebugLog("==[PlayerTeHui]== In->OnGetCostProfitAward(), Name:%s" % curPlayer.GetPlayerName())
-
- actionId = clientData.ActionID
- awardIndex = clientData.Index
-
- dayActionKeyId = ShareDefine.Def_Notify_WorldKey_DayAction_ID
- dayActionKey = ShareDefine.Def_Notify_WorldKey_DayAction_CostProfit
-
- curActionId = GameWorld.GetGameWorld().GetGameWorldDictByKey(dayActionKeyId % dayActionKey)
- if actionId != curActionId:
- GameWorld.DebugLog("OnGetCostProfitAward() action(%s) no equal current action(%s)" % (actionId, curActionId))
- return
-
- gotState = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostAwardState)
- if gotState & pow(2, awardIndex):
- GameWorld.DebugLog("OnGetCostProfitAward() have got award(%s)" % awardIndex)
- return
-
- actionAwardInfoList = __GetCostProfitCfg(curPlayer)
- if not actionAwardInfoList or awardIndex >= len(actionAwardInfoList):
- GameWorld.DebugLog("OnGetCostProfitAward() no configuration action(%s)" % actionId)
- return
-
- actionAwardInfo = actionAwardInfoList[awardIndex]
-
- curGoldNum = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostTotalGold)
- needGoldNum = actionAwardInfo[CostProfit_GoldNum]
- if curGoldNum < needGoldNum:
- GameWorld.DebugLog("OnGetCostProfitAward() current cost(%s) need(%s)" % (curGoldNum, needGoldNum))
- return
-
- packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem)
- needSpace = actionAwardInfo[CostProfit_NeedSpace]
- if packSpace < needSpace:
- GameWorld.DebugLog("OnGetCostProfitAward() pack space(%s) need space(%s)" % (packSpace, needSpace))
- return
-
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostAwardState, gotState | pow(2, awardIndex))
-
- itemInfoList = actionAwardInfo[CostProfit_ItemList]
- for itemId, itemNum, itemIsBind in itemInfoList:
- ItemControler.GivePlayerItem(curPlayer, itemId, itemNum, 0, [IPY_GameWorld.rptItem])
- addDataDict = {"actionId":actionId, "needCostGold":needGoldNum, "costGold":curGoldNum,
- "itemInfoList":str(itemInfoList)}
- DataRecordPack.DR_FuncGiveItem(curPlayer, "CostProfitAward", addDataDict)
-
- Sync_CostProfitInfo(curPlayer)
- GameWorld.DebugLog("==[PlayerTeHui]== Out->OnGetCostProfitAward()")
- return
-
-## 消费记录
-# @param curPlayer
-# @param costType 消费类型
-# @param costGold 消费钻石数
-# @param extraValue 预留信息
-# @return None
-def AddCostProfitGold(curPlayer, costType, costGold, infoDict):
- #===============================================================================================
- # if costGold <= 0:
- # return
- # if costType in ChConfig.CostProfit_CostType:
- # return
- #
- # delNPCIdList = ReadChConfig.GetEvalChConfig("TeHuiAction_CostProfitDelNPCID")
- # if costType == ChConfig.Def_Cost_BuyNPCShopItem:
- # if infoDict.get("NPCID", 0) in delNPCIdList:
- # return
- #
- # __PlayerCostRankAction(curPlayer, costGold)
- #
- # curGoldNum = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostTotalGold)
- # __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostTotalGold, curGoldNum + costGold)
- # Sync_CostProfitInfo(curPlayer)
- #===============================================================================================
- return
-
-## 通知消费返利信息
-# @param curPlayer
-# @return None
-def Sync_CostProfitInfo(curPlayer):
- dayActionKeyId = ShareDefine.Def_Notify_WorldKey_DayAction_ID
- dayActionKey = ShareDefine.Def_Notify_WorldKey_DayAction_CostProfit
- actionId = GameWorld.GetGameWorld().GetGameWorldDictByKey(dayActionKeyId % dayActionKey)
- if actionId <= 0:
- GameWorld.DebugLog("Sync_CostProfitInfo() no open action")
- return
-
- sendPack = ChPyNetSendPack.tagMCCostProfitInfo()
- sendPack.Clear()
- sendPack.ActionID = actionId
- sendPack.TotalCost = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostTotalGold)
- sendPack.AwardState = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostAwardState)
- NetPackCommon.SendFakePack(curPlayer, sendPack)
- return
-
-## 重置消费返利信息
-# @param curPlayer
-# @return None
-def ResetCostProfitInfo(curPlayer):
- __SendCostProfitRepairMail(curPlayer)
-
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostTotalGold, 0)
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostAwardState, 0)
-
- dayActionKey = ShareDefine.Def_Notify_WorldKey_DayAction_CostProfit
- actionIndex = GameWorld.GetGameWorld().GetGameWorldDictByKey(dayActionKey)
- __SetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_LastCostIndex, actionIndex)
-
- Sync_CostProfitInfo(curPlayer)
- return
-
-## 发送补偿邮件
-# @param curPlayer
-# @return None
-def __SendCostProfitRepairMail(curPlayer):
- mailInfo = ReadChConfig.GetEvalChConfig("TeHuiAction_CostProfitMail")
- actionAwardInfoList = __GetCostProfitCfg(curPlayer)
- if not actionAwardInfoList:
- GameWorld.DebugLog("__SendCostProfitRepairMail() no configuration")
- return
- awardNum = len(actionAwardInfoList)
-
- gotState = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostAwardState)
- if gotState >= pow(2, awardNum + 1) - 1:
- GameWorld.DebugLog("__SendCostProfitRepairMail() reward got finish")
- return
-
- curGoldNum = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_CostTotalGold)
-
- for i in range(awardNum):
- if gotState & pow(2, i):
- continue
-
- actionAwardInfo = actionAwardInfoList[i]
- itemInfoList = actionAwardInfo[CostProfit_ItemList]
- costGoldNum = actionAwardInfo[CostProfit_GoldNum]
- if curGoldNum < costGoldNum:
- GameWorld.DebugLog("__SendCostProfitRepairMail() cost(%s) gold no enough(%s)"
- % (curGoldNum, costGoldNum))
- return
-
- mailTitle = mailInfo[0]
- mailDay = mailInfo[1]
- mailContent = mailInfo[2] % costGoldNum
- playerIdList = [curPlayer.GetPlayerID()]
- if not PlayerControl.SendMail(mailTitle, mailContent, mailDay, playerIdList, itemInfoList):
- GameWorld.ErrLog("__SendCostProfitRepairMail() repair(%s) mail send fail" % i)
- return
-
-## 获取消费返利配置信息
-# @param None
-# @return 配置信息列表
-def __GetCostProfitCfg(curPlayer):
- costProfitDict = ReadChConfig.GetEvalChConfig("TeHuiAction_CostProfitAward")
- lastCostIndex = __GetPlayerTeHuiDictValue(curPlayer, ChConfig.Def_PDict_TeHui_LastCostIndex)
- actionAwardInfoList = costProfitDict.get(lastCostIndex, [])
- if not actionAwardInfoList:
- GameWorld.DebugLog("__GetCostProfitCfg() no configuration action index(%s)" % lastCostIndex)
-
- return actionAwardInfoList
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_ShopItem.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_ShopItem.py
deleted file mode 100644
index d3cea84..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_ShopItem.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-#
-##@package Player.RemoteQuery.GY_Query_ShopItem
-#
-# @todo:自定义商店
-# @author hxp
-# @date 2014-06-21
-# @version 1.0
-#
-# 详细描述: 自定义商店
-#
-#---------------------------------------------------------------------
-"""Version = 2014-06-21 15:20"""
-
-import GameWorld
-import ShareDefine
-import ShopItemManage
-
-
-#逻辑实现
-## 请求逻辑
-# @param query_Type 请求类型
-# @param query_ID 请求的玩家ID
-# @param packCMDList 发包命令 [ ]
-# @param tick 当前时间
-# @return "True" or "False" or ""
-# @remarks 函数详细说明.
-def DoLogic(query_Type, query_ID, packCMDList, tick):
- return packCMDList
-
-#---------------------------------------------------------------------
-#执行结果
-## 执行结果
-# @param curPlayer 发出请求的玩家
-# @param callFunName 功能名称
-# @param funResult 查询的结果
-# @param tick 当前时间
-# @return None
-# @remarks 函数详细说明.
-def DoResult(curPlayer, callFunName, funResult, tick):
- if funResult == '':
- return
- GameWorld.Log("GY_Query_ShopItem DoResult funResult=%s" % funResult)
- #还原格式 '[]' -> []
- funResult = eval(funResult)
- queryType = funResult[0]
-
- # 同步购买次数[queryType, shopID, buyCntDict]
- if queryType == ShareDefine.Def_ShopItem_QueryServerBuyCnt:
- shopID = funResult[1]
- buyCntDict = funResult[2] # 全服已购买次数字典
- ShopItemManage.Send_ShopItemAllBuyCntInfo(curPlayer, shopID, buyCntDict)
-
- # 购买物品[queryType, shopID, itemShopIndex, buyCount, canBuy, serverBuyCnt]
- elif queryType == ShareDefine.Def_ShopItem_BuyItem:
- shopID = funResult[1]
- itemShopIndex = funResult[2]
- buyCount = funResult[3]
- canBuy = funResult[4] # 反馈的可否购买
- serverBuyCnt = funResult[5] # 更新后的全服限购次数
-
- # 不可以买,不处理
- if not canBuy:
- GameWorld.DebugLog(" GameServer反馈不可购买!")
- return
-
- itemInfoDict = ShopItemManage.GetShopItemInfoDict(shopID, itemShopIndex)
- if not itemInfoDict:
- return
-
- ShopItemManage.DoBuyShopItem(curPlayer, itemInfoDict, buyCount, serverBuyCnt)
-
- # 清空全服限购次数[queryType, shopID]
- elif queryType == ShareDefine.Def_ShopItem_ClearBuyCnt:
- shopID = funResult[1]
- shopItemList = ShopItemManage.GetShopItemList(shopID)
-
- ShopItemManage.Send_ShopItem(curPlayer, shopItemList)
- ShopItemManage.ClearPlayerShopItemBuyCnt(curPlayer, shopID)
- ShopItemManage.Send_ShopItemAllBuyCntInfo(curPlayer, shopID, {})
-
- # 同步单品限购次数[queryType, shopID, itemShopIndex, serverBuyCnt]
- elif queryType == ShareDefine.Def_ShopItem_SyncServerBuyCnt:
- shopID = funResult[1]
- itemShopIndex = funResult[2]
- serverBuyCnt = funResult[3]
- ShopItemManage.Send_ShopItemBuyCntInfo(curPlayer, shopID, [itemShopIndex],
- {itemShopIndex:serverBuyCnt})
-
- else:
- pass
-
- return
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 64ae39c..7e0f897 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -195,19 +195,6 @@
Def_Notify_WorldKey_ManorWarLastFamilyID = 'ManorWarLastFamilyID_%s' # 领地争夺上次占领的战盟id,%s地图id
Def_Notify_WorldKey_ManorWarServerDay = 'ManorWarServerDay' # 领地战活动时的开服天数
-Def_Notify_WorldKey_DayAction_ID = "%s_ID" # 按天开启的活动唯一id,参数为活动标识key
-Def_Notify_WorldKey_DayAction_BeginTime = "%s_BT" # 按天开启的活动开始时间,参数为活动标识key
-Def_Notify_WorldKey_DayAction_EndTime = "%s_ET" # 按天开启的活动结束时间,参数为活动标识key
-Def_Notify_WorldKey_DayAction_ClassUPNum = "DA_ClassUPNum" # 按天开启的活动标识key - 升阶特惠活动编号
-Def_Notify_WorldKey_DayAction_Recharge = "DA_Recharge" # 按天开启的活动标识key - 充值特惠
-Def_Notify_WorldKey_DayAction_DiscountShop = "DA_DiscountShop" # 按天开启的活动标识key - 折扣店
-Def_Notify_WorldKey_DayAction_RechargeRank = "DA_RechargeRank" # 按天开启的活动标识key - 充值排行榜特惠
-Def_Notify_WorldKey_DayAction_MixDiscountShop = "DA_MixDiscountShop" # 按天开启的活动标识key - 合服折扣店
-Def_Notify_WorldKey_DayAction_CostProfit = "DA_CostProfit" # 按天开启的活动标识key - 消费返利
-Def_Notify_WorldKey_DayAction_CostRank = "DA_CostRank" # 按天开启的活动标识key - 消费特惠排行榜
-
-Def_Notify_WorldKey_ShopState = 'ShopState_%s' # 自定义商店开启状态, 参数为ShopID
-Def_Notify_WorldKey_TimeShopRefreshTime = 'TimeShopRefreshTime_%s' # 定时商店上次全服刷新时间
Def_Notify_WorldKey_ActionBuffState = 'ActionBuffState_%s' # 活动玩家buff状态, 1-可加,0-不可添加; 参数为buffID
Def_Notify_WorldKey_LoginAwardStartDate = 'LoginAwardStartDate_%s' # 登录领取奖励开始时间,参数为活动类型
@@ -647,14 +634,9 @@
Def_BT_HighLadder, #天梯竞技场排行
Def_BT_HighLadder_Yester, #天梯竞技场昨日排行
- Def_BT_RechargeTeHuiLast, #充值特惠活动排行榜-上一期记录
- Def_BT_RechargeTeHui, #充值特惠活动排行榜-当前期记录
-
- Def_BT_CostTeHui, #消费特惠排行榜
- Def_BT_CostTeHuiLast, #消费特惠排行榜上一期
Def_BT_Max, #排行榜最大类型
-) = range(0, 30 + 2)
+) = range(0, 26 + 2)
#职业对应战力排行榜类型
JobFightPowerBillboardDict = {
@@ -1061,7 +1043,7 @@
Def_UniversalGameRecType_32,
Def_UniversalGameRecType_ManorWarInfo, # 领地争夺战占领结果33
Def_UniversalGameRecType_34,
- Def_UniversalGameRecType_ShopItem, # 自定义商店全服限购数据35
+ Def_UniversalGameRecType_35,
Def_UniversalGameRecType_36,
Def_UniversalGameRecType_37,
Def_UniversalGameRecType_38,
@@ -1500,59 +1482,6 @@
Difficulty_Elite, # 精英
Difficulty_Hero, # 英雄
) = range(3)
-
-# 称号类型定义,需与\PySysDB\tagDienstgrad.txt表中的类型Type一致,从1开始
-(
-Def_DienstgradType_Flower, # 鲜花称号
-) = range(1, 2)
-
-# 特惠活动类型
-TeHuiActivityList = (
-TeHuiActivity_Recharge, # 0充值特惠
-TeHuiActivity_ClassUP, # 功能升阶特惠
-TeHuiActivity_DiscountShop, # 折扣店特惠
-TeHuiActivity_RechargeRank, # 充值排行特惠/合服每日充值排行榜
-TeHuiActivity_MixDiscountShop, # 合服折扣店特惠
-TeHuiActivity_CostProfit, # 5消费返利
-TeHuiActivity_CostRank, # 消费排行榜
-) = range(1, 7 + 1)
-
-
-# 特惠活动类型对应的Key
-TeHuiTypeKeyDict = {
-TeHuiActivity_Recharge:Def_Notify_WorldKey_DayAction_Recharge,
-TeHuiActivity_ClassUP:Def_Notify_WorldKey_DayAction_ClassUPNum,
-TeHuiActivity_DiscountShop:Def_Notify_WorldKey_DayAction_DiscountShop,
-TeHuiActivity_RechargeRank:Def_Notify_WorldKey_DayAction_RechargeRank,
-TeHuiActivity_MixDiscountShop:Def_Notify_WorldKey_DayAction_MixDiscountShop,
-TeHuiActivity_CostProfit:Def_Notify_WorldKey_DayAction_CostProfit,
-TeHuiActivity_CostRank:Def_Notify_WorldKey_DayAction_CostRank,
-}
-
-# 功能升阶日类型
-ClassUPDayList = (
-ClassUPDay_Horse, # 坐骑
-ClassUPDay_Wing, # 翅膀
-ClassUPDay_Office # 官爵
-) = range(1, 3 + 1)
-
-# 总动员类型
-Def_ZDY_List = (
-Def_ZDY_Horse, # 坐骑
-Def_ZDY_Wing, # 翅膀
-Def_ZDY_Office, # 官爵
-Def_ZDY_Pet, # 宠物
-Def_ZDY_FightPower, # 战力
-) = range(1, 5 + 1)
-
-# 自定义商店查询定义
-(
-Def_ShopItem_QueryServerBuyCnt, # 查询全部全服限购数据
-Def_ShopItem_BuyItem, # 购买物品
-Def_ShopItem_ClearBuyCnt, # 重置全服限购数据
-Def_ShopItem_SyncServerBuyCnt, # 同步单品全服限购数据
-) = range(4)
-
# 每日活动编号定义
DailyActionIDList = (
--
Gitblit v1.8.0