Преглед изворни кода

Fixed some inventory problems.

Iñigo Valentin пре 5 година
родитељ
комит
85120afc75

+ 4 - 1
application/API/v1/profile/PUT.php

@@ -793,7 +793,10 @@ function parse_profile($db, $player_id, $json){
         $statement->execute();
     }
     // Fix rune craft item type.
-    $db->query("UPDATE item SET type = 27 WHERE type = 29 AND id IN (2001, 4001, 4002, 4003, 9001, 9002, 9003, 8001);");
+    $db->query("UPDATE item SET type = 27 WHERE type = 29 AND id IN (2001, 4001, 4002, 4003, 9001, 9002, 9003, 8001, 9004);");
+    
+    // Set Conversion stone to type Craft Stuff and id 9999.
+    $db->query("UPDATE item SET type = 27, id = 9999 WHERE type = 75 AND id = 1;");
 
     // Parse Summon Stone summoning list
     // TODO: Set propper dates

+ 1 - 1
application/action/Optmimize_List_Action.php → application/action/Optimize_List_Action.php

@@ -374,7 +374,7 @@ class Optimize_List_Action extends Action{
             //error_log($statement->getSQL(true));
             $q = $statement->execute();
             while ($r = $q->fetchArray(SQLITE3_ASSOC)){
-                $rune = create_rune_array($unit, $r, $tuning);
+                $rune = $this->create_rune_array($unit, $r, $tuning);
                 //array_push($candidates[$i], new Rune($r["id"]));
                 array_push($candidates[$i], $rune);
                 $total_candidates ++;

+ 8 - 2
application/action/Optimize_Options_Action.php

@@ -39,6 +39,7 @@ class Optimize_Options_Action extends Action{
         $player = filter_input(INPUT_POST, 'player');
         if ($player == null){
             $this->code = 400;
+            error_log("400 player");
             $this->message = "POST parameter 'player' not specified or invalid.";
             return;
         }
@@ -46,6 +47,7 @@ class Optimize_Options_Action extends Action{
         $unit_id = filter_input(INPUT_POST, 'unit');
         if ($unit_id == null){
             $this->code = 400;
+            error_log("400 unit");
             $this->message = "POST parameter 'unit' not specified or invalid.";
             return;
         }
@@ -58,16 +60,20 @@ class Optimize_Options_Action extends Action{
         $tuning = filter_input(INPUT_POST, 'tuning');
         if ($tuning == null){
             $this->code = 400;
+            error_log("400 tining");
             $this->message = "POST parameter 'tuning' not specified or invalid.";
             return;
         }
     
-        $options = json_decode(filter_input(INPUT_POST, 'options'), true);
-        if ($options == null){
+        if (filter_input(INPUT_POST, 'options') == null){
             $this->code = 400;
+            error_log("400 option");
             $this->message = "POST parameter 'options' not specified or invalid.";
             return;
         }
+        $options = json_decode(filter_input(INPUT_POST, 'options'), true);
+        if ($options == null){
+        }
         foreach ($options as $option){
             $set = [
                 "runes" => [],

BIN
application/key.sqlite


+ 1 - 1
application/view/player.php

@@ -276,7 +276,7 @@
                                 </li>
                                 <li>
                                     <img title='Dimensional Energy' src='<?=URL::IMG["CURRENCY"]?>dimensionenergy.png'/>
-                                    <?=get_context()->get_player()->get_currencies()["dimension_energy"]?> / 10
+                                    <?=get_context()->get_player()->get_currencies()["dimension_energy"]?> / 100
                                 </li>
                                 <li>
                                     <img title='Dimensional Crystal' src='<?=URL::IMG["CURRENCY"]?>darkportalenergy.png'/>

BIN
public/img/inventory/000000010.png


BIN
public/img/inventory/000000012.png


BIN
public/img/inventory/000009004.png


BIN
public/img/inventory/000009999.png