6373 【后端】【2.0】删除无用功能代码、封包、配置(页游节日集字)
11个文件已修改
1个文件已删除
1024 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAction.py 568 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -12731,84 +12731,6 @@
#------------------------------------------------------
# AB 06 活动物品兑换 #tagCMExchangeActionItem
class  tagCMExchangeActionItem(Structure):
    Head = tagHead()
    ActionKeyLen = 0    #(BYTE ActionKeyLen)
    ActionKey = ""    #(String ActionKey)
    ItemID = 0    #(DWORD ItemID)// 兑换的目标物品ID
    ExcCnt = 0    #(WORD ExcCnt)// 兑换个数,默认1个
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xAB
        self.Head.SubCmd = 0x06
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.ActionKeyLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.ActionKey,_pos = CommFunc.ReadString(_lpData, _pos,self.ActionKeyLen)
        self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.ExcCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xAB
        self.Head.SubCmd = 0x06
        self.ActionKeyLen = 0
        self.ActionKey = ""
        self.ItemID = 0
        self.ExcCnt = 0
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += len(self.ActionKey)
        length += 4
        length += 2
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.ActionKeyLen)
        data = CommFunc.WriteString(data, self.ActionKeyLen, self.ActionKey)
        data = CommFunc.WriteDWORD(data, self.ItemID)
        data = CommFunc.WriteWORD(data, self.ExcCnt)
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                ActionKeyLen:%d,
                                ActionKey:%s,
                                ItemID:%d,
                                ExcCnt:%d
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.ActionKeyLen,
                                self.ActionKey,
                                self.ItemID,
                                self.ExcCnt
                                )
        return DumpString
m_NAtagCMExchangeActionItem=tagCMExchangeActionItem()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMExchangeActionItem.Head.Cmd,m_NAtagCMExchangeActionItem.Head.SubCmd))] = m_NAtagCMExchangeActionItem
#------------------------------------------------------
# AB 07 领取节日登陆奖励 #tagCMGetFestivalLoginAward
class  tagCMGetFestivalLoginAward(Structure):
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -25942,138 +25942,6 @@
#------------------------------------------------------
# AB 06 活动物品兑换次数记录 #tagMCExchangeActionItemCntRecord
class  tagMCExchangeActionItemCnt(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("ItemID", c_int),
                  ("ExcCnt", c_int),    # 已兑换次数
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xAB
        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 = 0xAB
        self.SubCmd = 0x06
        self.ItemID = 0
        self.ExcCnt = 0
        return
    def GetLength(self):
        return sizeof(tagMCExchangeActionItemCnt)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// AB 06 活动物品兑换次数记录 //tagMCExchangeActionItemCntRecord:
                                Cmd:%s,
                                SubCmd:%s,
                                ItemID:%d,
                                ExcCnt:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.ItemID,
                                self.ExcCnt
                                )
        return DumpString
class  tagMCExchangeActionItemCntRecord(Structure):
    Head = tagHead()
    ActionKeyLen = 0    #(BYTE ActionKeyLen)
    ActionKey = ""    #(String ActionKey)
    RecordCnt = 0    #(BYTE RecordCnt)
    RecordList = list()    #(vector<tagMCExchangeActionItemCnt> RecordList)
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xAB
        self.Head.SubCmd = 0x06
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.ActionKeyLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.ActionKey,_pos = CommFunc.ReadString(_lpData, _pos,self.ActionKeyLen)
        self.RecordCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.RecordCnt):
            temRecordList = tagMCExchangeActionItemCnt()
            _pos = temRecordList.ReadData(_lpData, _pos)
            self.RecordList.append(temRecordList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xAB
        self.Head.SubCmd = 0x06
        self.ActionKeyLen = 0
        self.ActionKey = ""
        self.RecordCnt = 0
        self.RecordList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += len(self.ActionKey)
        length += 1
        for i in range(self.RecordCnt):
            length += self.RecordList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.ActionKeyLen)
        data = CommFunc.WriteString(data, self.ActionKeyLen, self.ActionKey)
        data = CommFunc.WriteBYTE(data, self.RecordCnt)
        for i in range(self.RecordCnt):
            data = CommFunc.WriteString(data, self.RecordList[i].GetLength(), self.RecordList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                ActionKeyLen:%d,
                                ActionKey:%s,
                                RecordCnt:%d,
                                RecordList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.ActionKeyLen,
                                self.ActionKey,
                                self.RecordCnt,
                                "..."
                                )
        return DumpString
m_NAtagMCExchangeActionItemCntRecord=tagMCExchangeActionItemCntRecord()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCExchangeActionItemCntRecord.Head.Cmd,m_NAtagMCExchangeActionItemCntRecord.Head.SubCmd))] = m_NAtagMCExchangeActionItemCntRecord
#------------------------------------------------------
# AB 07 节日活动奖励状态 #tagMCFestivalLoginAwardState
class  tagMCFestivalLoginAwardState(Structure):
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -195,8 +195,6 @@
Def_Notify_WorldKey_ManorWarLastFamilyID = 'ManorWarLastFamilyID_%s'  # 领地争夺上次占领的战盟id,%s地图id
Def_Notify_WorldKey_ManorWarServerDay = 'ManorWarServerDay' # 领地战活动时的开服天数
Def_Notify_WorldKey_ActionBuffState = 'ActionBuffState_%s'   # 活动玩家buff状态, 1-可加,0-不可添加; 参数为buffID
Def_Notify_WorldKey_LoginAwardStartDate = 'LoginAwardStartDate_%s'   # 登录领取奖励开始时间,参数为活动类型
Def_Notify_WorldKey_LoginAwardEndDate = 'LoginAwardEndDate_%s'   # 登录领取奖励结束时间,参数为活动类型
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -691,18 +691,6 @@
PacketSubCMD_6=0x06
PacketCallFunc_6=OverTruck
;活动
[PlayerAction]
ScriptName = Player\PlayerAction.py
Writer = hxp
Releaser = hxp
RegType = 0
RegisterPackCount = 1
PacketCMD_1=0xAB
PacketSubCMD_1=0x06
PacketCallFunc_1=OnExchangeActionItem
;玩家查看数据缓存
[PlayerViewCache]
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3496,8 +3496,6 @@
Def_PDict_MixLoginDay = "MixLoginDay"  # 合服首登处理标记天
Def_PDict_ExcActionItemCnt = "ExcI_%s_%s"  # 活动兑换物品已兑换次数,参数(活动key,兑换物品对应次数编号标识)
Def_PDict_AddPointValue = "AddPointValue_%s"  # 已加属性点数, 参数(属性ID)
Def_PDict_AttrFruitEatCnt = "AttrFruitEatCnt_%s"  # 已吃属性果实个数,参数为物品id
Def_PDict_AttrFruitAddValue = "AttrFruitAddValue_%s"  # 已吃属性果实增加的属性,参数为物品id
@@ -3516,8 +3514,6 @@
Def_PDict_HaveRecover = "HaveRecover_%s" # 资源找回今日是否已找回<%s-找回项索引>
Def_PDict_RecoverGainLastTime = "RecoverGainLastTime" # 上一次资源找回时的时间
Def_PDict_ActionItemDropTime = "ActionItemDropTime_%s"   # 活动物品掉落周期控制, 记录上次掉落时间, 参数为ItemID
Def_PDict_NPCKillCount = "NPCKillCount_%s"   # NPC已击杀次数, 参数(NPCID) CCBBAA, AA存储公共装备次数,BB存储公共ID次数,CC存储私有次数
Def_PDict_RedPacketInviteGet = "RedPacketInviteGet"  # 红包邀请领取
@@ -4628,11 +4624,10 @@
Def_Cost_BuyStallItem, # 购买摆摊物品
Def_Cost_Warehouse, # 仓库
Def_Cost_BuyItemBack, # 回购
Def_Cost_ExchangeActionItem, # 活动物品兑换
Def_Cost_Trade, # 交易
Def_Cost_Rename, # 改名
Def_Cost_SkillLvUp, # 技能升级
) = range(2000, 2000 + 59)
) = range(2000, 2000 + 58)
Def_Cost_Reason_SonKey = "reason_name_son" # 消费点原因子类说明key
@@ -4698,7 +4693,6 @@
Def_Cost_Transport:"Transport",
Def_Cost_OffLineExp:"OffLineExp",
Def_Cost_GameServer:"GameServer",
Def_Cost_ExchangeActionItem:"ExchangeActionItem",
Def_Cost_Reincarnation:"Reincarnation",
Def_Cost_BuyStallItem:"BuyStallItem",
Def_Cost_Trade:"Trade",
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -12731,84 +12731,6 @@
#------------------------------------------------------
# AB 06 活动物品兑换 #tagCMExchangeActionItem
class  tagCMExchangeActionItem(Structure):
    Head = tagHead()
    ActionKeyLen = 0    #(BYTE ActionKeyLen)
    ActionKey = ""    #(String ActionKey)
    ItemID = 0    #(DWORD ItemID)// 兑换的目标物品ID
    ExcCnt = 0    #(WORD ExcCnt)// 兑换个数,默认1个
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xAB
        self.Head.SubCmd = 0x06
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.ActionKeyLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.ActionKey,_pos = CommFunc.ReadString(_lpData, _pos,self.ActionKeyLen)
        self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.ExcCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xAB
        self.Head.SubCmd = 0x06
        self.ActionKeyLen = 0
        self.ActionKey = ""
        self.ItemID = 0
        self.ExcCnt = 0
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += len(self.ActionKey)
        length += 4
        length += 2
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.ActionKeyLen)
        data = CommFunc.WriteString(data, self.ActionKeyLen, self.ActionKey)
        data = CommFunc.WriteDWORD(data, self.ItemID)
        data = CommFunc.WriteWORD(data, self.ExcCnt)
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                ActionKeyLen:%d,
                                ActionKey:%s,
                                ItemID:%d,
                                ExcCnt:%d
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.ActionKeyLen,
                                self.ActionKey,
                                self.ItemID,
                                self.ExcCnt
                                )
        return DumpString
m_NAtagCMExchangeActionItem=tagCMExchangeActionItem()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMExchangeActionItem.Head.Cmd,m_NAtagCMExchangeActionItem.Head.SubCmd))] = m_NAtagCMExchangeActionItem
#------------------------------------------------------
# AB 07 领取节日登陆奖励 #tagCMGetFestivalLoginAward
class  tagCMGetFestivalLoginAward(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -25942,138 +25942,6 @@
#------------------------------------------------------
# AB 06 活动物品兑换次数记录 #tagMCExchangeActionItemCntRecord
class  tagMCExchangeActionItemCnt(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("ItemID", c_int),
                  ("ExcCnt", c_int),    # 已兑换次数
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xAB
        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 = 0xAB
        self.SubCmd = 0x06
        self.ItemID = 0
        self.ExcCnt = 0
        return
    def GetLength(self):
        return sizeof(tagMCExchangeActionItemCnt)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// AB 06 活动物品兑换次数记录 //tagMCExchangeActionItemCntRecord:
                                Cmd:%s,
                                SubCmd:%s,
                                ItemID:%d,
                                ExcCnt:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.ItemID,
                                self.ExcCnt
                                )
        return DumpString
class  tagMCExchangeActionItemCntRecord(Structure):
    Head = tagHead()
    ActionKeyLen = 0    #(BYTE ActionKeyLen)
    ActionKey = ""    #(String ActionKey)
    RecordCnt = 0    #(BYTE RecordCnt)
    RecordList = list()    #(vector<tagMCExchangeActionItemCnt> RecordList)
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xAB
        self.Head.SubCmd = 0x06
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.ActionKeyLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.ActionKey,_pos = CommFunc.ReadString(_lpData, _pos,self.ActionKeyLen)
        self.RecordCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.RecordCnt):
            temRecordList = tagMCExchangeActionItemCnt()
            _pos = temRecordList.ReadData(_lpData, _pos)
            self.RecordList.append(temRecordList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xAB
        self.Head.SubCmd = 0x06
        self.ActionKeyLen = 0
        self.ActionKey = ""
        self.RecordCnt = 0
        self.RecordList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += len(self.ActionKey)
        length += 1
        for i in range(self.RecordCnt):
            length += self.RecordList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.ActionKeyLen)
        data = CommFunc.WriteString(data, self.ActionKeyLen, self.ActionKey)
        data = CommFunc.WriteBYTE(data, self.RecordCnt)
        for i in range(self.RecordCnt):
            data = CommFunc.WriteString(data, self.RecordList[i].GetLength(), self.RecordList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                ActionKeyLen:%d,
                                ActionKey:%s,
                                RecordCnt:%d,
                                RecordList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.ActionKeyLen,
                                self.ActionKey,
                                self.RecordCnt,
                                "..."
                                )
        return DumpString
m_NAtagMCExchangeActionItemCntRecord=tagMCExchangeActionItemCntRecord()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCExchangeActionItemCntRecord.Head.Cmd,m_NAtagMCExchangeActionItemCntRecord.Head.SubCmd))] = m_NAtagMCExchangeActionItemCntRecord
#------------------------------------------------------
# AB 07 节日活动奖励状态 #tagMCFestivalLoginAwardState
class  tagMCFestivalLoginAwardState(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -37,7 +37,6 @@
import ShareDefine
import ChItem
#import AICommon
import PlayerAction
import ChPyNetSendPack
import DataRecordPack
import NetPackCommon
@@ -4420,8 +4419,7 @@
        lastTimeHurtObj = self.__FindLastTimeHurtObj()
        if lastTimeHurtObj[0] == None and lastTimeHurtObj[1] == None:
            return
        PlayerAction.GetAwardOnKillNPC(lastTimeHurtObj, curNPC)
        return
    
    ## 最后一击处理
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -649,9 +649,6 @@
    # 投资理财
    PlayerGoldInvest.OnLogin(curPlayer)
#    
#    #节日活动
#    PlayerAction.ActionOnLogin(curPlayer)
#
#    #属性果实使用情况
    PlayerAttrFruit.AttrFruitOnLogin(curPlayer)
#    
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAction.py
File was deleted
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
@@ -54,7 +54,6 @@
import PlayerGoldGift
import PlayerActivity
import PlayerBindJadeWheel
import PlayerAction
import FBCommon
import PlayerSuccess
import PlayerFreeGoods
@@ -1429,10 +1428,6 @@
    # 王者仙盟
    elif key == ShareDefine.Def_Notify_WorldKey_ChampionFamilyID:
        GameLogic_FamilyWar.OnChampionFamilyIDChange()
    # 活动buff状态变更
    elif key.startswith(ShareDefine.Def_Notify_WorldKey_ActionBuffState[:-2]):
        PlayerAction.OnActionBuffStateChange(key, tick)
        
#===============================================================================
#    ---修改为上述的 统一字典处理
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -195,8 +195,6 @@
Def_Notify_WorldKey_ManorWarLastFamilyID = 'ManorWarLastFamilyID_%s'  # 领地争夺上次占领的战盟id,%s地图id
Def_Notify_WorldKey_ManorWarServerDay = 'ManorWarServerDay' # 领地战活动时的开服天数
Def_Notify_WorldKey_ActionBuffState = 'ActionBuffState_%s'   # 活动玩家buff状态, 1-可加,0-不可添加; 参数为buffID
Def_Notify_WorldKey_LoginAwardStartDate = 'LoginAwardStartDate_%s'   # 登录领取奖励开始时间,参数为活动类型
Def_Notify_WorldKey_LoginAwardEndDate = 'LoginAwardEndDate_%s'   # 登录领取奖励结束时间,参数为活动类型