コード例 #1
0
ファイル: EventInstanceManager.java プロジェクト: opencat/Nin
  public final void registerCarnivalParty(
      final MapleCharacter leader, final MapleMap map, final byte team) {
    leader.clearCarnivalRequests();
    List<MapleCharacter> characters = new LinkedList<MapleCharacter>();
    final MapleParty party = leader.getParty();

    if (party == null) {
      return;
    }
    for (MaplePartyCharacter pc : party.getMembers()) {
      final MapleCharacter c = map.getCharacterById_InMap(pc.getId());
      characters.add(c);
      registerPlayer(c);
      c.resetCP();
    }
    final MapleCarnivalParty carnivalParty = new MapleCarnivalParty(leader, characters, team);
    try {
      em.getIv().invokeFunction("registerCarnivalParty", this, carnivalParty);
    } catch (ScriptException ex) {
      ex.printStackTrace();
    } catch (NoSuchMethodException ex) {
      ex.printStackTrace();
    }
  }
コード例 #2
0
ファイル: EventInstanceManager.java プロジェクト: opencat/Nin
 public void registerParty(MapleParty party, MapleMap map) {
   for (MaplePartyCharacter pc : party.getMembers()) {
     MapleCharacter c = map.getCharacterById_InMap(pc.getId());
     registerPlayer(c);
   }
 }