everything up til magical property list work fine

This commit is contained in:
Hash Borgir 2023-06-17 04:58:19 -06:00
parent a67e421977
commit a678635c90
2 changed files with 426 additions and 33 deletions

View File

@ -95,13 +95,16 @@ class D2Item {
$this->itemcode = trim($this->itemcode);
$sql = "SELECT * FROM armor WHERE code = ?";
$res = PDO_FetchRow($sql, [$this->itemcode]);
$file = "armor";
if (empty($res)) {
$sql = "SELECT * FROM misc WHERE code = ?";
$res = PDO_FetchRow($sql, [$this->itemcode]);
$file = "misc";
}
if (empty($res)) {
$sql = "SELECT * FROM weapons WHERE code = ?";
$res = PDO_FetchRow($sql, [$this->itemcode]);
$file = "weapons";
}
// set txt data array
@ -132,7 +135,6 @@ class D2Item {
// if compact is 0, item is extended
if ($this->compact == "0") {
// advanced item info
//$this->b->skip(1);
$this->identifier = $this->b->read(32);
$this->ilvl = $this->b->read(7);
$this->rarity = $this->b->read(4);
@ -225,9 +227,38 @@ class D2Item {
break;
case D2ItemQuality::RARE:
$this->quality = "Rare";
echo $this->quality;
// this is from rare suffix/prefix.txt
$this->rareID1 = $this->b->read(8);
$this->rareID2 = $this->b->read(8);
// these are from magix suffix/perfi
$prefixes = [];
$suffixes = [];
for ($i = 0; $i < 3; $i++) {
$this->prefixBit = $this->b->read(1);
if ($this->prefixBit) {
$this->_prefixes[$i] = $this->b->read(11);
$prefixes[$i] = bindec(strrev($this->_prefixes[$i]));
}
$this->suffixBit = $this->b->read(1);
if ($this->suffixBit) {
$this->_suffixes[$i] = $this->b->read(11);
$suffixes[$i] = bindec(strrev($this->_sufffixes[$i]));
}
}
// now for each prefix/suffix array, we need to
// generate ISC strings
break;
case D2ItemQuality::UNIQUE:
$this->quality = "Unique";
$this->unique = $this->b->read(12);
break;
case D2ItemQuality::CRAFTED:
$this->quality = "Crafted";
@ -240,7 +271,7 @@ class D2Item {
if ($this->runeword == "1") {
$this->runewordname = $this->b->read(12);
$this->runewordname_unknown_4_bits = $this->b->read(12);
$this->runewordname_unknown_4_bits = $this->b->read(4); // problems might have been because of this. I was reading 12 bits here, instead of 4.
}
@ -253,6 +284,8 @@ class D2Item {
$charName .= $char;
$charBits = $this->b->read(7); // Read the next 7 bits
if (bindec(strrev($charBits)) == 0)
break;
}
$this->personalized_name = $charName;
}
@ -275,44 +308,103 @@ class D2Item {
$this->defense = $this->b->read($SaveAdd);
$this->_defense = bindec(strrev($this->defense)) - 10;
var_dump("Def:".$this->defense);
var_dump("Def:".$this->_defense);
var_dump("Def:" . $this->defense);
var_dump("Def:" . $this->_defense);
// armors are missing a full byte here
// if we insert all 0s, it evens out, but is wrong
// where does this byte come from?
// we can't read at this offset, as that just gives the wrong bits, I think
//
// I found it. It's current durability. If we read it, we end up missing the 8 bits.
$this->maxdurability = "" . $this->b->read(8);
$this->_maxdurability = bindec(strrev($this->maxdurability));
var_dump("MaxDur:" . $this->maxdurability);
var_dump("MaxDur:" . $this->_maxdurability);
//Only exists if the item's max durability is greater than zero
//The first 8 bits are the item's current durability. The last bit is unknown.
if ($this->maxdurability !== 0) {
$this->currentdurability = $this->b->read(8);
$this->_currentdurability = bindec(strrev($this->currentdurability));
var_dump("CurDur:" . $this->currentdurability);
var_dump("CurDur:" . $this->_currentdurability);
$this->currentdurability_unknown_bit = $this->b->read(1);
}
}
// if it is a weapon, get max Durability as we already got the armor's durability
$sql = "SELECT code FROM weapons WHERE code = ?";
$weap = PDO_FetchOne($sql, [$this->itemcode]);
if (!empty($weap)) {
$this->maxdurability = $this->b->read(8);
$this->_maxdurability = bindec(strrev($this->maxdurability));
var_dump("MaxDur:".$this->maxdurability);
var_dump("MaxDur:".$this->_maxdurability);
var_dump("MaxDur:" . $this->maxdurability);
var_dump("MaxDur:" . $this->_maxdurability);
//Only exists if the item's max durability is greater than zero
//The first 8 bits are the item's current durability. The last bit is unknown.
if ($this->maxdurability !== 0) {
$this->currentdurability = $this->b->read(8);
$this->_currentdurability = bindec(strrev($this->currentdurability));
var_dump("CurDur:" . $this->currentdurability);
var_dump("CurDur:" . $this->_currentdurability);
$this->currentdurability_unknown_bit = $this->b->read(1);
}
}
//Only exists if the item's max durability is greater than zero
//The first 8 bits are the item's current durability. The last bit is unknown.
if ($this->_maxdurability > 0) {
$this->currentdurability = $this->b->read(9);
$this->_currentdurability = bindec(strrev($this->currentdurability));
var_dump("CurDur:".$this->currentdurability);
var_dump("CurDur:".$this->_currentdurability);
//$this->currentDurability_unknown_bit = $this->b->read(1);
}
if ($this->txt['stackable'] == 1) {
$this->stackable = $this->b->read(9);
var_dump(bindec(strrev($this->stackable)));
var_dump("stackable: " . bindec(strrev($this->stackable)));
}
//
if ($this->socketed == "1") {
$this->numsockets = $this->b->read(3);
$this->_numsockets = bindec(($this->numsockets));
$this->_numsockets_extra_bit = $this->b->read(1);
var_dump($this->numsockets);
var_dump($this->_numsockets);
$this->numsockets = $this->b->read(4);
$this->_numsockets = bindec(strrev($this->numsockets));
//$this->numsockets_extra_bit = $this->b->read(1);
var_dump("numsock: " . $this->numsockets);
var_dump("numsock: " . $this->_numsockets);
}
// Set properties bit field, used later for reading the set property lists of the item
// if item is set
//somewhere here in the set thing, we're missing 9 bits.
// if we skip those 9 bits for testing, we should get corect setprops?
if (($quality == D2ItemQuality::SET)) {
$this->setfield = $this->b->read(5); // mismatch, need to debug
//var_dump($this->setProps);
}
$magicprops = new D2ItemProperties();
$props = $magicprops->magicprops;
// read properties here
$property = $this->b->read(9);
$_property = bindec(strrev($property));
var_dump($property);
var_dump($_property);
//var_dump($props);
//// $properties = [];
// while ($property !== "111111111") { // property is not 0x1FF (9 1s)
//
// ddump($props[bindec(strrev($property))]['Bits'][0]);
//
// //$properties[bindec(strrev($property))] = $this->b->read($props[bindec(strrev($property))]['Bits'][0]);
// $property = $this->b->read(9);
// }
//ddump($properties);
// dump out data
$oldbitsSplit = str_split($this->oldbits, 8);
$dumpValuesSplit = str_split($this->dumpValues(), 8);
@ -362,23 +454,38 @@ class D2Item {
$values[] = $this->class_specific;
$values[] = $this->class_specific_affix_id;
$values[] = $this->low_quality_item_data;
$values[] = $this->high_quality_item_data;
$values[] = $this->magic_prefix;
$values[] = $this->magic_suffix;
$values[] = $this->rareID1;
$values[] = $this->rareID2;
$values[] = $this->prefixBit;
$values[] = $this->_prefixes[0];
$values[] = $this->suffixBit;
$values[] = $this->_suffixes[0];
$values[] = $this->prefixBit;
$values[] = $this->_prefixes[1];
$values[] = $this->suffixBit;
$values[] = $this->_suffixes[1];
$values[] = $this->prefixBit;
$values[] = $this->_prefixes[2];
$values[] = $this->suffixBit;
$values[] = $this->_suffixes[2];
$values[] = $this->setid;
$values[] = $this->runewordname_unknown_4_bits;
$values[] = $this->unique;
$values[] = $this->runewordname;
$values[] = $this->runewordname_unknown_4_bits;
$values[] = $this->personalized_name;
$values[] = $this->tome;
$values[] = $this->timestamp;
$values[] = $this->defense;
$values[] = $this->maxdurability;
$values[] = $this->currentDurability;
//$values[] = $this->currentDurability_unknown_bit;
$values[] = $this->currentdurability;
$values[] = $this->currentdurability_unknown_bit;
$values[] = $this->stackable;
$values[] = $this->numsockets;
$values[] = $this->_numsockets_extra_bit;
$values[] = "";
$values[] = "";
//$values[] = $this->numsockets_extra_bit;
$values[] = $this->setfield;
$values[] = "";
$values[] = "";
$values[] = "";

View File

@ -4,24 +4,28 @@
*
*/
class D2ItemLocation {
//location
/**
*
*/
const STORED = 0;
/**
*
*/
const EQUIPPED = 1;
/**
*
*/
const BELT = 2;
/**
*
*/
const CURSOR = 4;
/**
*
*/
@ -33,20 +37,23 @@ class D2ItemLocation {
*
*/
class D2ItemLocationStored {
//storage
/**
*
*/
const NONE = 0;
/**
*
*/
const INVENTORY = 1;
/**
*
*/
const CUBE = 4;
/**
*
*/
@ -58,52 +65,63 @@ class D2ItemLocationStored {
*
*/
class D2ItemLocationBody {
//body parts
/**
*
*/
const HELMET = 1;
/**
*
*/
const AMULET = 2;
/**
*
*/
const ARMOR = 3;
/**
*
*/
const WEAPONR = 4;
/**
*
*/
const WEAPONL = 5;
/**
*
*/
const RINGR = 6;
/**
*
*/
const RINGL = 7;
/**
*
*/
const BELT = 8;
/**
*
*/
const BOOTS = 9;
/**
*
*/
const GLOVES = 10;
/**
*
*/
const WEAPONR2 = 11;
/**
*
*/
@ -112,6 +130,7 @@ class D2ItemLocationBody {
}
class D2ItemQuality {
const LOW_QUALITY = 1;
const NORMAL = 2;
const HIGH_QUALITY = 3;
@ -120,4 +139,271 @@ class D2ItemQuality {
const RARE = 6;
const UNIQUE = 7;
const CRAFTED = 8;
}
class D2ItemProperties {
public $magicprops = [
0 => ['Bits' => [8], 'Bias' => 32, 'Name' => '+{0} to Strength'],
1 => ['Bits' => [7], 'Bias' => 32, 'Name' => '+{0} to Energy'],
2 => ['Bits' => [7], 'Bias' => 32, 'Name' => '+{0} to Dexterity'],
3 => ['Bits' => [7], 'Bias' => 32, 'Name' => '+{0} to Vitality'],
7 => ['Bits' => [9], 'Bias' => 32, 'Name' => '+{0} to Life'],
9 => ['Bits' => [8], 'Bias' => 32, 'Name' => '+{0} to Mana'],
11 => ['Bits' => [8], 'Bias' => 32, 'Name' => '+{0} to Maximum Stamina'],
16 => ['Bits' => [9], 'Name' => '+{0}% Enhanced Defense'],
17 => ['Bits' => [9, 9], 'Name' => '+{0}% Enhanced Damage'],
19 => ['Bits' => [10], 'Name' => '+{0} to Attack rating'],
20 => ['Bits' => [6], 'Name' => '+{0}% Increased chance of blocking'],
21 => ['Bits' => [6], 'Name' => '+{0} to Minimum 1-handed damage'],
22 => ['Bits' => [7], 'Name' => '+{0} to Maximum 1-handed damage'],
23 => ['Bits' => [6], 'Name' => '+{0} to Minimum 2-handed damage'],
24 => ['Bits' => [7], 'Name' => '+{0} to Maximum 2-handed damage'],
25 => ['Bits' => [8], 'Name' => 'Unknown (Invisible)'], // damagepercent
26 => ['Bits' => [8], 'Name' => 'Unknown (Invisible)'], // manarecovery
27 => ['Bits' => [8], 'Name' => 'Regenerate Mana {0}%'],
28 => ['Bits' => [8], 'Name' => 'Heal Stamina {0}%'],
31 => ['Bits' => [11], 'Bias' => 10, 'Name' => '+{0} Defense'],
32 => ['Bits' => [9], 'Name' => '+{0} vs. Missile'],
33 => ['Bits' => [8], 'Bias' => 10, 'Name' => '+{0} vs. Melee'],
34 => ['Bits' => [6], 'Name' => 'Damage Reduced by {0}'],
35 => ['Bits' => [6], 'Name' => 'Magic Damage Reduced by {0}'],
36 => ['Bits' => [8], 'Name' => 'Damage Reduced by {0}%'],
37 => ['Bits' => [8], 'Name' => 'Magic Resist +{0}%'],
38 => ['Bits' => [8], 'Name' => '+{0}% to Maximum Magic Resist'],
39 => ['Bits' => [8], 'Bias' => 50, 'Name' => 'Fire Resist +{0}%'],
40 => ['Bits' => [5], 'Name' => '+{0}% to Maximum Fire Resist'],
41 => ['Bits' => [8], 'Bias' => 50, 'Name' => 'Lightning Resist +{0}%'],
42 => ['Bits' => [5], 'Name' => '+{0}% to Maximum Lightning Resist'],
43 => ['Bits' => [8], 'Bias' => 50, 'Name' => 'Cold Resist +{0}%'],
44 => ['Bits' => [5], 'Name' => '+{0}% to Maximum Cold Resist'],
45 => ['Bits' => [8], 'Bias' => 50, 'Name' => 'Poison Resist +{0}%'],
46 => ['Bits' => [5], 'Name' => '+{0}% to Maximum Poison Resist'],
48 => ['Bits' => [10], 'Name' => 'Light Radius +{0}'],
49 => ['Bits' => [7], 'Bias' => 100, 'Name' => 'Light Color'], // lightcolor
52 => ['Bits' => [8], 'Bias' => 50, 'Name' => 'Fire Damage: {0}-{0}'],
53 => ['Bits' => [8], 'Bias' => 50, 'Name' => 'Lightning Damage: {0}-{0}'],
54 => ['Bits' => [8], 'Bias' => 50, 'Name' => 'Magic Damage: {0}-{0}'],
55 => ['Bits' => [8], 'Bias' => 50, 'Name' => 'Cold Damage: {0}-{0}'],
56 => ['Bits' => [8], 'Bias' => 50, 'Name' => 'Poison Damage: {0}-{0} over {0} seconds'],
57 => ['Bits' => [8], 'Name' => 'Unknown (Invisible)'], // aurastate
58 => ['Bits' => [8], 'Name' => 'Unknown (Invisible)'], // auraeffect
59 => ['Bits' => [8], 'Name' => 'Unknown (Invisible)'], // auralevel
60 => ['Bits' => [8], 'Name' => 'Unknown (Invisible)'], // staminarecovery
62 => ['Bits' => [9], 'Bias' => 50, 'Name' => '{0}% Damage to Demons'],
63 => ['Bits' => [9], 'Bias' => 50, 'Name' => '{0}% Damage to Undead'],
64 => ['Bits' => [8], 'Name' => 'Attack Rating Against Demons +{0}'],
65 => ['Bits' => [8], 'Name' => 'Attack Rating Against Undead +{0}'],
66 => ['Bits' => [7], 'Name' => '+{0} to Attack Rating'],
67 => ['Bits' => [9], 'Bias' => 50, 'Name' => '{0}% Faster Hit Recovery'],
68 => ['Bits' => [9], 'Bias' => 50, 'Name' => '{0}% Faster Block Rate'],
69 => ['Bits' => [9], 'Bias' => 50, 'Name' => '{0}% Faster Run/Walk'],
70 => ['Bits' => [9], 'Bias' => 50, 'Name' => '{0}% Increased Chance of Getting Magic Items'],
72 => ['Bits' => [8], 'Bias' => 10, 'Name' => '{0} to Light Radius'],
73 => ['Bits' => [8], 'Name' => '{0} to Minimum Fire Damage'],
74 => ['Bits' => [8], 'Name' => '{0} to Maximum Fire Damage'],
75 => ['Bits' => [8], 'Name' => '{0} to Minimum Lightning Damage'],
76 => ['Bits' => [8], 'Name' => '{0} to Maximum Lightning Damage'],
77 => ['Bits' => [8], 'Name' => '{0} to Minimum Magic Damage'],
78 => ['Bits' => [8], 'Name' => '{0} to Maximum Magic Damage'],
79 => ['Bits' => [8], 'Name' => '{0} to Minimum Cold Damage'],
80 => ['Bits' => [8], 'Name' => '{0} to Maximum Cold Damage'],
81 => ['Bits' => [8], 'Name' => '{0} to Minimum Poison Damage'],
82 => ['Bits' => [8], 'Name' => '{0} to Maximum Poison Damage'],
83 => ['Bits' => [8], 'Name' => '{0} to Minimum Damage'],
84 => ['Bits' => [8], 'Name' => '{0} to Maximum Damage'],
85 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Life Stolen per Hit'],
86 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Mana Stolen per Hit'],
87 => ['Bits' => [8], 'Name' => '{0}% Stamina Drain'],
88 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Extra Gold from Monsters'],
89 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Better Chance of Getting Magic Items'],
90 => ['Bits' => [8], 'Name' => '{0}% Knockback'],
91 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Increased Attack Speed'],
92 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Faster Cast Rate'],
93 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Faster Hit Recovery'],
94 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Faster Block Rate'],
95 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Faster Run/Walk'],
96 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Faster Hit Stamina Drain'],
97 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Faster Hit Mana Drain'],
98 => ['Bits' => [8], 'Name' => 'Replenish Life +{0}'],
99 => ['Bits' => [8], 'Name' => 'Increase Maximum Durability {0}%'],
100 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Damage'],
101 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Defense'],
102 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Minimum Damage'],
103 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Maximum Damage'],
104 => ['Bits' => [8], 'Name' => '{0}% Life Stolen per Hit'],
105 => ['Bits' => [8], 'Name' => '{0}% Mana Stolen per Hit'],
106 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Experience Gained'],
107 => ['Bits' => [8], 'Name' => '{0}% to Maximum Experience'],
108 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance of Getting Magic Items'],
109 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance of Getting Magic Items (Quality)'],
110 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance of Getting Magic Items (Exceptional)'],
111 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance of Getting Magic Items (Elite)'],
112 => ['Bits' => [8], 'Name' => 'Unknown (Invisible)'], // mysticorbs
113 => ['Bits' => [8], 'Name' => 'Socketed (Number of Sockets: {0})'],
114 => ['Bits' => [8], 'Name' => 'Level Requirement {0}'],
115 => ['Bits' => [8], 'Name' => 'Unknown (Invisible)'], // maxsockets
116 => ['Bits' => [8], 'Name' => 'Unknown (Invisible)'], // runeword
117 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Target Defense'],
118 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Increased Attack Speed'],
119 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Faster Cast Rate'],
120 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Faster Hit Recovery'],
121 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Faster Block Rate'],
122 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Faster Run/Walk'],
123 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Faster Hit Stamina Drain'],
124 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Faster Hit Mana Drain'],
125 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Damage'],
126 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Defense'],
127 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Minimum Damage'],
128 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Maximum Damage'],
129 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Strength'],
130 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Energy'],
131 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Dexterity'],
132 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Vitality'],
133 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Life'],
134 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Mana'],
135 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Enhanced Maximum Stamina'],
136 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Damage to Demons'],
137 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Damage to Undead'],
138 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Attack Rating Against Demons'],
139 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Attack Rating Against Undead'],
140 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Damage Taken Goes to Mana'],
141 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Damage Taken Goes to Life'],
142 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} on Striking'],
143 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Struck'],
144 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} on Attack'],
145 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When You Die'],
146 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} on Kill'],
147 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (1)'],
148 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (2)'],
149 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (3)'],
150 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (4)'],
151 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (5)'],
152 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (6)'],
153 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (7)'],
154 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (8)'],
155 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (9)'],
156 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (10)'],
157 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (11)'],
158 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (12)'],
159 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (13)'],
160 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (14)'],
161 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (15)'],
162 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (16)'],
163 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (17)'],
164 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (18)'],
165 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (19)'],
166 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (20)'],
167 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (21)'],
168 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (22)'],
169 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (23)'],
170 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (24)'],
171 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (25)'],
172 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (26)'],
173 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (27)'],
174 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (28)'],
175 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (29)'],
176 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (30)'],
177 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (31)'],
178 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (32)'],
179 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (33)'],
180 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (34)'],
181 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (35)'],
182 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (36)'],
183 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (37)'],
184 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (38)'],
185 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (39)'],
186 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (40)'],
187 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (41)'],
188 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (42)'],
189 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (43)'],
190 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (44)'],
191 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (45)'],
192 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (46)'],
193 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (47)'],
194 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (48)'],
195 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (49)'],
196 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0}% Chance to Cast Level {0} {1} When Striking (50)'],
197 => ['Bits' => [6, 10, 7], 'Name' => '{2}% Chance to Cast Level {0} {1} When you die'],
// Order is spell id, level, % chance.
198 => ['Bits' => [6, 10, 7], 'Name' => '{2}% Chance to Cast Level {0} {1} On Striking'],
199 => ['Bits' => [6, 10, 7], 'Name' => '{2}% Chance to Cast Level {0} {1} On Striking'],
200 => ['Bits' => [6, 10, 7], 'Name' => '{2}% Chance to Cast Level {0} {1} On Striking'],
// Order is spell id, level, % chance.
201 => ['Bits' => [6, 10, 7], 'Name' => '{2}% Chance to Cast Level {0} {1} When Struck'],
202 => ['Bits' => [6, 10, 7], 'Name' => '{2}% Chance to Cast Level {0} {1} When Struck'],
203 => ['Bits' => [6, 10, 7], 'Name' => '{2}% Chance to Cast Level {0} {1} When Struck'],
// First value selects the spell id, second value is level, third is remaining charges
// and the last is the total number of charges.
204 => ['Bits' => [6, 10, 8, 8], 'Name' => 'Level {0} {1} ({2}/{3} Charges)'],
205 => ['Bits' => [6, 10, 8, 8], 'Name' => 'Level {0} {1} ({2}/{3} Charges)'],
206 => ['Bits' => [6, 10, 8, 8], 'Name' => 'Level {0} {1} ({2}/{3} Charges)'],
207 => ['Bits' => [6, 10, 8, 8], 'Name' => 'Level {0} {1} ({2}/{3} Charges)'],
208 => ['Bits' => [6, 10, 8, 8], 'Name' => 'Level {0} {1} ({2}/{3} Charges)'],
209 => ['Bits' => [6, 10, 8, 8], 'Name' => 'Level {0} {1} ({2}/{3} Charges)'],
210 => ['Bits' => [6, 10, 8, 8], 'Name' => 'Level {0} {1} ({2}/{3} Charges)'],
211 => ['Bits' => [6, 10, 8, 8], 'Name' => 'Level {0} {1} ({2}/{3} Charges)'],
212 => ['Bits' => [6, 10, 8, 8], 'Name' => 'Level {0} {1} ({2}/{3} Charges)'],
213 => ['Bits' => [6, 10, 8, 8], 'Name' => 'Level {0} {1} ({2}/{3} Charges)'],
// All values based on character level are stored in eights, so take
// the number divide by 8 and multiply by the character level and round down.
// Or, just do (value * 0.125)% per level.
214 => ['Bits' => [6], 'Name' => '+{0} to Defense (Based on Character Level)'],
215 => ['Bits' => [6], 'Name' => '{0}% Enhanced Defense (Based on Character Level)'],
216 => ['Bits' => [6], 'Name' => '+{0} to Life (Based on Character Level)'],
217 => ['Bits' => [6], 'Name' => '+{0} to Mana (Based on Character Level)'],
218 => ['Bits' => [6], 'Name' => '+{0} to Maximum Damage (Based on Character Level)'],
219 => ['Bits' => [6], 'Name' => '{0}% Enhanced Maximum Damage (Based on Character Level)'],
220 => ['Bits' => [6], 'Name' => '+{0} to Strength (Based on Character Level)'],
221 => ['Bits' => [6], 'Name' => '+{0} to Dexterity (Based on Character Level)'],
222 => ['Bits' => [6], 'Name' => '+{0} to Energy (Based on Character Level)'],
223 => ['Bits' => [6], 'Name' => '+{0} to Vitality (Based on Character Level)'],
224 => ['Bits' => [6], 'Name' => '+{0} to Attack Rating (Based on Character Level)'],
225 => ['Bits' => [6], 'Name' => '{0}% Bonus to Attack Rating (Based on Character Level)'],
226 => ['Bits' => [6], 'Name' => '+{0} Cold Damage (Based on Character Level)'],
227 => ['Bits' => [6], 'Name' => '+{0} Fire Damage (Based on Character Level)'],
228 => ['Bits' => [6], 'Name' => '+{0} Lightning Damage (Based on Character Level)'],
229 => ['Bits' => [6], 'Name' => '+{0} Poison Damage (Based on Character Level)'],
230 => ['Bits' => [6], 'Name' => 'Cold Resist +{0}% (Based on Character Level)'],
231 => ['Bits' => [6], 'Name' => 'Fire Resist +{0}% (Based on Character Level)'],
232 => ['Bits' => [6], 'Name' => 'Lightning Resist +{0}% (Based on Character Level)'],
233 => ['Bits' => [6], 'Name' => 'Poison Resist +{0}% (Based on Character Level)'],
234 => ['Bits' => [6], 'Name' => '+{0} Cold Absorb (Based on Character Level)'],
235 => ['Bits' => [6], 'Name' => '+{0} Fire Absorb (Based on Character Level)'],
236 => ['Bits' => [6], 'Name' => '+{0} Lightning Absorb (Based on Character Level)'],
237 => ['Bits' => [6], 'Name' => '{0} Poison Absorb (Based on Character Level)'],
238 => ['Bits' => [5], 'Name' => 'Attacker Takes Damage of {0} (Based on Character Level)'],
239 => ['Bits' => [6], 'Name' => '{0}% Extra Gold from Monsters (Based on Character Level)'],
240 => ['Bits' => [6], 'Name' => '{0}% Better Chance of Getting Magic Items (Based on Character Level)'],
241 => ['Bits' => [6], 'Name' => 'Heal Stamina Plus {0}% (Based on Character Level)'],
242 => ['Bits' => [6], 'Name' => '+{0} Maxmium Stamina (Based on Character Level)'],
243 => ['Bits' => [6], 'Name' => '{0}% Damage to Demons (Based on Character Level)'],
244 => ['Bits' => [6], 'Name' => '{0}% Damage to Undead (Based on Character Level)'],
245 => ['Bits' => [6], 'Name' => '+{0} to Attack Rating against Demons (Based on Character Level)'],
246 => ['Bits' => [6], 'Name' => '+{0} to Attack Rating against Undead (Based on Character Level)'],
247 => ['Bits' => [6], 'Name' => '{0}% Chance of Crushing Blow (Based on Character Level)'],
248 => ['Bits' => [6], 'Name' => '{0}% Chance of Open Wounds (Based on Character Level)'],
249 => ['Bits' => [6], 'Name' => '+{0} Kick Damage (Based on Character Level)'],
250 => ['Bits' => [6], 'Name' => '{0}% to Deadly Strike (Based on Character Level)'],
252 => ['Bits' => [6], 'Name' => 'Repairs 1 Durability in {0} Seconds'],
253 => ['Bits' => [6], 'Name' => 'Replenishes Quantity'],
254 => ['Bits' => [8], 'Name' => 'Increased Stack Size'],
305 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0} Pierce Cold'],
306 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0} Pierce Fire'],
307 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0} Pierce Lightning'],
308 => ['Bits' => [8], 'Bias' => 50, 'Name' => '{0} Pierce Poision'],
324 => ['Bits' => [6], 'Name' => 'Unknown (Invisible)'],
329 => ['Bits' => [9], 'Bias' => 50, 'Name' => '{0}% To Fire Skill Damage'],
330 => ['Bits' => [9], 'Bias' => 50, 'Name' => '{0}% To Lightning Skill Damage'],
331 => ['Bits' => [9], 'Bias' => 50, 'Name' => '{0}% To Cold Skill Damage'],
332 => ['Bits' => [9], 'Bias' => 50, 'Name' => '{0}% To Poison Skill Damage'],
333 => ['Bits' => [8], 'Name' => '-{0}% To Enemy Fire Resistance'],
334 => ['Bits' => [8], 'Name' => '-{0}% To Enemy Lightning Resistance'],
335 => ['Bits' => [8], 'Name' => '-{0}% To Enemy Cold Resistance'],
336 => ['Bits' => [8], 'Name' => '-{0}% To Enemy Poison Resistance'],
356 => ['Bits' => [2], 'Name' => 'Quest Item Difficulty +{0} (Invisible)'],
];
}