860312 优化开关服时间,memmove在大数据情况下耗时会几何数增加;并且优化个人邮件30天后清理,避免流失玩家合服后积累
| | |
| | | return
|
| | |
|
| | |
|
| | | ##æ¸
çè¶
æ¶30天ç个人é®ä»¶, å¦åæµå¤±ç©å®¶å¨ä¸æåææ
åµä¸æ°æ®ä¼ç´¯ç§¯
|
| | | # 个人é®ä»¶ææ è¿ææ¶é´è®¾å®ï¼åªæ30天æ¸
çé»è¾,以å建æ¶é´ä¸ºå
|
| | | # @param None
|
| | | # @return None
|
| | | def ClearUpPersonalCompensation():
|
| | | #æ ¡éªè¿æè¡¥å¿
|
| | | curTime = datetime.datetime.today()
|
| | | needClearGUIDList = []
|
| | | allCnt = GameWorld.GetCompensationMgr().GetAllPersonalCompensationCount()
|
| | | for i in xrange(allCnt):
|
| | | curMail = GameWorld.GetCompensationMgr().AtAllPersonalCompensation(i)
|
| | | # è¶
è¿æ¥æ¶é®ä»¶30天åå®å
¨å 餿¤é®ä»¶
|
| | | limitTime = datetime.datetime.strptime(curMail.CreateTime, ChConfig.TYPE_Time_Format) + datetime.timedelta(days = 30)
|
| | | if limitTime < curTime:
|
| | | needClearGUIDList.append([curMail.PlayerID, curMail.GUID])
|
| | | |
| | | #å é¤è¿æè¡¥å¿ä¿¡æ¯ï¼ 没æä¸»å¨éç¥å¨çº¿ç©å®¶
|
| | | for playerID, GUID in needClearGUIDList:
|
| | | ClearPersonalCompensation(playerID, GUID)
|
| | | return
|
| | |
|
| | | ## æ¸
çè¶
æ¶è¡¥å¿, 个人é®ä»¶å¨è¶
è¿ä¸éåæä¼èªå¨å é¤
|
| | | # @param None
|
| | | # @return None
|
| | | def ClearUpTimeOutCompensation():
|
| | |
|
| | | ClearUpPersonalCompensation()
|
| | | ClearUpEntireCompensation()
|
| | | return
|
| | |
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.ZoneID, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.SeasonID, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.PlayerName, pos = CommFunc.ReadString(buf, pos, 33)
|
| | | self.Job, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.FightPower, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.RealmLV, pos = CommFunc.ReadWORD(buf, pos)
|
| | | self.PKScore, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.DanLV, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.Time, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | self.PlayerName = Str
|
| | | else:
|
| | | self.PlayerName = Str[:33]
|
| | | |
| | | |
| | |
|
| | | #ä»éä¹äºè®°å½è¡¨#tagDBPyXMZZ
|
| | | class tagDBPyXMZZ(Structure):
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.LineID, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.Rank, pos = CommFunc.ReadWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | self.ADOResult,
|
| | | )
|
| | | return output
|
| | |
|
| | |
|
| | |
|
| | | #Bosså
³æ³¨è®°å½è¡¨#tagDBPyBossAttention
|
| | |
| | | return output
|
| | |
|
| | |
|
| | |
|
| | | #交ææç©åæè¿æäº¤å价表#tagDBPyBourseItemLastPrice
|
| | | class tagDBPyBourseItemLastPrice(Structure):
|
| | | _pack_ = 1
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.ItemID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.LastPrice, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | )
|
| | | return output
|
| | |
|
| | |
|
| | | #ç©å®¶é»åå #tagDBPyPlayerBlack
|
| | | class tagDBPyPlayerBlack(Structure):
|
| | | _pack_ = 1
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.TagID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.TagID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Timestamp, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.TagID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | )
|
| | | return output
|
| | |
|
| | |
|
| | | #ç©å®¶ä»äººè¡¨#tagPlayerEnemy
|
| | | class tagPlayerEnemy(Structure):
|
| | | _pack_ = 1
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.TagID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Timestamp, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | return output
|
| | |
|
| | |
|
| | |
|
| | | #个人社交æ»è¡¨ #tagPersonalSocial
|
| | | class tagPersonalSocial(Structure):
|
| | | _pack_ = 1
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.PlayerName, pos = CommFunc.ReadString(buf, pos, 33)
|
| | | self.Job, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.LV, pos = CommFunc.ReadWORD(buf, pos)
|
| | | self.RealmLV, pos = CommFunc.ReadWORD(buf, pos)
|
| | | self.OnlineType, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.RefCount, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | else:
|
| | | self.PlayerName = Str[:33]
|
| | |
|
| | |
|
| | |
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | msg = error.formatMsg('error', error.ERROR_NO_150, '(pos = %s)> (length = %s)'%(pos, length))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | msg = error.formatMsg('error', error.ERROR_NO_151, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.FamilyID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Name, pos = CommFunc.ReadString(buf, pos, 33)
|
| | | self.Sex, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.LV, pos = CommFunc.ReadWORD(buf, pos)
|
| | | self.Job, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.FamilyLV, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.FamilyName, pos = CommFunc.ReadString(buf, pos, 33)
|
| | | self.FamilyActiveValue, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.OfficialRank, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.Exattr1, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Exattr2, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Exattr3, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Exattr4, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Exattr5, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.ReincarnationLv, pos = CommFunc.ReadWORD(buf, pos)
|
| | | self.OperateInfo, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | else:
|
| | | self.FamilyName = Str[:33]
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #ç©å®¶éª 车马å¹è¡¨#tagPlayerHorseTable
|
| | |
| | |
|
| | |
|
| | |
|
| | |
|
| | | #éç¨è®°å½è¡¨#tagUniversalGameRec
|
| | | class tagUniversalGameRec(Structure):
|
| | | _pack_ = 1
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | msg = error.formatMsg('error', error.ERROR_NO_150, '(pos = %s)> (length = %s)'%(pos, length))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | msg = error.formatMsg('error', error.ERROR_NO_151, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.Type, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.Time, pos = CommFunc.ReadDouble(buf, pos)
|
| | | self.StrValue1, pos = CommFunc.ReadString(buf, pos, 33)
|
| | | self.StrValue2, pos = CommFunc.ReadString(buf, pos, 33)
|
| | | self.Value1, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Value2, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Value3, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Value4, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Value5, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.StrValue3, pos = CommFunc.ReadString(buf, pos, 256)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | self.StrValue3 = Str
|
| | | else:
|
| | | self.StrValue3 = Str[:256]
|
| | | |
| | | |
| | |
|
| | | #鵿³#tagBattleFormation
|
| | | class tagBattleFormation(Structure):
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | msg = error.formatMsg('error', error.ERROR_NO_150, '(pos = %s)> (length = %s)'%(pos, length))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | msg = error.formatMsg('error', error.ERROR_NO_151, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.GUID, pos = CommFunc.ReadString(buf, pos, 40)
|
| | | self.RecState, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | self.GUID = Str
|
| | | else:
|
| | | self.GUID = Str[:40]
|
| | | |
| | | |
| | |
|
| | |
|
| | | #ç©å®¶æ°æ®æ¥çç¼å表#tagPlayerViewCache
|
| | |
| | |
|
| | |
|
| | |
|
| | |
|
| | | #ç©å®¶å¥½å表#tagDBPyPlayerFriend
|
| | | class tagDBPyPlayerFriend(Structure):
|
| | | _pack_ = 1
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | msg = error.formatMsg('error', error.ERROR_NO_150, '(pos = %s)> (length = %s)'%(pos, length))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | msg = error.formatMsg('error', error.ERROR_NO_151, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.TagID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | )
|
| | | return output
|
| | |
|
| | |
|
| | | #个人社交æ»è¡¨ #tagPersonalSocial
|
| | | class tagPersonalSocial(Structure):
|
| | | _pack_ = 1
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | msg = error.formatMsg('error', error.ERROR_NO_150, '(pos = %s)> (length = %s)'%(pos, length))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | msg = error.formatMsg('error', error.ERROR_NO_151, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.PlayerName, pos = CommFunc.ReadString(buf, pos, 33)
|
| | | self.Job, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.LV, pos = CommFunc.ReadWORD(buf, pos)
|
| | | self.RealmLV, pos = CommFunc.ReadWORD(buf, pos)
|
| | | self.OnlineType, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.RefCount, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | self.PlayerName = Str[:33]
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | #ç©å®¶é»åå #tagDBPyPlayerBlack
|
| | | class tagDBPyPlayerBlack(Structure):
|
| | | _pack_ = 1
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | msg = error.formatMsg('error', error.ERROR_NO_150, '(pos = %s)> (length = %s)'%(pos, length))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | msg = error.formatMsg('error', error.ERROR_NO_151, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.TagID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | msg = error.formatMsg('error', error.ERROR_NO_150, '(pos = %s)> (length = %s)'%(pos, length))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | msg = error.formatMsg('error', error.ERROR_NO_151, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.TagID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Timestamp, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | msg = error.formatMsg('error', error.ERROR_NO_150, '(pos = %s)> (length = %s)'%(pos, length))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | msg = error.formatMsg('error', error.ERROR_NO_151, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.TagID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Timestamp, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | self.Timestamp,
|
| | | )
|
| | | return output
|
| | |
|
| | |
|
| | |
|
| | | # å®¶æä»åºç©å表#tagDBPyFamilyStoreItem
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | msg = error.formatMsg('error', error.ERROR_NO_150, '(pos = %s)> (length = %s)'%(pos, length))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | msg = error.formatMsg('error', error.ERROR_NO_151, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.ItemID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.LastPrice, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | msg = error.formatMsg('error', error.ERROR_NO_150, '(pos = %s)> (length = %s)'%(pos, length))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | msg = error.formatMsg('error', error.ERROR_NO_151, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.LineID, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.Rank, pos = CommFunc.ReadWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | def clear(self):
|
| | | memset(addressof(self), 0, self.getLength())
|
| | |
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | | msg = error.formatMsg('error', error.ERROR_NO_150, '(pos = %s)> (length = %s)'%(pos, length))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | if len(buf) < pos + self.getLength():
|
| | | msg = error.formatMsg('error', error.ERROR_NO_151, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
|
| | | mylog.error(msg)
|
| | | return -1
|
| | | self.clear()
|
| | | memmove(addressof(self), buf[pos:], self.getLength())
|
| | | self.ZoneID, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.SeasonID, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.PlayerName, pos = CommFunc.ReadString(buf, pos, 33)
|
| | | self.Job, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.FightPower, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.RealmLV, pos = CommFunc.ReadWORD(buf, pos)
|
| | | self.PKScore, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.DanLV, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.Time, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|