Kaynağa Gözat

Version 2.1

 - Global image URL composer.
 - Unified essences as K_Inventory instances.
 - Fixed bugs in monster view and monster info pages.
 - Type and stat filters working again in the runes page.
 - Sorting runes by type working again.
 - Fixed some filter windows not showing completely.
 - Documentation removed from the repository.
Iñigo Valentin 6 yıl önce
ebeveyn
işleme
7c8c532541
100 değiştirilmiş dosya ile 266 ekleme ve 8363 silme
  1. 1 1
      application/config.php
  2. 1 6
      application/entity/Inventory.php
  3. 79 248
      application/entity/K_Area.php
  4. 1 6
      application/entity/K_Building.php
  5. 1 6
      application/entity/K_Decoration.php
  6. 1 6
      application/entity/K_Effect.php
  7. 1 6
      application/entity/K_Guild_Skill_Group.php
  8. 92 0
      application/entity/K_Inventory.php
  9. 12 17
      application/entity/K_Leader_Skill.php
  10. 1 6
      application/entity/K_Rune_Set.php
  11. 1 6
      application/entity/K_Skill.php
  12. 1 6
      application/entity/K_Source.php
  13. 7 17
      application/entity/K_Unit.php
  14. 1 6
      application/entity/K_Unit_Transformation.php
  15. 3 3
      application/entity/Rune.php
  16. 28 0
      application/helper/APPLICATION_Helper.php
  17. 1 1
      application/helper/HTML_Helper.php
  18. 7 7
      application/page/Monster_Page.php
  19. 2 1
      application/page/Runes_Page.php
  20. BIN
      application/sw.sqlite
  21. 0 1
      application/view/catalog.php
  22. 3 3
      application/view/fusion.php
  23. 16 12
      application/view/inc/filter_runes.php
  24. 1 1
      application/view/monster_info.php
  25. 2 2
      application/view/report_runeupgrade.php
  26. 3 3
      application/view/runes.php
  27. 0 108
      doc/classes/APP.html
  28. 0 108
      doc/classes/APPLICATION.html
  29. 0 108
      doc/classes/ARCHETYPE_ID.html
  30. 0 108
      doc/classes/AREA_TYPE_ID.html
  31. 0 108
      doc/classes/ARENA_RANKING_POINTS.html
  32. 0 108
      doc/classes/ARENA_RANKING_RANK.html
  33. 0 108
      doc/classes/BUILDING_ID.html
  34. 0 108
      doc/classes/Building.html
  35. 0 108
      doc/classes/CRAFT_ID.html
  36. 0 108
      doc/classes/Catalog_Page.html
  37. 0 108
      doc/classes/Controller.html
  38. 0 108
      doc/classes/Custom_Filter.html
  39. 0 108
      doc/classes/DB.html
  40. 0 108
      doc/classes/DECORATION_ID.html
  41. 0 108
      doc/classes/DIFFICULTY_ID.html
  42. 0 108
      doc/classes/DUNGEON_ID.html
  43. 0 108
      doc/classes/Decoration.html
  44. 0 108
      doc/classes/EFFECT_AREA_ID.html
  45. 0 108
      doc/classes/ELEMENTAL_RIFT_DUNGEON_ID.html
  46. 0 108
      doc/classes/ELEMENT_ID.html
  47. 0 108
      doc/classes/ENHANCE_MONSTER_ID.html
  48. 0 108
      doc/classes/Entity.html
  49. 0 108
      doc/classes/FILTER.html
  50. 0 108
      doc/classes/Fusion.html
  51. 0 108
      doc/classes/Fusion_Page.html
  52. 0 108
      doc/classes/GUILD_MEMBER_GRADE_ID.html
  53. 0 108
      doc/classes/Guild.html
  54. 0 108
      doc/classes/Guild_Member.html
  55. 0 108
      doc/classes/Guild_Page.html
  56. 0 108
      doc/classes/HTML.html
  57. 0 108
      doc/classes/Helper.html
  58. 0 108
      doc/classes/Home_Page.html
  59. 0 108
      doc/classes/INVENTORY_ID.html
  60. 0 108
      doc/classes/INVENTORY_TYPE_ID.html
  61. 0 108
      doc/classes/Inventory.html
  62. 0 108
      doc/classes/K_Area.html
  63. 0 108
      doc/classes/K_Building.html
  64. 0 108
      doc/classes/K_Decoration.html
  65. 0 108
      doc/classes/K_Effect.html
  66. 0 108
      doc/classes/K_Guild_Skill.html
  67. 0 108
      doc/classes/K_Guild_Skill_Group.html
  68. 0 108
      doc/classes/K_Leader_Skill.html
  69. 0 108
      doc/classes/K_Rune_Set.html
  70. 0 108
      doc/classes/K_Skill.html
  71. 0 108
      doc/classes/K_Skill_Level.html
  72. 0 108
      doc/classes/K_Source.html
  73. 0 108
      doc/classes/K_Unit.html
  74. 0 108
      doc/classes/K_Unit_Transformation.html
  75. 0 108
      doc/classes/LABYRINTH_STAGES_ID.html
  76. 0 108
      doc/classes/Landing_Page.html
  77. 0 108
      doc/classes/Monster_Fusion.html
  78. 0 108
      doc/classes/Monster_Info_Page.html
  79. 0 108
      doc/classes/Monster_Page.html
  80. 0 108
      doc/classes/Monsters_Page.html
  81. 0 108
      doc/classes/NET.html
  82. 0 108
      doc/classes/PATH.html
  83. 0 108
      doc/classes/Page.html
  84. 0 108
      doc/classes/Profile_Page.html
  85. 0 108
      doc/classes/QUALITY_ID.html
  86. 0 108
      doc/classes/RAID_RIFT_DUNGEON_ID.html
  87. 0 108
      doc/classes/RUNE_SET_ID.html
  88. 0 108
      doc/classes/RUNE_STAT_ID.html
  89. 0 108
      doc/classes/Report_Page.html
  90. 0 108
      doc/classes/Report_Runecraft_Page.html
  91. 0 108
      doc/classes/Report_Runeupgrade_Page.html
  92. 0 108
      doc/classes/Report_Skillup_Page.html
  93. 0 108
      doc/classes/Run.html
  94. 0 108
      doc/classes/Rune.html
  95. 0 108
      doc/classes/Rune_Craft.html
  96. 0 108
      doc/classes/Runes_Page.html
  97. 0 108
      doc/classes/Runs_Page.html
  98. 0 108
      doc/classes/SCENARIO_ID.html
  99. 0 108
      doc/classes/SOURCE_ID.html
  100. 0 108
      doc/classes/STAT_ID.html

+ 1 - 1
application/config.php

@@ -26,7 +26,7 @@
          *
          * Can be any string, not just numbers.
          */
-        const VERSION = "2";
+        const VERSION = "2.1";
     }
 
     /**

+ 1 - 6
application/entity/Inventory.php

@@ -111,12 +111,7 @@
          * @return string Image URL, or a fixed unknown image.
          */
         public function get_image(){
-            if (file_exists(PATH::BASE . "img/inventory/" . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png")){
-                return URL::IMG["INVENTORY"] . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png";
-            }
-            else{
-                return URL::IMG["UNKNOWN"];
-            }
+            return APPLICATION::img("INVENTORY", $this->id);
         }
     }
 ?>

+ 79 - 248
application/entity/K_Area.php

@@ -82,26 +82,19 @@
          * @return string Image URL, or a fixed unknown image.
          */
         public function get_image($stage = null){
-            if ($this->id > 10000 && file_exists(PATH::BASE . "img/area/HOH.png")){
+            if ($this->id > 10000){
                 // Hall of Heroes
-                return URL::IMG["AREA"] . "HOH.png";
+                return APPLICATION::img("AREA", "HOH");
             }
             elseif (
-              (
                 $this->type == AREA_TYPE_ID::SCENARIO ||
-                //$this->type == AREA_TYPE_ID::RIFT_DUNGEON ||
-                //$this->type == AREA_TYPE_ID::DIMENSIONAL_HOLE ||
-                //$this->type == AREA_TYPE_ID::RIFT_RAID ||
                 $this->type == AREA_TYPE_ID::ARENA ||
                 $this->type == AREA_TYPE_ID::GUILD_WAR ||
                 $this->type == AREA_TYPE_ID::GUILD_SIEGE ||
-                //$this->type == AREA_TYPE_ID::TARTARUS_LABYRINTH ||
-                //$this->type == AREA_TYPE_ID::TRIAL_OF_ASCENSION ||
                 $this->type == AREA_TYPE_ID::WORLD_BOSS ||
                 $this->type == AREA_TYPE_ID::DIMENSIONAL_RIFT
-              ) && file_exists(PATH::BASE . "img/area/" . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png")
             ){
-                return URL::IMG["AREA"] . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png";
+                return APPLICATION::img("AREA", $this->id);
             }
             elseif ($this->type == AREA_TYPE_ID::CAIROS_DUNGEON && APPLICATION::valid_id("DUNGEON_ID", $this->id)){
                 switch ($this->id){
@@ -110,38 +103,27 @@
                             case 1:
                             case 6:
                                 // Light
-                                if (file_exists(PATH::BASE . "img/unit/00060204.png")){
-                                    return URL::IMG["UNIT"] . "00060204.png";
-                                }
-                                break;
+                                return APPLICATION::img("UNIT", 60204);
                                 break;
                             case 2:
                             case 7:
                                 // Dark
-                                if (file_exists(PATH::BASE . "img/unit/00060204.png")){
-                                    return URL::IMG["UNIT"] . "00060204.png";
-                                }
+                                return APPLICATION::img("UNIT", 60204);
                                 break;
                             case 3:
                             case 8:
                                 // Wind
-                                if (file_exists(PATH::BASE . "img/unit/00060203.png")){
-                                    return URL::IMG["UNIT"] . "00060203.png";
-                                }
+                                return APPLICATION::img("UNIT", 60203);
                                 break;
                             case 4:
                             case 9:
                                 // Fire
-                                if (file_exists(PATH::BASE . "img/unit/00060202.png")){
-                                    return URL::IMG["UNIT"] . "00060202.png";
-                                }
+                                return APPLICATION::img("UNIT", 60202);
                                 break;
                             case 5:
                             case 10:
                                 // Water
-                                if (file_exists(PATH::BASE . "img/unit/00060201.png")){
-                                    return URL::IMG["UNIT"] . "00060201.png";
-                                }
+                                return APPLICATION::img("UNIT", 60201);
                                 break;
                         }
                         break;
@@ -150,38 +132,28 @@
                             case 1:
                             case 6:
                                 // Wind
-                                if (file_exists(PATH::BASE . "img/unit/00060303.png")){
-                                    return URL::IMG["UNIT"] . "00060303.png";
-                                }
+                                return APPLICATION::img("UNIT", 60303);
                                 break;
                                 break;
                             case 2:
                             case 7:
                                 // Light
-                                if (file_exists(PATH::BASE . "img/unit/00060304.png")){
-                                    return URL::IMG["UNIT"] . "00060304.png";
-                                }
+                                return APPLICATION::img("UNIT", 60304);
                                 break;
                             case 3:
                             case 8:
                                 // Water
-                                if (file_exists(PATH::BASE . "img/unit/00060301.png")){
-                                    return URL::IMG["UNIT"] . "00060301.png";
-                                }
+                                return APPLICATION::img("UNIT", 60301);
                                 break;
                             case 4:
                             case 9:
                                 // Dark
-                                if (file_exists(PATH::BASE . "img/unit/00060305.png")){
-                                    return URL::IMG["UNIT"] . "00060305.png";
-                                }
+                                return APPLICATION::img("UNIT", 60305);
                                 break;
                             case 5:
                             case 10:
                                 // Fire
-                                if (file_exists(PATH::BASE . "img/unit/00060302.png")){
-                                    return URL::IMG["UNIT"] . "00060302.png";
-                                }
+                                return APPLICATION::img("UNIT", 60302);
                                 break;
                         }
                         break;
@@ -190,390 +162,249 @@
                             case 1:
                             case 6:
                                 // Water
-                                if (file_exists(PATH::BASE . "img/unit/00062101.png")){
-                                    return URL::IMG["UNIT"] . "00062101.png";
-                                }
+                                return APPLICATION::img("UNIT", 62101);
                                 break;
                                 break;
                             case 2:
                             case 7:
                                 // Fire
-                                if (file_exists(PATH::BASE . "img/unit/00062102.png")){
-                                    return URL::IMG["UNIT"] . "00062102.png";
-                                }
+                                return APPLICATION::img("UNIT", 62102);
                                 break;
                             case 3:
                             case 8:
                                 // Wind
-                                if (file_exists(PATH::BASE . "img/unit/00062103.png")){
-                                    return URL::IMG["UNIT"] . "00062103.png";
-                                }
+                                return APPLICATION::img("UNIT", 62103);
                                 break;
                             case 4:
                             case 9:
                                 // Light
-                                if (file_exists(PATH::BASE . "img/unit/00062104.png")){
-                                    return URL::IMG["UNIT"] . "00062104.png";
-                                }
+                                return APPLICATION::img("UNIT", 62104);
                                 break;
                             case 5:
                             case 10:
                                 // Dark
-                                if (file_exists(PATH::BASE . "img/unit/00062105.png")){
-                                    return URL::IMG["UNIT"] . "00062105.png";
-                                }
+                                return APPLICATION::img("UNIT", 62105);
                                 break;
                         }
                         break;
                     case DUNGEON_ID::HALL_OF_WATER:
-                        if (file_exists(PATH::BASE . "img/unit/00060101.png")){
-                            return URL::IMG["UNIT"] . "00060101.png";
-                        }
+                        return APPLICATION::img("UNIT", 60101);
                         break;
                     case DUNGEON_ID::HALL_OF_FIRE:
-                        if (file_exists(PATH::BASE . "img/unit/00060102.png")){
-                            return URL::IMG["UNIT"] . "00060102.png";
-                        }
+                        return APPLICATION::img("UNIT", 60102);
                         break;
                     case DUNGEON_ID::HALL_OF_WIND:
-                        if (file_exists(PATH::BASE . "img/unit/00060103.png")){
-                            return URL::IMG["UNIT"] . "00060103.png";
-                        }
+                        return APPLICATION::img("UNIT", 60103);
                         break;
                     case DUNGEON_ID::HALL_OF_LIGHT:
-                        if (file_exists(PATH::BASE . "img/unit/00060104.png")){
-                            return URL::IMG["UNIT"] . "00060104.png";
-                        }
+                        return APPLICATION::img("UNIT", 60104);
                         break;
                     case DUNGEON_ID::HALL_OF_DARK:
-                        if (file_exists(PATH::BASE . "img/unit/00060105.png")){
-                            return $PATH["IMG"]["UNIT"] . "00060105.png";
-                        }
+                        return APPLICATION::img("UNIT", 60105);
                         break;
                     case DUNGEON_ID::HALL_OF_MAGIC:
-                        if (file_exists(PATH::BASE . "img/unit/00062004.png")){
-                            return URL::IMG["UNIT"] . "00062004.png";
-                        }
+                        return APPLICATION::img("UNIT", 62004);
                         break;
                     default:
-                        if (file_exists(PATH::BASE . "img/area/" . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png")){
-                            return URL::IMG["AREA"] . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png";
-                        }
+                        return APPLICATION::img("AREA", $this->id);
                 }
             }
             elseif ($this->type == AREA_TYPE_ID::RIFT_DUNGEON && APPLICATION::valid_id("ELEMENTAL_RIFT_DUNGEON_ID", $this->id)){
                 switch ($this->id){
                     case ELEMENTAL_RIFT_DUNGEON_ID::ICE_BEAST:
-                        if (file_exists(PATH::BASE . "img/unit/00043001.png")){
-                            return URL::IMG["UNIT"] . "00043001.png";
-                        }
+                        return APPLICATION::img("UNIT", 43001);
                         break;
                     case ELEMENTAL_RIFT_DUNGEON_ID::FIRE_BEAST:
-                        if (file_exists(PATH::BASE . "img/unit/00043002.png")){
-                            return URL::IMG["UNIT"] . "00043002.png";
-                        }
+                        return APPLICATION::img("UNIT", 43002);
                         break;
                     case ELEMENTAL_RIFT_DUNGEON_ID::WIND_BEAST:
-                        if (file_exists(PATH::BASE . "img/unit/00043003.png")){
-                            return URL::IMG["UNIT"] . "00043003.png";
-                        }
+                        return APPLICATION::img("UNIT", 43003);
                         break;
                     case ELEMENTAL_RIFT_DUNGEON_ID::LIGHT_BEAST:
-                        if (file_exists(PATH::BASE . "img/unit/00043004.png")){
-                            return URL::IMG["UNIT"] . "00043004.png";
-                        }
+                        return APPLICATION::img("UNIT", 43004);
                         break;
                     case ELEMENTAL_RIFT_DUNGEON_ID::DARK_BEAST:
-                        if (file_exists(PATH::BASE . "img/unit/00043005.png")){
-                            return URL::IMG["UNIT"] . "00043005.png";
-                        }
+                        return APPLICATION::img("UNIT", 43005);
                         break;
                     default:
-                        if (file_exists(PATH::BASE . "img/area/" . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png")){
-                            return URL::IMG["AREA"] . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png";
-                        }
+                        return APPLICATION::img("AREA", $this->id);
                         break;
                 }
             }
             elseif ($this->type == AREA_TYPE_ID::RIFT_RAID){
-                if (file_exists(PATH::BASE . "img/unit/00044007.png")){
-                    return URL::IMG["UNIT"] . "00044007.png";
-                }
+                return APPLICATION::img("UNIT", 44007);
             }
             elseif ($this->type == AREA_TYPE_ID::DIMENSIONAL_HOLE){
                 switch ($this->id){
                     case DUNGEON_ID::FOREST_OF_ROARING_BEASTS:
-                        if (file_exists(PATH::BASE . "img/unit/00047002.png")){
-                            return URL::IMG["UNIT"] . "00047002.png";
-                        }
+                        return APPLICATION::img("UNIT", 47002);
                         break;
                     case DUNGEON_ID::SANCTUARY_OF_DREAMING_FAIRIES:
-                        if (file_exists(PATH::BASE . "img/unit/00047001.png")){
-                            return URL::IMG["UNIT"] . "00047001.png";
-                        }
+                        return APPLICATION::img("UNIT", 47001);
                         break;
                     case DUNGEON_ID::CLIFF_OF_TOUGH_BEASTS_MEN:
-                        if (file_exists(PATH::BASE . "img/unit/00047002.png")){
-                            return URL::IMG["UNIT"] . "00047003.png";
-                        }
+                        return APPLICATION::img("UNIT", 47002);
                         break;
                     case DUNGEON_ID::KARZHAN_REMAINS_WARBEAR:
                         switch ($stage){
                             case 1:
-                                if (file_exists(PATH::BASE . "img/unit/00010734.png")){
-                                    return URL::IMG["UNIT"] . "00010734.png";
-                                }
+                                return APPLICATION::img("UNIT", 10734);
                                 break;
                             case 2:
-                                if (file_exists(PATH::BASE . "img/unit/00010733.png")){
-                                    return URL::IMG["UNIT"] . "00010733.png";
-                                }
+                                return APPLICATION::img("UNIT", 10733);
                                 break;
                             case 3:
-                                if (file_exists(PATH::BASE . "img/unit/00010731.png")){
-                                    return URL::IMG["UNIT"] . "00010731.png";
-                                }
+                                return APPLICATION::img("UNIT", 10731);
                                 break;
                             case 4:
-                                if (file_exists(PATH::BASE . "img/unit/00010735.png")){
-                                    return URL::IMG["UNIT"] . "00010735.png";
-                                }
+                                return APPLICATION::img("UNIT", 10735);
                                 break;
                             case 5:
-                                if (file_exists(PATH::BASE . "img/unit/00010732.png")){
-                                    return URL::IMG["UNIT"] . "00010732.png";
-                                }
+                                return APPLICATION::img("UNIT", 10732);
                                 break;
                             default:
-                                if (file_exists(PATH::BASE . "img/area/" . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png")){
-                                    return URL::IMG["AREA"] . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png";
-                                }
+                                return APPLICATION::img("AREA", $this->id);
                                 break;
                         }
                         break;
                     case DUNGEON_ID::KARZHAN_REMAINS_INUGAMI:
                         switch ($stage){
                             case 1:
-                                if (file_exists(PATH::BASE . "img/unit/00011031.png")){
-                                    return URL::IMG["UNIT"] . "00011031.png";
-                                }
+                                return APPLICATION::img("UNIT", 11031);
                                 break;
                             case 2:
-                                if (file_exists(PATH::BASE . "img/unit/00011033.png")){
-                                    return URL::IMG["UNIT"] . "00011033.png";
-                                }
+                                return APPLICATION::img("UNIT", 11033);
                                 break;
                             case 3:
-                                if (file_exists(PATH::BASE . "img/unit/00011032.png")){
-                                    return URL::IMG["UNIT"] . "00011032.png";
-                                }
+                                return APPLICATION::img("UNIT", 11032);
                                 break;
                             case 4:
-                                if (file_exists(PATH::BASE . "img/unit/00011034.png")){
-                                    return URL::IMG["UNIT"] . "00011034.png";
-                                }
+                                return APPLICATION::img("UNIT", 11034);
                                 break;
                             case 5:
-                                if (file_exists(PATH::BASE . "img/unit/00011035.png")){
-                                    return URL::IMG["UNIT"] . "00011035.png";
-                                }
+                                return APPLICATION::img("UNIT", 11035);
                                 break;
                             default:
-                                if (file_exists(PATH::BASE . "img/area/" . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png")){
-                                    return URL::IMG["AREA"] . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png";
-                                }
+                                return APPLICATION::img("AREA", $this->id);
                                 break;
                         }
                         break;
                     case DUNGEON_ID::ELLUNIA_REMAINS_FAIRY:
                         switch ($stage){
                             case 1:
-                                if (file_exists(PATH::BASE . "img/unit/00010132.png")){
-                                    return URL::IMG["UNIT"] . "00010132.png";
-                                }
+                                return APPLICATION::img("UNIT", 10132);
                                 break;
                             case 2:
-                                if (file_exists(PATH::BASE . "img/unit/00010134.png")){
-                                    return URL::IMG["UNIT"] . "00010134.png";
-                                }
+                                return APPLICATION::img("UNIT", 10134);
                                 break;
                             case 3:
-                                if (file_exists(PATH::BASE . "img/unit/00010131.png")){
-                                    return URL::IMG["UNIT"] . "00010131.png";
-                                }
+                                return APPLICATION::img("UNIT", 10131);
                                 break;
                             case 4:
-                                if (file_exists(PATH::BASE . "img/unit/00010133.png")){
-                                    return URL::IMG["UNIT"] . "00010133.png";
-                                }
+                                return APPLICATION::img("UNIT", 10133);
                                 break;
                             case 5:
-                                if (file_exists(PATH::BASE . "img/unit/00010134.png")){
-                                    return URL::IMG["UNIT"] . "00010134.png";
-                                }
+                                return APPLICATION::img("UNIT", 10134);
                                 break;
                             default:
-                                if (file_exists(PATH::BASE . "img/area/" . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png")){
-                                    return URL::IMG["AREA"] . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png";
-                                }
+                                return APPLICATION::img("AREA", $this->id);
                                 break;
                         }
                         break;
                     case DUNGEON_ID::ELLUNIA_REMAINS_PIXIE:
                         switch ($stage){
                             case 1:
-                                if (file_exists(PATH::BASE . "img/unit/00010334.png")){
-                                    return URL::IMG["UNIT"] . "00010334.png";
-                                }
+                                return APPLICATION::img("UNIT", 10334);
                                 break;
                             case 2:
-                                if (file_exists(PATH::BASE . "img/unit/00010332.png")){
-                                    return URL::IMG["UNIT"] . "00010332.png";
-                                }
+                                return APPLICATION::img("UNIT", 10332);
                                 break;
                             case 3:
-                                if (file_exists(PATH::BASE . "img/unit/00010335.png")){
-                                    return URL::IMG["UNIT"] . "00010335.png";
-                                }
+                                return APPLICATION::img("UNIT", 10335);
                                 break;
                             case 4:
-                                if (file_exists(PATH::BASE . "img/unit/00010333.png")){
-                                    return URL::IMG["UNIT"] . "00010333.png";
-                                }
+                                return APPLICATION::img("UNIT", 10333);
                                 break;
                             case 5:
-                                if (file_exists(PATH::BASE . "img/unit/00010331.png")){
-                                    return URL::IMG["UNIT"] . "00010331.png";
-                                }
+                                return APPLICATION::img("UNIT", 10331);
                                 break;
                             default:
-                                if (file_exists(PATH::BASE . "img/area/" . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png")){
-                                    return URL::IMG["AREA"] . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png";
-                                }
+                                return APPLICATION::img("AREA", $this->id);
                                 break;
                         }
                         break;
                     case DUNGEON_ID::LUMEL_REMAINS_WEREWOLF:
                         switch ($stage){
                             case 1:
-                                if (file_exists(PATH::BASE . "img/unit/00014035.png")){
-                                    return URL::IMG["UNIT"] . "00014035.png";
-                                }
+                                return APPLICATION::img("UNIT", 14035);
                                 break;
                             case 2:
-                                if (file_exists(PATH::BASE . "img/unit/00014033.png")){
-                                    return URL::IMG["UNIT"] . "00014033.png";
-                                }
+                                return APPLICATION::img("UNIT", 14033);
                                 break;
                             case 3:
-                                if (file_exists(PATH::BASE . "img/unit/00014031.png")){
-                                    return URL::IMG["UNIT"] . "00014031.png";
-                                }
+                                return APPLICATION::img("UNIT", 14031);
                                 break;
                             case 4:
-                                if (file_exists(PATH::BASE . "img/unit/00014034.png")){
-                                    return URL::IMG["UNIT"] . "00014034.png";
-                                }
+                                return APPLICATION::img("UNIT", 14034);
                                 break;
                             case 5:
-                                if (file_exists(PATH::BASE . "img/unit/00014032.png")){
-                                    return URL::IMG["UNIT"] . "00014032.png";
-                                }
+                                return APPLICATION::img("UNIT", 14032);
                                 break;
                             default:
-                                if (file_exists(PATH::BASE . "img/area/" . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png")){
-                                    return URL::IMG["AREA"] . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png";
-                                }
+                                return APPLICATION::img("AREA", $this->id);
                                 break;
                         }
                         break;
                     case DUNGEON_ID::LUMEL_REMAINS_MARTIAL_CAT:
                         switch ($stage){
                             case 1:
-                                if (file_exists(PATH::BASE . "img/unit/00015032.png")){
-                                    return URL::IMG["UNIT"] . "00015032.png";
-                                }
+                                return APPLICATION::img("UNIT", 15032);
                                 break;
                             case 2:
-                                if (file_exists(PATH::BASE . "img/unit/00015034.png")){
-                                    return URL::IMG["UNIT"] . "00015034.png";
-                                }
+                                return APPLICATION::img("UNIT", 15034);
                                 break;
                             case 3:
-                                if (file_exists(PATH::BASE . "img/unit/00015031.png")){
-                                    return URL::IMG["UNIT"] . "00015031.png";
-                                }
+                                return APPLICATION::img("UNIT", 15031);
                                 break;
                             case 4:
-                                if (file_exists(PATH::BASE . "img/unit/00015035.png")){
-                                    return URL::IMG["UNIT"] . "00015035.png";
-                                }
+                                return APPLICATION::img("UNIT", 15035);
                                 break;
                             case 5:
-                                if (file_exists(PATH::BASE . "img/unit/00015033.png")){
-                                    return URL::IMG["UNIT"] . "00015033.png";
-                                }
+                                return APPLICATION::img("UNIT", 15033);
                                 break;
                             default:
-                                if (file_exists(PATH::BASE . "img/area/" . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png")){
-                                    return URL::IMG["AREA"] . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png";
-                                }
+                                return APPLICATION::img("AREA", $this->id);
                                 break;
                         }
                         break;
                     default:
-                        if (file_exists(PATH::BASE . "img/area/" . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png")){
-                            return URL::IMG["AREA"] . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png";
-                        }
+                        return APPLICATION::img("AREA", $this->id);
                         break;
                 }
             }
             elseif ($this->type == AREA_TYPE_ID::TARTARUS_LABYRINTH){
                 switch ($stage){
                     case LABYRINTH_STAGES_ID::TARTARUS:
-                        if (file_exists(PATH::BASE . "img/unit/00046001.png")){
-                            return URL::IMG["UNIT"] . "00046001.png";
-                        }
+                        return APPLICATION::img("UNIT", 46001);
                         break;
                     case LABYRINTH_STAGES_ID::LEOS:
-                        if (file_exists(PATH::BASE . "img/unit/00046101.png")){
-                            return URL::IMG["UNIT"] . "00046101.png";
-                        }
+                        return APPLICATION::img("UNIT", 46101);
                         break;
                     case LABYRINTH_STAGES_ID::KOTTOS:
-                        if (file_exists(PATH::BASE . "img/unit/00046102.png")){
-                            return URL::IMG["UNIT"] . "00046102.png";
-                        }
+                        return APPLICATION::img("UNIT", 46102);
                         break;
                     case LABYRINTH_STAGES_ID::AQUILES:
-                        if (file_exists(PATH::BASE . "img/unit/00046103.png")){
-                            return URL::IMG["UNIT"] . "00046103.png";
-                        }
+                        return APPLICATION::img("UNIT", 46103);
                         break;
                     default:
-                        if (file_exists(PATH::BASE . "img/area/" . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png")){
-                            return URL::IMG["AREA"] . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png";
-                        }
-                        else{
-                            return URL::IMG["UNKNOWN"];
-                        }
+                        return APPLICATION::img("AREA", $this->id);
                 }
             }
             elseif ($this->type == AREA_TYPE_ID::TRIAL_OF_ASCENSION){
-                if (file_exists(PATH::BASE . "img/area/TRIAL_OF_ASCENSION.png")){
-                    return URL::IMG["AREA"] . "TRIAL_OF_ASCENSION.png";
-                }
-                else{
-                    return URL::IMG["UNKNOWN"];
-                }
+                return APPLICATION::img("AREA", "TRIAL_OF_ASCENSION");
             }
             else{
-                if (file_exists(PATH::BASE . "img/area/" . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png")){
-                    return URL::IMG["AREA"] . str_pad($this->id, 9, '0', STR_PAD_LEFT) . ".png";
-                }
-                else{
-                    return URL::IMG["UNKNOWN"];
-                }
+                return APPLICATION::img("AREA", $this->id);
             }
         }
 

+ 1 - 6
application/entity/K_Building.php

@@ -72,12 +72,7 @@
          * @return string Image URL, or a fixed unknown image.
          */
         public function get_image(){
-            if (file_exists(PATH::BASE . "img/building/" . str_pad($this->id, 4, '0', STR_PAD_LEFT) . ".png")){
-                return URL::IMG["BUILDING"] . str_pad($this->id, 4, '0', STR_PAD_LEFT) . ".png";
-            }
-            else{
-                return URL::IMG["UNKNOWN"];
-            }
+            return APPLICATION::img("BUILDING", $this->id);
         }
 
     }

+ 1 - 6
application/entity/K_Decoration.php

@@ -124,12 +124,7 @@
          * @return string Image URL, or a fixed unknown image.
          */
         public function get_image(){
-            if (file_exists(PATH::BASE . "img/decoration/" . str_pad($this->id, 4, '0', STR_PAD_LEFT) . ".png")){
-                return URL::IMG["DECORATION"] . str_pad($this->id, 4, '0', STR_PAD_LEFT) . ".png";
-            }
-            else{
-                return URL::IMG["UNKNOWN"];
-            }
+            return APPLICATION::img("DECORATION", $this->id);
         }
 
     }

+ 1 - 6
application/entity/K_Effect.php

@@ -78,12 +78,7 @@
          * @return string Image URL, or a fixed unknown image.
          */
         public function get_image(){
-            if (file_exists(PATH::BASE . "img/effect/" . str_pad($this->id, 4, '0', STR_PAD_LEFT) . ".png")){
-                return URL::IMG["EFFECT"] . str_pad($this->id, 4, '0', STR_PAD_LEFT) . ".png";
-            }
-            else{
-                return URL::IMG["UNKNOWN"];
-            }
+            return APPLICATION::img("EFFECT", $this->id);
         }
     }
 ?>

+ 1 - 6
application/entity/K_Guild_Skill_Group.php

@@ -85,12 +85,7 @@
          * @return string Image URL, or a fixed unknown image.
          */
         public function get_image(){
-            if (file_exists(PATH::BASE . "img/skill_guild/" . str_pad($this->id, 1, '0', STR_PAD_LEFT) . ".png")){
-                return URL::IMG["SKILL_GUILD"] . str_pad($this->id, 1, '0', STR_PAD_LEFT) . ".png";
-            }
-            else{
-                return URL::IMG["UNKNOWN"];
-            }
+            return APPLICATION::img("SKILL_GUILD", $this->id);
         }
 
     }

+ 92 - 0
application/entity/K_Inventory.php

@@ -0,0 +1,92 @@
+<?php
+    /**
+     * Inventory base entity file.
+     *
+     * Creates the entity and makes it available.
+     *
+     * @category Entity
+     */
+
+    /**
+     * Require dependent entities if not present.
+     */
+    require_once(PATH::ENTITY . "Entity.php");
+
+    /**
+     * An inventory base item.
+     *
+     * Represents an object from the table 'k_inventory'.
+     *
+     * @category Entity 
+     */
+    class K_Inventory extends Entity{
+
+        /**
+         * @var int Item identifier.
+         */
+        public $id;
+
+        /**
+         * @var string Item name.
+         */
+        public $name;
+
+        /**
+         * @var string Item type name.
+         */
+        public $type;
+        
+        /**
+         * @var string Item description.
+         */
+        public $description;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * building, populating it and it's items.
+         *
+         * @param resource $db Connection to the database.
+         * @param int $id Item identifier.
+         * @param int $type Item type identifier. Optional, will try to guess if null.
+         */
+        public function __construct($db, $id, $type = null){
+            parent::__construct($db);
+            $s = "
+                SELECT
+                  k_inventory.id AS id,
+                  k_inventory.name AS name,
+                  k_inventory.description AS description,
+                  k_inventory_type.name AS type
+                FROM
+                  k_inventory,
+                  k_inventory_type
+                WHERE
+                  k_inventory.type = k_inventory_type.id AND
+                  k_inventory.id = $id
+            ";
+            if ($type != null){
+                $s .= "AND k_inventory.type = $type";
+            }
+            $q = $this->db->query($s);
+            $r = $q->fetchArray(SQLITE3_ASSOC);
+            $this->type = $r["type"];
+            $this->amount = $r["amount"];
+            $this->id = $r["id"];
+            $this->name = HTML::e($r["name"]);
+            $this->description = HTML::e($r["description"]);
+        }
+
+        /**
+         * Gets the path to the item image. The image must be in the
+         * img/content/inventory/ directory, and its name must be the item id,
+         * padded with '0' to 9 digites, and the extension must be '.png'.
+         *
+         * @return string Image URL, or a fixed unknown image.
+         */
+        public function get_image(){
+            return APPLICATION::img("INVENTORY", $this->id);
+        }
+    }
+?>

+ 12 - 17
application/entity/K_Leader_Skill.php

@@ -83,12 +83,7 @@
          * @return string Image URL, or a fixed unknown image.
          */
         public function get_image(){
-            if (file_exists(PATH::BASE . "img/content/skill_leader/" . str_pad($this->id, 4, '0', STR_PAD_LEFT) . ".png")){
-                return URL::IMG["SKILL_LEADER"] . str_pad($this->id, 4, '0', STR_PAD_LEFT) . ".png";
-            }
-            else{
-                return URL::IMG["UNKNOWN"];
-            }
+            return APPLICATION::img("SKILL_LEADER", $this->id);
         }
 
         /**
@@ -102,28 +97,28 @@
             global $EFFECT_AREA;
             $s = "Increases the ";
             switch ($this->attribute){
-                case STAT::ATK:
+                case STAT_ID::ATK:
                     $s .= "attack power";
                     break;
-                case STAT::DEF:
+                case STAT_ID::DEF:
                     $s .= "defense";
                     break;
-                case STAT::HP:
+                case STAT_ID::HP:
                     $s .= "HP";
                     break;
-                case STAT::SPD:
+                case STAT_ID::SPD:
                     $s .= "attack speed";
                     break;
-                case STAT::CRIT_RATE:
+                case STAT_ID::CRIT_RATE:
                     $s .= "critical rate";
                     break;
-                case STAT::CRIT_DMG:
+                case STAT_ID::CRIT_DMG:
                     $s .= "critical damage";
                     break;
-                case STAT::ACC:
+                case STAT_ID::ACC:
                     $s .= "accuracy";
                     break;
-                case STAT::RES:
+                case STAT_ID::RES:
                     $s .= "resistance";
                     break;
             }
@@ -147,13 +142,13 @@
             }
             $s = $s . "by " . $this->amount . "%";
             switch ($this->area){
-                case EFFECT_AREA::DUNGEON:
+                case EFFECT_AREA_ID::DUNGEON:
                     $s = $s . " in the Dungeons";
                     break;
-                case EFFECT_AREA::ARENA:
+                case EFFECT_AREA_ID::ARENA:
                     $s = $s . " in the Arena";
                     break;
-                case EFFECT_AREA::GUILD:
+                case EFFECT_AREA_ID::GUILD:
                     $s = $s . " in Guild content";
                     break;
             }

+ 1 - 6
application/entity/K_Rune_Set.php

@@ -78,12 +78,7 @@
          * @return string Image URL, or a fixed unknown image.
          */
         public function get_image(){
-            if (file_exists(PATH::BASE . "img/rune/" . str_pad($this->id, 2, '0', STR_PAD_LEFT) . ".png")){
-                return URL::IMG["RUNE"] . str_pad($this->id, 2, '0', STR_PAD_LEFT) . ".png";
-            }
-            else{
-                return URL::IMG["UNKNOWN"];
-            }
+            return APPLICATION::img("RUNE", $this->id);
         }
     }
 ?>

+ 1 - 6
application/entity/K_Skill.php

@@ -155,12 +155,7 @@
          * @return string Image URL, or a fixed unknown image.
          */
         public function get_image(){
-            if (file_exists(PATH::BASE . "img/skill/" . str_pad($this->id, 8, '0', STR_PAD_LEFT) . ".png")){
-                return URL::IMG["SKILL"] . str_pad($this->id, 8, '0', STR_PAD_LEFT) . ".png";
-            }
-            else{
-                return URL::IMG["UNKNOWN"];
-            }
+            return APPLICATION::img("SKILL", $this->id);
         }
     }
 ?>

+ 1 - 6
application/entity/K_Source.php

@@ -79,12 +79,7 @@
          * @return string Image URL, or a fixed unknown image.
          */
         public function get_image(){
-            if (file_exists(PATH::BASE . "img/source/" . str_pad($this->id, 4, '0', STR_PAD_LEFT) . ".png")){
-                return URL::IMG["SOURCE"] . str_pad($this->id, 4, '0', STR_PAD_LEFT) . ".png";
-            }
-            else{
-                return URL::IMG["UNKNOWN"];
-            }
+            return APPLICATION::img("SOURCE", $this->id);
         }
 
     }

+ 7 - 17
application/entity/K_Unit.php

@@ -14,6 +14,7 @@
     require_once(PATH::ENTITY . "K_Skill.php");
     require_once(PATH::ENTITY . "K_Leader_Skill.php");
     require_once(PATH::ENTITY . "K_Source.php");
+    require_once(PATH::ENTITY . "K_Inventory.php");
     require_once(PATH::ENTITY . "K_Unit_Transformation.php");
 
     /**
@@ -200,9 +201,8 @@
          *
          * Formed by arrays of:
          * [
-         *   "element" => "",
-         *   "grade" => "",
-         *   "amount" => 
+         *   "item" => K_Inventory,
+         *   "amount" => int
          * ]
          */
         public $essences = [];
@@ -373,21 +373,16 @@
             $this->essences = [];
             $s =
               "SELECT " .
-              "  element, " .
-              "  grade, " .
+              "  item, " .
               "  amount " .
               "FROM k_unit_essence " .
               "WHERE " .
               "  unit = " . $this->id . " " .
-              "ORDER BY " .
-              "  element <> 'Magic', " .
-              "  grade <> 'Low', " .
-              "  grade <> 'Mid'; ";
+              "ORDER BY item; ";
             $q = $this->db->query($s);
             while ($r = $q->fetchArray(SQLITE3_ASSOC)){
                 $e = [
-                    "element" => $r["element"],
-                    "grade" => $r["grade"],
+                    "item" => new K_Inventory($this->db, $r["item"], INVENTORY_TYPE_ID::ESSENCES),
                     "amount" => $r["amount"]
                 ];
                 array_push($this->essences, $e);
@@ -466,12 +461,7 @@
          * @return string Image URL, or a fixed unknown image.
          */
         public function get_image(){
-            if (file_exists(PATH::BASE . "img/unit/" . str_pad($this->id, 8, '0', STR_PAD_LEFT) . ".png")){
-                return URL::IMG["UNIT"] . str_pad($this->id, 8, '0', STR_PAD_LEFT) . ".png";
-            }
-            else{
-                return URL::IMG["UNKNOWN"];
-            }
+            return APPLICATION::img("UNIT", $this->id);
         }
 
     }

+ 1 - 6
application/entity/K_Unit_Transformation.php

@@ -103,12 +103,7 @@
          * @return string Image URL, or a fixed unknown image.
          */
         public function get_image(){
-            if (file_exists(PATH::BASE . "img/unit/" . str_pad($this->id, 8, '0', STR_PAD_LEFT) . ".png")){
-                return URL::IMG["UNIT"] . str_pad($this->id, 8, '0', STR_PAD_LEFT) . ".png";
-            }
-            else{
-                return URL::IMG["UNKNOWN"];
-            }
+            return APPLICATION::img("UNIT", $this->id);
         }
 
     }

+ 3 - 3
application/entity/Rune.php

@@ -324,8 +324,8 @@
             $this->substat_2_name = $this->stat_name($this->substat_2);
             $this->substat_3_name = $this->stat_name($this->substat_3);
             $this->substat_4_name = $this->stat_name($this->substat_4);
-            $this->quality_name = $this->quality_name($this->quality);
-            $this->original_quality_name = $this->quality_name($this->original_quality);
+            $this->quality_name = $this->get_quality_name($this->quality);
+            $this->original_quality_name = $this->get_quality_name($this->original_quality);
         }
 
         /**
@@ -369,7 +369,7 @@
          * @param int $q Quality id.
          * @return string Quality (Uppercase)
          */
-        private function quality_name($q){
+        private function get_quality_name($q){
             switch ($q){
                 case QUALITY_ID::NORMAL:
                     return "NORMAL";

+ 28 - 0
application/helper/APPLICATION_Helper.php

@@ -45,5 +45,33 @@
                 return false;
             }
         }
+
+        /**
+         * Forms an image URL.
+         *
+         * It will intentionally fail when used for a non constant class.
+         *
+         * @param string $type Image type. valid values are:
+         *   ICON,    LOGO,         CURRENCY,    UNIT,
+         *   AREA,    SKILL,        ESSENCE,     RUNE,
+         *   GRIND,   ELEMENT,      SKILL_GUILD, DECORATION,
+         *   SOURCE,  SKILL_LEADER, INVENTORY,   EFFECT,
+         *   BUILDING
+         * @param string|int $name Filename, with no path or extension. It can also
+         * skip the padding. An id can be used.
+         * @return Image URL if found. If not, the URL to an 'unknown' icon.
+         */
+        public static function img($type, $name){
+            $pad = 1;
+            $url = URL::IMG["UNKNOWN"];
+            while ($pad < 10){
+                if (isset(PATH::IMG[$type]) && file_exists(PATH::IMG[$type] . str_pad($name, $pad, '0', STR_PAD_LEFT) . ".png")){
+                    $url = URL::IMG[$type] . str_pad($name, $pad, '0', STR_PAD_LEFT) . ".png";
+                    break;
+                }
+                $pad ++;
+            }
+            return $url;
+        }
     }
 ?>

+ 1 - 1
application/helper/HTML_Helper.php

@@ -195,7 +195,7 @@
                 return "";
             }
             $html = "";
-            $html .= "<table class='rune'>\n";
+            $html .= "<table class='rune' id='rune-" . $rune->id . "'>\n";
             $html .= "<tr>\n";
             $html .= "<td class='icon'>\n";
             $html .= HTML::rune_panel($rune, $unit) . "\n";

+ 7 - 7
application/page/Monster_Page.php

@@ -83,25 +83,25 @@
                 k_decoration.id = decoration.decoration AND
                 decoration.decoration = k_decoration_level.decoration AND
                 decoration.level = k_decoration_level.level AND
-                area = " . EFFECT_AREA::GENERAL . " AND
-                affected_stat IN (" . STAT::ATK . ", " . STAT::DEF . ", " . STAT::HP . ", " . STAT::SPD . ", " . STAT::CRIT_DMG . ");
+                area = " . EFFECT_AREA_ID::GENERAL . " AND
+                affected_stat IN (" . STAT_ID::ATK . ", " . STAT_ID::DEF . ", " . STAT_ID::HP . ", " . STAT_ID::SPD . ", " . STAT_ID::CRIT_DMG . ");
             ";
             $q = $this->db->query($s);
             while ($r = $q->fetchArray(SQLITE3_ASSOC)){
                 switch($r["affected_stat"]){
-                    case STAT::DEF:
+                    case STAT_ID::DEF:
                         $this->building_stats["def"] += $r["bonus"];
                         break;
-                    case STAT::HP:
+                    case STAT_ID::HP:
                         $this->building_stats["hp"] += $r["bonus"];
                         break;
-                    case STAT::SPD:
+                    case STAT_ID::SPD:
                         $this->building_stats["spd"] += $r["bonus"];
                         break;
-                    case STAT::CRIT_DMG:
+                    case STAT_ID::CRIT_DMG:
                         $this->building_stats["crd"] += $r["bonus"];
                         break;
-                    case STAT::ATK:
+                    case STAT_ID::ATK:
                         if(strlen($r["element"]) > 0){
                             $this->building_stats["elm"][$r["element"]] += $r["bonus"];
                         }

+ 2 - 1
application/page/Runes_Page.php

@@ -56,6 +56,7 @@
             else{
                 $s = $this->build_custom_query($_GET["custom_filter"]);
             }
+            error_log($s);
             $q = $this->db->query($s);
             while ($r = $q->fetchArray(SQLITE3_ASSOC)){
                 $rune = new Rune($db, $r["id"]);
@@ -183,7 +184,7 @@
               WHERE uid = '$UID' AND (
                 $cond
               )
-              ORDER BY  slot, type, stars DESC, original_quality DESC, quality DESC, level;
+              ORDER BY slot, type, stars DESC, original_quality DESC, quality DESC, level;
             ";
             return $s;
         }

BIN
application/sw.sqlite


+ 0 - 1
application/view/catalog.php

@@ -69,7 +69,6 @@
             <article id='filters_content'>
 <?php
                 $filters = $page->filters;
-                $custom_filters = $page->custom_filters;
                 include __DIR__ . "/inc/filter_catalog.php";
 ?>
             </article>

+ 3 - 3
application/view/fusion.php

@@ -194,7 +194,7 @@
                                             foreach ($sub_fusion->product->essences as $essence){
 ?>
                                                 <div class='essence border_<?=$essence["element"]?>'>
-                                                    <img alt='<?=$essence["grade"]?> <?=$essence["element"]?> essence' title='<?=$essence["amount"]?>x <?=$essence["grade"]?> <?=$essence["element"]?> essence' class='essence' src='<?=URL::IMG["ESSENCE"]?><?=$essence["element"]?>_<?=$essence["grade"]?>.png'/>
+                                                    <img alt='<?=$essence["item"]->name?>' title='<?=$essence["amount"]?>x <?=$essence["item"]->name?>' class='essence' src='<?=$essence["item"]->get_image()?>'/>
                                                     <span>
                                                         <?=$essence["amount"]?>
                                                     </span>
@@ -280,7 +280,7 @@
                                                         foreach ($sub_fusion->ingredient_unawaken[$num]->essences as $essence){
 ?>
                                                             <div class='essence border_<?=$essence["element"]?>'>
-                                                                <img alt='<?=$essence["grade"]?> <?=$essence["element"]?> essence' title='<?=$essence["amount"]?>x <?=$essence["grade"]?> <?=$essence["element"]?> essence' class='essence' src='<?=URL::IMG["ESSENCE"]?><?=$essence["element"]?>_<?=$essence["grade"]?>.png'/>
+                                                                <img alt='<?=$essence["item"]->name?>' title='<?=$essence["amount"]?>x <?=$essence["item"]->name?>' class='essence' src='<?=$essence["item"]->get_image()?>'/>
                                                                 <span>
                                                                     <?=$essence["amount"]?>
                                                                 </span>
@@ -391,7 +391,7 @@
                                         foreach ($fusion->ingredient_unawaken[0]->essences as $essence){
 ?>
                                             <div class='essence border_<?=$essence["element"]?>'>
-                                                <img alt='<?=$essence["grade"]?> <?=$essence["element"]?> essence' title='<?=$essence["amount"]?>x <?=$essence["grade"]?> <?=$essence["element"]?> essence' class='essence' src='<?=URL::IMG["ESSENCE"]?><?=$essence["element"]?>_<?=$essence["grade"]?>.png'/>
+                                                <img alt='<?=$essence["item"]->name?>' title='<?=$essence["amount"]?>x <?=$essence["item"]->name?>' class='essence' src='<?=$essence["item"]->get_image()?>'/>
                                                 <span>
                                                     <?=$essence["amount"]?>
                                                 </span>

+ 16 - 12
application/view/inc/filter_runes.php

@@ -67,14 +67,16 @@
                 <span>Type:</span>
                 <select multiple name='type[]' id='filter_type'>
 <?php
-                    foreach(RUNE_SET_ID as $k=>$n){
+
+                    $reflect = new ReflectionClass(RUNE_SET_ID);
+                    foreach($reflect->getConstants() as $name => $id){
                         $selected = "";
-                        if (in_array($n, $filters["TYPE"])){
+                        if (in_array($id, $filters["TYPE"])){
                             $selected = "selected='selected'";
                         }
-                        $name = ucwords(strtolower($k));
+                        $name_format = ucwords(strtolower($name));
 ?>
-                        <option value='<?=$n?>' <?=$selected?>><?=$name?></option>
+                        <option value='<?=$id?>' <?=$selected?>><?=$name_format?></option>
 <?php
                     }
 ?>
@@ -118,14 +120,15 @@
                 <span>Main stat:</span>
                 <select multiple name='main_stat[]' id='filter_main_stat'>
 <?php
-                    foreach(RUNE_STAT_ID as $k=>$n){
+                    $reflect = new ReflectionClass(RUNE_STAT_ID);
+                    foreach($reflect->getConstants() as $name => $id){
                         $selected = "";
-                        if (in_array($n, $filters["MAIN"])){
+                        if (in_array($id, $filters["MAIN"])){
                             $selected = "selected='selected'";
                         }
-                        $name = ucwords($k);
+                        $name_format = ucwords(str_replace("_P", "%", $name));
 ?>
-                        <option value='<?=$n?>' <?=$selected?>><?=$name?></option>
+                        <option value='<?=$n?>' <?=$selected?>><?=$name_format?></option>
 <?php
                     }
 ?>
@@ -135,14 +138,15 @@
                 <span>Has sub stat:</span>
                 <select multiple name='sub_stat[]' id='filter_sub_stat'>
 <?php
-                    foreach(RUNE_STAT_ID as $k=>$n){
+                    $reflect = new ReflectionClass(RUNE_STAT_ID);
+                    foreach($reflect->getConstants() as $name => $id){
                         $selected = "";
-                        if (in_array($n, $filters["SUB"])){
+                        if (in_array($id, $filters["SUB"])){
                             $selected = "selected='selected'";
                         }
-                        $name = ucwords($k);
+                        $name_format = ucwords(str_replace("_P", "%", $name));
 ?>
-                        <option value='<?=$n?>' <?=$selected?>><?=$name?></option>
+                        <option value='<?=$n?>' <?=$selected?>><?=$name_format?></option>
 <?php
                     }
 ?>

+ 1 - 1
application/view/monster_info.php

@@ -156,7 +156,7 @@
                                     foreach ($page->monster[$i]->essences as $essence){
 ?>
                                        <div class='essence border_<?=$essence["element"]?>'>
-                                            <img alt='<?=$essence["grade"]?> <?=$essence["element"]?> essence' title='<?=$essence["amount"]?>x <?=$essence["grade"]?> <?=$essence["element"]?> essence' class='essence' src='<?=URL::IMG["ESSENCE"]?><?=$essence["element"]?>_<?=$essence["grade"]?>.png'/>
+                                            <img alt='<?=$essence["item"]->name?>' title='<?=$essence["amount"]?>x <?=$essence["item"]->name?>' class='essence' src='<?=$essence["item"]->get_image()?>'/>
                                             <span>
                                                 <?=$essence["amount"]?>
                                             </span>

+ 2 - 2
application/view/report_runeupgrade.php

@@ -45,8 +45,8 @@
             function toggleFilters(){
                 var content = document.getElementById('filters_content');
                 var slid = document.getElementById('filters_slid');
-                if (content.style.maxHeight != '40em'){
-                    content.style.maxHeight = '40em';
+                if (content.style.maxHeight != '50em'){
+                    content.style.maxHeight = '50em';
                     slid.style.transform = 'rotate(90deg)';
                 }
                 else{

+ 3 - 3
application/view/runes.php

@@ -45,8 +45,8 @@
             function toggleFilters(){
                 var content = document.getElementById('filters_content');
                 var slid = document.getElementById('filters_slid');
-                if (content.style.maxHeight != '30em'){
-                    content.style.maxHeight = '30em';
+                if (content.style.maxHeight != '55em'){
+                    content.style.maxHeight = '55em';
                     slid.style.transform = 'rotate(90deg)';
                 }
                 else{
@@ -80,7 +80,7 @@
             $group_title = "";
             $group_image = "";
             foreach ($page->runes as $rune){
-                switch ($page->filters["group"]){
+                switch ($page->filters["GROUP"]){
                     case 1: // "TYPE":
                         $group = $rune->type->name;
                         $group_title = $rune->type->name;

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/APP.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/APPLICATION.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/ARCHETYPE_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/AREA_TYPE_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/ARENA_RANKING_POINTS.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/ARENA_RANKING_RANK.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/BUILDING_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Building.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/CRAFT_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Catalog_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Controller.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Custom_Filter.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/DB.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/DECORATION_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/DIFFICULTY_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/DUNGEON_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Decoration.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/EFFECT_AREA_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/ELEMENTAL_RIFT_DUNGEON_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/ELEMENT_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/ENHANCE_MONSTER_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Entity.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/FILTER.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Fusion.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Fusion_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/GUILD_MEMBER_GRADE_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Guild.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Guild_Member.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Guild_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/HTML.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Helper.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Home_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/INVENTORY_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/INVENTORY_TYPE_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Inventory.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/K_Area.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/K_Building.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/K_Decoration.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/K_Effect.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/K_Guild_Skill.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/K_Guild_Skill_Group.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/K_Leader_Skill.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/K_Rune_Set.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/K_Skill.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/K_Skill_Level.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/K_Source.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/K_Unit.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/K_Unit_Transformation.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/LABYRINTH_STAGES_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Landing_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Monster_Fusion.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Monster_Info_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Monster_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Monsters_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/NET.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/PATH.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Profile_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/QUALITY_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/RAID_RIFT_DUNGEON_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/RUNE_SET_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/RUNE_STAT_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Report_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Report_Runecraft_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Report_Runeupgrade_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Report_Skillup_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Run.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Rune.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Rune_Craft.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Runes_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/Runs_Page.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/SCENARIO_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/SOURCE_ID.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 108
doc/classes/STAT_ID.html


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor