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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..