Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode
| | |
| | | DWORD MapID; //场景地图ID
|
| | | };
|
| | |
|
| | | //副本助战表
|
| | |
|
| | | struct tagFBHelpBattle
|
| | | {
|
| | | DWORD _DataMapID; //数据地图ID
|
| | | BYTE _LineID; //功能线路ID
|
| | | DWORD FightPowerMin; //助战最低战力,也是副本战力
|
| | | DWORD FightPowerMax; //助战最高战力,0为不限制
|
| | | WORD LVLimit; //助战等级限制, 0为不限制
|
| | | list DayFreeHelpCount; //每日免费助战次数,[每日免费助战次数, 是否所有层通用]
|
| | | };
|
| | |
|
| | | //地图表
|
| | |
|
| | | struct tagChinMap
|
| | |
| | | eval RewardInfo; //奖励信息
|
| | | };
|
| | |
|
| | | //副本助战表
|
| | |
|
| | | struct tagFBHelpBattle
|
| | | {
|
| | | DWORD _DataMapID; //数据地图ID
|
| | | BYTE _LineID; //功能线路ID
|
| | | DWORD RobotFightPower; //助战NPC战力
|
| | | WORD RobotLV; //助战NPC等级
|
| | | dict RobotSkillsDict; //助战NPC技能, {"职业":[技能列表], ...}
|
| | | };
|
| | |
|
| | | //副本刷怪标识点表
|
| | |
|
| | | struct tagNPCCustomRefresh
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 06 助战召唤 #tagCMHelpBattleCall
|
| | |
|
| | | class tagCMHelpBattleCall(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsOneKeyCall", c_ubyte), # 是否一键召唤
|
| | | ("PlayerID", c_int), # 召唤的玩家ID,大于1小于100代表机器人
|
| | | ("IsGoldCall", c_ubyte), # 是否仙玉召唤
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB1
|
| | | 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 = 0xB1
|
| | | self.SubCmd = 0x06
|
| | | self.IsOneKeyCall = 0
|
| | | self.PlayerID = 0
|
| | | self.IsGoldCall = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMHelpBattleCall)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 06 助战召唤 //tagCMHelpBattleCall:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsOneKeyCall:%d,
|
| | | PlayerID:%d,
|
| | | IsGoldCall:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsOneKeyCall,
|
| | | self.PlayerID,
|
| | | self.IsGoldCall
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMHelpBattleCall=tagCMHelpBattleCall()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHelpBattleCall.Cmd,m_NAtagCMHelpBattleCall.SubCmd))] = m_NAtagCMHelpBattleCall
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 05 助战登记 #tagCMHelpBattleCheckIn
|
| | |
|
| | | class tagCMHelpBattleCheckIn(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB1
|
| | | self.SubCmd = 0x05
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB1
|
| | | self.SubCmd = 0x05
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMHelpBattleCheckIn)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 05 助战登记 //tagCMHelpBattleCheckIn:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMHelpBattleCheckIn=tagCMHelpBattleCheckIn()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHelpBattleCheckIn.Cmd,m_NAtagCMHelpBattleCheckIn.SubCmd))] = m_NAtagCMHelpBattleCheckIn
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 07 助战刷新 #tagCMHelpBattleRefresh
|
| | |
|
| | | class tagCMHelpBattleRefresh(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB1
|
| | | self.SubCmd = 0x07
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB1
|
| | | self.SubCmd = 0x07
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMHelpBattleRefresh)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 07 助战刷新 //tagCMHelpBattleRefresh:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMHelpBattleRefresh=tagCMHelpBattleRefresh()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHelpBattleRefresh.Cmd,m_NAtagCMHelpBattleRefresh.SubCmd))] = m_NAtagCMHelpBattleRefresh
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 02 领取多倍副本奖励 #tagCMGetMultiFBPrize
|
| | |
|
| | | class tagCMGetMultiFBPrize(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 06 助战召唤结果 #tagMCHelpBattleCallResult
|
| | |
|
| | | class tagMCHelpBattleCallResult(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ObjID", c_int), # 助战实例ID
|
| | | ("PlayerID", c_int), # 助战镜像ID,大于1小于100代表机器人,如果是机器人前端按顺序自己记录对应实例ID代表已召唤
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | 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 = 0xB2
|
| | | self.SubCmd = 0x06
|
| | | self.ObjID = 0
|
| | | self.PlayerID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCHelpBattleCallResult)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 06 助战召唤结果 //tagMCHelpBattleCallResult:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ObjID:%d,
|
| | | PlayerID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ObjID,
|
| | | self.PlayerID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCHelpBattleCallResult=tagMCHelpBattleCallResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleCallResult.Cmd,m_NAtagMCHelpBattleCallResult.SubCmd))] = m_NAtagMCHelpBattleCallResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 05 助战登记结果 #tagMCHelpBattleCheckInResult
|
| | |
|
| | | class tagMCHelpBattleCheckInResult(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsOK", c_ubyte), #是否成功
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x05
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x05
|
| | | self.IsOK = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCHelpBattleCheckInResult)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 05 助战登记结果 //tagMCHelpBattleCheckInResult:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsOK:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsOK
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCHelpBattleCheckInResult=tagMCHelpBattleCheckInResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleCheckInResult.Cmd,m_NAtagMCHelpBattleCheckInResult.SubCmd))] = m_NAtagMCHelpBattleCheckInResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 07 助战机器人列表 #tagMCHelpBattleList
|
| | |
|
| | | class tagMCHelpBattlePlayer(Structure):
|
| | | ObjID = 0 #(DWORD ObjID)// 实例ID, 0代表未召唤
|
| | | PlayerID = 0 #(DWORD PlayerID)// 助战镜像ID, 大于1小于100代表机器人,如果是机器人,没有以下信息,相关信息自己读配置
|
| | | NameLen = 0 #(BYTE NameLen)
|
| | | Name = "" #(String Name)// 玩家名,size = NameLen
|
| | | LV = 0 #(WORD LV)// 玩家等级
|
| | | Job = 0 #(BYTE Job)// 玩家职业, 如果是机器人,则职业有值,服务端控制
|
| | | RealmLV = 0 #(WORD RealmLV)// 玩家境界等级
|
| | | FightPower = 0 #(DWORD FightPower)// 玩家战力
|
| | | IsNeedGold = 0 #(BYTE IsNeedGold)// 是否需要仙玉召唤
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.ObjID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
|
| | | self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.IsNeedGold,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.ObjID = 0
|
| | | self.PlayerID = 0
|
| | | self.NameLen = 0
|
| | | self.Name = ""
|
| | | self.LV = 0
|
| | | self.Job = 0
|
| | | self.RealmLV = 0
|
| | | self.FightPower = 0
|
| | | self.IsNeedGold = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.Name)
|
| | | length += 2
|
| | | length += 1
|
| | | length += 2
|
| | | length += 4
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.ObjID)
|
| | | data = CommFunc.WriteDWORD(data, self.PlayerID)
|
| | | data = CommFunc.WriteBYTE(data, self.NameLen)
|
| | | data = CommFunc.WriteString(data, self.NameLen, self.Name)
|
| | | data = CommFunc.WriteWORD(data, self.LV)
|
| | | data = CommFunc.WriteBYTE(data, self.Job)
|
| | | data = CommFunc.WriteWORD(data, self.RealmLV)
|
| | | data = CommFunc.WriteDWORD(data, self.FightPower)
|
| | | data = CommFunc.WriteBYTE(data, self.IsNeedGold)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | ObjID:%d,
|
| | | PlayerID:%d,
|
| | | NameLen:%d,
|
| | | Name:%s,
|
| | | LV:%d,
|
| | | Job:%d,
|
| | | RealmLV:%d,
|
| | | FightPower:%d,
|
| | | IsNeedGold:%d
|
| | | '''\
|
| | | %(
|
| | | self.ObjID,
|
| | | self.PlayerID,
|
| | | self.NameLen,
|
| | | self.Name,
|
| | | self.LV,
|
| | | self.Job,
|
| | | self.RealmLV,
|
| | | self.FightPower,
|
| | | self.IsNeedGold
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCHelpBattleList(Structure):
|
| | | Head = tagHead()
|
| | | RefreshCount = 0 #(BYTE RefreshCount)// 已刷新次数
|
| | | HelpCount = 0 #(BYTE HelpCount)// 助战个数
|
| | | HelpPlayerList = list() #(vector<tagMCHelpBattlePlayer> HelpPlayerList)// 助战镜像信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x07
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.RefreshCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.HelpCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.HelpCount):
|
| | | temHelpPlayerList = tagMCHelpBattlePlayer()
|
| | | _pos = temHelpPlayerList.ReadData(_lpData, _pos)
|
| | | self.HelpPlayerList.append(temHelpPlayerList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x07
|
| | | self.RefreshCount = 0
|
| | | self.HelpCount = 0
|
| | | self.HelpPlayerList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.HelpCount):
|
| | | length += self.HelpPlayerList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.RefreshCount)
|
| | | data = CommFunc.WriteBYTE(data, self.HelpCount)
|
| | | for i in range(self.HelpCount):
|
| | | data = CommFunc.WriteString(data, self.HelpPlayerList[i].GetLength(), self.HelpPlayerList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | RefreshCount:%d,
|
| | | HelpCount:%d,
|
| | | HelpPlayerList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.RefreshCount,
|
| | | self.HelpCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCHelpBattleList=tagMCHelpBattleList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleList.Head.Cmd,m_NAtagMCHelpBattleList.Head.SubCmd))] = m_NAtagMCHelpBattleList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 04 冰晶矿脉信息通知 #tagMCIceLodeInfo
|
| | |
|
| | | class tagMCIceLodeInfo(Structure):
|
| | |
| | | ("DWORD", "MapID", 0),
|
| | | ),
|
| | |
|
| | | "FBHelpBattle":(
|
| | | ("DWORD", "DataMapID", 1),
|
| | | ("BYTE", "LineID", 1),
|
| | | ("DWORD", "FightPowerMin", 0),
|
| | | ("DWORD", "FightPowerMax", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("list", "DayFreeHelpCount", 0),
|
| | | ),
|
| | |
|
| | | "ChinMap":(
|
| | | ("DWORD", "MapID", 1),
|
| | | ("char", "MapName", 0),
|
| | |
| | | def GetDataMapID(self): return self.DataMapID # 数据地图ID
|
| | | def GetLineID(self): return self.LineID # 功能线路ID
|
| | | def GetMapID(self): return self.MapID # 场景地图ID |
| | | |
| | | # 副本助战表 |
| | | class IPY_FBHelpBattle(): |
| | | |
| | | def __init__(self): |
| | | self.DataMapID = 0
|
| | | self.LineID = 0
|
| | | self.FightPowerMin = 0
|
| | | self.FightPowerMax = 0
|
| | | self.LVLimit = 0
|
| | | self.DayFreeHelpCount = [] |
| | | return |
| | | |
| | | def GetDataMapID(self): return self.DataMapID # 数据地图ID
|
| | | def GetLineID(self): return self.LineID # 功能线路ID
|
| | | def GetFightPowerMin(self): return self.FightPowerMin # 助战最低战力,也是副本战力
|
| | | def GetFightPowerMax(self): return self.FightPowerMax # 助战最高战力,0为不限制
|
| | | def GetLVLimit(self): return self.LVLimit # 助战等级限制, 0为不限制
|
| | | def GetDayFreeHelpCount(self): return self.DayFreeHelpCount # 每日免费助战次数,[每日免费助战次数, 是否所有层通用] |
| | | |
| | | # 地图表 |
| | | class IPY_ChinMap(): |
| | |
| | | self.ipyFBStateTimeCustomLen = len(self.ipyFBStateTimeCustomCache)
|
| | | self.ipyFBLineCache = self.__LoadFileData("FBLine", IPY_FBLine)
|
| | | self.ipyFBLineLen = len(self.ipyFBLineCache)
|
| | | self.ipyFBHelpBattleCache = self.__LoadFileData("FBHelpBattle", IPY_FBHelpBattle)
|
| | | self.ipyFBHelpBattleLen = len(self.ipyFBHelpBattleCache)
|
| | | self.ipyChinMapCache = self.__LoadFileData("ChinMap", IPY_ChinMap)
|
| | | self.ipyChinMapLen = len(self.ipyChinMapCache)
|
| | | self.ipyBOSSInfoCache = self.__LoadFileData("BOSSInfo", IPY_BOSSInfo)
|
| | |
| | | def GetFBStateTimeCustomByIndex(self, index): return self.ipyFBStateTimeCustomCache[index]
|
| | | def GetFBLineCount(self): return self.ipyFBLineLen
|
| | | def GetFBLineByIndex(self, index): return self.ipyFBLineCache[index]
|
| | | def GetFBHelpBattleCount(self): return self.ipyFBHelpBattleLen
|
| | | def GetFBHelpBattleByIndex(self, index): return self.ipyFBHelpBattleCache[index]
|
| | | def GetChinMapCount(self): return self.ipyChinMapLen
|
| | | def GetChinMapByIndex(self, index): return self.ipyChinMapCache[index]
|
| | | def GetBOSSInfoCount(self): return self.ipyBOSSInfoLen
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 06 助战召唤 #tagCMHelpBattleCall
|
| | |
|
| | | class tagCMHelpBattleCall(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsOneKeyCall", c_ubyte), # 是否一键召唤
|
| | | ("PlayerID", c_int), # 召唤的玩家ID,大于1小于100代表机器人
|
| | | ("IsGoldCall", c_ubyte), # 是否仙玉召唤
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB1
|
| | | 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 = 0xB1
|
| | | self.SubCmd = 0x06
|
| | | self.IsOneKeyCall = 0
|
| | | self.PlayerID = 0
|
| | | self.IsGoldCall = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMHelpBattleCall)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 06 助战召唤 //tagCMHelpBattleCall:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsOneKeyCall:%d,
|
| | | PlayerID:%d,
|
| | | IsGoldCall:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsOneKeyCall,
|
| | | self.PlayerID,
|
| | | self.IsGoldCall
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMHelpBattleCall=tagCMHelpBattleCall()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHelpBattleCall.Cmd,m_NAtagCMHelpBattleCall.SubCmd))] = m_NAtagCMHelpBattleCall
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 05 助战登记 #tagCMHelpBattleCheckIn
|
| | |
|
| | | class tagCMHelpBattleCheckIn(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB1
|
| | | self.SubCmd = 0x05
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB1
|
| | | self.SubCmd = 0x05
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMHelpBattleCheckIn)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 05 助战登记 //tagCMHelpBattleCheckIn:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMHelpBattleCheckIn=tagCMHelpBattleCheckIn()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHelpBattleCheckIn.Cmd,m_NAtagCMHelpBattleCheckIn.SubCmd))] = m_NAtagCMHelpBattleCheckIn
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 07 助战刷新 #tagCMHelpBattleRefresh
|
| | |
|
| | | class tagCMHelpBattleRefresh(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB1
|
| | | self.SubCmd = 0x07
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB1
|
| | | self.SubCmd = 0x07
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMHelpBattleRefresh)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 07 助战刷新 //tagCMHelpBattleRefresh:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMHelpBattleRefresh=tagCMHelpBattleRefresh()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHelpBattleRefresh.Cmd,m_NAtagCMHelpBattleRefresh.SubCmd))] = m_NAtagCMHelpBattleRefresh
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 02 领取多倍副本奖励 #tagCMGetMultiFBPrize
|
| | |
|
| | | class tagCMGetMultiFBPrize(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 06 助战召唤结果 #tagMCHelpBattleCallResult
|
| | |
|
| | | class tagMCHelpBattleCallResult(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ObjID", c_int), # 助战实例ID
|
| | | ("PlayerID", c_int), # 助战镜像ID,大于1小于100代表机器人,如果是机器人前端按顺序自己记录对应实例ID代表已召唤
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | 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 = 0xB2
|
| | | self.SubCmd = 0x06
|
| | | self.ObjID = 0
|
| | | self.PlayerID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCHelpBattleCallResult)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 06 助战召唤结果 //tagMCHelpBattleCallResult:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ObjID:%d,
|
| | | PlayerID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ObjID,
|
| | | self.PlayerID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCHelpBattleCallResult=tagMCHelpBattleCallResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleCallResult.Cmd,m_NAtagMCHelpBattleCallResult.SubCmd))] = m_NAtagMCHelpBattleCallResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 05 助战登记结果 #tagMCHelpBattleCheckInResult
|
| | |
|
| | | class tagMCHelpBattleCheckInResult(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsOK", c_ubyte), #是否成功
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x05
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x05
|
| | | self.IsOK = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCHelpBattleCheckInResult)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 05 助战登记结果 //tagMCHelpBattleCheckInResult:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsOK:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsOK
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCHelpBattleCheckInResult=tagMCHelpBattleCheckInResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleCheckInResult.Cmd,m_NAtagMCHelpBattleCheckInResult.SubCmd))] = m_NAtagMCHelpBattleCheckInResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 07 助战机器人列表 #tagMCHelpBattleList
|
| | |
|
| | | class tagMCHelpBattlePlayer(Structure):
|
| | | ObjID = 0 #(DWORD ObjID)// 实例ID, 0代表未召唤
|
| | | PlayerID = 0 #(DWORD PlayerID)// 助战镜像ID, 大于1小于100代表机器人,如果是机器人,没有以下信息,相关信息自己读配置
|
| | | NameLen = 0 #(BYTE NameLen)
|
| | | Name = "" #(String Name)// 玩家名,size = NameLen
|
| | | LV = 0 #(WORD LV)// 玩家等级
|
| | | Job = 0 #(BYTE Job)// 玩家职业, 如果是机器人,则职业有值,服务端控制
|
| | | RealmLV = 0 #(WORD RealmLV)// 玩家境界等级
|
| | | FightPower = 0 #(DWORD FightPower)// 玩家战力
|
| | | IsNeedGold = 0 #(BYTE IsNeedGold)// 是否需要仙玉召唤
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.ObjID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
|
| | | self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.IsNeedGold,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.ObjID = 0
|
| | | self.PlayerID = 0
|
| | | self.NameLen = 0
|
| | | self.Name = ""
|
| | | self.LV = 0
|
| | | self.Job = 0
|
| | | self.RealmLV = 0
|
| | | self.FightPower = 0
|
| | | self.IsNeedGold = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.Name)
|
| | | length += 2
|
| | | length += 1
|
| | | length += 2
|
| | | length += 4
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.ObjID)
|
| | | data = CommFunc.WriteDWORD(data, self.PlayerID)
|
| | | data = CommFunc.WriteBYTE(data, self.NameLen)
|
| | | data = CommFunc.WriteString(data, self.NameLen, self.Name)
|
| | | data = CommFunc.WriteWORD(data, self.LV)
|
| | | data = CommFunc.WriteBYTE(data, self.Job)
|
| | | data = CommFunc.WriteWORD(data, self.RealmLV)
|
| | | data = CommFunc.WriteDWORD(data, self.FightPower)
|
| | | data = CommFunc.WriteBYTE(data, self.IsNeedGold)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | ObjID:%d,
|
| | | PlayerID:%d,
|
| | | NameLen:%d,
|
| | | Name:%s,
|
| | | LV:%d,
|
| | | Job:%d,
|
| | | RealmLV:%d,
|
| | | FightPower:%d,
|
| | | IsNeedGold:%d
|
| | | '''\
|
| | | %(
|
| | | self.ObjID,
|
| | | self.PlayerID,
|
| | | self.NameLen,
|
| | | self.Name,
|
| | | self.LV,
|
| | | self.Job,
|
| | | self.RealmLV,
|
| | | self.FightPower,
|
| | | self.IsNeedGold
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCHelpBattleList(Structure):
|
| | | Head = tagHead()
|
| | | RefreshCount = 0 #(BYTE RefreshCount)// 已刷新次数
|
| | | HelpCount = 0 #(BYTE HelpCount)// 助战个数
|
| | | HelpPlayerList = list() #(vector<tagMCHelpBattlePlayer> HelpPlayerList)// 助战镜像信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x07
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.RefreshCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.HelpCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.HelpCount):
|
| | | temHelpPlayerList = tagMCHelpBattlePlayer()
|
| | | _pos = temHelpPlayerList.ReadData(_lpData, _pos)
|
| | | self.HelpPlayerList.append(temHelpPlayerList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x07
|
| | | self.RefreshCount = 0
|
| | | self.HelpCount = 0
|
| | | self.HelpPlayerList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.HelpCount):
|
| | | length += self.HelpPlayerList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.RefreshCount)
|
| | | data = CommFunc.WriteBYTE(data, self.HelpCount)
|
| | | for i in range(self.HelpCount):
|
| | | data = CommFunc.WriteString(data, self.HelpPlayerList[i].GetLength(), self.HelpPlayerList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | RefreshCount:%d,
|
| | | HelpCount:%d,
|
| | | HelpPlayerList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.RefreshCount,
|
| | | self.HelpCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCHelpBattleList=tagMCHelpBattleList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleList.Head.Cmd,m_NAtagMCHelpBattleList.Head.SubCmd))] = m_NAtagMCHelpBattleList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 04 冰晶矿脉信息通知 #tagMCIceLodeInfo
|
| | |
|
| | | class tagMCIceLodeInfo(Structure):
|
| | |
| | |
|
| | |
|
| | | #总跑环次数已满,不可再做
|
| | | if run_event == Def_Run_Around_Over_1 and allCount >= RUNCOUNT:
|
| | | return
|
| | | if run_event == Def_Run_Around_Over_1:
|
| | | if allCount >= RUNCOUNT or aroundCount >= AROUNDCOUNT:
|
| | | return
|
| | |
|
| | | nextMissionID = 0
|
| | | nextMission = None
|
| | |
| | |
|
| | | if curMissionData.Type == QuestCommon.Def_Mission_Type_RunFamily:
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_TaskFRun, 1)
|
| | | if allCount < RUNCOUNT:
|
| | | nextMissionID = __OverRandRunAround(curPlayer, curMissionData)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RunTaskNextMissionID % curMissionData.Type, nextMissionID)
|
| | | # if allCount < RUNCOUNT:
|
| | | # nextMissionID = __OverRandRunAround(curPlayer, curMissionData)
|
| | | # PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RunTaskNextMissionID % curMissionData.Type, nextMissionID)
|
| | |
|
| | |
|
| | |
|
| | |
| | | lineID = FBCommon.GetFBPropertyMark()
|
| | | star = GameWorld.GetGameFB().GetGameFBDictByKey(FBPlayerDict_FBStar)
|
| | | mapID = ChConfig.Def_FBMapID_IceLode
|
| | | |
| | | isInFBOnDay = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_IceLodeIsInFBOnDay)
|
| | | #更新星级
|
| | | lastStar = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [mapID])
|
| | | if isPass and star > lastStar:
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, star, False, [mapID])
|
| | | FBCommon.Sync_FBPlayerFBInfoData(curPlayer, mapID) # 同步信息
|
| | | if not lastStar: #每日活动
|
| | | if not lastStar and not isInFBOnDay: #每日活动
|
| | | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_IceLode)
|
| | | isInFBOnDay = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_IceLodeIsInFBOnDay)
|
| | | if isInFBOnDay: #在副本里过天,副本结束后再补发奖励
|
| | | |
| | | if isInFBOnDay: #在副本里过天,副本结束后再补发星级奖励
|
| | | CheckIceLodeStarAwardMail(curPlayer)
|
| | | # exp = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_TotalExp)
|
| | | # expPoint = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_TotalExpPoint)
|
| | |
| | | if not costTime:
|
| | | costTime = tick - GameWorld.GetGameFB().GetFBStepTick()
|
| | | #jsonItemList = PyGameData.g_fbPickUpItemDict.get(playerID, [])
|
| | | jsonItemList = FBCommon.GetJsonItemList(FBCommon.GetFBLineReward(mapID, lineID))
|
| | | overDict = {FBCommon.Over_isPass:int(isPass), FBCommon.Over_costTime:costTime}
|
| | | if isPass:
|
| | | itemList = FBCommon.GetFBLineReward(mapID, lineID)
|
| | | # 给物品
|
| | | needSpace = len(itemList)
|
| | | packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, needSpace)
|
| | | if needSpace > packSpace:
|
| | | PlayerControl.SendMailByKey('', [curPlayer.GetID()], itemList)
|
| | | else:
|
| | | for itemID, itemCount, isBind in itemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isBind, [IPY_GameWorld.rptItem])
|
| | | |
| | | jsonItemList = FBCommon.GetJsonItemList(itemList)
|
| | | overDict[FBCommon.Over_itemInfo] = jsonItemList
|
| | | # 通知结果
|
| | | __SendIceLodeOverInfo(curPlayer, {FBCommon.Over_isPass:int(isPass), FBCommon.Over_costTime:costTime, FBCommon.Over_itemInfo:jsonItemList})
|
| | | __SendIceLodeOverInfo(curPlayer, overDict)
|
| | |
|
| | | # 进入离开阶段
|
| | | FBCommon.SetFBStep(FB_Step_Over, tick)
|
| | |
| | |
|
| | | ## 可否扫荡
|
| | | def OnPlayerFBSweepAsk(curPlayer, mapID, lineID, sweepCnt, isFinish, dataEx):
|
| | | if curPlayer.GetMapID() == ChConfig.Def_FBMapID_IceLode:
|
| | | GameWorld.DebugLog('冰晶矿脉扫荡 副本里不能扫荡 ')
|
| | | return
|
| | | #战力判断
|
| | | LVIpyData = PlayerControl.GetPlayerLVIpyData(curPlayer.GetLV())
|
| | | reFightPower = 0 if not LVIpyData else LVIpyData.GetIceLodeFightPower() # 当前等级参考战力
|
| | |
| | | for itemID, itemCnt, isBind in itemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind, [IPY_GameWorld.rptItem])
|
| | | #直接将5条线星级改为3星
|
| | | addCnt = 0
|
| | | starCnt, lineList = GetIceLodeAllStarCnt(curPlayer)
|
| | | for lineid in lineList:
|
| | | curStar = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [mapID])
|
| | | if curStar == 0:
|
| | | addCnt += 1
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineid, 3, False, [mapID])
|
| | | |
| | | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_IceLode, addCnt)
|
| | | FBCommon.Sync_FBPlayerFBInfoData(curPlayer, mapID) # 同步信息
|
| | | # npcCountDict = {}
|
| | | # iceLodeSweepDict = IpyGameDataPY.GetFuncEvalCfg('IceLodeSweep')
|
| | | # for npcID, count in iceLodeSweepDict.items():
|
| | |
| | | maxCnt, randomCnt = IpyGameDataPY.GetFuncEvalCfg('IceLodeCfg', 2)
|
| | | for i in xrange(maxCnt):
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, i, 0, False, [ChConfig.Def_FBMapID_IceLode])
|
| | | FBCommon.Sync_FBPlayerFBInfoData(curPlayer, ChConfig.Def_FBMapID_IceLode) # 同步信息
|
| | | #重置领奖记录
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_IceLodeStarAwardRecord, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_IceLodeHasSweep, 0)
|
| | | #随机今日玩法
|
| | | __RandomLine(curPlayer)
|
| | | #֪ͨ
|
| | |
| | | ("eval", "RewardInfo", 0),
|
| | | ),
|
| | |
|
| | | "FBHelpBattle":(
|
| | | ("DWORD", "DataMapID", 1),
|
| | | ("BYTE", "LineID", 1),
|
| | | ("DWORD", "RobotFightPower", 0),
|
| | | ("WORD", "RobotLV", 0),
|
| | | ("dict", "RobotSkillsDict", 0),
|
| | | ),
|
| | |
|
| | | "NPCCustomRefresh":(
|
| | | ("DWORD", "ID", 1),
|
| | | ("list", "RefreshMarkInfo", 0),
|
| | |
| | | def GetGradeInfo(self): return self.GradeInfo # 评级规则
|
| | | def GetRewardInfo(self): return self.RewardInfo # 奖励信息 |
| | | |
| | | # 副本助战表 |
| | | class IPY_FBHelpBattle(): |
| | | |
| | | def __init__(self): |
| | | self.DataMapID = 0
|
| | | self.LineID = 0
|
| | | self.RobotFightPower = 0
|
| | | self.RobotLV = 0
|
| | | self.RobotSkillsDict = {} |
| | | return |
| | | |
| | | def GetDataMapID(self): return self.DataMapID # 数据地图ID
|
| | | def GetLineID(self): return self.LineID # 功能线路ID
|
| | | def GetRobotFightPower(self): return self.RobotFightPower # 助战NPC战力
|
| | | def GetRobotLV(self): return self.RobotLV # 助战NPC等级
|
| | | def GetRobotSkillsDict(self): return self.RobotSkillsDict # 助战NPC技能, {"职业":[技能列表], ...} |
| | | |
| | | # 副本刷怪标识点表 |
| | | class IPY_NPCCustomRefresh(): |
| | | |
| | |
| | | self.ipyFBFuncLen = len(self.ipyFBFuncCache)
|
| | | self.ipyFBLineCache = self.__LoadFileData("FBLine", IPY_FBLine)
|
| | | self.ipyFBLineLen = len(self.ipyFBLineCache)
|
| | | self.ipyFBHelpBattleCache = self.__LoadFileData("FBHelpBattle", IPY_FBHelpBattle)
|
| | | self.ipyFBHelpBattleLen = len(self.ipyFBHelpBattleCache)
|
| | | self.ipyNPCCustomRefreshCache = self.__LoadFileData("NPCCustomRefresh", IPY_NPCCustomRefresh)
|
| | | self.ipyNPCCustomRefreshLen = len(self.ipyNPCCustomRefreshCache)
|
| | | self.ipyDailyActionCache = self.__LoadFileData("DailyAction", IPY_DailyAction)
|
| | |
| | | def GetFBFuncByIndex(self, index): return self.ipyFBFuncCache[index]
|
| | | def GetFBLineCount(self): return self.ipyFBLineLen
|
| | | def GetFBLineByIndex(self, index): return self.ipyFBLineCache[index]
|
| | | def GetFBHelpBattleCount(self): return self.ipyFBHelpBattleLen
|
| | | def GetFBHelpBattleByIndex(self, index): return self.ipyFBHelpBattleCache[index]
|
| | | def GetNPCCustomRefreshCount(self): return self.ipyNPCCustomRefreshLen
|
| | | def GetNPCCustomRefreshByIndex(self, index): return self.ipyNPCCustomRefreshCache[index]
|
| | | def GetDailyActionCount(self): return self.ipyDailyActionLen
|
| | |
| | |
|
| | | #老号相关神兵场景特效等级同步支持
|
| | | if curPlayer.GetExAttr15() == 0:
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | maxType = ipyDataMgr.GetGodWeaponByIndex(ipyDataMgr.GetGodWeaponCount()-1).GetType()
|
| | | for setWeaponType in xrange(1, maxType + 1):
|
| | |
| | | if not setLV:
|
| | | continue
|
| | | SetGodWeaponLV(curPlayer, setWeaponType, setLV)
|
| | | GameWorld.Log("老号设置神兵场景等级: setWeaponType=%s,setLV=%s" % (setWeaponType, setLV), curPlayer.GetPlayerID())
|
| | | |
| | | giveSkillList = []
|
| | | for attrLV in xrange(1, setLV + 1):
|
| | | godWeaponData = IpyGameDataPY.GetIpyGameData('GodWeapon', setWeaponType, attrLV)
|
| | | if godWeaponData:
|
| | | giveSkillID = GodWeaponLVUP(curPlayer, godWeaponData, attrLV)
|
| | | if giveSkillID:
|
| | | giveSkillList.append(giveSkillID)
|
| | | GameWorld.Log("老号设置神兵场景等级: setWeaponType=%s,setLV=%s, giveSkillList=%s" % (setWeaponType, setLV, giveSkillList), playerID)
|
| | | |
| | | return
|
| | |
|
| | | def SetGodWeaponLV(curPlayer, weaponType, lv):
|
| | |
| | | sysMark = godWeaponData.GetSysMark()
|
| | | if sysMark:
|
| | | PlayerControl.WorldNotify(0, sysMark, [curPlayer.GetName(), attrLV, skillID])
|
| | | return skillID
|
| | | return
|
| | | |
| | |
|
| | |
|
| | |
|