diff --git a/filterProperties.txt b/filterProperties.txt new file mode 100644 index 0000000..426b585 --- /dev/null +++ b/filterProperties.txt @@ -0,0 +1,129 @@ +color +bloody +Expansion +gembonus +fire-fx +light-fx +gems%/lvl +dmg-slash +dmg-slash% +dmg-crush +dmg-crush% +dmg-thrust +dmg-thrust% +abs-slash +abs-crush +abs-thrust +abs-slash% +abs-crush% +abs-thrust% +ac/time +ac%/time +hp/time +mana/time +dmg/time +dmg%/time +str/time +dex/time +enr/time +vit/time +att/time +att%/time +dmg-cold/time +dmg-fire/time +dmg-ltng/time +dmg-pois/time +res-cold/time +res-fire/time +res-ltng/time +res-pois/time +abs-cold/time +abs-fire/time +abs-ltng/time +abs-pois/time +gold%/time +mag%/time +regen-stam/time +stam/time +dmg-dem/time +dmg-und/time +att-dem/time +att-und/time +crush/time +wounds/time +kick/time +deadly/time +gems%/time +fade +state +pruby +fruby +nruby +flruby +cruby +pamethyst +famethyst +namethyst +flamethyst +camethyst +pdiamond +fdiamond +ndiamond +fldiamond +cdiamond +pemerald +femerald +nemerald +flemerald +cemerald +psapphire +fsapphire +nsapphire +flsapphire +csapphire +ptopaz +ftopaz +ntopaz +fltopaz +ctopaz +pskull +fskull +nskull +flskull +cskull +rbgr01 +rbgr02 +rbgr03 +rbgr04 +rbgr05 +rbgr06 +rbgr07 +rbgr08 +rbgr09 +rbgr10 +rbgr11 +rbgr12 +rbgr13 +rbgr14 +rbgr15 +rbgr16 +rbgr17 +rbgr18 +rbgr19 +rbgr20 +rbgr21 +rbgr22 +rbgr23 +rbgr24 +rbgr25 +rbgr26 +rbgr27 +rbgr28 +rbgr29 +rbgr30 +rbgr31 +rbgr32 +rbgr33 +magharv +showkills +iforge \ No newline at end of file diff --git a/index.php b/index.php index 13dab06..d047357 100644 --- a/index.php +++ b/index.php @@ -23,6 +23,8 @@ ini_set('display_errors', 1); ini_set('log_errors', 1); +define('FILTER_PROPERTIES_FILE', 'filterProperties.txt'); + $filename = 'd2im.conf'; if (file_exists($filename)) { @@ -58,21 +60,46 @@ if (file_exists($filename)) { $u = $files->getFile("UniqueItems"); $s = $files->getFile("SetItems"); - - + + // If there's data, process it and save if (!empty($_POST)) { require_once './src/D2SaveFile.php'; $saver = new D2SaveFile(); + // process post + // combine armor/weapon codes + $post = $_POST; + if (!empty($post['code'])) { + array_filter($post['code']); + + if (!empty($post['code'][0])) { + $post['code'] = $post['code'][0]; + } else { + $post['code'] = $post['code'][1]; + } + } + + + // if ladder or carry1 is 0, set empty field. + if (!$post['ladder']){ + $post['ladder'] = ''; + } + if (!$post['carry1']){ + $post['carry1'] = ''; + } + + + + if ($_POST['formtype'] == "uniqueitems") { $saver->save($u); $saver->saveTblEnries("UniqueItems.tbl.txt"); } if ($_POST['formtype'] == "setitems") { - - - - + + + + $saver->save($s); $saver->saveTblEnries("SetItems.tbl.txt"); } diff --git a/src/D2Functions.php b/src/D2Functions.php index 3e756f6..81dc656 100644 --- a/src/D2Functions.php +++ b/src/D2Functions.php @@ -6,3 +6,7 @@ function dd($var) { echo ""; die(); } + +function filterFunc($arg1, $arg2) { + return !($arg1 == $arg2); +} \ No newline at end of file diff --git a/src/D2SM.php b/src/D2SM.php index f45a6e6..9041031 100644 --- a/src/D2SM.php +++ b/src/D2SM.php @@ -4,29 +4,30 @@
Add Func:
-Note: Edit boxes in Vertical Order.
[aprop1a, aprop1b][aprop2a, aprop2b]
Note: Edit boxes in Vertical Order.
[aprop1a, aprop1b][aprop2a, aprop2b]
aprop1a,aprop1b to aprop5a,aprop5b: An ID pointer of a property from Properties.txt, these columns control each of the five pairs of different variable (green) modifiers a set item can grant you at most.
-apar1a,apar1b to apar5a,apar5b: The parameter passed on to the associated property, this is used to pass skill IDs, state IDs, monster IDs, montype IDs and the like on to the properties that require them, these fields support calculations.
-amin1a,amin1b to amin5a,amin5b: Minimum value to assign to the associated property. Certain properties have special interpretations based on stat encoding (e.g. chance-to-cast and charged skills). See the File Guide for Properties.txt and ItemStatCost.txt for further details.
-amax1a,amax1b to amax5a,amax5b: Maximum value to assign to the associated property. Certain properties have special interpretations based on stat encoding (e.g. chance-to-cast and charged skills). See the File Guide for Properties.txt and ItemStatCost.txt for further details.
+ + + + + + +aprop1a,aprop1b to aprop5a,aprop5b: An ID pointer of a property from Properties.txt, these columns control each of the five pairs of different variable (green) modifiers a set item can grant you at most.
+apar1a,apar1b to apar5a,apar5b: The parameter passed on to the associated property, this is used to pass skill IDs, state IDs, monster IDs, montype IDs and the like on to the properties that require them, these fields support calculations.
+amin1a,amin1b to amin5a,amin5b: Minimum value to assign to the associated property. Certain properties have special interpretations based on stat encoding (e.g. chance-to-cast and charged skills). See the File Guide for Properties.txt and ItemStatCost.txt for further details.
+amax1a,amax1b to amax5a,amax5b: Maximum value to assign to the associated property. Certain properties have special interpretations based on stat encoding (e.g. chance-to-cast and charged skills). See the File Guide for Properties.txt and ItemStatCost.txt for further details.
- -Rarity
NoLimit
+Carry1
+