Files
BA-AD/baad/FlatData/VoiceExcel.py
Deathemonic 2ee2061ae9 feat: bump dump
- bump dump file to support latest client 1.46.287264
- updated flatbuf generator to support lastest dump file
- refactored table extracter
2024-07-15 23:21:43 +08:00

154 lines
5.8 KiB
Python

# automatically generated by the FlatBuffers compiler, do not modify
# namespace: FlatData
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class VoiceExcel(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = VoiceExcel()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsVoiceExcel(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# VoiceExcel
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# VoiceExcel
def UniqueId(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos)
return 0
# VoiceExcel
def Id(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
return 0
# VoiceExcel
def Nation_(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
a = self._tab.Vector(o)
return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
return 0
# VoiceExcel
def Nation_AsNumpy(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o)
return 0
# VoiceExcel
def Nation_Length(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.VectorLen(o)
return 0
# VoiceExcel
def Nation_IsNone(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
return o == 0
# VoiceExcel
def Path(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
a = self._tab.Vector(o)
return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
return ""
# VoiceExcel
def PathLength(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.VectorLen(o)
return 0
# VoiceExcel
def PathIsNone(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
return o == 0
# VoiceExcel
def Volume(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
a = self._tab.Vector(o)
return self._tab.Get(flatbuffers.number_types.Float32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
return 0
# VoiceExcel
def VolumeAsNumpy(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Float32Flags, o)
return 0
# VoiceExcel
def VolumeLength(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
return self._tab.VectorLen(o)
return 0
# VoiceExcel
def VolumeIsNone(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
return o == 0
def Start(builder): builder.StartObject(5)
def VoiceExcelStart(builder):
"""This method is deprecated. Please switch to Start."""
return Start(builder)
def AddUniqueId(builder, UniqueId): builder.PrependInt64Slot(0, UniqueId, 0)
def VoiceExcelAddUniqueId(builder, UniqueId):
"""This method is deprecated. Please switch to AddUniqueId."""
return AddUniqueId(builder, UniqueId)
def AddId(builder, Id): builder.PrependUint32Slot(1, Id, 0)
def VoiceExcelAddId(builder, Id):
"""This method is deprecated. Please switch to AddId."""
return AddId(builder, Id)
def AddNation_(builder, Nation_): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(Nation_), 0)
def VoiceExcelAddNation_(builder, Nation_):
"""This method is deprecated. Please switch to AddNation_."""
return AddNation_(builder, Nation_)
def StartNation_Vector(builder, numElems): return builder.StartVector(4, numElems, 4)
def VoiceExcelStartNation_Vector(builder, numElems):
"""This method is deprecated. Please switch to Start."""
return StartNation_Vector(builder, numElems)
def AddPath(builder, Path): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(Path), 0)
def VoiceExcelAddPath(builder, Path):
"""This method is deprecated. Please switch to AddPath."""
return AddPath(builder, Path)
def StartPathVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def VoiceExcelStartPathVector(builder, numElems):
"""This method is deprecated. Please switch to Start."""
return StartPathVector(builder, numElems)
def AddVolume(builder, Volume): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(Volume), 0)
def VoiceExcelAddVolume(builder, Volume):
"""This method is deprecated. Please switch to AddVolume."""
return AddVolume(builder, Volume)
def StartVolumeVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def VoiceExcelStartVolumeVector(builder, numElems):
"""This method is deprecated. Please switch to Start."""
return StartVolumeVector(builder, numElems)
def End(builder): return builder.EndObject()
def VoiceExcelEnd(builder):
"""This method is deprecated. Please switch to End."""
return End(builder)