コード例 #1
0
def parse_refids(formidarray: List[int], pluginlist: List[str], refidcount: int,
                 i: int, data: bytes) -> Tuple[int, List[Tuple[str, int]]]:
    formiddata = [] # type: List[Tuple[str, int]]
    for _ in range(refidcount):
        plugin, fid = get_formid_data(data[i:i+3], formidarray, pluginlist)
        formiddata.append((plugin, fid))
        i += 3
    return refidcount*3, formiddata
コード例 #2
0
def parse_refids(formidarray: List[int], pluginlist: List[str],
                 refidcount: int, i: int,
                 data: bytes) -> Tuple[int, List[Tuple[str, int]]]:
    formiddata = []  # type: List[Tuple[str, int]]
    for _ in range(refidcount):
        plugin, fid = get_formid_data(data[i:i + 3], formidarray, pluginlist)
        formiddata.append((plugin, fid))
        i += 3
    return refidcount * 3, formiddata
コード例 #3
0
def parse_factions(formidarray: List[int], pluginlist: List[str], factionsize: int,
                    i: int, data: bytes) -> Tuple[int, List[Tuple[str, int, int]]]:
    factions = [] # type: List[Tuple[str, int, int]]
    factioncount = factionsize // 4
    for _ in range(factioncount):
        plugin, fid = get_formid_data(data[i:i+3], formidarray, pluginlist)
        rank = uint8(data[i+3:i+4])
        factions.append((plugin, fid, rank))
        i += 4
    return factionsize, factions
コード例 #4
0
def parse_factions(formidarray: List[int], pluginlist: List[str],
                   factionsize: int, i: int,
                   data: bytes) -> Tuple[int, List[Tuple[str, int, int]]]:
    factions = []  # type: List[Tuple[str, int, int]]
    factioncount = factionsize // 4
    for _ in range(factioncount):
        plugin, fid = get_formid_data(data[i:i + 3], formidarray, pluginlist)
        rank = uint8(data[i + 3:i + 4])
        factions.append((plugin, fid, rank))
        i += 4
    return factionsize, factions