| | |
| | | list ItemList; //物品列表[[物品ID,个数,是否拍品], ...]
|
| | | };
|
| | |
|
| | | //仙盟阵法表
|
| | |
|
| | | struct tagFamilyZhenfa
|
| | | {
|
| | | BYTE _ZhenfaType; // 阵法类型
|
| | | WORD _ZhenfaLV; // 阵法等级
|
| | | DWORD LVUpNeedExp; //升下一级所需经验
|
| | | list LVAttrType; //累计总属性类型
|
| | | list LVAttrValue; //累计总属性值
|
| | | };
|
| | |
|
| | | //装备洗练等级上限
|
| | |
|
| | | struct tagItemWashMax
|
| | |
| | | PacketSubCMD_1=0x16
|
| | | PacketCallFunc_1=OnZhenbaogeOP
|
| | |
|
| | | ;家族阵法
|
| | | [PlayerFamilyZhenfa]
|
| | | ScriptName = Player\PlayerFamilyZhenfa.py
|
| | | Writer = hxp
|
| | | Releaser = hxp
|
| | | RegType = 0
|
| | | RegisterPackCount = 1
|
| | |
|
| | | PacketCMD_1=0xA6
|
| | | PacketSubCMD_1=0x14
|
| | | PacketCallFunc_1=OnFamilyZhenfaLVUP
|
| | |
|
| | | ;宠物
|
| | | [PlayerPet]
|
| | | ScriptName = Player\PlayerPet.py
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A6 14 家族阵法升级 #tagCMFamilyZhenfaLVUP
|
| | |
|
| | | class tagCMFamilyZhenfaLVUP(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ZhenfaType", c_ubyte), # 阵法类型
|
| | | ("ItemID", c_int), # 消耗的物品ID
|
| | | ("ItemCount", c_ushort), # 消耗个数,默认1
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA6
|
| | | self.SubCmd = 0x14
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xA6
|
| | | self.SubCmd = 0x14
|
| | | self.ZhenfaType = 0
|
| | | self.ItemID = 0
|
| | | self.ItemCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMFamilyZhenfaLVUP)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A6 14 家族阵法升级 //tagCMFamilyZhenfaLVUP:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ZhenfaType:%d,
|
| | | ItemID:%d,
|
| | | ItemCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ZhenfaType,
|
| | | self.ItemID,
|
| | | self.ItemCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMFamilyZhenfaLVUP=tagCMFamilyZhenfaLVUP()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFamilyZhenfaLVUP.Cmd,m_NAtagCMFamilyZhenfaLVUP.SubCmd))] = m_NAtagCMFamilyZhenfaLVUP
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A6 26 请求家族成员列表 #tagCMGetFamilyInfo
|
| | |
|
| | | class tagCMGetFamilyInfo(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 09 仙盟阵法信息 #tagMCFamilyZhenfaInfo
|
| | |
|
| | | class tagMCFamilyZhenfa(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ZhenfaType", c_ubyte), # 阵法类型
|
| | | ("ZhenfaLV", c_ushort), # 阵法等级
|
| | | ("ZhenfaExp", c_int), # 阵法经验
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.ZhenfaType = 0
|
| | | self.ZhenfaLV = 0
|
| | | self.ZhenfaExp = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFamilyZhenfa)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A5 09 仙盟阵法信息 //tagMCFamilyZhenfaInfo:
|
| | | ZhenfaType:%d,
|
| | | ZhenfaLV:%d,
|
| | | ZhenfaExp:%d
|
| | | '''\
|
| | | %(
|
| | | self.ZhenfaType,
|
| | | self.ZhenfaLV,
|
| | | self.ZhenfaExp
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFamilyZhenfaInfo(Structure):
|
| | | Head = tagHead()
|
| | | PlayerID = 0 #(DWORD PlayerID)// 当前培养阵法的玩家ID,如果有做自动捐献,需等收到的玩家ID为自己的时候才发送下一个捐献包
|
| | | Count = 0 #(BYTE Count)
|
| | | ZhenfaInfoList = list() #(vector<tagMCFamilyZhenfa> ZhenfaInfoList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA5
|
| | | self.Head.SubCmd = 0x09
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temZhenfaInfoList = tagMCFamilyZhenfa()
|
| | | _pos = temZhenfaInfoList.ReadData(_lpData, _pos)
|
| | | self.ZhenfaInfoList.append(temZhenfaInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA5
|
| | | self.Head.SubCmd = 0x09
|
| | | self.PlayerID = 0
|
| | | self.Count = 0
|
| | | self.ZhenfaInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.ZhenfaInfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.PlayerID)
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.ZhenfaInfoList[i].GetLength(), self.ZhenfaInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | PlayerID:%d,
|
| | | Count:%d,
|
| | | ZhenfaInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.PlayerID,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFamilyZhenfaInfo=tagMCFamilyZhenfaInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyZhenfaInfo.Head.Cmd,m_NAtagMCFamilyZhenfaInfo.Head.SubCmd))] = m_NAtagMCFamilyZhenfaInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 01 已申请加入的家族信息 #tagMCNotifyRequestJoinFamilyInfo
|
| | |
|
| | | class tagMCNotifyRequestJoinFamilyInfo(Structure):
|
| | |
| | | ("list", "ItemList", 0),
|
| | | ),
|
| | |
|
| | | "FamilyZhenfa":(
|
| | | ("BYTE", "ZhenfaType", 1),
|
| | | ("WORD", "ZhenfaLV", 1),
|
| | | ("DWORD", "LVUpNeedExp", 0),
|
| | | ("list", "LVAttrType", 0),
|
| | | ("list", "LVAttrValue", 0),
|
| | | ),
|
| | |
|
| | | "ItemWashMax":(
|
| | | ("BYTE", "Type", 1),
|
| | | ("BYTE", "Star", 1),
|
| | |
| | | def GetItemWeight(self): return self.attrTuple[1] # 随机权重 DWORD
|
| | | def GetItemList(self): return self.attrTuple[2] # 物品列表[[物品ID,个数,是否拍品], ...] list |
| | | |
| | | # 仙盟阵法表 |
| | | class IPY_FamilyZhenfa(): |
| | | |
| | | def __init__(self): |
| | | self.attrTuple = None |
| | | return |
| | | |
| | | def GetZhenfaType(self): return self.attrTuple[0] # 阵法类型 BYTE
|
| | | def GetZhenfaLV(self): return self.attrTuple[1] # 阵法等级 WORD
|
| | | def GetLVUpNeedExp(self): return self.attrTuple[2] # 升下一级所需经验 DWORD
|
| | | def GetLVAttrType(self): return self.attrTuple[3] # 累计总属性类型 list
|
| | | def GetLVAttrValue(self): return self.attrTuple[4] # 累计总属性值 list |
| | | |
| | | # 装备洗练等级上限 |
| | | class IPY_ItemWashMax(): |
| | | |
| | |
| | | self.__LoadFileData("FamilyDonate", onlyCheck)
|
| | | self.__LoadFileData("FamilyZhenbaogeCut", onlyCheck)
|
| | | self.__LoadFileData("FamilyZhenbaogeItem", onlyCheck)
|
| | | self.__LoadFileData("FamilyZhenfa", onlyCheck)
|
| | | self.__LoadFileData("ItemWashMax", onlyCheck)
|
| | | self.__LoadFileData("SkillElement", onlyCheck)
|
| | | self.__LoadFileData("LingGenEffect", onlyCheck)
|
| | |
| | | def GetFamilyZhenbaogeItemByIndex(self, index): |
| | | self.CheckLoadData("FamilyZhenbaogeItem") |
| | | return self.ipyFamilyZhenbaogeItemCache[index]
|
| | | |
| | | def GetFamilyZhenfaCount(self): |
| | | self.CheckLoadData("FamilyZhenfa") |
| | | return self.ipyFamilyZhenfaLen
|
| | | def GetFamilyZhenfaByIndex(self, index): |
| | | self.CheckLoadData("FamilyZhenfa") |
| | | return self.ipyFamilyZhenfaCache[index]
|
| | | |
| | | def GetItemWashMaxCount(self): |
| | | self.CheckLoadData("ItemWashMax") |
| | |
| | | import PlayerCoin
|
| | | import PlayerControl
|
| | | import PlayerFamily
|
| | | import PlayerFamilyZhenfa
|
| | | import PlayerLoginDayAward
|
| | | import NPCCommon
|
| | | import FunctionNPCCommon
|
| | |
| | |
|
| | | if key == ShareDefine.Def_Notify_WorldKey_FBOpenRecord:
|
| | | PyGameData.FBOpenTimeRecord = eval(msgValue)
|
| | | return
|
| | | |
| | | if key == ShareDefine.Def_Notify_WorldKey_VSFamilyInfo:
|
| | | PyGameData.VSFamilyInfo = eval(msgValue)
|
| | | return
|
| | | |
| | | if key == ShareDefine.Def_Notify_WorldKey_FamilyZhenfaInfo:
|
| | | PlayerFamilyZhenfa.GameServer_FamilyZhenfa(eval(msgValue))
|
| | | return
|
| | |
|
| | | if key == ShareDefine.Def_Notify_WorldKey_CoupleInfo:
|
| | |
| | | import PlayerViewCache
|
| | | import ChPyNetSendPack
|
| | | import PlayerFamilyEmblem
|
| | | #import PlayerFamilyZhenfa
|
| | | import PlayerFamilyZhenbaoge
|
| | | import IPY_PlayerDefine
|
| | | import IpyGameDataPY
|
| | |
| | | PlayerLoginRefreshFamily(curPlayer, tick)
|
| | | Sync_RequestAddFamilyInfo(curPlayer, False)
|
| | | SyncDonateCntInfo(curPlayer)
|
| | | #PlayerFamilyZhenfa.OnPlayerLogin(curPlayer)
|
| | | PlayerFamilyZhenbaoge.OnPlayerLogin(curPlayer)
|
| | | return
|
| | |
|
| | |
| | |
|
| | | FBOpenTimeRecord = {} #限时副本开启时间记录
|
| | |
|
| | | VSFamilyInfo = [] # 仙盟联赛开启的副本信息 [是否最终决赛场次, roundNum, groupID, [familyIDA, failyIDB], [familyNameA, familyNameB], [familyRankA, familyRankB]]
|
| | |
|
| | | g_PassiveEffManager = None # 被动技能(效果)单例
|
| | |
|
| | | g_maliciousAttackDict = {} # 受到恶意攻击信息 {playerID:{atkPlayerID:atkTick, ...}}
|
| | |
| | |
|
| | | g_playerPriWoodPileNPCDict = {} # {playerID:[npcObj, ...], ...}
|
| | | g_mirrorBattleDict = {} # {battleID:MirrorBattle, ...}
|
| | |
|
| | | g_familyZhenfaInfo = {} # 仙盟阵法信息{familyID:{zhenfaType:{k:v, }, ...}, ...}
|
| | |
|
| | | g_singleAtkRecordList = None # 单次攻击记录
|
| | |
|
| | |
| | | Def_PstMax, # 最大数量
|
| | | ) = range(10, 13 + 1)
|
| | |
|
| | | #---家族相关---
|
| | | Def_PlayerMoney_Change_FamilyMoney_Rate = 1 #玩家银子兑换家族资金比率 (PlayerMoney * 1)
|
| | |
|
| | | (
|
| | | TViewFamilyType_None, #无点击家族NPC
|
| | | TViewFamilyType_CreateFamily, #点击家族NPC, 创建家族状态
|
| | | TViewFamilyType_FamilyWar, #查看家族战
|
| | | TViewFamilyType_AddFamily, #查看申请加入家族
|
| | | ) = range(0, 3 + 1)
|
| | | #家族允许加入类型
|
| | | FamilyAcceptJoinType = (
|
| | | FamilyAcceptJoin_Examine, #0 默认需要审核
|
| | | FamilyAcceptJoin_Agree, #1 自动同意申请,除非已满员
|
| | | FamilyAcceptJoin_Refuse, #2 拒绝申请
|
| | | ) = range(0, 3)
|
| | |
|
| | | #开启的副本对战仙盟信息
|
| | | (
|
| | | VSFamilyInfo_IsFinalMatch, # 是否最终决赛场次
|
| | | VSFamilyInfo_RoundNum, # 轮次
|
| | | VSFamilyInfo_GroupID, # 联赛组级别
|
| | | VSFamilyInfo_FamilyIDList, # 对战仙盟ID列表
|
| | | VSFamilyInfo_FamilyRankList, # 对战仙盟排名列表
|
| | | VSFamilyInfo_FamilyNameList, # 对战仙盟名列表
|
| | | VSFamilyInfo_WinCountList, # 对战仙盟连胜次数列表
|
| | | ) = range(7)
|
| | |
|
| | | Def_OnEventHour = 5 # 特殊时间点凌晨X点过天/周
|
| | | Def_OnEventType = 1 # 常规过天/周策划表配置类型
|
| | | Def_OnEventTypeEx = 2 # 特殊时间点过天/周策划表配置类型
|
| | |
| | | Def_Notify_WorldKey_WorldAverageLv = "WorldAverageLv" #世界等级
|
| | | Def_Notify_WorldKey_YdayLoginCnt= 'YdayLoginCnt' # 昨天总在线人数
|
| | | Def_Notify_WorldKey_YdayNewCoinCnt = 'YdayNewCoinCnt' # 昨天总充值点券数
|
| | |
|
| | | Def_Notify_WorldKey_VSFamilyInfo = "VSFamilyInfo" # 仙盟联赛对战仙盟信息
|
| | | Def_Notify_WorldKey_ChampionFamilyID = "ChampionFamilyID" # 仙盟联赛上次冠军仙盟ID
|
| | |
|
| | | Def_Notify_WorldKey_FamilyZhenfaInfo = "FamilyZhenfaInfo" # 仙盟阵法数据
|
| | |
|
| | | Def_Notify_WorldKey_AddFamilyAuctionItem = "AddFamilyAuctionItem" # 添加仙盟拍品
|
| | | Def_Notify_WorldKey_AddSystemAuctionItem = "AddSystemAuctionItem" # 添加系统拍品
|
| | |
|
| | | Def_Notify_WorldKey_CrossServerConnState = "CrossServerConnState" # 跨服服务器链接状态
|
| | | Def_Notify_WorldKey_CrossServerOpen = "CrossServerOpen" # 跨服服务器是否开启中
|
| | |
| | | Def_ActionType_5,
|
| | | Def_ActionType_6,
|
| | | Def_ActionType_7,
|
| | | Def_ActionType_FamilyZhenfa, #仙盟阵法8
|
| | | Def_ActionType_8,
|
| | | Def_ActionType_9,
|
| | | Def_ActionType_10,
|
| | | Def_ActionType_11,
|