Skip to content

Fastlist Inside Array (Suggestion - Help)

Featured Replies

  • Author

public static ArrayList<FastList> couplesList = new ArrayList<>();

public static final FastList<L2PcInstance> _players = new FastList<L2PcInstance>();final L2PcInstance partner = L2World.getInstance().getPlayer(player.getPartnerId());

 

 

 

 

 

 

 


else if (command.startsWith("remove"))

{

 

//=================================================================


if (couplesList.contains(_players))

{

couplesList.remove(_players);

 

player.sendMessage("You removed your participation from event");

partner.sendMessage("Your partner removed the participation from event");

 

setCouples(getCouples() -1);

}

 


 

else if (command.startsWith("join"))

{

 

//=================================================================

 

final L2PcInstance partner = L2World.getInstance().getPlayer(player.getPartnerId());

 

 

_players.add(player);

_players.add(partner);

 

couplesList.add(_players);

 

_players.clear();

 

player.sendMessage("You are registered in the event with your partner");

partner.sendMessage("You are registered in the event with your partner");

 

setCouples(getCouples() + 1);

 

Timer();

Ravie si ça aide :)

 

"Ravi" if you're a male, "ravie" if you're a female (which I seriously doubt, because frenchies are as rare in L2J world as female).

 

Regarding topic, and for the third time, Couple model already owns the couple, CoupleManager already owns such a List of Couple, so all you have to do is to take Couples which are in a specific gamemode. So you have to implement in Couple model an Enum, something like CoupleGameMode with possible states : NONE, REGISTERED, IN_EVENT.

 

When your event begins, you only for loop the couples with the good CoupleGameMode and you can store the result in your own event and refers to it to avoid to generate it each time.

Phone autocorrect, bloody gramar nazi :D

 

French is love, french is life.

 

maitre-capello.jpg

Edited by Tryskell

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.