Jump to content
  • 0

[Help me] Conquerable locations problem on compilation on L2j Freya


Question

Posted

[javac] D:\SOURCE\trunk\Core\java\com\l2jserver\gameserver\model\actor\instance\L2CrystalInstance.java:695: error: setReputationScore(int,boolean) has private access in L2Clan
    [javac] 				player.getClan().setReputationScore(player.getClan().getReputationScore() - price, true);   
    [javac] 				                ^
    [javac] D:\SOURCE\trunk\Core\java\com\l2jserver\gameserver\model\actor\instance\L2CrystalInstance.java:702: error: setReputationScore(int,boolean) has private access in L2Clan
    [javac] 				player.getClan().setReputationScore(player.getClan().getReputationScore() - price, true);   
    [javac] 				                ^
    [javac] 2 errors

 

int current = _warningCount;
			_warningCount = current + count;
			player.getClan().setReputationScore(player.getClan().getReputationScore() - price, true);   
			player.sendPacket(new CreatureSay(0, Say2.PARTY, "Crystal", "Successfully purchased " + count + " warnings!"));
		}
		else if (abilitiId == 2)
		{
			int current = _defenceSpawnCount;
			_defenceSpawnCount = current + count;
			player.getClan().setReputationScore(player.getClan().getReputationScore() - price, true);   
			player.sendPacket(new CreatureSay(0, Say2.PARTY, "Crystal", "Successfully purchased " + count + " Defence Abilities!"));

7 answers to this question

Recommended Posts

  • 0
Posted

That's the reason to first, spam Matim's post and then, come here and post it?...

Maybe if you read the error that's shown on console....

error: setReputationScore(int,boolean) has private access in L2Clan

 

Index: java/com/l2jserver/gameserver/model/L2Clan.java
===================================================================
--- java/com/l2jserver/gameserver/model/L2Clan.java	(revision 5235)
+++ java/com/l2jserver/gameserver/model/L2Clan.java	(working copy)
@@ -1904,7 +1904,7 @@
		setReputationScore(getReputationScore() - value, save);
	}

-	private void setReputationScore(int value, boolean save)
+	public void setReputationScore(int value, boolean save)
	{
		if (_reputationScore >= 0 && value < 0)
		{

  • 0
Posted

Changing the type of the method isn't the good solution, if it's private it's for a good reason, for instance, that method got children, named takeReputation and addReputation, use those methods.

  • 0
Posted

Changing the type of the method isn't the good solution, if it's private it's for a good reason, for instance, that method got children, named takeReputation and addReputation, use those methods.

 

Yep, right, just didn't have time to look it well.

 

@author

As Tryskell said you can use:

 

player.getClan().addReputationScore(1000, true);
player.getClan().takeReputationScore(1000, true);

  • 0
Posted

In that case, it's takeReputation (-).

 

8)

Yea... but as I see in the code, I think you can also use addReputationScore(-200, true) and will be the same effect xd

  • 0
Posted

Yea... but as I see in the code, I think you can also use addReputationScore(-200, true) and will be the same effect xd

Yup but gl to re-read your code once you forget you did shit previously, lol :).

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