Advertisement
Guest User

IconParser v1.2

a guest
Jan 2nd, 2023
647
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.18 KB | None | 0 0
  1. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/item/kind/Item.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/item/kind/Item.java
  2. index ca4ba59..6bac84e 100644
  3. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/item/kind/Item.java
  4. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/item/kind/Item.java
  5. @@ -105,6 +105,7 @@
  6.    
  7.     private final int _itemId;
  8.     private final String _name;
  9. +   private final String _icon;
  10.     protected int _type1; // needed for item list (inventory)
  11.     protected int _type2; // different lists for armor, weapon, etc
  12.     private final int _weight;
  13. @@ -138,6 +139,7 @@
  14.     {
  15.         _itemId = set.getInteger("item_id");
  16.         _name = set.getString("name");
  17. +       _icon = set.getString("icon", "icon.noimage");
  18.         _weight = set.getInteger("weight", 0);
  19.         _materialType = set.getEnum("material", MaterialType.class, MaterialType.STEEL);
  20.         _duration = set.getInteger("duration", -1);
  21. @@ -288,6 +290,14 @@
  22.     }
  23.    
  24.     /**
  25. +    * @return String the icon of the item
  26. +    */
  27. +   public final String getIcon()
  28. +   {
  29. +       return _icon;
  30. +   }
  31. +  
  32. +   /**
  33.      * @return int the part of the body used with the item.
  34.      */
  35.     public final int getBodyPart()
  36. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/skills/L2Skill.java b/aCis_gameserver/java/net/sf/l2j/gameserver/skills/L2Skill.java
  37. index e9df87c..d993775 100644
  38. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/skills/L2Skill.java
  39. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/skills/L2Skill.java
  40. @@ -59,6 +59,7 @@
  41.     private final int _level;
  42.    
  43.     private final String _name;
  44. +   private final String _icon;
  45.     private final SkillOpType _operateType;
  46.    
  47.     private final boolean _isMagic;
  48. @@ -187,6 +188,7 @@
  49.         _level = set.getInteger("level", 1);
  50.        
  51.         _name = set.getString("name");
  52. +       _icon = set.getString("icon", String.format("icon.skill%04d", _id));
  53.         _operateType = set.getEnum("operateType", SkillOpType.class);
  54.        
  55.         _isMagic = set.getBool("isMagic", false);
  56. @@ -770,6 +772,14 @@
  57.     }
  58.    
  59.     /**
  60. +    * @return Returns the icon.
  61. +    */
  62. +   public final String getIcon()
  63. +   {
  64. +       return _icon;
  65. +   }
  66. +  
  67. +   /**
  68.      * @return Returns the reuseDelay.
  69.      */
  70.     public final int getReuseDelay()
  71.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement