mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-12-21 06:43:58 -06:00
Added D2Strings class to get strings where needed from strings table
This commit is contained in:
@@ -3,12 +3,14 @@
|
||||
require_once 'D2CharStructureData.php';
|
||||
require_once 'D2Files.php';
|
||||
require_once 'D2BitReader.php';
|
||||
require_once 'D2Strings.php';
|
||||
|
||||
class D2Char {
|
||||
|
||||
public $cData; // char data output
|
||||
public $items; // char item data
|
||||
private $sData; // char file structure data
|
||||
private $bData; // char binary data from d2s
|
||||
private $bData; // char binary data from d2s
|
||||
private $filePath; // .d2s file path
|
||||
private $fp; // file pointer
|
||||
|
||||
@@ -23,10 +25,15 @@ class D2Char {
|
||||
fseek($this->fp, $k);
|
||||
$this->bData[$k] = fread($this->fp, $v);
|
||||
}
|
||||
|
||||
$this->strings = new D2Strings();
|
||||
return $this->parseChar();
|
||||
|
||||
}
|
||||
|
||||
public function parseItems(){
|
||||
|
||||
}
|
||||
|
||||
public function parseChar() {
|
||||
$cData = null;
|
||||
$cData['Identifier'] = bin2hex($this->bData[0]);
|
||||
@@ -69,6 +76,8 @@ class D2Char {
|
||||
$cData['NPCIntroductions'] = $this->bData[714];
|
||||
$cData['filePath'] = $this->filePath;
|
||||
$this->cData = $cData;
|
||||
$this->parseItems();
|
||||
|
||||
return $this->cData;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user