Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] Yeah, but what is LookupFileID doing?

[DiscordArchive] Yeah, but what is LookupFileID doing?

[DiscordArchive] Yeah, but what is LookupFileID doing?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
01-31-2019, 12:55 PM
#1
Archived author: Skarn • Posted: 2019-01-31T12:55:38.244000+00:00
Original source

Yeah, but what is LookupFileID doing?
rektbyfaith
01-31-2019, 12:55 PM #1

Archived author: Skarn • Posted: 2019-01-31T12:55:38.244000+00:00
Original source

Yeah, but what is LookupFileID doing?

rektbyfaith
Administrator
0
01-31-2019, 12:55 PM
#2
Archived author: Kallar • Posted: 2019-01-31T12:55:46.774000+00:00
Original source

yeah
rektbyfaith
01-31-2019, 12:55 PM #2

Archived author: Kallar • Posted: 2019-01-31T12:55:46.774000+00:00
Original source

yeah

rektbyfaith
Administrator
0
01-31-2019, 12:55 PM
#3
Archived author: Kallar • Posted: 2019-01-31T12:55:49.691000+00:00
Original source

was about to say that
rektbyfaith
01-31-2019, 12:55 PM #3

Archived author: Kallar • Posted: 2019-01-31T12:55:49.691000+00:00
Original source

was about to say that

rektbyfaith
Administrator
0
01-31-2019, 12:55 PM
#4
Archived author: MaxtorCoder • Posted: 2019-01-31T12:55:57.031000+00:00
Original source

```csharp
private static void LookupFileID(uint id)
{
using (StreamReader sr = new StreamReader(Program.CSVFile))
{
while (!sr.EndOfStream)
{
string str;
string[] arr;
str = sr.ReadLine();
arr = str.Split(';');

CsvData data = new CsvData();

int dataid = int.Parse(arr[0]);
string filename = arr[1];

data.ID = dataid;

if (data.ID == id)
{
uint length = (uint)filename.Length;
M2Reader.TextureList.Add(filename, length);
}
}
}
}``` It's slow as fuck but it works.
rektbyfaith
01-31-2019, 12:55 PM #4

Archived author: MaxtorCoder • Posted: 2019-01-31T12:55:57.031000+00:00
Original source

```csharp
private static void LookupFileID(uint id)
{
using (StreamReader sr = new StreamReader(Program.CSVFile))
{
while (!sr.EndOfStream)
{
string str;
string[] arr;
str = sr.ReadLine();
arr = str.Split(';');

CsvData data = new CsvData();

int dataid = int.Parse(arr[0]);
string filename = arr[1];

data.ID = dataid;

if (data.ID == id)
{
uint length = (uint)filename.Length;
M2Reader.TextureList.Add(filename, length);
}
}
}
}``` It's slow as fuck but it works.

rektbyfaith
Administrator
0
01-31-2019, 12:56 PM
#5
Archived author: MaxtorCoder • Posted: 2019-01-31T12:56:12.583000+00:00
Original source

Have to make it faster at some point
rektbyfaith
01-31-2019, 12:56 PM #5

Archived author: MaxtorCoder • Posted: 2019-01-31T12:56:12.583000+00:00
Original source

Have to make it faster at some point

rektbyfaith
Administrator
0
01-31-2019, 12:56 PM
#6
Archived author: Skarn • Posted: 2019-01-31T12:56:15.911000+00:00
Original source

Okay
rektbyfaith
01-31-2019, 12:56 PM #6

Archived author: Skarn • Posted: 2019-01-31T12:56:15.911000+00:00
Original source

Okay

rektbyfaith
Administrator
0
01-31-2019, 12:56 PM
#7
Archived author: Skarn • Posted: 2019-01-31T12:56:17.478000+00:00
Original source

That's good
rektbyfaith
01-31-2019, 12:56 PM #7

Archived author: Skarn • Posted: 2019-01-31T12:56:17.478000+00:00
Original source

That's good

rektbyfaith
Administrator
0
01-31-2019, 12:56 PM
#8
Archived author: Skarn • Posted: 2019-01-31T12:56:25.138000+00:00
Original source

But that assumes that CSV contains all file names
rektbyfaith
01-31-2019, 12:56 PM #8

Archived author: Skarn • Posted: 2019-01-31T12:56:25.138000+00:00
Original source

But that assumes that CSV contains all file names

rektbyfaith
Administrator
0
01-31-2019, 12:56 PM
#9
Archived author: MaxtorCoder • Posted: 2019-01-31T12:56:26.859000+00:00
Original source

It is iterating through the CSV file and looking for the id provided in TXID
rektbyfaith
01-31-2019, 12:56 PM #9

Archived author: MaxtorCoder • Posted: 2019-01-31T12:56:26.859000+00:00
Original source

It is iterating through the CSV file and looking for the id provided in TXID

rektbyfaith
Administrator
0
01-31-2019, 12:56 PM
#10
Archived author: Skarn • Posted: 2019-01-31T12:56:29.255000+00:00
Original source

But it does not
rektbyfaith
01-31-2019, 12:56 PM #10

Archived author: Skarn • Posted: 2019-01-31T12:56:29.255000+00:00
Original source

But it does not

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)