Jump to content
  • 0

[HELP]Java erotiseis


Pony™❼

Question

1 answer to this question

Recommended Posts

  • 0

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

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