Checksum code fixed. Added DocBlocks to D2Classes. TODO: Fill in docblocks, refactor, code cleanup

This commit is contained in:
Hash Borgir
2022-07-06 17:41:24 -06:00
parent f3b24de2a8
commit eb28039f88
28 changed files with 1285 additions and 340 deletions

View File

@@ -1,10 +1,22 @@
<?php
/**
*
*/
class D2ItemData {
/**
* @var
*/
public $strings;
/**
* @var
*/
public $images;
/**
* @return void
*/
public function getImages() {
$sql = "SELECT code,uniqueinvfile,invfile,type,type2 FROM armor
UNION ALL
@@ -24,6 +36,11 @@ class D2ItemData {
unset($isc2);
}
/**
* @param $index
* @param $doc
* @return false|string
*/
public function uniqueItems($index, $doc = FALSE) {
if (empty($this->images)) {
$this->getImages();
@@ -897,6 +914,10 @@ class D2ItemData {
}
}
/**
* @param $iscStat
* @return mixed
*/
public function getIscStrings($iscStat) {
if (empty($this->strings)) {
$this->getStrings();
@@ -904,6 +925,9 @@ class D2ItemData {
return ($this->strings[$iscStat]);
}
/**
* @return void
*/
public function getStrings() {
$sql = "
SELECT p.`code` as prop,