Advertisement
Guest User

L2Icons for L2JFrozen by Tessa ^^

a guest
Dec 13th, 2014
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5.75 KB | None | 0 0
  1. Index: head-src/com/l2jfrozen/gameserver/datatables/sql/ItemTable.java
  2. ===================================================================
  3. --- head-src/com/l2jfrozen/gameserver/datatables/sql/ItemTable.java (revision 1113)
  4. +++ head-src/com/l2jfrozen/gameserver/datatables/sql/ItemTable.java (working copy)
  5. @@ -133,11 +133,11 @@
  6.     /** Table of SQL request in order to obtain items from tables [etcitem], [armor], [weapon] */
  7.     private static final String[] SQL_ITEM_SELECTS =
  8.     {
  9. -       "SELECT item_id, name, crystallizable, item_type, weight, consume_type, crystal_type, duration, price, crystal_count, sellable, dropable, destroyable, tradeable FROM etcitem",
  10. +       "SELECT item_id, name, crystallizable, item_type, weight, consume_type, crystal_type, duration, price, crystal_count, sellable, dropable, destroyable, tradeable, icon FROM etcitem",
  11.        
  12. -       "SELECT item_id, name, bodypart, crystallizable, armor_type, weight," + " crystal_type, avoid_modify, duration, p_def, m_def, mp_bonus," + " price, crystal_count, sellable, dropable, destroyable, tradeable, item_skill_id, item_skill_lvl FROM armor",
  13. +       "SELECT item_id, name, bodypart, crystallizable, armor_type, weight," + " crystal_type, avoid_modify, duration, p_def, m_def, mp_bonus," + " price, crystal_count, sellable, dropable, destroyable, tradeable, item_skill_id, item_skill_lvl, icon FROM armor",
  14.        
  15. -       "SELECT item_id, name, bodypart, crystallizable, weight, soulshots, spiritshots," + " crystal_type, p_dam, rnd_dam, weaponType, critical, hit_modify, avoid_modify," + " shield_def, shield_def_rate, atk_speed, mp_consume, m_dam, duration, price, crystal_count," + " sellable, dropable, destroyable, tradeable, item_skill_id, item_skill_lvl,enchant4_skill_id,enchant4_skill_lvl, onCast_skill_id, onCast_skill_lvl," + " onCast_skill_chance, onCrit_skill_id, onCrit_skill_lvl, onCrit_skill_chance FROM weapon"
  16. +       "SELECT item_id, name, bodypart, crystallizable, weight, soulshots, spiritshots," + " crystal_type, p_dam, rnd_dam, weaponType, critical, hit_modify, avoid_modify," + " shield_def, shield_def_rate, atk_speed, mp_consume, m_dam, duration, price, crystal_count," + " sellable, dropable, destroyable, tradeable, item_skill_id, item_skill_lvl,enchant4_skill_id,enchant4_skill_lvl, onCast_skill_id, onCast_skill_lvl," + " onCast_skill_chance, onCrit_skill_id, onCrit_skill_lvl, onCrit_skill_chance, icon FROM weapon"
  17.     };
  18.    
  19.     private static final String[] SQL_CUSTOM_ITEM_SELECTS =
  20. @@ -331,6 +331,7 @@
  21.        
  22.         item.set.set("item_id", item.id);
  23.         item.set.set("name", item.name);
  24. +       item.set.set("icon", rset.getString("icon"));
  25.        
  26.         // lets see if this is a shield
  27.         if (item.type == L2WeaponType.NONE)
  28. @@ -425,6 +426,7 @@
  29.        
  30.         item.set.set("item_id", item.id);
  31.         item.set.set("name", item.name);
  32. +       item.set.set("icon", rset.getString("icon"));
  33.         final int bodypart = _slots.get(rset.getString("bodypart"));
  34.         item.set.set("bodypart", bodypart);
  35.         item.set.set("crystallizable", Boolean.valueOf(rset.getString("crystallizable")));
  36. @@ -585,6 +587,7 @@
  37.         item.set.set("weight", weight);
  38.         item.name = rset.getString("name");
  39.         item.set.set("name", item.name);
  40. +       item.set.set("icon", rset.getString("icon"));
  41.        
  42.         item.set.set("duration", rset.getInt("duration"));
  43.         item.set.set("price", rset.getInt("price"));
  44. Index: head-src/com/l2jfrozen/gameserver/templates/L2Item.java
  45. ===================================================================
  46. --- head-src/com/l2jfrozen/gameserver/templates/L2Item.java (revision 1113)
  47. +++ head-src/com/l2jfrozen/gameserver/templates/L2Item.java (working copy)
  48. @@ -130,6 +130,7 @@
  49.     private final boolean _dropable;
  50.     private final boolean _destroyable;
  51.     private final boolean _tradeable;
  52. +   private final String _icon;
  53.    
  54.     protected final Enum<?> _type;
  55.    
  56. @@ -167,6 +168,7 @@
  57.         _dropable = set.getBool("dropable", true);
  58.         _destroyable = set.getBool("destroyable", true);
  59.         _tradeable = set.getBool("tradeable", true);
  60. +       _icon = set.getString("icon");
  61.     }
  62.    
  63.     /**
  64. @@ -311,6 +313,15 @@
  65.     }
  66.    
  67.     /**
  68. +    * Returns the icon of the item
  69. +    * @return String
  70. +    */
  71. +   public final String getIcon()
  72. +   {
  73. +       return _icon;
  74. +   }
  75. +  
  76. +   /**
  77.      * Return the part of the body used with the item.
  78.      * @return int
  79.      */
  80. Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java
  81. ===================================================================
  82. --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java   (revision 1113)
  83. +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java   (working copy)
  84. @@ -1060,18 +1060,19 @@
  85.                         }
  86.                        
  87.                         final String name = ItemTable.getInstance().getTemplate(drop.getItemId()).getName();
  88. +                       final String icon = ItemTable.getInstance().getTemplate(drop.getItemId()).getIcon();
  89.                        
  90. -                       if (drop.getChance() >= 600000)
  91. -                       {
  92. -                           html1.append("<tr><td><font color=\"ff0000\">" + name + "</font></td><td>" + (drop.isQuestDrop() ? "Quest" : cat.isSweep() ? "Sweep" : "Drop") + "</td></tr>");
  93. -                       }
  94. -                       else if (drop.getChance() >= 300000)
  95. -                       {
  96. -                           html1.append("<tr><td><font color=\"00ff00\">" + name + "</font></td><td>" + (drop.isQuestDrop() ? "Quest" : cat.isSweep() ? "Sweep" : "Drop") + "</td></tr>");
  97. -                       }
  98. -                       else
  99. -                       {
  100. -                           html1.append("<tr><td><font color=\"0000ff\">" + name + "</font></td><td>" + (drop.isQuestDrop() ? "Quest" : cat.isSweep() ? "Sweep" : "Drop") + "</td></tr>");
  101. -                       }
  102. +                       html1.append("<tr><td><img src=\"" + icon + "\" width=32 height=32></td><td><table><tr><td><font color=\"LEVEL\">" + name + "</font></td></tr><tr><td>Drop Rate: " + (double)drop.getChance() / 10000 + "% | [" + (drop.isQuestDrop() ? "Quest" : (cat.isSweep() ? "Sweep" : "Drop")) + "]</td></tr></table></td></tr>");
  103.                     }
  104.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement