Jump to content

[Guide]Πως να περάσεις το δεικό σου Java Code


Recommended Posts

Καλησπέρα σε όλους.Σε αυτό μου το guide, θα σας δείξω πως να περάσετε, το δείκο σας java code.

 

Λοιπόν ξεκινάμε.Για παράδειγμα θα χρησιμοποιήσω αυτό το Java Code

 

Πρώτα από όλα ανοίγουμε το Eclipse.exe.

 

Το Code λέει να πάμε L2PCInstance

Index: /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 1434)
+++ /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -9680,6 +9680,90 @@

public boolean setActiveClass(int classIndex)
   {
+	      L2ItemInstance rhand = getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
+	      if (rhand != null)
+	      {
+	         
+	            L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(rhand.getItem().getBodyPart());
+	            InventoryUpdate iu = new InventoryUpdate();
+	            for (L2ItemInstance element : unequipped)
+	               iu.addModifiedItem(element);
+	            sendPacket(iu);
+	         
+	      }
+	      
+	      L2ItemInstance lhand = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND);
+	      if (lhand != null)
+	      {
+	         
+	            L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(lhand.getItem().getBodyPart());
+	            InventoryUpdate iu = new InventoryUpdate();
+	            for (L2ItemInstance element : unequipped)
+	               iu.addModifiedItem(element);
+	            sendPacket(iu);
+	         
+	      }
       /*
        * 1. Call store() before modifying _classIndex to avoid skill effects rollover.
        * 2. Register the correct _classId against applied 'classIndex'.
        */
       store();

 

Πρέπει να βρούμε αυτό εδώ το αρχείο L2PcInstance.java

 

Μόλις ανοίξουμε το L2PCInstance Πατάμε Ctrl + F και γράφουμε αυτό που λέει εδώ

public boolean setActiveClass(int classIndex)

πατάμε ok

 

 

Μετά αυτά που έχουν "+" στο Code δηλαδή αυτά εδώ

 

+	      L2ItemInstance rhand = getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
+	      if (rhand != null)
+	      {
+	         
+	            L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(rhand.getItem().getBodyPart());
+	            InventoryUpdate iu = new InventoryUpdate();
+	            for (L2ItemInstance element : unequipped)
+	               iu.addModifiedItem(element);
+	            sendPacket(iu);
+	         
+	      }
+	      
+	      L2ItemInstance lhand = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND);
+	      if (lhand != null)
+	      {
+	         
+	            L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(lhand.getItem().getBodyPart());
+	            InventoryUpdate iu = new InventoryUpdate();
+	            for (L2ItemInstance element : unequipped)
+	               iu.addModifiedItem(element);
+	            sendPacket(iu);
+	         
+	      } 

 

Τα κάνουμε c/p κάτω από αυτό που έδειξα πριν

public boolean setActiveClass(int classIndex)

 

Credits: me

 

Ότι απορίες έχετε κάντε ένα Reply Cya..

Link to comment
Share on other sites

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
Reply to this topic...

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