All pastes #676322 Raw Edit

Unnamed

public text v1 · immutable
#676322 ·published 2007-08-30 23:05 UTC
rendered paste body
function LoadDefInfo($FileName)
{
	$File = openDef($FileName);
	foreach ($File as $line)
	{
		echo $line . "<br />";
		$line = trim($line)
		if (($line[0] == "/" && $line[1] == "/") || ($line[0] == '\n' || $line[0] == '\r\n'))
		{
			break; // Kill the loop - this line is blank or the item is commented out (Hence not in use).
		}

		$line = explode('\t',$line);
		$ItemID = $line[1]; // This should return the item id...
		// TEMP
		$TableKey = "name	model	type	value1	value2	value3	BmNum	index	sizex	sizey	smallbmnum	weight	stockable	FillWeight	qualifier	gfxmods	ItemGroupID	TextDescID	BasePrice	Techlevel	Itemflags	shortname	end";
		$TableKey = explode('\t',$TableKey);
		// END TEMP
		$DefInfo = new array();
		for ($i=0;$i<count($line)-1;$i++)
		{
			$DefInfo[$ItemID] = array($TableKey[$i], $line);
		}
	}
}