Jump to content
  • 0

[HELP]Java erotiseis


Question

1 answer to this question

Recommended Posts

  • 0
Posted

oi sinartiseis oi opoies einai boolean epistrefoun times false i true

 

paradigma edw...

 

 

if (!activeChar.isCastleLord(castleId))  kalite i sinartisi me onoma iscastlelord, to opotelesma 8a einai true i false afou i sinartisi einai tipou boolean(an i timi pou 8a epistrafei einai true tote den 8a mpei mesa sto IF)

{

activeChar.sendPacket(new SystemMessage(SystemMessageId.YOU_DO_NOT_HAVE_AUTHORITY_TO_POSITION_MERCENARIES));

return;

}

 

 

 

i sinartisi auti edw epistefei tin timi true an exoun clan kai i clan exei to sigekrimeno castle kai einai lord apo to caste i false an den isxioun ta proigoumena...

 

public boolean isCastleLord(int castleId)

{

L2Clan clan = getClan();

 

// player has clan and is the clan leader, check the castle info

if ((clan != null) && (clan.getLeader().getPlayerInstance() == this))

{

// if the clan has a castle and it is actually the queried castle, return true

Castle castle = CastleManager.getInstance().getCastleByOwner(clan);

if ((castle != null) && (castle == CastleManager.getInstance().getCastleById(castleId)))

return true;

}

 

return false;

}

 

 

elpizw na voithisa ...

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