16 卡牌服务端(删除旧版交易所、拍卖行、答题等部分不需要内容;)
| | |
| | | ;类名注册的时候, ClassName必须唯一
|
| | | ;FuncName是类名注册的时候, 被调用到的函数名
|
| | |
|
| | |
|
| | |
|
| | | ;交易所
|
| | | [PlayerBourse]
|
| | | ScriptName = Player\PlayerBourseTube.py
|
| | | Writer = xmnathan
|
| | | Releaser = xmnathan
|
| | | RegType = 0
|
| | | RegisterPackCount = 4
|
| | |
|
| | | PacketCMD_1=0x02
|
| | | PacketSubCMD_1=0x01
|
| | | PacketCallFunc_1=OnGMCheckAddPlayerBourseItemResult
|
| | |
|
| | |
|
| | | PacketCMD_2=0x02
|
| | | PacketSubCMD_2=0x02
|
| | | PacketCallFunc_2=OnGMCheckBuyBourseItemResult
|
| | |
|
| | | PacketCMD_3=0x02
|
| | | PacketSubCMD_3=0x03
|
| | | PacketCallFunc_3=OnGMGiveBourseItem
|
| | |
|
| | |
|
| | | PacketCMD_4=0x02
|
| | | PacketSubCMD_4=0x04
|
| | | PacketCallFunc_4=OnGMGivePlayerBourseGains
|
| | |
|
| | | [PlayerFriend]
|
| | | ScriptName = Player\PlayerFriend.py
|
| | | Writer = Alee
|
| | |
| | | PacketSubCMD_1=0x0D
|
| | | PacketCallFunc_1=OnYinji
|
| | |
|
| | |
|
| | |
|
| | | ;交易所
|
| | | [PlayerBourseTube]
|
| | | ScriptName = Player\PlayerBourseTube.py
|
| | | Writer = xdh
|
| | | Releaser = xdh
|
| | | RegType = 0
|
| | | RegisterPackCount = 2
|
| | |
|
| | | PacketCMD_1=0xB5
|
| | | PacketSubCMD_1=0x01
|
| | | PacketCallFunc_1=OnPlayerSellBourseItem
|
| | |
|
| | | PacketCMD_2=0xB5
|
| | | PacketSubCMD_2=0x02
|
| | | PacketCallFunc_2=OnPlayerBuyBourseItem
|
| | |
|
| | | ;拍卖行
|
| | | [PlayerAuctionHouse]
|
| | | ScriptName = Player\PlayerAuctionHouse.py
|
| | | Writer = hxp
|
| | | Releaser = hxp
|
| | | RegType = 0
|
| | | RegisterPackCount = 3
|
| | |
|
| | | PacketCMD_1=0xB5
|
| | | PacketSubCMD_1=0x13
|
| | | PacketCallFunc_1=OnSellAuctionItem
|
| | |
|
| | | PacketCMD_2=0xB5
|
| | | PacketSubCMD_2=0x14
|
| | | PacketCallFunc_2=OnBiddingAuctionItem
|
| | |
|
| | | PacketCMD_3=0xB5
|
| | | PacketSubCMD_3=0x15
|
| | | PacketCallFunc_3=OnUnsellAuctionItem
|
| | |
|
| | | ;法宝
|
| | | [PlayerMagicWeapon]
|
| | | ScriptName = Player\PlayerMagicWeapon.py
|
| | |
| | | PacketCMD_2=0xB4
|
| | | PacketSubCMD_2=0x08
|
| | | PacketCallFunc_2=OnPassivePage
|
| | |
|
| | | ;我要太极摇骰子
|
| | | [PlayerDiceEx]
|
| | | ScriptName = Player\PlayerDiceEx.py
|
| | | Writer = xdh
|
| | | Releaser = xdh
|
| | | RegType = 0
|
| | | RegisterPackCount = 1
|
| | |
|
| | | PacketCMD_1=0xAB
|
| | | PacketSubCMD_1=0x0C
|
| | | PacketCallFunc_1=OnDice
|
| | |
|
| | | ;仙魔之争
|
| | | [GameLogic_XMZZ]
|
| | |
| | | PacketCMD_1=0xA5
|
| | | PacketSubCMD_1=0x11
|
| | | PacketCallFunc_1=OnTryFirstGoldItem
|
| | |
|
| | | ;绑玉转盘
|
| | | [PlayerBindJadeWheel]
|
| | | ScriptName = Player\PlayerBindJadeWheel.py
|
| | | Writer = xdh
|
| | | Releaser = xdh
|
| | | RegType = 0
|
| | | RegisterPackCount = 1
|
| | |
|
| | | PacketCMD_1=0xA5
|
| | | PacketSubCMD_1=0x17
|
| | | PacketCallFunc_1=OnStartBindJadeWheel
|
| | |
|
| | | ;限时抢购
|
| | | [PlayerFlashSale]
|
| | |
| | | PacketSubCMD_2=0x30
|
| | | PacketCallFunc_2=UpdateFineSoulSlot
|
| | |
|
| | | ;答题
|
| | | [Exam]
|
| | | ScriptName = Player\PlayerExam.py
|
| | | Writer = panwei
|
| | | Releaser = panwei
|
| | | RegType = 0
|
| | | RegisterPackCount = 1
|
| | |
|
| | | PacketCMD_1=0x01
|
| | | PacketSubCMD_1=0x1B
|
| | | PacketCallFunc_1=Client_JoinAction
|
| | |
|
| | |
|
| | | ;玩家防外挂验证
|
| | | [NetPackCommon]
|
| | | ScriptName = NetPackCommon.py
|
| | |
| | | PacketCMD_2=0x3
|
| | | PacketSubCMD_2=0x37
|
| | | PacketCallFunc_2=OnCPlayerChangeDienstgrad
|
| | |
|
| | | ;交易所
|
| | | [PlayerBourse]
|
| | | ScriptName = Player\PlayerBourseTube.py
|
| | | Writer = xmnathan
|
| | | Releaser = xmnathan
|
| | | RegType = 0
|
| | | RegisterPackCount = 1
|
| | |
|
| | | PacketCMD_1=0x1B
|
| | | PacketSubCMD_1=0x03
|
| | | PacketCallFunc_1=OnPlayerRecaptureBourseItem
|
| | |
|
| | |
|
| | | ;任务
|
| | | [QuestLogic]
|
| | |
| | | Def_SkillID_DoubleExp = -1 # 双倍经验系统中的双倍经验ID
|
| | | Def_SkillID_Justice = 11504 # 正义阵营
|
| | | Def_SkillID_Evil = 11505 # 黑道阵营
|
| | | Def_SkillID_JoinExam = -1 # 答题Buff
|
| | | Def_SkillID_ActionWuDi = -1 # 活动无敌Buff
|
| | | Def_SkillID_ZhenQiRestore = -1 # 真气恢复加成BUFF
|
| | | Def_SkillTypeID_EfficientBattle = -1 #高效战斗类型ID,高效战斗buffID:49001~49008
|
| | |
| | | Def_PDict_NewFCPartyAwardRecord = "NewFCPartyAwardRecord" #全民来嗨活动领奖记录
|
| | | Def_PDict_NewFCCostGold = "NewFCCostGold" # 绝版降临总累计消费仙玉
|
| | |
|
| | | #绑玉转盘
|
| | | Def_PDict_BindJadeWheelCurCnt = "BindJadeWheelCurCnt" # 今日已转次数
|
| | | Def_PDict_BindJadeWheelHistoryCnt = "BindJadeWheelHistoryCnt" # 历史已转次数
|
| | |
|
| | | #限时抢购活动
|
| | | Def_PDict_FlashSaleID = "FlashSaleID_%s" # 玩家身上的限时抢购活动ID,唯一标识,取活动开始日期time,参数(活动编号)
|
| | | Def_PDict_FlashSaleState = "FlashSaleState_%s" # 玩家身上的限时抢购活动state,参数(活动编号)
|
| | |
| | |
|
| | | Def_PDict_GFPassiveIndex = "GFP_%s_%s" # 被动功法 页数-索引
|
| | | Def_PDict_GFPassivePage = "GFPPage" # 被动功法选中页数
|
| | |
|
| | | # 我要太极
|
| | | Def_PDict_Dice_Result = "DiceResult" # 我要太极结果
|
| | | Def_PDict_Dice_FreeChangeCnt = "DiceFreeChangeCnt" # 我要太极免费改投次数
|
| | |
|
| | | # 挂机收益
|
| | | Def_PDict_GuajiCalcTime = "GuajiCalcTime" # 上次统计收益时间戳
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 17 绑玉转盘开始 #tagCMStartBindJadeWheel
|
| | |
|
| | | class tagCMStartBindJadeWheel(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x17
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x17
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMStartBindJadeWheel)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A5 17 绑玉转盘开始 //tagCMStartBindJadeWheel:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMStartBindJadeWheel=tagCMStartBindJadeWheel()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMStartBindJadeWheel.Cmd,m_NAtagCMStartBindJadeWheel.SubCmd))] = m_NAtagCMStartBindJadeWheel
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 21 境界修为池提取 #tagCMTakeOutRealmExp
|
| | |
|
| | | class tagCMTakeOutRealmExp(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 0B 购买天神经验 #tagCMBuySkyGodExp
|
| | |
|
| | | class tagCMBuySkyGodExp(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | self.SubCmd = 0x0B
|
| | | 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 = 0x0B
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMBuySkyGodExp)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 0B 购买天神经验 //tagCMBuySkyGodExp:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMBuySkyGodExp=tagCMBuySkyGodExp()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuySkyGodExp.Cmd,m_NAtagCMBuySkyGodExp.SubCmd))] = m_NAtagCMBuySkyGodExp
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 12 抢红包 #tagCMGrabFamilyRedPacket
|
| | |
|
| | | class tagCMGrabFamilyRedPacket(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 0A 骰子投掷 #tagCMDiceTake
|
| | |
|
| | | class tagCMDiceTake(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsAutoBuy", c_ubyte), # 是否自动购买 0-否 1-是
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | self.SubCmd = 0x0A
|
| | | 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 = 0x0A
|
| | | self.IsAutoBuy = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMDiceTake)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 0A 骰子投掷 //tagCMDiceTake:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsAutoBuy:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsAutoBuy
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMDiceTake=tagCMDiceTake()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMDiceTake.Cmd,m_NAtagCMDiceTake.SubCmd))] = m_NAtagCMDiceTake
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 11 开服活动奖励 #tagCMOpenServerCampaignAward
|
| | |
|
| | | class tagCMOpenServerCampaignAward(Structure):
|
| | |
| | |
|
| | | m_NAtagCMOpenServerCampaignAward=tagCMOpenServerCampaignAward()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMOpenServerCampaignAward.Cmd,m_NAtagCMOpenServerCampaignAward.SubCmd))] = m_NAtagCMOpenServerCampaignAward
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 0C 摇骰子 #tagCMDiceEx
|
| | |
|
| | | class tagCMDiceEx(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Type", c_ubyte), # 0-投骰子 1-改投 2-见好就收
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | self.SubCmd = 0x0C
|
| | | 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 = 0x0C
|
| | | self.Type = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMDiceEx)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 0C 摇骰子 //tagCMDiceEx:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Type:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Type
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMDiceEx=tagCMDiceEx()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMDiceEx.Cmd,m_NAtagCMDiceEx.SubCmd))] = m_NAtagCMDiceEx
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | | m_NAtagCMTurnFight=tagCMTurnFight()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMTurnFight.Head.Cmd,m_NAtagCMTurnFight.Head.SubCmd))] = m_NAtagCMTurnFight
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B5 14 拍卖行竞价物品 #tagCMBiddingAuctionItem
|
| | |
|
| | | class tagCMBiddingAuctionItem(Structure):
|
| | | Head = tagHead()
|
| | | ItemGUID = "" #(char ItemGUID[40])
|
| | | BiddingPrice = 0 #(DWORD BiddingPrice)//竞价价格
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB5
|
| | | self.Head.SubCmd = 0x14
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40)
|
| | | self.BiddingPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB5
|
| | | self.Head.SubCmd = 0x14
|
| | | self.ItemGUID = ""
|
| | | self.BiddingPrice = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 40
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 40, self.ItemGUID)
|
| | | data = CommFunc.WriteDWORD(data, self.BiddingPrice)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ItemGUID:%s,
|
| | | BiddingPrice:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ItemGUID,
|
| | | self.BiddingPrice
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMBiddingAuctionItem=tagCMBiddingAuctionItem()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBiddingAuctionItem.Head.Cmd,m_NAtagCMBiddingAuctionItem.Head.SubCmd))] = m_NAtagCMBiddingAuctionItem
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B5 02 交易所购买物品#tagCMPYBuyBourseItem
|
| | |
|
| | | class tagCMPYBuyBourseItem(Structure):
|
| | | Head = tagHead()
|
| | | ItemGUID = "" #(char ItemGUID[40])
|
| | | Pwd = "" #(char Pwd[8])//交易密码
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB5
|
| | | self.Head.SubCmd = 0x02
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40)
|
| | | self.Pwd,_pos = CommFunc.ReadString(_lpData, _pos,8)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB5
|
| | | self.Head.SubCmd = 0x02
|
| | | self.ItemGUID = ""
|
| | | self.Pwd = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 40
|
| | | length += 8
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 40, self.ItemGUID)
|
| | | data = CommFunc.WriteString(data, 8, self.Pwd)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ItemGUID:%s,
|
| | | Pwd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ItemGUID,
|
| | | self.Pwd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMPYBuyBourseItem=tagCMPYBuyBourseItem()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPYBuyBourseItem.Head.Cmd,m_NAtagCMPYBuyBourseItem.Head.SubCmd))] = m_NAtagCMPYBuyBourseItem
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B5 01 交易所玩家上架物品#tagCMPYPlayerSellBourseItem
|
| | |
|
| | | class tagCMPYPlayerSellBourseItem(Structure):
|
| | | Head = tagHead()
|
| | | ItemIndex = 0 #(BYTE ItemIndex)//物品在背包中索引
|
| | | Count = 0 #(WORD Count)//出售数量
|
| | | PriceType = 0 #(BYTE PriceType)//出售价格类型
|
| | | PriceCount = 0 #(DWORD PriceCount)//出售价格
|
| | | Pwd = "" #(char Pwd[8])//交易密码
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB5
|
| | | self.Head.SubCmd = 0x01
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ItemIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.PriceType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.PriceCount,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Pwd,_pos = CommFunc.ReadString(_lpData, _pos,8)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB5
|
| | | self.Head.SubCmd = 0x01
|
| | | self.ItemIndex = 0
|
| | | self.Count = 0
|
| | | self.PriceType = 0
|
| | | self.PriceCount = 0
|
| | | self.Pwd = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 4
|
| | | length += 8
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ItemIndex)
|
| | | data = CommFunc.WriteWORD(data, self.Count)
|
| | | data = CommFunc.WriteBYTE(data, self.PriceType)
|
| | | data = CommFunc.WriteDWORD(data, self.PriceCount)
|
| | | data = CommFunc.WriteString(data, 8, self.Pwd)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ItemIndex:%d,
|
| | | Count:%d,
|
| | | PriceType:%d,
|
| | | PriceCount:%d,
|
| | | Pwd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ItemIndex,
|
| | | self.Count,
|
| | | self.PriceType,
|
| | | self.PriceCount,
|
| | | self.Pwd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMPYPlayerSellBourseItem=tagCMPYPlayerSellBourseItem()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPYPlayerSellBourseItem.Head.Cmd,m_NAtagCMPYPlayerSellBourseItem.Head.SubCmd))] = m_NAtagCMPYPlayerSellBourseItem
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B5 13 拍卖行上架拍品 #tagCMSellAuctionItem
|
| | |
|
| | | class tagCMSellAuctionItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ItemIndex", c_ubyte), #物品在背包中索引
|
| | | ("SellCount", c_ushort), #上架个数,0代表全部上架
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB5
|
| | | self.SubCmd = 0x13
|
| | | 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 = 0xB5
|
| | | self.SubCmd = 0x13
|
| | | self.ItemIndex = 0
|
| | | self.SellCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMSellAuctionItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B5 13 拍卖行上架拍品 //tagCMSellAuctionItem:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ItemIndex:%d,
|
| | | SellCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ItemIndex,
|
| | | self.SellCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMSellAuctionItem=tagCMSellAuctionItem()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSellAuctionItem.Cmd,m_NAtagCMSellAuctionItem.SubCmd))] = m_NAtagCMSellAuctionItem
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B5 15 拍卖行下架拍品 #tagCMUnsellAuctionItem
|
| | |
|
| | | class tagCMUnsellAuctionItem(Structure):
|
| | | Head = tagHead()
|
| | | ItemGUID = "" #(char ItemGUID[40])
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB5
|
| | | self.Head.SubCmd = 0x15
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB5
|
| | | self.Head.SubCmd = 0x15
|
| | | self.ItemGUID = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 40
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 40, self.ItemGUID)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ItemGUID:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ItemGUID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMUnsellAuctionItem=tagCMUnsellAuctionItem()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUnsellAuctionItem.Head.Cmd,m_NAtagCMUnsellAuctionItem.Head.SubCmd))] = m_NAtagCMUnsellAuctionItem
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 24 通知绑玉转盘结果 #tagMCBindJadeWheelResult
|
| | |
|
| | | class tagMCBindJadeWheelResult(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Index", c_ubyte), # 格子
|
| | | ("Cnt", c_ubyte), #今日已转次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x24
|
| | | 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 = 0xA3
|
| | | self.SubCmd = 0x24
|
| | | self.Index = 0
|
| | | self.Cnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCBindJadeWheelResult)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 24 通知绑玉转盘结果 //tagMCBindJadeWheelResult:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Index:%d,
|
| | | Cnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Index,
|
| | | self.Cnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCBindJadeWheelResult=tagMCBindJadeWheelResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCBindJadeWheelResult.Cmd,m_NAtagMCBindJadeWheelResult.SubCmd))] = m_NAtagMCBindJadeWheelResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 B7 当日累计攻击boss次数 #tagMCBOSSAttactCnt
|
| | |
|
| | | class tagMCBossCntInfo(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 23 摇骰子奖励回包 #tagMCDiceAward
|
| | |
|
| | | class tagMCDiceAward(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("AwardCnt", c_ubyte), # 太极数量
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | self.SubCmd = 0x23
|
| | | 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 = 0x23
|
| | | self.AwardCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCDiceAward)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 23 摇骰子奖励回包 //tagMCDiceAward:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | AwardCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.AwardCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCDiceAward=tagMCDiceAward()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDiceAward.Cmd,m_NAtagMCDiceAward.SubCmd))] = m_NAtagMCDiceAward
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 25 节日红包信息 #tagMCFeastRedPackInfo
|
| | |
|
| | | class tagMCFeastRedPackInfo(Structure):
|
| | |
| | |
|
| | | m_NAtagMCRefineGiftInfo=tagMCRefineGiftInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRefineGiftInfo.Cmd,m_NAtagMCRefineGiftInfo.SubCmd))] = m_NAtagMCRefineGiftInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 22 摇骰子结果 #tagMCDiceExResult
|
| | |
|
| | | class tagMCDiceExResult(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ResultNum", c_int), # 骰子结果
|
| | | ("DiceType", c_ubyte), # 0-正常 1-改投 2-重置
|
| | | ("UseFreeCnt", c_ubyte), # 改投使用次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | self.SubCmd = 0x22
|
| | | 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 = 0x22
|
| | | self.ResultNum = 0
|
| | | self.DiceType = 0
|
| | | self.UseFreeCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCDiceExResult)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 22 摇骰子结果 //tagMCDiceExResult:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ResultNum:%d,
|
| | | DiceType:%d,
|
| | | UseFreeCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ResultNum,
|
| | | self.DiceType,
|
| | | self.UseFreeCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCDiceExResult=tagMCDiceExResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDiceExResult.Cmd,m_NAtagMCDiceExResult.SubCmd))] = m_NAtagMCDiceExResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | | import PlayerControl
|
| | | import IPY_GameWorld
|
| | | import DataRecordPack
|
| | | import PlayerAuctionHouse
|
| | | import PlayerTongTianLing
|
| | | import PlayerWeekParty
|
| | | import IpyGameDataPY
|
| | |
| | | if curRate < 100:
|
| | | playerGoldPaper = curPlayer.GetGoldPaper()
|
| | | queryData = [classLV, equipPlace, curPartStar, equipPackIndex, isAutoBuyPreview, curRate, delEquipGUIDDict, delItemInfoDict, lackItemCostMoney, playerGoldPaper]
|
| | | PlayerAuctionHouse.QueryGameServer_AuctionHouse(playerID, "EquipStarAutoBuy", queryData)
|
| | | #拍卖行删除
|
| | | return
|
| | |
|
| | | if lackItemCostMoney:
|
| | |
| | | import PlayerControl
|
| | | import ShareDefine
|
| | | import NPCCustomRefresh
|
| | | import PlayerAuctionHouse
|
| | | import ItemControler
|
| | | import PlayerFeastTravel
|
| | | import PlayerWeekParty
|
| | |
| | | PlayerControl.SendMailBatch("LeagueBOSS2", batchPlayerIDList, batchAddItemList, batchParamList, batchDetail=batchDetailList)
|
| | | if familyAuctionItemDict:
|
| | | GameWorld.Log('familyAuctionItemDict=%s' % familyAuctionItemDict)
|
| | | PlayerAuctionHouse.DoAddFamilyAuctionItem(familyAuctionItemDict)
|
| | | #拍卖行删除
|
| | | else:
|
| | | playerCount = playerManager.GetPlayerCount()
|
| | | for index in xrange(playerCount):
|
| | |
| | | import ChConfig
|
| | | import ReadChConfig
|
| | | import ShareDefine
|
| | | import GameDataControl
|
| | | import ItemControler
|
| | | import DataRecordPack
|
| | | import EventReport
|
| | |
| | | import ChConfig
|
| | | import NPCCommon
|
| | | import NPCCustomRefresh
|
| | | import GameLogInfo
|
| | | import time
|
| | | import math
|
| | | import ReadChConfig
|
| | | import PlayerActivity
|
| | | import SkillCommon
|
| | | import BuffSkill
|
| | | import GameObj
|
| | | import SkillShell
|
| | | import FBLogic
|
| | |
| | | # GameWorld.Log('功能或AI不存在: %s'%curNPC.GetAIType())
|
| | |
|
| | | return
|
| | | |
| | | #===============================================================================
|
| | | # def OnUndeathBossHurt(curNPC, hurtHP):
|
| | | # npcID = curNPC.GetNPCID()
|
| | | # UndeathBossDict = ReadChConfig.GetEvalChConfig("UndeathBoss")
|
| | | # if npcID not in UndeathBossDict:
|
| | | # return False
|
| | | # unitLostHP = UndeathBossDict[npcID] # 叠加一层buff所需掉血量
|
| | | # |
| | | # curLayerLostHP = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_Undeath_LayerLostHP)
|
| | | # updLostHP = curLayerLostHP + hurtHP
|
| | | # addLayer = updLostHP / unitLostHP # 增加buff层数, 攻击高的可能一次性加多层
|
| | | # #GameWorld.DebugLog("不死boss掉血: curLayerLostHP=%s,hurtHP=%s,updLostHP=%s,unitLostHP=%s,addLayer=%s" |
| | | # # % (curLayerLostHP, hurtHP, updLostHP, unitLostHP, addLayer), npcID)
|
| | | # if addLayer > 0:
|
| | | # curBuffLayer = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_Undeath_BuffLayer)
|
| | | # updBuffLyaer = curBuffLayer + addLayer
|
| | | # curNPC.SetDict(ChConfig.Def_NPC_Dict_Undeath_BuffLayer, updBuffLyaer)
|
| | | # updLostHP = updLostHP % unitLostHP # 更新层累加后剩余的伤害值
|
| | | # #GameWorld.DebugLog(" 增加NPC字典buff层: curBuffLayer=%s,updBuffLyaer=%s,updLostHP=%s" |
| | | # # % (curBuffLayer, updBuffLyaer, updLostHP), npcID)
|
| | | # __UpdBossLayerBuff(curNPC, updBuffLyaer)
|
| | | # |
| | | # curNPC.SetDict(ChConfig.Def_NPC_Dict_Undeath_LayerLostHP, updLostHP)
|
| | | # return True
|
| | | # |
| | | # def __UpdBossLayerBuff(curNPC, updBuffLyaer):
|
| | | # ''' 更新boss层buff层级 '''
|
| | | # buffType = IPY_GameWorld.bfBuff
|
| | | # buffTuple = SkillCommon.GetBuffManagerByBuffType(curNPC, buffType)
|
| | | # if buffTuple == ():
|
| | | # return
|
| | | # |
| | | # tick = GameWorld.GetGameWorld().GetTick()
|
| | | # buffState = buffTuple[0]
|
| | | # for i in range(0,buffState.GetBuffCount()):
|
| | | # curBuff = buffState.GetBuff(i)
|
| | | # curSkill = curBuff.GetSkill()
|
| | | # skillID = curSkill.GetSkillID()
|
| | | # if not skillID:
|
| | | # continue
|
| | | # |
| | | # for j in range(0, curSkill.GetEffectCount()):
|
| | | # curEffect = curSkill.GetEffect(j)
|
| | | # effectID = curEffect.GetEffectID()
|
| | | # # 层级buff效果
|
| | | # if effectID in ChConfig.Def_BuffLayerEffectList:
|
| | | # BuffSkill.AddBuffNoRefreshState(curNPC, buffType, curSkill, tick, updBuffLyaer, curNPC)
|
| | | # #GameWorld.DebugLog(" 更新层级buff效果层数: isOK=%s,skillID=%s,effID=%s,updBuffLyaer=%s" |
| | | # # % (isOK, skillID, effectID, updBuffLyaer), curNPC.GetNPCID())
|
| | | # break
|
| | | # |
| | | # NPCCommon.NPCControl(curNPC).RefreshNPCAttrState()
|
| | | # return
|
| | | #===============================================================================
|
| | |
|
| | | def OnUndeathBossAttacked(curNPC):
|
| | | npcID = curNPC.GetNPCID()
|
| | |
| | | import PlayerGoldInvest
|
| | | import PlayerActivity
|
| | | import FBCommon
|
| | | import PlayerBindJadeWheel
|
| | | import BossHurtMng
|
| | | import PlayerWishingWell
|
| | | import PlayerAttrFruit
|
| | |
| | | import PlayerVip
|
| | | import PlayerRefineStove
|
| | | import PassiveBuffEffMng
|
| | | import PlayerDiceEx
|
| | | import GameLogic_XMZZ
|
| | | import PlayerFlashSale
|
| | | import PlayerFlashGiftbag
|
| | |
| | |
|
| | | #通知玩家技能信息
|
| | | __Sync_ClientSkill(curPlayer)
|
| | | #清除国家答题Buff
|
| | | #PlayerExam.DoLogic_ExitExam(curPlayer, tick, needRefresh = False)
|
| | | #清除VIPbuff
|
| | | #BuffSkill.DelBuffBySkillID(curPlayer, ChConfig.Def_VIPExp_SkillTypeID, tick)
|
| | |
|
| | |
| | | FunctionNPCCommon.ShopItemOnLogin(curPlayer)
|
| | | # 通知设置的被动功法
|
| | | #PassiveBuffEffMng.OnLoginGFPassive(curPlayer)
|
| | | #我要太极
|
| | | PlayerDiceEx.DiceExOnLogin(curPlayer)
|
| | | #仙魔之争
|
| | | GameLogic_XMZZ.OnXMZZLogin(curPlayer)
|
| | | PlayerOnlinePrize.OnPlayerLogin(curPlayer)
|
| | |
| | | PlayerDogz.OnPlayerLogin(curPlayer)
|
| | | # 骑宠
|
| | | FamilyRobBoss.OnPlayerLogin(curPlayer)
|
| | | # 绑玉转盘
|
| | | PlayerBindJadeWheel.OnLogin(curPlayer)
|
| | | # 许愿池
|
| | | PlayerWishingWell.OnLogin(curPlayer)
|
| | | #幸运鉴宝
|
| | |
| | | import FBLogic
|
| | | import IPY_GameWorld
|
| | | import ChPlayer
|
| | | import GameLogInfo
|
| | | import GameServerRefresh
|
| | | import ShareDefine
|
| | | import PlayerGameWallow
|
| | |
| | | import FunctionNPCCommon
|
| | | import PlayerGoldGift
|
| | | import PlayerActivity
|
| | | import PlayerBindJadeWheel
|
| | | import FBCommon
|
| | | import PlayerSuccess
|
| | | import PlayerFreeGoods
|
| | |
| | | import PlayerCrossYaomoBoss
|
| | | import PlayerLuckyCloudBuy
|
| | | import PlayerLuckyTreasure
|
| | | import PlayerAuctionHouse
|
| | | import PlayerTongTianLing
|
| | | import PlayerRefineStove
|
| | | import PlayerFlashSale
|
| | |
| | | import PlayerZhanling
|
| | | import PlayerVip
|
| | | import PlayerLove
|
| | | import PlayerDiceEx
|
| | | import IpyGameDataPY
|
| | | import FamilyRobBoss
|
| | | import FBHelpBattle
|
| | |
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | #处理所有玩家信件的onday事件, 把存在时间+1
|
| | | playerManager.ProcessAllPlayerMailOnDay()
|
| | | #清空每日日记记录信息
|
| | | GameLogInfo.ClearGameLogInfo()
|
| | |
|
| | | #副本OnDay事件响应
|
| | | FBLogic.OnDay(tick)
|
| | |
| | | PlayerGoldGift.OnDay(curPlayer)
|
| | | #炼丹
|
| | | PlayerRefineStove.OnDay(curPlayer)
|
| | | #绑玉转盘
|
| | | PlayerBindJadeWheel.OnDay(curPlayer)
|
| | | #转盘
|
| | | PlayerActTurntable.PlayerOnDay(curPlayer)
|
| | | #情缘
|
| | |
| | | PlayerRecover.RecoverOnDay(curPlayer)
|
| | | #购买次数清空
|
| | | Operate_PlayerBuyZhenQi.PlayerOnDay(curPlayer)
|
| | | |
| | | #我要太极过天
|
| | | PlayerDiceEx.OnDay(curPlayer)
|
| | | # 世界boss
|
| | | BossHurtMng.OnDay(curPlayer)
|
| | | # 仙盟过天
|
| | |
| | | assistData = eval(msgValue)
|
| | | if GameWorld.GetMap().GetMapID() == assistData[0]:
|
| | | PlayerAssist.GameServer_AssistBossMsg(assistData[1:])
|
| | | return
|
| | | |
| | | if key == ShareDefine.Def_Notify_WorldKey_AddFamilyAuctionItem:
|
| | | mapID, familyAuctionItemDict = eval(msgValue)
|
| | | if GameWorld.GetMap().GetMapID() == mapID:
|
| | | PlayerAuctionHouse.DoAddFamilyAuctionItem(familyAuctionItemDict)
|
| | | return
|
| | | |
| | | if key == ShareDefine.Def_Notify_WorldKey_AddSystemAuctionItem:
|
| | | mapID, sysAuctionItemList = eval(msgValue)
|
| | | if GameWorld.GetMap().GetMapID() == mapID:
|
| | | PlayerAuctionHouse.DoAddSystemAuctionItem(sysAuctionItemList)
|
| | | return
|
| | |
|
| | | if key == ShareDefine.Def_Notify_WorldKey_FairyDomainLimit:
|
| | |
| | | import AttackCommon
|
| | | import ChItem
|
| | | import PlayerGMOper
|
| | | import GameLogInfo
|
| | | import ItemCommon
|
| | | import OperControlManager
|
| | | import ShareDefine
|
| | |
| | | # @return 返回值, 无意义
|
| | | # @remarks C++封包触发, 全局定时器, 处理玩家状态
|
| | | def __Func_ProcessState(tick):
|
| | | timeClock = time.clock()
|
| | | #2009-07-01断言tick >=0 ,服务器tick为DWord,超过24天未重启硬件,将导致逻辑不可预知
|
| | | if tick < 0 :
|
| | | GameWorld.Log('###服务器运行时间超过24天 tick = %s' % (tick))
|
| | |
| | | if curPlayer.GetID() == 0:
|
| | | continue
|
| | |
|
| | | ProcessPlayerState(curPlayer, tick) |
| | | |
| | | #记录玩家逻辑处理总耗时
|
| | | GameLogInfo.LogInfo_PlayerLogicTime(timeClock)
|
| | | ProcessPlayerState(curPlayer, tick)
|
| | | |
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | import FormulaControl
|
| | | import ConfigParser
|
| | | import ShareDefine
|
| | | import MapConfig
|
| | | #---------------------------------------------------------------------
|
| | | #全局变量
|
| | | #---------------------------------------------------------------------
|
| | |
| | | FormulaControl.ClearCompileFormulaDist()
|
| | | PyMongoDataServerConfig = None
|
| | | DBAllChConfig = {}
|
| | | |
| | | MapConfig.ClearConfig()
|
| | |
|
| | | GameWorld.Log('MapServer_Reload_ChConfig')
|
| | | #关闭字典
|
| | |
| | | Def_Notify_WorldKey_CommMapLinePlayerCount = 'CommMapLinePlayerCount' # 常规地图玩家人数信息
|
| | | Def_Notify_WorldKey_PurTalk = 'PursuePlayerTalk' # 追踪玩家聊天
|
| | | Def_Notify_WorldKey_ReloadConfig = 'ReloadConfig' # 重读策划配置表
|
| | | Def_Notify_WorldKey_Game_EXAM = 'Game_EXAM' # 答题
|
| | | Def_Notify_WorldKey_ReloadTexCaptcha = 'ReloadTexCaptcha' # 重读tex图形验证码
|
| | | Def_Notify_WorldKey_ReloadJpegCaptcha = 'ReloadJpegCaptcha' # 重读tex图形验证码
|
| | | Def_Notify_WorldKey_GameServerScriptReloadVersion = 'GameServerScriptReloadVersion' # GameServer 脚本重读版本标记
|
| | |
| | | ActStateJoin_Start, # 开启参与中 1
|
| | | ActStateJoin_End, # 参与结束,仅有配置参与时间段的活动有该状态 2
|
| | | ) = range(3)
|
| | |
|
| | | #答题类型枚举
|
| | | Def_Game_ExamTypeList = range(1, 4 + 1)
|
| | | (
|
| | | Def_Game_Exam_ZGTX, #智冠天下
|
| | | Def_Game_Exam_BSL, #变色龙
|
| | | Def_Game_Exam_JQBD, #举旗不定
|
| | | Def_Game_Exam_ZXH, #真心话
|
| | | ) = Def_Game_ExamTypeList
|
| | |
|
| | | #答题附加功能枚举
|
| | | Def_Game_Exam_Func_Cnt = 4
|
| | | (
|
| | | Def_Game_Exam_Func_Double, #双倍
|
| | | Def_Game_Exam_Func_AnswerRight, #自动跳过
|
| | | Def_Game_Exam_Func_DelOper, #删除选项
|
| | | Def_Game_Exam_Func_Three, #三倍
|
| | | ) = range(1, Def_Game_Exam_Func_Cnt + 1)
|
| | |
|
| | | #真心话大冒险特殊阶段定义
|
| | | (
|
| | | Def_ExamZXH_FunctionNO_SendSelectOption,
|
| | | Def_ExamZXH_FunctionNO_SendAnswer,
|
| | | ) = range(1, 2 + 1)
|
| | |
|
| | | #答题玩家未上榜索引标示
|
| | | Def_Game_Exam_NoInBillboardSign = 999
|
| | |
|
| | | #玩家头顶经验显示,获得经验渠道枚举,前端 2、4、5有展示经验倍率
|
| | | (
|
| | |
| | |
|
| | | #装备最大孔数
|
| | | Def_Equip_Max_Hole_Count = 9
|
| | |
|
| | | #---倒计时类型---
|
| | | #===============================================================================
|
| | | # /**计时器类型*/
|
| | | # enum TTimeTickType
|
| | | # {
|
| | | # tttLeaveMap = 0, ///<离开地图倒计时
|
| | | # tttWaitStart, ///<等待开始
|
| | | # tttTowerTake, ///<家族战占领塔, id为NPCid
|
| | | # tttFlagTake, ///<家族战占领棋
|
| | | # tttLeaveFamilyWar, ///<家族战完毕, 等待退出
|
| | | # tttAddUpTime, ///<累加时间
|
| | | # tttFBAddTime, ///<副本时间累计
|
| | | # tttMax, ///<无意义, 表示最大数目
|
| | | # };
|
| | | #===============================================================================
|
| | | (
|
| | | Def_TimeTickType_LeaveMap, #离开地图倒计时
|
| | | Def_TimeTickType_WaitStart, #等待开始
|
| | | Def_TimeTickType_TowerTake, #家族战占领塔, id为NPCid
|
| | | Def_TimeTickType_FlagTake, #家族战占领棋
|
| | | Def_TimeTickType_LeaveFamilyWar, #家族战完毕, 等待退出
|
| | | Def_TimeTickType_AddUpTime, #累加时间
|
| | | Def_TimeTickType_FBAddTime, #副本时间累计
|
| | | Def_TimeTickType_ExamLeaveMap, #答题剩余总时间
|
| | | Def_TimeTickType_ExamWaitStart, #答题等待时间
|
| | | Def_TimeTickType_ExamBeginCountDown, #答题开始倒计时特效
|
| | | Def_TimeTickType_Max, #无意义, 表示最大数目
|
| | | ) = range(0, 10 + 1)
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | #/**聊天频道*/
|
| | |
| | |
|
| | | #异常错误
|
| | | if not buffSkill:
|
| | | #GameWorld.Log("查找Buff异常 = %s "%(ChConfig.Def_SkillID_JoinExam) , curPlayer.GetPlayerID())
|
| | | #GameWorld.Log("查找Buff异常", curPlayer.GetPlayerID())
|
| | | return False
|
| | |
|
| | | buffType = SkillCommon.GetBuffType(buffSkill)
|
| | |
| | |
|
| | | #异常错误
|
| | | if not buffSkill:
|
| | | #GameWorld.Log("查找Buff异常 = %s "%(ChConfig.Def_SkillID_JoinExam) , curPlayer.GetPlayerID())
|
| | | #GameWorld.Log("查找Buff异常", curPlayer.GetPlayerID())
|
| | | return False
|
| | |
|
| | | buffType = SkillCommon.GetBuffType(buffSkill)
|