Jump to content
  • 0

Question

Posted

If I do not mind, I'd like to ask if you can help me with anything. It's about Encahnt Items in Gm shop. How i can edit Multisell to make that?

i appreciate any help...thanks. And please...do explained. Thanks again

1 answer to this question

Recommended Posts

  • 0
Posted (edited)

ti ennoeis?prepei na perasis code sto server sou

 

 

 

1.Index: /trunk/Gameserver/java/com/l2jserver/gameserver/network/serverpackets/MultiSellList.java
2.===================================================================
3.--- /trunk/Gameserver/java/com/l2jserver/gameserver/network/serverpackets/MultiSellList.java (revision 24)
4.+++ /trunk/Gameserver/java/com/l2jserver/gameserver/network/serverpackets/MultiSellList.java (revision 71)
5.@@ -119,5 +119,5 @@
6.                else
7.                {
8.-                   writeH(0x00); // enchant level
9.+                   writeH(ing.getEnchantLevel()); // enchant level
10.                    writeD(0x00); // augment id
11.                    writeD(0x00); // mana
12.@@ -154,5 +154,5 @@
13.                else
14.                {
15.-                   writeH(0x00); // enchant level
16.+                   writeH(ing.getEnchantLevel()); // enchant level
17.                    writeD(0x00); // augment id
18.                    writeD(0x00); // mana
19.Index: /trunk/Gameserver/java/com/l2jserver/gameserver/model/multisell/PreparedEntry.java
20.===================================================================
21.--- /trunk/Gameserver/java/com/l2jserver/gameserver/model/multisell/PreparedEntry.java (revision 24)
22.+++ /trunk/Gameserver/java/com/l2jserver/gameserver/model/multisell/PreparedEntry.java (revision 71)
23.@@ -72,5 +72,5 @@
24.        adenaAmount += _taxAmount; // do not forget tax
25.        if (adenaAmount > 0)
26.-           _ingredients.add(new Ingredient(ADENA_ID, adenaAmount, false, false));
27.+           _ingredients.add(new Ingredient(ADENA_ID, adenaAmount,0, false, false));
28.        
29.        // now copy products
30.Index: /trunk/Gameserver/java/com/l2jserver/gameserver/model/multisell/Ingredient.java
31.===================================================================
32.--- /trunk/Gameserver/java/com/l2jserver/gameserver/model/multisell/Ingredient.java (revision 24)
33.+++ /trunk/Gameserver/java/com/l2jserver/gameserver/model/multisell/Ingredient.java (revision 71)
34.@@ -30,4 +30,5 @@
35.    private int _itemId;
36.    private long _itemCount;
37.+    private int _EnchantmentLevel;
38.    private boolean _isTaxIngredient, _maintainIngredient;
39.    
40.@@ -35,8 +36,9 @@
41.    private ItemInfo _itemInfo = null;
42.    
43.-   public Ingredient(int itemId, long itemCount, boolean isTaxIngredient, boolean maintainIngredient)
44.+   public Ingredient(int itemId, long itemCount,int EnchantmentLevel, boolean isTaxIngredient, boolean maintainIngredient)
45.    {
46.        _itemId = itemId;
47.        _itemCount = itemCount;
48.+       _EnchantmentLevel = EnchantmentLevel;
49.        _isTaxIngredient = isTaxIngredient;
50.        _maintainIngredient = maintainIngredient;
51.@@ -80,5 +82,5 @@
52.    public final int getEnchantLevel()
53.    {
54.-       return _itemInfo != null ? _itemInfo.getEnchantLevel() : 0;
55.+            return _itemInfo == null?_EnchantmentLevel:_itemInfo.getEnchantLevel();
56.    }
57.    
58.Index: /trunk/Gameserver/java/com/l2jserver/gameserver/datatables/MultiSell.java
59.===================================================================
60.--- /trunk/Gameserver/java/com/l2jserver/gameserver/datatables/MultiSell.java (revision 52)
61.+++ /trunk/Gameserver/java/com/l2jserver/gameserver/datatables/MultiSell.java (revision 71)
62.@@ -270,4 +270,8 @@
63.            if ("ingredient".equalsIgnoreCase(n.getNodeName()))
64.            {
65.+               int enchantmentLevel = 0;
66.+               if (n.getAttributes().getNamedItem("enchantmentLevel") != null)
67.+               enchantmentLevel = Integer.parseInt(n.getAttributes().getNamedItem("enchantmentLevel").getNodeValue());
68.+               
69.                int id = Integer.parseInt(n.getAttributes().getNamedItem("id").getNodeValue());
70.                long count = Long.parseLong(n.getAttributes().getNamedItem("count").getNodeValue());
71.@@ -286,12 +290,16 @@
72.                    mantainIngredient = false;
73.                
74.-               entry.addIngredient(new Ingredient(id, count, isTaxIngredient, mantainIngredient));
75.+               entry.addIngredient(new Ingredient(id, count, enchantmentLevel, isTaxIngredient, mantainIngredient));
76.            }
77.            else if ("production".equalsIgnoreCase(n.getNodeName()))
78.            {
79.+               int enchantmentLevel = 0;
80.+               if (n.getAttributes().getNamedItem("enchantmentLevel") != null)
81.+               enchantmentLevel = Integer.parseInt(n.getAttributes().getNamedItem("enchantmentLevel").getNodeValue());
82.+               
83.                int id = Integer.parseInt(n.getAttributes().getNamedItem("id").getNodeValue());
84.                long count = Long.parseLong(n.getAttributes().getNamedItem("count").getNodeValue());
85.                
86.-               entry.addProduct(new Ingredient(id, count, false, false));
87.+               entry.addProduct(new Ingredient(id, count, enchantmentLevel, false, false));
88.            }
89.        }
90.

 

 

1.<?xml version='1.0' encoding='utf-8'?>
2.
3.
4.<list maintainEnchantment="true">
5.
6.  
7.  <item id="1">
8.  <ingredient id="57" count="10"/>
9.  <production id="7874" count="1" enchantmentLevel="16"/>
10.  </item>
11.
12.</list>

Edited by AlexHack

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...