Jump to content
  • 0

[REQUEST]JAVA CODE


~Ge0rge~

Question

Recommended Posts

  • 0

error on return false;

damn i am not concetrated.. Bahh i go to study for my test when i will finish i will give you the right code except if someone give it earlier :D brb in 1-1:30 hours gz :D

Link to comment
Share on other sites

  • 0
Index: /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 345)
+++ /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 346)
@@ -8425,4 +8425,6 @@
     public boolean addSubClass(int classId, int classIndex)
     {
     	if (getTotalSubClasses() == 3 || classIndex == 0)
     		return false;
@@ -8430,4 +8432,8 @@
     	if (getSubClasses().containsKey(classIndex))
     		return false;
+        if(isInCombat())
+           return false;             	
+        if(isInParty())
+           return false;
[\code]

Link to comment
Share on other sites

  • 0

Index: /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 345)
+++ /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 346)
@@ -8425,4 +8425,6 @@
     public boolean addSubClass(int classId, int classIndex)
     {
     	if (getTotalSubClasses() == 3 || classIndex == 0)
     		return false;
@@ -8430,4 +8432,8 @@
     	if (getSubClasses().containsKey(classIndex))
     		return false;
+        if(isInCombat())
+           return false;             	
+        if(isInParty())
+           return false;
[\code]

it is only to add subclass
Link to comment
Share on other sites

  • 0

Index: /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 345)
+++ /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 346)
@@ -8425,4 +8425,6 @@
     public boolean addSubClass(int classId, int classIndex)
     {
     	if (getTotalSubClasses() == 3 || classIndex == 0)
     		return false;
@@ -8430,4 +8432,8 @@
     	if (getSubClasses().containsKey(classIndex))
     		return false;
+        if(isInCombat())
+           return false;             	
+        if(isInParty())
+           return false;
[\code]

same code is given by me :D

Link to comment
Share on other sites

  • 0

For the love of God! Akken please delete your last post, totally dysfunctional.

 

Index: D:/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2VillageMasterInstance.java
===================================================================
--- D:/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2VillageMasterInstance.java	(revision 4425)
+++ D:/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2VillageMasterInstance.java	(working copy)
@@ -417,6 +417,12 @@
						return;
					}

+					if (player.isInCombat() || player.isInParty())
+					{
+						player.sendMessage("Your status don't allow a subclass change.");
+						return;
+					}
+					
					if (player.getClassIndex() == paramOne)
					{
						html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_Current.htm");

Link to comment
Share on other sites

  • 0

For the love of God! Akken please delete your last post, totally dysfunctional.

 

Index: D:/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2VillageMasterInstance.java
===================================================================
--- D:/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2VillageMasterInstance.java	(revision 4425)
+++ D:/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2VillageMasterInstance.java	(working copy)
@@ -417,6 +417,12 @@
						return;
					}

+					if (player.isInCombat() || player.isInParty())
+					{
+						player.sendMessage("Your status don't allow a subclass change.");
+						return;
+					}
+					
					if (player.getClassIndex() == paramOne)
					{
						html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_Current.htm");

soor is for c6? i search for if (player.getClassIndex() == paramOne) and nothing.the same for html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_Current.htm");. so in which line i add the code?
Link to comment
Share on other sites

  • 0

as i see versus you got com.l2jserver.. but anyway

 

if (Olympiad.getInstance().isRegisteredInComp(player)
                       || player.getOlympiadGameId() > 0)
                   {
                       player.sendPacket(new SystemMessage(
                                                           SystemMessageId.YOU_HAVE_ALREADY_BEEN_REGISTERED_IN_A_WAITING_LIST_OF_AN_EVENT));
                       return;
                   }
                   
+                    					if (player.isInCombat() || player.isInParty())
+                    						{
+                   							player.sendMessage("Your status don't allow a subclass change.");
+                    							return;
+                    						}
                   						
                   player.setActiveClass(paramOne);

                   content.append("Change Subclass:<br>Your active sub class is now a <font color=\"LEVEL\">"
                       + CharTemplateTable.getClassNameById(player.getActiveClass()) + "</font>.");

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...