Jump to content
  • 0

Code Number


SQL Developer

Question

Hey i am try to add a code on eclipse but i fail on it because i can find the correct line number,can someone help me to learn about line numbers?

for example the code who i want pass tells:

The line @@ -843,4 +844,57 @@ .. what means? which line is it? 

@@ -843,4 +844,57 @@
               
        }
       
+       public L2ItemInstance[] getWeaponsList()
+       {
+               FastList<L2ItemInstance> list = FastList.newInstance();
+               for (L2ItemInstance item : _items)
+               {
+                       if ((item != null) && (item.isEnchantable()) && item.isWeapon())
+                       {
+                               int enchantLevel = Config.weaponEnchantLevel;
+                               if (Config.modifyItemEnchant)
+                               {
+                                       if (Config.modifyItemEnchantList.containsKey(item.getItemId()))
+                                       {
+                                               enchantLevel = Config.modifyItemEnchantList.get(item.getItemId());
+                                       }
+                               }
+
+                               if(item.getEnchantLevel() < enchantLevel)
+                                       list.add(item);
+                       }
+               }
+              
+               L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
+               FastList.recycle(list);
+               return result;
+       }
+      
+       public L2ItemInstance[] getArmorsList()
+       {
+               FastList<L2ItemInstance> list = FastList.newInstance();
+               for (L2ItemInstance item : _items)
+               {
+                       if ((item != null) && (item.isEnchantable()) && item.isArmor())
+                       {
+                               int enchantLevel = Config.armorEnchantLevel;
+                               if (Config.modifyItemEnchant)
+                               {
+                                       if (Config.modifyItemEnchantList.containsKey(item.getItemId()))
+                                       {
+                                               enchantLevel = Config.modifyItemEnchantList.get(item.getItemId());
+                                       }
+                               }
+
+                               if(item.getEnchantLevel() < enchantLevel)
+                               {
+                                       list.add(item);
+                               }
+                       }
+               }
+              
+               L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
+               FastList.recycle(list);
+               return result;
+       }
 }
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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...