From 3b9231c63cdeb20e273cdff217e8673f18d338ce Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 26 三月 2019 17:45:03 +0800
Subject: [PATCH] 6373 【后端】【2.0】删除无用功能代码、封包、配置(页游节日集字)
---
/dev/null | 568 -------------------------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini | 12
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 78 ----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 132 -------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 4
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 78 ----
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py | 5
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 132 -------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 8
12 files changed, 2 insertions(+), 1,022 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 1886fdd..237882b 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/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):
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 1e30bb9..3be2ddf 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/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):
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index 46d0bae..2a0215c 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/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' # 登录领取奖励结束时间,参数为活动类型
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
index c660910..1d2c205 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
+++ b/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]
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index e3b5839..7d8cc7e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/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",
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 1886fdd..237882b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/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):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 1e30bb9..3be2ddf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/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):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 1128d84..15d6446 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/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
## 最后一击处理
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 2d2d3e2..ccbac65 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -649,9 +649,6 @@
# 投资理财
PlayerGoldInvest.OnLogin(curPlayer)
#
-# #节日活动
-# PlayerAction.ActionOnLogin(curPlayer)
-#
# #属性果实使用情况
PlayerAttrFruit.AttrFruitOnLogin(curPlayer)
#
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAction.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAction.py
deleted file mode 100644
index b7dcf05..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAction.py
+++ /dev/null
@@ -1,568 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-#
-##@package PlayerAction
-#
-# @todo:玩家活动模块
-# @author hxp
-# @date 2013-12-23 14:00
-# @version 2.0
-#
-# @change: "2014-10-29 15:30" hxp 增加节日兑换物品活动
-# @change: "2014-12-03 21:30" hxp 根据时间活动添加玩家buff
-# @change: "2014-12-06 22:30" hxp 活动buff状态变更
-# @change: "2015-01-06 13:30" hxp 增加找不到buff技能数据防错; 增加兑换物品广播支持
-# @change: "2015-01-06 21:00" hxp 增加根据活动key重置物品兑换记录
-# @change: "2015-03-21 21:30" hxp 增加个人掉落周期控制
-# @change: "2015-04-15 19:30" hxp 增加背包中个数限制
-# @change: "2015-04-28 16:00" hxp 物品兑换支持兑换多个物品
-# @change: "2016-08-30 21:30" hxp 全服广播优化
-# @change: "2016-09-19 10:30" hxp 全服玩家人数获取方式修改
-#
-# 详细描述: 玩家活动模块
-#
-#---------------------------------------------------------------------
-#"""Version = 2016-09-19 10:30"""
-#---------------------------------------------------------------------
-
-import ReadChConfig
-import GameWorld
-import PlayerControl
-import ItemCommon
-import ItemControler
-import IPY_GameWorld
-import ChPyNetSendPack
-import DataRecordPack
-import NetPackCommon
-import ShareDefine
-import SkillCommon
-import SkillShell
-import BuffSkill
-import ChConfig
-
-import math
-import time
-
-#----------------------------------------------------------------------
-
-# 奖励信息索引定义
-(
-Def_AwardInfo_PlayerMinLV, # 参与活动玩家最低等级限制
-Def_AwardInfo_DropRate, # 掉落活动物品概率
-Def_AwardInfo_RandomItemList, # 随机物品列表
-Def_AwardInfo_ItemInfoDict, # 物品相关信息
-) = range(4)
-
-# 物品信息索引定义
-(
-Def_ItemInfo_IsBind, # 是否绑定
-Def_ItemInfo_Circle, # 掉落周期,秒
-Def_ItemInfo_CircleSelf, # 个人掉落周期,秒
-Def_ItemInfo_MaxCnt, # 背包中最大个数
-) = range(4)
-
-##获取击杀NPC活动物品奖励
-# @param lastTimeHurtObj 补刀者(玩家,组队)
-# @param curNPC 击杀的NPC
-# @return None
-def GetAwardOnKillNPC(lastTimeHurtObj, curNPC):
- actionAward = ReadChConfig.GetEvalChConfig("PlayerActionAward")
- if not actionAward:
- GameWorld.ErrLog("Info is null! Please check PlayerActionAward.txt!")
- return
-
- gameWorldMgr = GameWorld.GetGameWorld()
- tick = GameWorld.GetGameWorld().GetTick()
- for keyInfo, awardInfo in actionAward.items():
-
- if len(keyInfo) != 2:
- GameWorld.ErrLog("keyInfo=%s len!=2 error! Check PlayerActionAward.txt!" % str(keyInfo))
- continue
-
- if gameWorldMgr.GetGameWorldDictByKey(keyInfo[0]) != keyInfo[1]:
- #GameWorld.DebugLog("keyInfo[0]=%s,keyInfo[1]=%s" % (keyInfo[0], keyInfo[1]))
- continue
-
- if len(awardInfo) != 4:
- GameWorld.ErrLog("keyInfo=%s awardInfo len!=4 error! Check PlayerActionAward.txt!" % str(keyInfo))
- continue
-
- curPlayer, curTeam = lastTimeHurtObj
-
- #补刀是玩家
- if curPlayer:
- __DoPlayerGetActionAward(keyInfo, curPlayer, curNPC, awardInfo, tick)
-
- #补刀是组队
- elif curTeam:
- #队员列表
- playerlist = PlayerControl.GetAreaTeamMember(curTeam, curNPC.GetPosX(), curNPC.GetPosY())
- #遍历组队队员进行分享连斩数和经验加成
- for curPlayer in playerlist:
- __DoPlayerGetActionAward(keyInfo, curPlayer, curNPC, awardInfo, tick)
-
- return
-
-
-##对单个玩家进行击杀NPC活动领奖处理
-# @param keyInfo 活动key信息
-# @param curPlayer 玩家实例
-# @param curNPC 击杀的NPC
-# @param awardInfo 奖励信息
-# @param tick 时间
-# @return None
-def __DoPlayerGetActionAward(keyInfo, curPlayer, curNPC, awardInfo, tick):
- playerID = curPlayer.GetPlayerID()
-
- if curPlayer.GetLV() < awardInfo[Def_AwardInfo_PlayerMinLV]:
- #GameWorld.DebugLog("__DoPlayerGetActionAward playerLV Limit!")
- return
-
- npcLV = curNPC.GetLV()
- curPlayerLV = curPlayer.GetLV()
- #GameWorld.DebugLog("curPlayerLV=%s" % curPlayerLV)
- modulus = 1
- rate = awardInfo[Def_AwardInfo_DropRate] * modulus
- #GameWorld.DebugLog("__DoPlayerGetActionAward modulus=%s,rate=%s" % (modulus, rate))
- if not GameWorld.CanHappen(rate):
- return
-
- itemID = GameWorld.GetResultByRandomList(awardInfo[Def_AwardInfo_RandomItemList])
-
- itemInfoDict = awardInfo[Def_AwardInfo_ItemInfoDict]
- if not itemInfoDict:
- return
-
- itemInfo = itemInfoDict.get(itemID, [])
- if not itemInfo:
- GameWorld.ErrLog("itemInfo Error! Check PlayerActionAward.txt! itemID=%s,awardInfo=%s,"
- % (itemID, str(awardInfo)))
- return
-
- #GameWorld.DebugLog("__DoPlayerGetActionAward itemID=%s,itemInfo=%s" % (itemID, str(itemInfo)))
- # 检查掉落周期
- circleTime = itemInfo[Def_ItemInfo_Circle]
- if circleTime > 0:
- # keyName_sign_itemID
- lastDropTickKey = "%s_%s_%d" % (keyInfo[0], keyInfo[1], itemID)
- gameWorldMgr = GameWorld.GetGameWorld()
- lastDropTick = gameWorldMgr.GetGameWorldDictByKey(lastDropTickKey)
- # 掉落周期限制
- if tick - lastDropTick < circleTime * 1000:
- return
- #GameWorld.DebugLog("lastDropTickKey=%s,lastDropTick=%s,tick=%s,circleTime=%s,passTime=%s"
- # % (lastDropTickKey, lastDropTick, tick, circleTime * 1000, tick - lastDropTick))
- GameWorld.GetGameWorld().SetGameWorldDict(lastDropTickKey, tick)
-
- # 个人掉落周期
- if len(itemInfo) > Def_ItemInfo_CircleSelf:
- circleTimeSelf = itemInfo[Def_ItemInfo_CircleSelf]
- if circleTimeSelf > 0:
- lastDropTimeSelfKey = ChConfig.Def_PDict_ActionItemDropTime % itemID
- lastDropTime = curPlayer.NomalDictGetProperty(lastDropTimeSelfKey)
- curTime = int(time.time())
- if curTime - lastDropTime < circleTimeSelf:
- return
- PlayerControl.NomalDictSetProperty(curPlayer, lastDropTimeSelfKey, curTime)
-
- # 背包中个数限制
- if len(itemInfo) > Def_ItemInfo_MaxCnt:
- packMaxItemCnt = itemInfo[Def_ItemInfo_MaxCnt]
- itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
- hasEnough = ItemCommon.GetItem_FromPack_ByID(itemID, itemPack, packMaxItemCnt)[0]
- if hasEnough:
- #GameWorld.DebugLog("活动物品已达到背包最大个数=%s,不能再掉了!" % packMaxItemCnt)
- return
-
- # 给物品
- giveItem = ItemCommon.CreateSingleItem(itemID)
-
- if not giveItem:
- GameWorld.ErrLog('__DoPlayerGetActionAward giveItemErr=%s' % (itemID), playerID)
- return
-
- itemControler = ItemControler.PlayerItemControler(curPlayer)
- if not itemControler.PutInItem(IPY_GameWorld.rptItem, giveItem):
- giveItem.Clear()
- return
-
- #PlayerControl.NotifyCode(curPlayer, "ObtainRes01", [itemID, 1])
- return
-
-
-##-----------------------------活动兑换物品-------------------------------
-
-# 活动兑换配置索引
-(
-Def_ExcCfg_GameWorldActionKey, # 对应活动key
-Def_ExcCfg_ActionState, # 可兑换物品的活动状态
-Def_ExcCfg_RecordResetWay, # 兑换次数重置方式 0-活动中不重置, 1-活动中过天重置
-Def_ExcCfg_ItemDict, # 兑换物品信息
-) = range(4)
-
-
-# 兑换物品信息配置索引
-(
-Def_ExcItem_RecordMark, # 兑换记录编号标识, 从0开始依次递增
-Def_ExcItem_GetCnt, # 单次兑换可获得的个数
-Def_ExcItem_MaxCnt, # 最大可兑换次数
-Def_ExcItem_CostItem, # 消耗材料列表[(消耗物品ID,个数),(消耗物品ID,个数),...]
-Def_ExcItem_CostMoney, # [消耗货币类型, 货币数]
-Def_ExcItem_NotifyMark, # 全服广播mark, 参数[玩家名,itemID,itemID]
-Def_ExcItem_NeedSpace, # 所需格子数
-Def_ExcItem_GiveItem, # 给予的物品列表, 如果该配置空则默认取key作为itemID
-) = range(8)
-
-
-## 节日活动玩家登录
-# @param curPlayer
-# @return None
-def ActionOnLogin(curPlayer):
- actionItemExchangeInfo = ReadChConfig.GetEvalChConfig("ActionItemExchange")
-
- for actionKey, excCfg in actionItemExchangeInfo.items():
- gwDictKey = excCfg[Def_ExcCfg_GameWorldActionKey]
- curState = GameWorld.GetGameWorld().GetGameWorldDictByKey(gwDictKey)
-
- # 如果是兑换活动中,同步兑换次数
- if curState == excCfg[Def_ExcCfg_ActionState]:
- Sync_ExcItemCnt(curPlayer, actionKey)
-
- DoPlayerActionBuffOnLogin(curPlayer)
- return
-
-## 节日活动过天
-# @param curPlayer
-# @return None
-def ActionOnDay(curPlayer):
- actionItemExchangeInfo = ReadChConfig.GetEvalChConfig("ActionItemExchange")
-
- for actionKey, excCfg in actionItemExchangeInfo.items():
- gwDictKey = excCfg[Def_ExcCfg_GameWorldActionKey]
- curState = GameWorld.GetGameWorld().GetGameWorldDictByKey(gwDictKey)
-
- # 不是可兑换物品活动期间,重置兑换记录
- if curState != excCfg[Def_ExcCfg_ActionState]:
- GameWorld.DebugLog("非活动中,重置活动物品兑换数据actionKey=%s" % actionKey)
- __ResetExcRecord(curPlayer, actionKey, excCfg, False)
- else:
- resetWay = excCfg[Def_ExcCfg_RecordResetWay]
- # 活动中过天重置兑换次数的
- if resetWay == 1:
- GameWorld.DebugLog("活动中,过天重置活动物品兑换数据actionKey=%s" % actionKey)
- __ResetExcRecord(curPlayer, actionKey, excCfg, True)
-
- return
-
-
-## 重置兑换次数记录
-# @param curPlayer
-# @return None
-def __ResetExcRecord(curPlayer, actionKey, excCfg, isNotify):
- itemDict = excCfg[Def_ExcCfg_ItemDict]
- for itemInfo in itemDict.values():
- recordMark = itemInfo[Def_ExcItem_RecordMark]
- excCntKey = ChConfig.Def_PDict_ExcActionItemCnt % (actionKey, recordMark)
- PlayerControl.NomalDictSetProperty(curPlayer, excCntKey, 0)
-
- if isNotify:
- Sync_ExcItemCnt(curPlayer, actionKey)
- return
-
-## 根据活动key重置兑换次数记录
-# @param curPlayer
-# @param keyList [key列表]
-# @return None
-def ResetExcRecordByKey(curPlayer, keyList, isNotify=False):
-
- if not keyList:
- return
-
- actionItemExchangeInfo = ReadChConfig.GetEvalChConfig("ActionItemExchange")
-
- for actionKey, excCfg in actionItemExchangeInfo.items():
-
- if actionKey in keyList:
- __ResetExcRecord(curPlayer, actionKey, excCfg, isNotify)
-
- return
-
-##// AB 06 活动物品兑换 #tagCMExchangeActionItem
-#
-#struct tagCMExchangeActionItem
-#
-#{
-# tagHead Head;
-# BYTE ActionKeyLen;
-# char ActionKey[ActionKeyLen];
-# DWORD ItemID; // 兑换的目标物品ID
-# WORD ExcCnt; // 兑换个数,默认1个
-#};
-## 活动物品兑换
-# @param curPlayer
-# @return None
-def OnExchangeActionItem(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- if not curPlayer:
- return
-
- actionKey = clientData.ActionKey
- itemID = clientData.ItemID
- excCnt = clientData.ExcCnt
- excCnt = max(1, excCnt)
-
- GameWorld.DebugLog("活动兑换物品actionKey=%s,itemID=%s,excCnt=%s" % (actionKey, itemID, excCnt))
- actionItemExchangeInfo = ReadChConfig.GetEvalChConfig("ActionItemExchange")
-
- if actionKey not in actionItemExchangeInfo:
- GameWorld.ErrLog(" ActionItemExchange.txt无该活动!actionKey=%s" % (actionKey))
- return
-
- excCfg = actionItemExchangeInfo[actionKey]
- gwDictKey = excCfg[Def_ExcCfg_GameWorldActionKey]
- curState = GameWorld.GetGameWorld().GetGameWorldDictByKey(gwDictKey)
- exchangeState = excCfg[Def_ExcCfg_ActionState]
- if curState != exchangeState:
- GameWorld.DebugLog(" 非兑换物品期间,不可兑换!curState=%s,exchangeState=%s"
- % (curState, exchangeState))
- return
-
- itemDict = excCfg[Def_ExcCfg_ItemDict]
-
- if itemID not in itemDict:
- GameWorld.ErrLog(" ActionItemExchange.txt未配置兑换该物品兑换信息!actionKey=%s,itemID=%s"
- % (actionKey, itemID))
- return
-
- itemInfo = itemDict[itemID]
-
- recordMark = itemInfo[Def_ExcItem_RecordMark]
- getCnt = itemInfo[Def_ExcItem_GetCnt] # 单次兑换可获得个数
- maxCnt = itemInfo[Def_ExcItem_MaxCnt] # 最大兑换次数,0为不限制
- costItemList = itemInfo[Def_ExcItem_CostItem]
- costMoneyInfo = itemInfo[Def_ExcItem_CostMoney]
- notifyMark = itemInfo[Def_ExcItem_NotifyMark]
- needSpace = itemInfo[Def_ExcItem_NeedSpace]
- giveItemList = itemInfo[Def_ExcItem_GiveItem]
-
- excCntKey = ChConfig.Def_PDict_ExcActionItemCnt % (actionKey, recordMark)
- exchangeCnt = curPlayer.NomalDictGetProperty(excCntKey) # 已兑换次数
-
- if maxCnt > 0 and exchangeCnt + excCnt > maxCnt:
- GameWorld.DebugLog(" 兑换次数不足,不可兑换!已兑换=%s,要兑换=%s,最大=%s,"
- % (exchangeCnt, excCnt, maxCnt))
- return
-
- packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem)
- #验证背包空间
- if needSpace > packSpace:
- PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
- return
-
- needMoney = 0
- if costMoneyInfo:
- moneyType, needMoney = costMoneyInfo
- needMoney = needMoney * excCnt
- if not PlayerControl.HaveMoney(curPlayer, moneyType, needMoney):
- GameWorld.DebugLog(" 货币不足 moneyType=%s,needMoney=%s" % (moneyType, needMoney))
- return
-
- costItemCntDict = {} # 消耗物品总个数字典
- for costItemID, costCnt in costItemList:
- costItemCntDict[costItemID] = costCnt * excCnt # 单次消耗个数*兑换次数
-
- delItemInfoList, findItemIsBind, lackItemCntDict = __GetCostItem(curPlayer, costItemCntDict)
-
- if lackItemCntDict:
- GameWorld.DebugLog(" 兑换材料不足,还需 %s" % str(lackItemCntDict))
- return
-
- # 支付所需货币
- if needMoney > 0:
- infoDict = {ChConfig.Def_Cost_Reason_SonKey:"%s_%s" % (actionKey, itemID)}
- PlayerControl.PayMoney(curPlayer, moneyType, needMoney, ChConfig.Def_Cost_ExchangeActionItem, infoDict)
-
- # 扣除附加物品
- for item, delCnt in delItemInfoList:
- ItemCommon.DelItem(curPlayer, item, delCnt, True, "ExchangeActionItem")
-
- # 更新兑换次数
- PlayerControl.NomalDictSetProperty(curPlayer, excCntKey, exchangeCnt + excCnt)
- Sync_ExcItemCnt(curPlayer, actionKey)
-
- notifyItemID = 0
- if not giveItemList:
- giveItemList = [(itemID, getCnt)]
- notifyItemID = itemID
-
- for giveItemID, giveCnt in giveItemList:
- if not notifyItemID:
- notifyItemID = giveItemID
- giveTotalCnt = giveCnt * excCnt
- if not ItemControler.GivePlayerItem(curPlayer, giveItemID, giveTotalCnt, 0,
- [IPY_GameWorld.rptItem, IPY_GameWorld.rptAnyWhere]):
- GameWorld.ErrLog("OnExchangeActionItem(), give itemID:%s,count:%s fail!"
- % (giveItemID, giveTotalCnt), curPlayer.GetPlayerID())
- # 您获得了物品XX XX个
- #PlayerControl.NotifyCode(curPlayer, "ObtainRes01", [giveItemID, giveTotalCnt])
-
- # 全服广播
- if notifyMark and notifyItemID:
- PlayerControl.WorldNotify(0, notifyMark, [curPlayer.GetPlayerName(), notifyItemID, notifyItemID])
-
- # 兑换流向
- addDataDict = {"ActionKey":actionKey, "ExchangeCnt":excCnt, "ExchangeItemIDKey":itemID}
- DataRecordPack.DR_FuncGiveItem(curPlayer, "ExchangeItem", addDataDict)
-
- GameWorld.DebugLog(" OK!获得giveItemList=%s * excCnt=%s" % (giveItemList, excCnt))
- return
-
-## 获取兑换物品需扣除的物品信息
-# @param curPlayer
-# @param costItemCntDict: 消耗材料个数字典
-# @return 返回列表[要扣除的物品信息, 所找的材料是否有绑定的, 不足的个数信息字典]
-def __GetCostItem(curPlayer, costItemCntDict):
- findItemIsBind = False
- delItemInfoList = []
-
- itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
- for i in range(itemPack.GetCount()):
- curItem = itemPack.GetAt(i)
- #过滤不符合其他条件的物品
- if not ItemCommon.CheckItemCanUse(curItem):
- continue
-
- itemID = curItem.GetItemTypeID()
- if itemID not in costItemCntDict:
- continue
-
- #查找到的物品为绑定物品
- if not findItemIsBind and curItem.GetIsBind():
- findItemIsBind = True
-
- needCnt = costItemCntDict[itemID]
- itemCount = curItem.GetCount()
-
- #不够
- if needCnt > itemCount:
- needCnt -= itemCount
- costItemCntDict[itemID] = needCnt # 更新还需个数
- delItemInfoList.append([curItem, itemCount])
- else:
- costItemCntDict.pop(itemID)
- delItemInfoList.append([curItem, needCnt])
-
- # 如果都够了,跳出,不再查找
- if not costItemCntDict:
- break
-
- #返回列表[要扣除的物品信息, 所找的材料是否有绑定的, 不足的个数信息字典]
- return delItemInfoList, findItemIsBind, costItemCntDict
-
-
-## 同步兑换次数
-# @param curPlayer
-# @return None
-def Sync_ExcItemCnt(curPlayer, actionKey):
- actionItemExchangeInfo = ReadChConfig.GetEvalChConfig("ActionItemExchange")
-
- if actionKey not in actionItemExchangeInfo:
- return
-
- excCfg = actionItemExchangeInfo[actionKey]
-
- exRecordPack = ChPyNetSendPack.tagMCExchangeActionItemCntRecord()
- exRecordPack.Clear()
- exRecordPack.ActionKey = actionKey
- exRecordPack.ActionKeyLen = len(actionKey)
- exRecordPack.RecordList = []
-
- itemDict = excCfg[Def_ExcCfg_ItemDict]
- for itemID, itemInfo in itemDict.items():
- recordMark = itemInfo[Def_ExcItem_RecordMark]
- excCntKey = ChConfig.Def_PDict_ExcActionItemCnt % (actionKey, recordMark)
- exchangeCnt = curPlayer.NomalDictGetProperty(excCntKey) # 已兑换次数
- excItem = ChPyNetSendPack.tagMCExchangeActionItemCnt()
- excItem.Clear()
- excItem.ItemID = itemID
- excItem.ExcCnt = exchangeCnt
- exRecordPack.RecordList.append(excItem)
-
- exRecordPack.RecordCnt = len(exRecordPack.RecordList)
- NetPackCommon.SendFakePack(curPlayer, exRecordPack)
- return
-
-##------------------------------- 按活动时间给buff ------------------------------
-
-## 活动buff状态变更
-# @param curPlayer
-# @return None
-def OnActionBuffStateChange(key, tick):
- buffID = key[len(ShareDefine.Def_Notify_WorldKey_ActionBuffState) - 2:]
- try:
- buffID = int(buffID)
- except BaseException:
- GameWorld.ErrLog("活动buffID配置key错误, key=%s" % key)
- return
-
- actionBuffList = ReadChConfig.GetEvalChConfig("PlayerActionBuff")
- if buffID not in actionBuffList:
- GameWorld.ErrLog("活动buffID不在PlayerActionBuff.txt里, buffID=%s" % buffID)
- return
-
- buffState = GameWorld.GetGameWorld().GetGameWorldDictByKey(key)
- GameWorld.DebugLog("OnActionBuffStateChange buffID=%s,state=%s" % (buffID, buffState))
-
- playerManager = GameWorld.GetPlayerManager()
- for index in range(0, playerManager.GetPlayerCount()):
- curPlayer = playerManager.GetPlayerByIndex(index)
- if curPlayer.GetID() == 0:
- continue
-
- isOK = __AddPlayerActionBuff(curPlayer, buffID, buffState, tick)
- if isOK:
- playerControl = PlayerControl.PlayerControl(curPlayer)
- playerControl.RefreshPlayerAttrByBuff()
- return
-
-## 玩家活动buff逻辑
-# @param curPlayer
-# @return None
-def DoPlayerActionBuffOnLogin(curPlayer):
- tick = GameWorld.GetGameWorld().GetTick()
- actionBuffList = ReadChConfig.GetEvalChConfig("PlayerActionBuff")
- isNeedRefresh = False
- for buffID in actionBuffList:
- stateKey = ShareDefine.Def_Notify_WorldKey_ActionBuffState % buffID
- buffState = GameWorld.GetGameWorld().GetGameWorldDictByKey(stateKey)
- isOK = __AddPlayerActionBuff(curPlayer, buffID, buffState, tick)
- isNeedRefresh = True if isOK else isNeedRefresh
-
- if isNeedRefresh:
- playerControl = PlayerControl.PlayerControl(curPlayer)
- playerControl.RefreshPlayerAttrByBuff()
- return
-
-## 添加玩家活动buff
-# @param curPlayer
-# @param buffID
-# @param isAddBuff 是否添加
-# @return None
-def __AddPlayerActionBuff(curPlayer, buffID, isAddBuff, tick):
-
- if isAddBuff:
- skillInfo = SkillCommon.FindBuffByID(curPlayer, buffID)
- findBuff, buffManager, buffType, findSkill = skillInfo
- if findBuff == None:
- if not findSkill:
- return False
-
- return BuffSkill.AddBuffNoRefreshState(curPlayer, buffType, findSkill, tick, [], curPlayer)
- else:
- return BuffSkill.DelBuffBySkillID(curPlayer, buffID, tick)
-
- return False
-
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 76fbcca..d87881c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
+++ b/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)
#===============================================================================
# ---修改为上述的 统一字典处理
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 46d0bae..2a0215c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/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' # 登录领取奖励结束时间,参数为活动类型
--
Gitblit v1.8.0