Cube documenter working half way

This commit is contained in:
color.diff=auto
2021-05-10 01:15:44 -06:00
parent e3365ed343
commit 2d504c947f
1043 changed files with 27077 additions and 126 deletions

View File

@@ -19,7 +19,7 @@
following disclaimer in the documentation and/or other
materials provided with the distribution.
* This software must not be used for commercial purposes
* This software must not be used for commercial purposes
* without my consent. Any sales or commercial use are prohibited
* without my express knowledge and consent.
@@ -81,8 +81,8 @@ class D2ItemDesc {
DescVal: Controls whenever and if so in what way the stat value is shown,
* 0 = doesn't show the value of the stat,
* 1 = shows the value of the stat infront of the description,
* 0 = doesn't show the value of the stat,
* 1 = shows the value of the stat infront of the description,
* 2 = shows the value of the stat after the description.
DescStrPos: The string used for the description when the stat value is positive.
@@ -90,13 +90,13 @@ class D2ItemDesc {
DescStrNeg: The string used for the description when the stat value is negative.
DescStr2: An additional string used by some DescFuncs, usually used as a suffix or for aditional info (such as per character level etc).
*
*
*
*
*
*
* DATA SAMPLE
*
*
*
*
*
*
array (size=174)
'item_absorbcold' =>
array (size=6)
@@ -130,15 +130,15 @@ class D2ItemDesc {
'descval' => string '1' (length=1)
'descstrpos' => string 'ModStr5h' (length=8)
'String' => string 'Fire Absorb' (length=11)
*
*
*
*
*/
public $str = '';
// takes value, param.
// value == Value to show on this stat
//descfunc 14
//descfunc 14
public $skilltabsDesc;
public $skilltabsDescClean;
@@ -181,12 +181,90 @@ class D2ItemDesc {
"dru" => "Druid",
"ass" => "Assassin"
];
/*
*
* Prepare values for descfunc
These are prop funcs from properties.txt
val1 to val7: Parameter to the property function, if the function can
use it (see class skills properties).
func1 to func7: Function used to assign a value to a property
* min: Description of the min value
* max: Description of the max value
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
*
*
APPENDIX: Functions of Properties.txt
Here are some functions used by the properties.txt to link
param/min/max value to the actual bonus of the properties.
*
*
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
1 - Applies a value to a stat, can use SetX parameter.
2 - defensive function only, similar to 1 ???
3 - Apply the same min-max range as used in the previous function block
(see res-all).
4 - not used ???
5 - Dmg-min related ???
6 - Dmg-max related ???
7 - Dmg% related ???
8 - ??? use for speed properties (ias, fcr, etc ...)
9 - Apply the same param and value in min-max range, as used in the
previous function block.
10 - skilltab skill group ???
11 - event-based skills ???
12 - random selection of parameters for parameter-based stat ???
13 - durability-related ???
14 - inventory positions on item ??? (related to socket)
15 - use min field only
16 - use max field only
17 - use param field only
18 - Related to /time properties.
19 - Related to charged item.
20 - Simple boolean stuff. Use by indestruct.
21 - Add to group of skills, group determined by stat ID, uses ValX parameter.
22 - Individual skill, using param for skill ID, random between min-max.
23 - ethereal
24 - property applied to character or target monster ???
25--32 can be used in custom code. Check plugin documentation for syntax.
*
* @prep
*
*
*/
public function prep($par, $min, $max) {
}
/*
* @getDesc
*
@return string
*
*
@return string
*
*
* probably non real need to code this function.
Just put this in getDesc()
if par
* use par
* else
* use min
*
*/
@@ -194,12 +272,18 @@ class D2ItemDesc {
if (empty($params))
return false;
//ddump($params);
$s1 = $params['string1'];
$s2 = $params['string2'];
$prop = $params['prop'];
$par = $params['par'];
$min = (int) $params['min'];
$v = $min;
$v = $par;
if (empty($par)) {
$v = $min;
}
$max = (int) $params['max'];
@@ -216,13 +300,13 @@ class D2ItemDesc {
/*
* Descval 1
*
*
*
*
* $format = 'The %s contains %d monkeys';
echo sprintf($format, $num, $location);
*
*
*
*
*
*
*/
if ($params['descval'] == 1 || $params['descval'] == '') {
@@ -302,6 +386,8 @@ class D2ItemDesc {
if ($params['descfunc'] == 14) {
$sql = "SELECT class
FROM `charstats`
WHERE `StrSkillTab1`='{$this->skilltabs[$par]}' OR
@@ -310,9 +396,17 @@ class D2ItemDesc {
$class = PDO_FetchOne($sql);
//ddump($class);
$s1 = $this->skilltabsDesc[$par]['String'];
//ddump($s1);
$this->str = sprintf($s1, $min);
if (!isset($par)) {
$this->str = "Par is not set.";
}
}
if ($params['descfunc'] == 15) {
$sql = "SELECT skill FROM `skills` WHERE `Id`='$par'";
@@ -390,13 +484,13 @@ class D2ItemDesc {
}
/*
* Descval 0
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/ else if ($params['descval'] == 0) {
if ($params['descfunc'] == 1) {
$this->str = "$s1";
@@ -511,12 +605,12 @@ class D2ItemDesc {
}
/*
* Descval 2
*
*
*
*
*
*
*
*
*
*
*
*
*/ else if ($params['descval'] == 2) {
if ($params['descfunc'] == 1) {
$this->str = "$s1 +$v";