Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: head-src/com/l2jfrozen/gameserver/datatables/sql/ItemTable.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/datatables/sql/ItemTable.java (revision 1113)
- +++ head-src/com/l2jfrozen/gameserver/datatables/sql/ItemTable.java (working copy)
- @@ -133,11 +133,11 @@
- /** Table of SQL request in order to obtain items from tables [etcitem], [armor], [weapon] */
- private static final String[] SQL_ITEM_SELECTS =
- {
- - "SELECT item_id, name, crystallizable, item_type, weight, consume_type, crystal_type, duration, price, crystal_count, sellable, dropable, destroyable, tradeable FROM etcitem",
- + "SELECT item_id, name, crystallizable, item_type, weight, consume_type, crystal_type, duration, price, crystal_count, sellable, dropable, destroyable, tradeable, icon FROM etcitem",
- - "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",
- + "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",
- - "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"
- + "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"
- };
- private static final String[] SQL_CUSTOM_ITEM_SELECTS =
- @@ -331,6 +331,7 @@
- item.set.set("item_id", item.id);
- item.set.set("name", item.name);
- + item.set.set("icon", rset.getString("icon"));
- // lets see if this is a shield
- if (item.type == L2WeaponType.NONE)
- @@ -425,6 +426,7 @@
- item.set.set("item_id", item.id);
- item.set.set("name", item.name);
- + item.set.set("icon", rset.getString("icon"));
- final int bodypart = _slots.get(rset.getString("bodypart"));
- item.set.set("bodypart", bodypart);
- item.set.set("crystallizable", Boolean.valueOf(rset.getString("crystallizable")));
- @@ -585,6 +587,7 @@
- item.set.set("weight", weight);
- item.name = rset.getString("name");
- item.set.set("name", item.name);
- + item.set.set("icon", rset.getString("icon"));
- item.set.set("duration", rset.getInt("duration"));
- item.set.set("price", rset.getInt("price"));
- Index: head-src/com/l2jfrozen/gameserver/templates/L2Item.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/templates/L2Item.java (revision 1113)
- +++ head-src/com/l2jfrozen/gameserver/templates/L2Item.java (working copy)
- @@ -130,6 +130,7 @@
- private final boolean _dropable;
- private final boolean _destroyable;
- private final boolean _tradeable;
- + private final String _icon;
- protected final Enum<?> _type;
- @@ -167,6 +168,7 @@
- _dropable = set.getBool("dropable", true);
- _destroyable = set.getBool("destroyable", true);
- _tradeable = set.getBool("tradeable", true);
- + _icon = set.getString("icon");
- }
- /**
- @@ -311,6 +313,15 @@
- }
- /**
- + * Returns the icon of the item
- + * @return String
- + */
- + public final String getIcon()
- + {
- + return _icon;
- + }
- +
- + /**
- * Return the part of the body used with the item.
- * @return int
- */
- Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java (revision 1113)
- +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java (working copy)
- @@ -1060,18 +1060,19 @@
- }
- final String name = ItemTable.getInstance().getTemplate(drop.getItemId()).getName();
- + final String icon = ItemTable.getInstance().getTemplate(drop.getItemId()).getIcon();
- - if (drop.getChance() >= 600000)
- - {
- - html1.append("<tr><td><font color=\"ff0000\">" + name + "</font></td><td>" + (drop.isQuestDrop() ? "Quest" : cat.isSweep() ? "Sweep" : "Drop") + "</td></tr>");
- - }
- - else if (drop.getChance() >= 300000)
- - {
- - html1.append("<tr><td><font color=\"00ff00\">" + name + "</font></td><td>" + (drop.isQuestDrop() ? "Quest" : cat.isSweep() ? "Sweep" : "Drop") + "</td></tr>");
- - }
- - else
- - {
- - html1.append("<tr><td><font color=\"0000ff\">" + name + "</font></td><td>" + (drop.isQuestDrop() ? "Quest" : cat.isSweep() ? "Sweep" : "Drop") + "</td></tr>");
- - }
- + 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>");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement